Random Hackers by jpbader@flickr

Random Hackers by jpbader@flickr

There’s one short answer to this question, and one long. The short is: “No.” The long, well, that will take some elaboration. I was recently collecting some introductory material on programming for the new students who are arriving this fall and these are my top five ideas on how to learn how to program.

Work hard
Programming is highly practical. Your job is to transform words of English (or any other spoken language) into a language that the computer understands. The tricky part is that the computer has, compared to human beings, very limited interpretation skills. Surely, artificial intelligence is growing steadily, but it is far from ready to understand syntactical misspellings and so forth that you eventually will make as a programmer. Practicing, learning-by-doing, is the key to understand the wonders of programming. One awesome thing is that once you’ve passed the first barrier, the other is just next door and then there’s a world of possibilities.

Connect with reality
Find things around which you can relate to. While I was working as a Java supervisor I tried everything from apples to CD-racks. Those are tangible, things you have in your house, but most importantly things you already know. Ask someone for help if you have a hard time imagining what, for example, a heap looks like.

Love errors
I think the first thing we should teach people who are new to programming what a stack trace is. Irrespective of what programming language you’re using, there’s a huge chance the answer to what’s going wrong is in the stack trace, or error output. Be prepared to fail, and to learn from your mistakes.

Don’t read a book
Well, do that too, but there are few books to my knowledge that suits students with absolutely no programming knowledge. The best book I’ve found is called “How to think like a computer scientist” by Allen B. Downey as he starts at a more conceptual level and then slowly moves into the Java programming language. Most importantly, however, start filling out that blank white sheet with some code!

Learn from others
Work two and two. Find a friend who’s also new to programming and sit down together. Attack a problem, discuss, test, fail, discuss again, and change. Read other people’s code. There are plenty of open source projects out there where the code is freely available. Inevitably some of it will fly over your head, but study the details and you will soon see similarities. Once again, it will require hard work.

All of this may sound so simple when reading it. It is not. That is why I cannot teach you how to program.

Happy hacking!



2 Responses to “Can you teach me how to program?”  

  1. 1 klaar

    I remember reading the Python version of that book ages ago, great read. :)

  2. Another cool thing could be to do some “unofficial” Coding Dojo thing, just for students (think geek party/event)
    http://codingdojo.org/


Leave a Reply