This article is hosted on my medium. I’ve posted it here as well for convenience.
Programming is hard to learn
I remember my first foray into the world of programming; I had decided that Objective-C would be the language I wanted to learn - iOS (or iPhone OS as it was known then) was an exciting new platform, and build apps for it was an exciting idea.
With copies of Learn C on the Mac, Learn Objective-C on the Mac, and Beginning iPhone Application Development at hand, I studiously went through the C book until I felt like I knew enough to learn Objective-C. Then I went through enough of the Objective-C book until I thought I knew enough to make apps.
But in reality I had no idea what I was doing - I had been following instructions and believing I understood them. The problem came to light when I got stuck for hours trying to call instance methods on a class. Oops.
I tried three times to learn Objective-C as my first language and failed every time. Based on the recommendations of some friends, I tried learning PHP.
Suddenly things started falling into place. I started off with some very basic sites - firstly a simple blog system, which started off procedural and was rewritten in an object oriented fashion, and quickly moved on to writing more complex sites using CodeIgniter.
So what changed? Was it simply that PHP is much easier to learn? Partly. Was it that I was trying to learn too much at once for iOS development? Again, partly. But what changed in my head?
Thinking like a programmer
This transformation was language independent. Even Objective-C made sense now, despite the struggles I’d had earlier - and learning a new programming language was orders of magnitude easier than learning the first one.
What changed was that I could think like a programmer. I’ve heard this phrase thrown around from time to time, but I don’t think it’s ever been defined clearly.
A programmer is someone who can structure solutions in their head in terms a computer can understand.
This is by no means a perfect definition. It doesn’t say anything about the quality of the programmer, or of the difficulty of the problem they’re solving. But in order to help people learn how to code, we need to understand what mental line must be crossed for them to become a programmer.
This was what PHP showed me - at first I just played with functions and basic logic. Then I moved on to an object oriented approach, and started to understand the different structural elements of the code I was writing.
Once the ‘programming line’ has been crossed, the rest comes so much easier. You can pick up new languages quickly, learn about the more theoretical aspects of computer science, and with enough determination, you can make pretty much anything you like.
As for me, I’m at a top University in the UK studying Computer Science, and have worked on a variety of projects, ranging from games to data analysis.
My journey is still just beginning; by remembering how it felt to not understand, I hope to help other people start their journey too.
If you’re just starting out learning to code and need some help crossing the line, contact me and I’d love to give you a hand. I’ll also be writing more to try and help others cross over into the world of code.