Learning to program is difficult without good goals, and academia has been pretty good about making things fun for me. I have been asked to author a series of articles for introductory programmers to get them up to speed and maybe even show them some of the interesting aspects of software development.
Below is a list of interesting labs that i have come across and been asked to do. They are in no particular order, and more than that they are of mixed difficulties. You should be able to implement these projects multiple times and see changes over time as you learn more about programming.
- Frequency Charts – Count the frequency of words or characters in a given document, output the chart to the screen/a file as you see fit.
- Implement with a linked list, standard array or doubly linked list
- Add sorting based on frequency or alphabetical order
- C, CPP and Perl are fun
- Arbitrary File Generator – At one point i was asked to create an uncompressible file for testing FTP transfers. The files contain randomly generated characters, with absolutely no upper limit (beyond that of the operating system.
- This was most fun in Perl, although implementing it in C/CPP was fun as well, and faster =) The upper limit of my testing was about 4GB, and it took ~ an hour and a half to write it.
- You should be able to do some advanced file IO.
- Randomization is something worth noting. Its not as easy as you think. and randomizing every character is not realistic for files over a megabyte.
- Maze solver – One of my favorite Data Structures labs, you are given a maze, all text formatted and you have to find a solution to it.
- You should look into a Stack structure for this, implementing it in Perl is pretty damned easy, but C is really cool. it requires a bit of work to get your mind around the concepts but it is fun to watch.
- Convert a BMP to Black and White – Open a color BMP and convert it to black and white, it is even cooler if you are able to convert 24 and 32 bit files with the same application.
- I implemented this in ASM, but this was a ton of fun and actually requires some math for the conversion.
- You will find some fun and games to be had with reading the file in. Things that come into play include Memory Alignment and Structures
- One thing that i enjoy beyond most everything else is Pointer arithmetic.
- Light Switch – All about bitwise arithmetic and manipulation, this is similar to the concepts behind the elevator problem seen in most OO Development books, but you don’t need to do it in OO.
- Bit manipulation is awesome, but not as simple as i make it sound.
These five labs are a sample of what i have accomplished in academia, i assure you this is only a small sample and i will be including more in the future if there is a calling for it.
Enjoy your coding and if you have Labs you would like to share please leave them in the comments below. If you would like to have the actual description/specification for the labs above i have all of my labs and can surely post the application spec’s here.