“How did you learn to code?”
I often get asked how I initially learned programming… to which the answer is sadly that I’m not completely certain. Although I’ve always been fascinated with making things, I’m uncertain when it finally clicked that computers could be used for things other than playing Prince of Persia. It’d be nice if I had documented my efforts to learn, but I didn’t. Sorry, world… I failed you. However, my deplorable memory need not be an impedance, as long as others document how they learn. Consequently, I’ve badgered a rather bright friend of mine, Joseph (a designer) into making a diary of how he’s learning to program. What follows are his thoughts:
“This will be very difficult at first, but stick with it. If you go through this book, and do each exercise for one or two hours a night, you will have a good foundation for moving onto another book. You might not really learn “programming” from this book, but you will learn the foundation skills you need to start learning the language.” - Zed Shaw.
They may not seem like much, but those are the words that comfort me as I take my first programming baby steps. I’m a graphic designer and I’ve always loved making stuff. However, like many designers, I felt doing that on paper and Photoshop or (insert a design software of your choice here) was enough. Then two years back, I came across the world of web design. Fun, challenging and rewarding but there was one problem - code, lots of it. It took quite a while to get my head wrapped around HTML and CSS. Aside from the load of crap learning materials you have to wade through, there are too many opinions on how to do stuff for the web, it makes it quite hard for a beginner to sail smoothly. Thanks to some people who had a lot of experience building web stuff, I survived. I still prefer handing over my Photoshop mockups to much more dedicated devs :).
As I’m in my early stages of learning the challenges have been pretty easy to scale at this point. Being a little scared of math, I was a bit worried when I realized I’d be dealing with numbers and operators, but after a few exercises I’ve become more comfortable. Format strings also seemed like a problem at first, but those too have come around after I got a table with a list of them and the function each performs.
I’m curious to see how Python improves my workflow, from building quick prototypes of ideas to writing scripts that help automate stuff on desktop apps I use daily, especially Photoshop which is where I spend most of my day, every day. Although Photoshop doesn’t natively support scripting with Python its COM interface fixes that. It excites me to know that in a few weeks or months, I’d be able to write scripts for tasks I repeatedly carry out and have them run just by typing shortcut keys.
My primary guide, Learn Python The Hard Way, strips Python to its very bare form and lets you get your hands dirty with code very early into reading it. I find that really interesting and rewarding. There’s also the emphasis on research as the author makes you look beyond the book for more information.
Over the coming days and weeks, I’ll post updates on how well I’m doing.
I’m adding skills I never thought would be useful, using the Windows command prompt is a good example. I’m also collaborating with micrypt on this article through GitHub, a platform that never seemed useful. Also, I have no excuse to back out, especially when I know there might be someone (more hopefully) out there waiting to know how well (or “badly”) I’m doing. :)
gedit for editing code. Windows CMD compiling and running (my OS is Windows 7).