Wilduck
Wilduck

Reputation: 14096

Toy projects for new programers

When I was first started teaching myself programming, after finishing a tutorial I would feel like I still couldn't do anything in the language. So, I looked around to find something to work on. Since I had just learned a few of the basics, the amount of work involved in finding, reading and adding to an open source project seemed insurmountable. Instead I started on a couple toy projects, which ended up being incredibly beneficial.

Having seen a lot of questions from beginners similar to "what should I do now?" and a lot of answers similar to "start working for an open source project" has made me think there has to be better advice for a new programmer. While working on an open source project surely gives great experience, there is a perceptible barrier to entry.

Instead, I think it would be great if new programmers were prodded towards working on a toy program related to some interest they have. Since there are so many directions that programming can take you, I think it would be interesting to list some simple (but fun/rewarding) projects grouped by the direction the new programmer is looking to pursue. Such as:

Game Design:

Write a text adventure (like Zork)

Natural Language Processing:

Create a program that writes meaningless, but grammatically valid essays.

Upvotes: 4

Views: 2667

Answers (4)

Sean
Sean

Reputation: 623

Start by writing a Blackjack simulation. Choose whichever strategy you want for the first run.

Next, start adding additional runs for different strategies like hitting/standing when your hand's value is 15 vs. 16 vs. 17 vs. 18, and whether the hand is soft or hard (an ace's value being counted as 1 or 11). The dealer's strategy will be constant, as they really are in casinos.

By the end, your program will run, say, 1000 instances of each strategy combination. It will print out a summary of the rate of hand wins (percentage of times you beat the dealer) for each stand value and hard/soft combination.

This is easily one of my favorite projects I've done and it can really cement some techniques in the language of your choosing. Plus, if you have the initiative to start learning some of the (fairly simple) discrete math that's involved in coming up with the odds of these situations as a side project, you can come away with an even better experience. Who knows, maybe you could ditch this computer stuff and take up card counting?

Upvotes: 0

Kiril
Kiril

Reputation: 40345

I actually think that a TopCoder approach might be better... programmers can still pick topics of interests, but they're actually working for a prize on a REAL project and they get feedback. Frankly speaking, TopCoder is a bit of a bloat and as far as I can tell, they don't allow people to make free competitions. It would be great if there is a TopCoder/StackOverflow type of site: people can submit code, get voted on their implementation and just have a good time!

I'll even pitch my idea, I'm starting to work on my own version of TopCoder/StackOverflow hybrid monstrosity called MyDevArmy (although I have not done anything so far except buy the domain).

Upvotes: 2

mcandre
mcandre

Reputation: 24602

Write a program which renders Wolfram automata (esp. Rule 110).

See YelloSoft for example code.

Upvotes: 0

Adam Shiemke
Adam Shiemke

Reputation: 3742

I recently asked a similar question (Diverse resource of problems to show merits of different languages) and got links to sites that provide problem sets, as well as validation. Check out:

http://www.codechef.com/

https://www.spoj.pl/problems/classical/

http://wiki.python.org/moin/ProblemSets

http://projecteuler.net/

Although these problems don't oftem amount to projects, they are still interesting. I'm interested in seeing what people come up with here.

Upvotes: 4

Related Questions