It’s officially the beginning of my third week at Hackbright working on Python. There has been ups and downs, some days (and nights) of pure nightmares, literally (quoting one of my classmates, “I dreamed that a python ate me last night”!), and some days of awesome state of “flow”, when hours seem to fly by and lots get done.
I begin to realize I am approaching this 10-week course less as a syntax crash course, more of a training of the mind. Many hackers eventually build in other languages, but mastering one allows great agility in picking up new ones. The mental fortitude in a great programmer is highly a transferrable skill, one which I admire and aspire to achieve. So far, I have observed a few mind- or life-hacks to learning to program.
1. Take ambiguity in stride.
The art of programming is the skill of controlling complexity. The great program is subdued, made simple in its complexity.
Earlier last week we worked on the Markov problem. Starting with the bare basics of lists and string manipulations, I was able to move step by step and eventually not only solved the problem. Some of the classmates even created several twitter bots.
Perhaps many beginner programmers, myself at least, have the tendency to think too far ahead, or to find the perfect, shortest solution. Focusing on one single small problem, tailoring solution to a single case first, actually provides more understanding of the problem itself and turns out to be much more effective in solving the bigger problem.
2. Draw it out, talk it out.
John Dewey was quoted to have said, “A problem well stated is a problem half solved”.
I would take it further that stepping away from the computer (as suggested Rick Hickey’s Hammock Driven Development), and removing any digital distraction, is highly instrumental in attacking a problem. Social media and instant messaging on the phone reduces attention span; 18-24-year-olds are reported to send up to 110 texts per day, that is an astounding distraction of a text every 7 mins of waking hours!
Most of the solutions take time to structure - I find it useful to stretch out on paper or whiteboard.
Pair programming, a technique we use everyday in class, is another excellent practice. It ensures discipline (it’s hard to check Facebook or your email when your partner is looking at the same screen!), strong communication (describing clearly what you are doing) and collaboration (cross checking of errors real time).
3. Keep shipping.
The computer programmer is a creator of universes for which he alone is responsible. Universes of virtually unlimited complexity can be created in the form of computer programs.
― Joseph Weizenbaum, Computer Power and Human Reason
Ex googler Pamela Fox dropped by to chat with us last Monday and shared about her extensive collection of mini projects. I particularly liked Translation Telephone, a web app that translates the message to 20 random languages using Google Translate and finally translates it back to the original language.
I can see that programmers develop the eyes of spotting problems in daily lives. And what better way to get into the rhythm of spotting and solving problems than through getting feedback from users (even if just a few)?
4. Be involved in the community
Like what I experienced in the overall startup community, giving and learning from the community is crucial. Not only is it highly motivating to see what fellow classmates did, be it a game or a tweetbot or a muni arrival notification app, hackers are strong believers of sharing what you make and your experiences. Github, stackoverflow, hacker news are all built upon the mindset of community credits.
Programming is by no means an individual pilgrimage; seeing what others are working on and helping/getting help from others can make learning much more fun and rewarding.
What are other tricks do you have to learn programming? I’d love to hear your thoughts and experiences in the comments :)
Photo Credit: Front Creative