Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Like the title says, what is the best way to learn programming if you've never done so before? Should one start explaining variables, sequential execution, objects, algorithms; where does one start? Of course, this may differ from person to person, but maybe there is a best "average" way which helps the most amount of people on average.

I myself don't actually remember the time when I started programming, which is why I'm interested of this. Also, I've often wondered how programmering to newcomers should be taught in the best way.

share|improve this question

closed as not constructive by gnat, MichaelT, Martijn Pieters, Giorgio, BЈовић Feb 10 '13 at 23:24

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

Go to school, take online courses, read books, speak to fellow programmers, try it out? I think explaining how to learn programming is the task of a book or a course, not of an answer on programmers. – Giorgio Feb 10 '13 at 22:59

Well, start programming?

Ok, if you need advice books and tutorials for languages might help, but isn't it all part of programming, even after 10 or more years of doing so?

So to start :

  1. Choose a project, something that is simple, like a very simple (textual) game, or a (textual) agenda tool.
  2. Choose a language. For this one, a lot of people say Python is an excellent first language, but you can find other languages that might fit your project. Python is good choice. If you have no idea, use this one.
  3. Program. Start reading about the language and see what you need to do to get your project done.

Through the process of searching and learning you'll progressively get to the point you feel confident about what programming is about. It's all about experience, once you've got objectives and tools set.

I started programming because I wanted to make games. I think having a kind of specific project to build using programming might be the most powerful motivator to start and keep up for a long time.

share|improve this answer
Agreed.... best way to learn programming is to pick a project and start working on it. – Rachel Nov 24 '10 at 13:44
you cannot learn to swim by reading about fish; get in the water. It doesn't matter which lake (but stay close to shore at first) – Steven A. Lowe Nov 24 '10 at 15:32

My girlfriend had never programmed before and expressed interest so we picked up Head First Programming from Head First Labs (O'Reilly) and she ate it right up, picking it up very quickly. Within a few chapters she was asking me fairly complex questions about how programmers think and approach problems, which I took as a good sign.

The book teaches you the basics of Python, a language that's both reasonably modern and fairly accessible, providing a solid baseline understanding of programming concepts without being too cryptic.

While going through the book she was inspired to start a somewhat complex project (and did so), which I also took as a good sign. Before she'd even finished the book she went out and bought Head First Java, ready to move on to more complex stuff.

That's certainly one good way to learn programming.

(Note: I have nothing to do with O'Reilly or either of those books. I just saw the approach work quite well for someone who was a complete newb.)

share|improve this answer
Lucky. If I even mention the word 'byte' around my wife, she screams and runs out of the room with her fingers in her ears. Needless to say, we don't talk a lot about work. :) – Neil Nov 24 '10 at 15:35
I am incredibly lucky, agreed. She loves playing designer/euro boardgames as well. I may be the luckiest geek in the world. :) – Matthew Frederick Nov 27 '10 at 18:30

I learnt swimming very quickly thanks to the father of my best friend. He throwed me in the pool ;)

See my previous answer on the subject.

share|improve this answer
Haha! Well, that's one way to do it. XD – gablin Nov 24 '10 at 12:08
+1 because a strong motivation speeds the learning process greatly – Gary Rowe Nov 24 '10 at 17:01

The best thing would be if you have a real need to learn programming. When I was doing my PhD (in seismology), I started to write a program for precise measurements using a computer and an analogue-to-digital converter, and I really needed to do it well and fast. Surprisingly (for others, not for me) I decided to continue my carrier as a software developer.

It is very good, if there is a person, who can answer your questions, when you are starting. But the main thing is to know what you are doing and why.

share|improve this answer

A good way to learn programming is to head over to Codecademy (, pick a language, and start going through the exercises. It's fun and it teaches you the basics of programming in a way that you can apply it to other languages/frameworks if you wish. This way you won't have to worry about when to learn what topics, if you follow through and complete a track for a language, you should learn a great deal about programming.

After that, go to github or a similar site and find an open source project to contribute to. At the very least, you could fork a project that interests you on github and mess around with it.

share|improve this answer

Have a look at scratch. It allows a LOT of kids to program without having to do all the tedious things:

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.