Category Archives: Programming

Posts about computer programming.

List Of Programming Project Ideas.

The best way to learn to program is to work on projects, so here’s some ideas for projects for beginners, intermediate, and advanced programmers. Remember: it doesn’t matter whether or not you finish these projects. What matters is what you learn along the way. If you have any ideas for things to add to this list you can email me at noahmartinwilliams@gmail.com with the subject “programming project ideas”.

Assembly:

  • A program that exits with return status 0
  • A program that prints “hello, world”

C:

  • A Linux kernel driver for a USB button.
  • A C standard library that has memory allocation using the buddy algorithm.
  • An arduino program that blinks an LED.
  • An arduino program which turns on a motor which closes or opens a window based on the temperature.

Golang:

  • A library that parses xml concurrently.
  • A Simple web server that serves up one html page.
  • A web server that serves up all files in the current directory.
  • A concurrent pipeline that reads in MNIST samples and uses image magicke to turn them into files, and maybe apply some optional filters.
  • A concurrent system that runs dijkstra’s algorithm.
  • A web server that uses youtube-dl to download youtube videos automatically, save them, and play them back to whoever owns the server.
  • A program that uses concurrency, and image magicke to automagically fix the gamma settings for a huge number of image files in parallel.
  • A reddit scraper.

Prolog:

  • A script that helps you pick out parts for a PC.
  • A simple package manager using an sqlite library.
  • A script that lets you access firefox web history and use readln to issue queries about it.
  • A script that acts as a pharmacist.

Haskell:

  • A program that takes an integer and tells you if the integer is prime using a parallelized brute force method.
  • A password cracker that uses the Control.Parallel.Strategies library.
  • A program that takes in an adjacency list as a CSV file and spits out an adjacency matrix.
  • A program that runs K-means image segmentation on it’s input using the accelerate library for GPU acceleration.
  • A neural network library that uses dependent types, and the accelerate library.
  • A program that can lazily generate all possible tweets.

Bash:

  • An rsync wrapper that backs up your files using snapshot backups.
  • A program that finds duplicate files in a directory and makes them the same file using hard links so as to save space.
  • A script that grabs a random line from a given file.
  • A script that renames every file to include the date and time it was modified in the file name.

Lex and Yacc:

  • An XML parser.
  • A C compiler.
  • A programming language that has all the features you wish other programming languages had.
  • A parser for the wavefront obj file format.

Erlang:

  • A simple web forum using the yaws program.
  • A gopher server.
  • A bank website.
  • A server that can serve up videos.
  • A Debian package server using this specification.
  • A mastodon web server.

Python:

  • An XKCD comic downloader.
  • A script that uses AI to draw googly eyes on images.

Octave/Matlab:

  • A script that uses rotation, scaling, and translation matrices to trilaterate the position of a thing given it’s distances to four given points in 3D space.
  • A neural network script.

Pytorch:

  • A script that can read a text file and summarize it using transformers.

Projects where you’ll have to decide on your own what language to use:

  • A program that reads in a wavefront obj file and displays it in a window, and the user can rotate the model around to see it from different angles.
  • A twitter client that uses ncurses.
  • A quick script or program that can generate the sound of what hydrogen should theoretically sound like when excited.
  • A remote controlled differential drive robot (note: this will require some knowledge of electrical engineering).
  • A program that argues with the user (bonus points if it uses AI).
  • Add a new feature to an existing project on github.com
  • A series of programs that enables you to create a genetic breeding model for machine learning.

How I Made A Wheely Robot.

So far I’ve had a policy of only making updates when I’ve completed a project, but instead I’m going to post an update of a project that’s still in progress since it would take so long to finish. Introducing: the wheely robot.
20160515_220806
Note that I’m not exactly the best photographer yet, but at least you can figure out that it’s a robot.

So what does it do? Well so far I’ve been working on it as a sort of experiment on how to program robots.
A problem that I’ve run into before with earlier attempts at building robots was that I might tell the robot to move forward some distance (like for example: one meter), and it would move forward, but if something was in the way, or its wheels didn’t get as much traction as it thought it was getting then it would stop too soon, and not realize that it hadn’t actually reached the goal.

The problem at its core was that the earlier robots weren’t aware of the kinds of the fact that when they try to do something, that thing might not have actually gotten done because of some kind of obstacle. That’s where the fancier kinds of programming come into play.

The first fancy programming trick is what’s called a “PID controller”. The idea is pretty simple: the robot tells its wheels to move forward at speed x, and there are sensors at the wheels that tell the robot how fast its wheels are ACTUALLY moving, and then that data goes to the computer which uses an algorithm known as the “PID controller” that adjusts to any variations in speed.

More info here:

This is a pretty simple way to adapt to problems, my robot uses wheel encoders to figure out where the wheels are, and they aren’t a very good way to get sensor feedback which is why I’m working on getting more sensors for it.

I’ve also added multiple computers onto it. One handles sensor data since there will be so many sensors on the robot in the future, and one controls everything. The two communicate via i2c. With fancier programming techniques I could someday get it to use behavior-based robotics to go around obstacles (more info here, and here).

I’m also keeping a github repo for it here which will hopefully have some useful info (note: I’ve made changes to it recently which I haven’t tested). I’ve also setup an amazon wish-list here that has (almost) all the parts I used (it as of this writing doesn’t contain the screws that I used to screw everything in).

I’m hoping to someday make this go throughout my apartment and pick up things off the floor for me before a vacuum robot goes through.

A tutorial on Maxima

I’ve recently found out about a programming language called “Maxima”.

Maxima is a computer algebra system, which means that it can do algebra (as well as many other kinds of Math) for you. Here is a tutorial on how to use it.

Note that I admittedly haven’t read the tutorial as I already know how to use Maxima, but the tutorial is on its sourceforge page so I’m just going to trust it.