Learning to program is not easy. Learning to learn to program is even harder. It’s easy to start learning, but even easier to get lost along the way. I have just written my first comment on the Coding Horror blog (by Jeff Atwood of Stack Overflow). It’s for this post. I wrote about how hard it is to go from “Hello World” to advanced programming, and how the post topic – programmers’ communication skills – relates to that. When learning to program there are few maps to follow and those few that exist are not easy to find. This blog is an attempt to create a map for myself as I try to find my way, as I get lost, as I get back on track, and so on. Hopefully someday it will start being useful for others as well.
I certainly hope many programmers will take Jeff Atwood’s advice and start sharing their knowledge and maps. Programming is a big and complex field, and it often takes a guide or a map to help you figure out how things are interconnected and how the pieces work together. There will always be books, and recently there are also some universities, like MIT, that put a lot of material online (see MIT Open Course Ware). But sharing directly, on the Internet, can help us see get insights from many valuable points of view and that’s interesting.
In case you are wondering why, on this blog, I am writing about certain subjects and not (yet) about others, I will explain. I am especially behind with the theory – I definitely should write about algorithms and data structures, just haven’t found the time yet. It’s been a year since I’ve returned to programming after trying other paths, and in the first months I had started with the theory (books and MIT Open Course Ware, etc), but after a few months I tried concentrating more on PHP, Python and practical web development. And the blog came much later. I am always trying to find a balance between theory and practice, and I hope that soon this blog will start reflecting that.
Click “continue reading” if you want to read 5 basic pieces of advice to fellows apprentices and more thoughts. If you have thoughts and advice of your own on this subject, I would love to read it in your comments! Thank you in advance. BTW do visit the new Stack Exchange (a platform for Questions and Answers site brought to you by the creators of Stack Overflow) for all your writing needs: http://writers.stackexchange.com/. You’ll find advice on common writing tasks we face everyday and beyond: from e-mails and making technical issues accessible, to actual short stories.
When learning to learn to program…
1) Take notes. Take better notes. Learn on your note-taking mistakes to learn making better notes on learning to code better. Your notes are maps, they will help you get lost less often.
2) Remember, as they teach at MIT, that often the bug is something more trivial then you think. Could be a typo. Check that you are running the same code that you are modifying. Don’t panic or question yourself every time. Keep a checklist of your particular common errors. Everyone has those annoying “oh, I’ve done that again” mistakes, apparently. It’s OK.
3) Read books about programming and books about learning to program, which luckily now exist. I’ll write a separate post about books later.
4) Don’t waste time arguing on IRC, no matter what. Sometimes you can get good advice on IRC. Sometimes you’ll even get answers from core developers. But if things go less well, breathe deeply and move on.
5) Program. A lot. Try to transform every little annoyance into inspiration for writing code, be it a simple script, an app, or something bigger. Some website you use has a lousy interface, and you click too much? Write a powerbrowsing script that scrapes the important parts and makes them into an RSS feed for you, for example. You repeatedly have to go through some steps to accomplish a task? Write a script. You have an idea for a program? Write a very simple prototype to start with. It’s better to improve something that you’ve actually finished, then to create something elaborate and perfect that exists only in your head. And this particular advice is not easy for me to put in practice:)
These 5 are just some things on top of my mind. I’ll continue thinking about this argument and will certainly write more well thought out posts about it in the future.
I’ve started learning programming many times since I was a kid – starting from copying “snake” games in BASIC on my ZX Spectrum. And I’ve even worked as a programmer in PHP before. But there are so many strange obstacles when it comes to improving your skills as a programmer.
There are subjects such as Regular Expressions or Databases, or even pointers, that are sort of surrounded by a cloud of fear so you convince yourself you won’t understand them before even trying. That fear is a real obstacle, and makes us concentrate on not making a fool of ourselves instead of on having fun learning something new.
Another obstacle that comes to mind is reading other people’s code. Programming goes from simple scripts to complex programs that are very hard to read, but you don’t find tutorials about going from scripts to complex. It’s like the world is divided between those who read others’ code and those who don’t, and as if they were all just born that way. I’m determined to learn to read other people’s code and learn from it, and will blog about it in the future. Any advice on how to go about that would be perfect! How do you approach a complex application? Where do you start? How do you map it, and take notes to help yourself find your way around? How did you learn? What was the first program you read? Any comments are welcome.
This time I am serious. This time I am serious about learning to program. And I’m also serious about learning to learn.