Learning to Code

So I’m 30-something, I recently completed a teaching qualification and in September I embark on a Master’s degree in Computer Science. Since I don’t currently have any teaching work, I’m spending my summer creating lesson plans, writing teaching articles and, before-all-else: coding! Truth is, I know nothing about Computer Science! I totally cheated on the Computer Science entrance test – shhh! But, it’s ok cause I have two solid months to learn this stuff before the course starts.

I wanna let you guys know if you want to learn coding, if you want to be a computer programmer, if you want to be a tech nerd, then you damn well can be! :bangs fists on table: Hell, if I can do this, anyone can! This is like quantum physics to me but I have an offer letter from a pretty decent university in the bag. I know, I know, the “cheating” thing… Do we really have to keep bringing that up?

Anyway, people try all kinds of fancy methods to learn stuff but any kind of learning boils down to this sacred rule: get the damn shit in your head! The best way to do that is through rote learning. In the West, we notoriously hate rote learning, instead preferring holistic methods involving “feelings” and “journeys”. Meanwhile, over in China where rote learning is common, they slay the rest of us in pretty much all of their subject pass rates. Coincidence? I don’t think so!

My main method of learning to code is: code, code, code. I see code (on a website, in a video, in a book, on the back of a toilet door…); I write code (in NetBeans, txt files, or in my bad-ass coding notebook). I don’t know what the hell these codes are or what the hell they do, I just write them. Sometimes I’ll open a text document and just copy out a simple programme over and over and over and over. You have to engage with new knowledge around 70 times before it enters long-term memory.

Don’t let that depress you! Go eat some chocolate… Feel better? Good!

Look, rote learning doesn’t have to be boring: it can be like a challenge: how many times can you type out the code in 5 minutes? How fast can you write the code 20 times? Can you think of different ways to write it?

Immerse yourself in the code; learn to love it.

As you keep writing codes, things will gradually start to make sense. Almost like learning a new language (well, it kinda is a language!), you’ll notice certain “words” keep popping up, and you’ll start to learn the grammar and syntax rules (yes, computer languages have those!). Don’t be afraid to experiment with codes and make lots of mistakes, that’s an essential part of the learning process. Also, don’t worry that you have no clue yet. Sometimes we get put off learning because we think we need to know all of everything right now.

When I stopped worrying about the “why” and “what”, I started writing much better codes. There’s this guy over at Simple Programmer who says “trust the process”. That would be my advice to anyone about anything at all in life, ever. Any learning is hard initially. Don’t sweat it, just keep coding and one day you’ll look at the screen and think, “Woah, did I just write that?!”

A Beginner’s Thoughts on Python

What?! That’s exactly what pythons look like… I’ve seen ’em!

Anyway, so I’ve recently started learning Python (the coding language, not the snake) in the hope of being able to apply for a Data Science MSc (because I was denied everything else I wanted to do) in the summer (4 months away!).

Because there are so many computer programs and interfaces, I was initially told…. Hmm…. Can I remember? I think I was told to learn Java, which also means learning Eclipse or similar, then it’s like “No, no! Learn MongoDB” Now MongoDB is a NoSLQ database… to me, at this stage, it all involves code therefore I struggle to tell the difference between interfaces, databases, code languages and whatever else you nerds got over there in Nerdsville. This is not my world (yet).

And there really are so many different “things” in the computer programming world. Looking at a list of coding languages and interfaces recently nearly knocked me sick. Then there’s not just coding languages, there’s also modified coding languages like you have Python and Java but then they had some babies including Jython and Jython++ and JythonMCQ and Jython GeoM – I’m making these names up cuz I can’t remember the real ones but you catch my drift, right? This kind of thing looks very scary to a newbie.

Coding was a big deal when I was a kid. Every dork I knew was doing HTML and C++ (whatever they are…). I should have joined them but I was too busy obsessing over pop stars. One guy I knew back then is now the founder of some fancy IT consultant company. And I hate his successful a$$! :cries:

So anyway, I started with Java then moved onto JavaScript because MongoDB’s natural coding is very similar to JavaScript but then “No, No! Learn Python!” So now I’m learning Python (the language, not the snake! (I swear, it’s all the same to me at this stage!)).

I’d like to take a Computer Science path that involves working with Big Data databases because that interests me (yes, even though I know nothing about it, thanks for reminding me!). I just like organizing stuff… my happy place is a massive library where I have to alphabetize all the books. Anyway, as with languages, there’s loads and loads of databases (another list that will knock a newbie sick). People keep mentioning “Hadoop” to me which I keep calling “Hadloop” and it doesn’t mean much to my newbie ears except I think it’s an elephant, and erm, it’s grey? Maybe it’s a S….L……..- S……Q……L…? Forget it, I have no idea!

Well, anyway…
I was actually reluctant to learn Python because I’d heard junk about it and had already been around the houses with other languages. But having started with Java (which I kinda liked but meh…) and then doing JavaScript (which I kinda liked but meh…), Python is the language I’ve been looking for! It’s like Goldilocks and the Three Bears and Python is my “just right”.

I have no idea what it does, or what it’s supposed to do, or what I can do with it. But it’s a great starter language because unlike Java you don’t need all these complicated twiddly bits;
(like the semi-colon);
you just type and go.

It’s a very “common sense” programing language. With Java, it’s like you have to explicitly state everything you want to do in minute steps, it’s not able to interpret what you’re getting at or use common sense.  In Python, the coding is much more streamlined than Java. It’s easier to read, interpret and execute, making it a good beginner language.

Currently I have quite a few Python tutorial I’m going through one-by-one but I have started with Hands On Python by Dr. Andrew N. Harrington (available here). I think it’s for a slightly older version of Python than I have but that’s not caused me any major problems so far. It comes with (via a link) downloadable example programs (programs…? Code…? Stuff…? It’s all the same to me!) which you work with as part of the tutorials.

Like the title suggests, it’s very “hands on” and as a kinesthetic learner who is not good at reading long texts, I find this book to be very user-friendly, beginner-friendly and it gets you coding right away. Some of the Java books I used to read were not well-written for newbies, giving limited explanations and assuming prior knowledge and harping on about things you don’t need to know unless you’re the CEO of a computer company. Hands On Java lays everything out in a simple and clear format.

So yea, I have a long way to go with Python. At the moment, I only get about 3 hours a week with it (because: busy!). The basic code I’m reading makes sense to me, I can execute other people’s code (by copying it out), and write my own super-basic code. The challenge is creating my own more complex code or copying other people’s code from memory. Ideally, I need to be able to do that by summer if I want to have a shot at the Masters course.

Anyway, I’ll post an update as I go on.