views:

1082

answers:

16

I can not seem to find this exactly as a post, but what I am looking for is a list of exercises to help me get better at programming. Like Fibonacci sequences, temperature conversions, etc. A website would be great. Thanks for any help.

+5  A: 

The game of life is a good one

Joe
This is a fun exercise but it forces you to write some GUI code, which can get complicated in some languages. I'd leave this one for "phase 2," after you're already familiar with the basic language concepts and are ready to start learning libraries.
Outlaw Programmer
Not necessarily. You could write a single pass of Life that takes in an array representing the current state, and outputs an array representing the new state. For example, a file using `*` to represent live cells.
lacqui
+16  A: 

There are a lot of good more mathematical, but still require programming techniques, problems at Project Euler. http://projecteuler.net/

DeadHead
+5  A: 

I agree on Project Euler, but you may also want to look into the Code Katas.

Hank Gay
A: 

Your best bet might be to get a book on that particular language. A good book will often start you off with a specific programming goal and walk you through to implementation in that language.

RibaldEddie
That's a good start, but I find that I only begin to understand the gestalt of a computer language after I have used it awhile.
Robert Harvey
+2  A: 

I believe this link may be interesting to you. (lots of text, so I didn't want to cram it all down here)

ldigas
A: 

One thing I like to do is to write some kind of card game like poker or blackjack. It's a pretty simple project but you can get used to the languages version of some basic concepts:

  • Objects/Classes for things like Card, Deck (if your language supports it)
  • Some kind of enum pattern for suits/card values
  • How to separate library code (JARs, dlls, etc) from client code (the game itself)
  • Switch statements/polymorphism for determining poker hand types

I like these kinds of projects because you only write a few hundred lines of code and there's no need to learn any kind of business logic or framework or anything, just basic language structures and syntax.

Outlaw Programmer
+2  A: 

When I was looking into learning python the python challenge looked like a fun and interesting way to learn.

Shraptnel
+1  A: 

I would say to re-implement the last "real life" project (or at least a subset of it).

That way you already know the problem domain and what works and what doesn't from a logic perspective and can focus on learning the new language. Plus, it will more quickly drive you to see how the two languages compare and contrast by seeing what is easier in one or the other.

Nathan Voxland
+1  A: 

These 15 exercises may also be good for learning new languages

Roc
A: 

I always learned A LOT (AI, graphics, logic, etc.) when programming really simple computer-games (e.g.: Snake-remake) and many ScreenSavers just for fun. It's really amazing, that even simplest games (or ScreenSavers) can offer a lot of challenging questions/problems to solve.

A: 

What i do is get a good descriptive reference type book, look up forums where people are asking questions and try to research and post the answer for about 2 or 3 (then move up to 3 or 4 if you get through them quickly) posts in a day for a good week , maybe more if i run into an interesting dilemma .. but for the most part, you will be answering questions that you will inevitably be asking yourself someday and it is good to see the scenarios that these problems arise in. Try it out, i suggest it for anyone preparing to self-teach.

+1  A: 

Here's 15 exercises to Know a Programming Language - This list is much tougher than the one linked to by Roc, and going through it will give you a decent impression about programming in a programming language of your choice.

Yuval F
A: 

Write programs that implement classical data structures and algorithms such as lists, queues, stacks, trees, hashes, simple crypto and the like. Things you might already find in the library of the language.

If you have access to the source code of the library (like you do in .NET), you can compare your implementation against theirs.

Robert Harvey
A: 

Project Euler: "A series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve."

Octoberdan
A: 

The PLEAC project has been around for quite some time and I used it to learn things about Ruby based on my Java knowledge. http://pleac.sourceforge.net/

Mondain