[tweetmeme source= “NoxDineen” only_single=false]
When I decided to teach myself how to program I expected it would take a couple of weeks, a month or two tops. After all, I was a wizard with BASIC back when I had baby teeth. Turns out it’s a little bit more time consuming, and takes more patience than I can usually muster. It also turns out the phrase “%#$@ this should work” gets more use than you’d anticipate.
But it’s totally doable, and definitely worth the time. You’ll start to see the whole Internet in a new and more interesting way, and making yourself think in a logical, ordered way is awesome exercise for your brain (especially if you’re anything like me and tend towards intuitive rather than rational problem solving).
Choose the right language
If anybody tries to convince you to start with a compiled language (Java, C, etc.) feel free to ask them outright whether they’re a sadist or just an idiot. Without a doubt the best language to get started with is Python. It has an awesomely straightforward syntax, and behaves in a delightfully elegant manner.
Gather your resources
Google has a great intro to Python class available for free online. It includes seven 30-60 minute lectures on YouTube and all of the files you’ll need to complete the exercises assigned as you progress through the lectures. If you want a more in depth intro to computer science, conveniently using Python as the learning language, check out MIT’s OpenCourseWare for twenty-four 1 hour lectures.
As far as code editors go, every single programmer I’ve asked has a different recommendation so it’s pretty clearly just a matter of personal choice. Editra is a nice option, with all the features you’ll likely need and not much additional bloat. It’s written in Python, so you can even write your own add-ons as your ability and confidence increase. Personally I’m a fan of Aptana, it’s pretty and it supports virtually any language you will ever want to work with so you can stay with an editor you’re comfortable with as you expand your abilities.
Focus on the small picture
Forget about the big picture, break your goal into the smallest possible pieces and remember to test each as you write the code. Finding a bug in a for loop is much less frustrating than waiting until all the code is written to test your program only to discover that somewhere, something isn’t working as expected. That sort of needle in a haystack situation wastes your time and can get wickedly demoralizing. (It does lead to some of the most inventive swearing you’ll likely do, though.)
Ask for help
I’m spoiled, since I live with a great programmer who has enough patience to walk me through any question I can throw at him. If you’re not as lucky, you can always crowdsource your questions. Every time I post to Twitter with the #python hashtag I get great help. The really cool thing I’ve discovered about programmers is that the vast majority of people who write code do it because they love it and they will jump at the chance to help you learn to love it too.
Stick with it
You’ll pick up the basics pretty quickly, but at some point you’ll probably hit a wall. Just keep writing a bit of code ever day, find some great blogs about programming (there’s a ton out there to choose from) and keep the faith. Not everybody is destined to become Guido Van Rossum (the creator of Python) but persistence and consistence will pay off.