First projects

One of my online friends has started learning programming in C++ and Python a few months ago. While he seems fairly competent in it, he was complaining that he feels he hasn’t acheived anything worthwhile in it. He said he just can’t think of anything useful to make.

This reminded me of when I was starting out (and again when I was starting out with Javascript, and again with PHP, and again with… you get the picture). Like him, I also struggled to think of something to make. My first trivial program was a Java clock applet when I was 13. I saw one on another site and decided to make one for my own. My first non-trivial program was a social network, written in PHP when I was 15. Two years to think of an decent idea that I could keep working on until completion.

I think the problem with beginners projects by self-learners is one of overreaching. I’ve certainly done it a lot. If they try to write a social network, they want to write Facebook. If they write a forum, they want to write vBulletin. If they write a game, they want to write Fallout 3. All of these were written over a significant amount of time by large groups of people.

My advice is this: Start small. Reduce whatever you plan to build to it’s basics. A social network can be reduced to users who can add friends, edit profiles and leave comments on other’s profiles. A forum can be reduced to users creating threads and posts. A game can be something like Pacman. Implement these basics. When you have them done, you will have enough motivation to get the rest of the stuff done (login, logout, etc.). While you can’t assume designing a successful product is as simple, as the linked blog post shows, designing a beginners project to practice your coding is easier than designing a product to base a business around.

Despite not being quite that simple, many successful products are based on simplicity. Compare Twitter to Facebook, punbb to vbulletin, Google Chrome to Firefox. Simple and fully-featured are two equally valid design strategies (although I tend to favour simple products myself), but simple ones are much easier to get going.

Once you have your basic program written, you can then add features to it. You could add image uploads to your social network, bbcode to your forum or extra enemies to your game. Further again, you can add groups to your social network, tagging to your forum, and new level types to the game. Since you already have a working base to start from, it’s much easier to look at it feature by feature, instead of waiting ages until you have anything that works.

  1. You could write something that you need yourself and cannot do with existing programs. My friend needed to convert a lot of text files from one encoding to another. He found no tool for this task, so he wrote the converter himself. It was a short program, but he had to learn about code pages and UTF-8 structure, which was useful for later projects.

    Rewriting a large existing program is a bad idea. Just write something small for your own usage. Later it may evolve into a larger program useful for other people.

  2. That was handy for him, but how often do you find a task you need to do, that can be easily done?

    And again, the point is not rewriting a large program. Rewriting phpBB, or Facebook would be a large program, but a basic forum, or social network wouldn’t be.

    It wouldn’t be hugely successful, or feature packed, but it would be writeable.

  3. A basic forum or social network are nice projects for a newbie, especially if it suits your needs better than the existing software (it’s a great motivation when you see something unhandy or slow, and want to rewrite it).

    I could add that there are a lot of practical tasks such as converting from one format to another, filtering comment spam, calculating interest for a bank deposit, etc. These tasks don’t feel as “cool” as writing a CMS, but they are, in fact, more interesting from algorithmic point of view. A simple social network or a forum is basically a specialized web interface to database. It just saves and shows your posts (comments, profiles, list of friends, status updates, etc.) without doing anything interesting with them.

    Sometimes it’s useful to return to the idea that computer is a number-crunching machine (not just a tool for chatting :) , and write some algorithms.

  4. I certainly see where you are coming from, and yes, those are also quite good as projects. Maybe I’m just restricting myself to ideas that cater to my short attention span :P

  1. No trackbacks yet.