Notes on Learning To Code

A general guide to self-teaching

Having taught myself how to code to build Streamplate a friend asked me,

Image for post

So this is my response that I’ve generalised because I think others will be interested.

As with any concept, its structure can appear imposing because of its unfamiliarity. Consider the following:

Image for post

With no understanding of electrical engineering let alone circuit schematics this is naturally confusing for anyone. Recognising that the confusion is a function of unfamiliarity is important in learning anything — because it points your attention towards the concepts that are out of your understanding.

Similarly, coding has the problem of being visually off-putting — because you don’t understand it — not because it’s inherently difficult to understand. They’re two separate problems and it’s important to repeatedly remind yourself that you always have the ability to change this state and learn how to code.

In short, coding is easy.

print "Hello"

Above is a simple Python script, program, code, whatever you want to call it. That’s it.

What makes coding easy is this:

  1. Write code,
  2. Run the code,
  3. See the mistakes,
  4. Fix the mistakes,
  5. Run the code again,
  6. Repeat until completion.

Not many other industries have an ability to simulate their task’s execution before delivery. That isn’t to say that there aren’t areas of coding that aren’t hard — the readership here is supposed to be those learning to code. There’s plenty of ways code can become hard through optimisation techniques, pursuing languages that are designed to optimally work with hardware and less so with programmers, managing networks of competing code — eg. web-servers and their networks and so on.

The point is that with coding you have the ability to fix any problems with relatively no cost — and so again, the burden is on your own willpower to do so.

Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post

Above is a collection of famous self-taught programmers: Margaret Hamilton, Dr. Grace Hopper, Steve Wozniak, Elon Musk, Bill Gates, Mark Zuckerberg and Franz Allen. Whatever you’re about to learn by yourself is infinitely easier than what they generally had to learn and develop.

Keep your perspective in check when you’re faced with problems during development — you’re writing a simple program, not the code for the in-flight software for the Apollo and Skylab missions (Margaret Hamilton — the woman next to the stack of pages — all code).

It should be obvious now that the most important challenge with self-teaching relates to motivation. If this crumbles or your own willpower falters, then there’ll be no drive to overcome some of the issues you face — and to a newcomer, they can be overwhelmingly brutal.

As for coding itself — as a general recommendation without knowing your personal circumstances, I’d suggest Python.

Coding is an interface — just like how writing on paper is our way of communicating to other people — this is how programmers speak to machines. And just like writing, there can be more efficient ways of speaking, whether that’s with slang, verbosity or abbreviations and so on, there’s different ways of programming.

The key metric for programming is speed — the faster it can execute, the more code can be processed and hence the computer has greater utility value.

Image for post

Some languages can be processed faster by the machine because there’s less interpretation to be completed — yet they can be harder for a programmer to manage. Languages like this are, C, C++ and (somewhat) Go.

Languages that are easier for programmers to manage and aren’t generally as fast to execute (albeit this is a generalisation, there are ways to nearly-match speeds with C) are primarily Java, Python, JavaScript. JavaScript is mostly used for websites and some server-side operations while Python and Java are quite versatile and multi-purposeful.

To learn how to use Python you first need a way to write code through an app. My recommendation would be either Visual Studio Code or Atom, both free.

After you’ve installed either of these, you can begin coding.

To get you started, these are my recommendations for forums/search engines that are general enough to accommodate most queries:

  1. YouTube — will provide video-based explanations and implementations of most of the problems/concepts you’ll encounter.
  2. Stack Overflow — one of the few industries to have such an exact Q&A forum with such reliability and accessability. A Google search with your problem will most likely produce results linking to Stack Overflow. In fact if you want to know where your first step is into programming — here it is.
  3. sentdex — a well-skilled programmer that works and documents really cool projects (using machine-learning for the cars in Grand Theft Auto 5 to become self-driving, financial modelling and web-crawling etc).
  4. Google — naturally this will produce a range of options to consider, but most of these will link to either YouTube or Stack Overflow.

Depending on your level of motivation I think there’s a better way to learn how to code, yet it’s much harder. It forces you to understand concepts and also produce ideas rather than simply following guidelines and in a sense, colouring in between the lines.

I’m an advocate for practical, parallelised learning. Rather than a serial implementation as many teaching systems follow, for practical-based tasks such as programming, the final result rests on the delivered product, not the ideas behind it. The idea with this type of learning is that the implementation isn’t necessarily perfect each time, but you’re learning more faster and at each epoch in your education, your general understanding has grown rather than a siloed section of a concept.

As such, I think it’s better to begin independently coding as quickly as possible because it’s not hard, coding’s difficulty is grounded in its unfamiliarity. Overcoming this as quickly as possible produces much better results. Secondly, there’s nothing to suggest that learning the theory or modularising the concepts has to be mutually exclusive. Thirdly, programming lends itself nicely to ‘trial by fire’. If your code doesn’t work — check the errors and fix your code accordingly.

So with this said, I think the best way to learn how to code is with a project in mind and exclusively pursuing this. If you don’t have one — then following this initially is a good start.

If you do have one, then you know the resources to use for any questions you have.

Good luck!

Be sure to sign up for Streamplate’s Limited Release launching on the 11th March!

I’m presently debugging some of the ~100,000 lines of Python, Swift and PHP code and you can follow my progress on Medium, or learn more about Streamplate on our Facebook or Instagram accounts.

Thanks :)

Written by

Electrical engineering/Neuroscience at University of Sydney. Aspiring neuro-trauma surgeon with a few software/hardware goals.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store