Learning to code

(Preamble: I talk about GCSE this and A-level that a lot in this post. For those unacquainted with English patterned education, GCSEs are equivalent to American high school diplomas and belong in the set of school leaving qualifications. A-levels are equivalent to AP courses and the IB diploma, and belong in the set of university entrance qualifications.)

Unlike the majority of people, my first proper programming experience came when I entered a GCSE computer science for the first time when I was 13 (normally GCSEs start at 14 but the school I went to was weird like that). Having just moved from the US, I was with new people, new teachers, strange uniform, different culture, etc, and it’s within this context that I first opened up Eclipse and was told how to write my first Hello World program in Java.

Yes, Java was my first programming language. For some reason, my school taught Java to GCSE pupils even though the GCSE curriculum only requires a knowledge of procedural programming. If you are reading this to see how someone else took their first baby steps at programming, then please take my advice and learn something like Python or (if you like making things hard for yourself), C. Java is really only useful if you are learning object-oriented programming (in fact, Java is used by many universities to teach OOP), and even then, C# is probably more useful and powerful than Java, and is very similar to Java (When I was 15, I did a week’s work experience at a local software company where I used C#, and it felt very familiar to me even though my only experience was with Java)

Anyway, at the beginning of my journey with programming, I struggled, big time. I remember constantly forgetting how to print to the command line (albeit System.out.write() is super verbose compared to most other languages where you simply write print() or printf()), and I just thought, “I am never going to be able to program in my life”. Lesson by lesson, we would go through things like if-else statements, while loops, for loops; and it would make sense in my mind, but actually implementing basic programs felt beyond me.

This feeds into a second piece of advice to people learning to code: you need to practice. I feel as though if I had spent, let’s say an hour per day after school just programming and trying to solidify my learning, I would probably become much more proficient than I am at the minute.

I eventually became a decent enough programmer for the level needed for GCSE computer science, and I decided to take A-level computer science, as I saw myself taking computer science at university. The A-level expands on the GCSE content, namely by introducing object-oriented programming and various data structures such as stacks, queues, etc. Now I took A-levels at a different school, and this school taught its CS curriculum in Python, so I ended up in the truly bizarre situation of having learned procedural programming in Java and OOP in Python (hence my advice earlier).

Now learning about data structures in the A-level is fairly sound in theory, but in practice, I came out with very little intuition on when I should actually use stacks, queues, etc. As a result, during my (self-imposed for Very Good Reasons1) COVID gap year, I actually haven’t done too much programming, and I struggle to start any programming project. University will probably give me a kick up the arse in this regard, and there are useful things I can get on with in the meantime (ie: this blog, working through Velleman’s How to Prove It, etc.).

This feels like a ramble so I will end it here. Learning to program is a road that I am certainly not done with yet, but I think it is very rewarding and if you want to start following this path, then you probably should. It’s just worth bearing in mind that you need to put in some effort, and you need to be consistent about it (unlike me).2


  1. In April 2020, I figured that going to university in 2020 would be a fool’s errand because while the universities were promising ‘blended learning’, I felt that sinking thousands of pounds into tuition fees and accommodation was not going to be worth it as I thought that COVID would come back roaring in the autumn and winter (spurred on in part by university students moving to university), and so I would end up stuck at home, encumbered with online lectures and uni work while not getting any social benefit out of my first year (which is 90% of the point of university if you ask me). Two lockdowns and seven months of staying at home later, I feel smugly vindicated. ↩︎

  2. This advice probably applies to learning anything really. ↩︎