Hacker News new | ask | show | jobs
by randomdata 5394 days ago
I learned to program when a misconfigured web server spit out the source code to the web application I was trying to use. At first it all looked like gobbledygook (it was written in Perl), but I was ultimately intrigued. The more I observed it, the more it started to make sense. I started by making modifications and testing their results and eventually had enough knowledge to build my own, albeit simple, application. It all snowballed from there.

What I took away from the experience is to jump right in to the most advanced stage possible and work your way back to understanding. Baby steps only serve to hide the big picture and ultimately hinder your ability to understand. This is something I have applied to all of my learning since that day and I feel it has served me well. I always struggled in a formal education setting and I found out why: They teach backwards.

When you are learning to cook you don't mix flour and water together and look at the scientific properties that cause them to interact the way they do. No, you find a delicious recipe and prepare the entire dish. Each time you subsequently make it you add a twist to see how it affects the overall taste. Eventually you start to increase your understanding how the pieces fit together and can begin to come up with new combinations of your own. You will probably want to know why flour and water behave the way they do, but that comes later.

In my opinion, the way to learn how to program is to start with a recipe (i.e. source code). The rise of open source makes that easy. Make some small changes of your own. Break it down to understand why the original author did what he did. Once you are armed with the basics, you can start to apply that knowledge to meaningful Google searches.