top of page
duet trumpet insects dtbg for web 600x600.jpg

Coding Training

I love Coding. There, I've said it. It really is one of the most useful and enjoyable skills you can treat yourself to. As test subject for the BBC Acorn education software, I was the very first child in the UK to learn on a personal home computer and, like most people back in then, I started with the programming language BASIC and moved on to HTML when the internet became generally available. Later, I learned CSS, JavaScript, ActionScript 3, XHTML, RegEx and finally PHP. I'm certainly no genius though, in fact I believe anyone and everyone can, and really should, learn to code.

Why Learn Coding?

For anyone considering learning a little Coding my first piece of advice is "Don't wait!". There's never been a better time to start and, when it comes to coding, your age really ain't nuthin' but a number. 

Why learn Coding?
Because it’s fun!

Coding is like a wonderful puzzle box that, once solved, just opens up to reveal another puzzle box. It can also be like building some crazy mysterious machine- all brass and crystal and strings. It can be beautiful and broken but then fixing it’s half the fun and sometimes you’ll have no idea why what you did fixed it or why it’s suddenly able to do amazing things you never intended it to.

the room coding image 1200x850.jpg

The more you tinker the more you learn and, as you grow to understand its mysteries, you’ll feel like some kind of wizard, seeing structure and patterns that most people find incomprehensible.

I’ve seen a few lines of code create hauntingly beautiful artwork, resolve business critical issues, reverse-engineer DNA strands, cut production times in half or just generate an army of self-replicating rubber-legged robots, each furiously engaged in a custard-pie fight inside a tumble dryer!

tesla image coding tm.png

Why learn Coding?
Becuase knowledge is power

Why rely on an “intellectual priesthood” of expensive digital gurus every time your site needs fixing? Say your boiler breaks. You wouldn’t want to fix it yourself but wouldn’t it feel great to be able to just fix a leaky tap without having to call a plumber?

Even basic coding skills will save you money and help you understand whether those you employ are pulling their weight.

Why learn Coding?
Because it’s easy

It’s easier than you might think to pick up a little coding and it’ll look great on your CV once you’re up to speed with even the simplest coding languages. 

 

Coding languages are just like any other language. You learn one and it’s easier to learn the next, and you don’t need to learn an entire language to get by in it. Sure, at times it’ll be frustratingly difficult but a game that’s too easy is no fun.

Did I mention coding really is a lot of fun?

coding header for linkedin article tm_edited.jpg

Which coding language should I start with?

A lot of people ask me "which language should I start with if I'm learning to code?". There's no single "right" answer to this question, which isn't very helpful, nevertheless here's a simple list that represents a sensible and achievable path to a career in coding:

  1. HTML

  2. CSS

  3. Javascript

  4. PHP

  5. RegEx, Python, C, Ruby, SQL, etc (advanced languages, depends on what you need to work on)

Fundamentals of All Code

As any of my learners will have found already, there can be a lot of jargon in Coding but I think this short list of the basic, fundamental components of Coding will provide a solid foundation for all further development, regardless of which Coding language you learn:

Computer Programming
  • 1) Comments
    Comments allow you to leave notes to yourself (and others) within your code. Comments don’t get run as part of your program, it’s really handy to be able to do this. The different Coding languages use different methods to declare a line of code to be a comment, for example: // This is a comment in JavaScript <!— This is a comment in HTML —> /* This is a comment in CSS */ caveat: https://www.xanthir.com/b4U10
  • 2) Integers
    An integer is just a whole number, any whole number (1,2,3,4…).
  • 3) Variables
    Variables are just a kind of receptacle for a value, be it a numeric value or a piece of text, or whatever. If you say “X=2” then “X” is the variable and “2” the value it holds, Refer to “X” in your code and you might as well be writing “2”. Using variables is really common in Coding.
  • 4) Conditional Statements
    Let's take the coding language of JavaScript as an example here. In JavaScript, If, Else, Else If and Switch allow you to create conditional statements, sort of like “If there’s whole milk at the shop then buy it, else get semi-skimmed milk”.
  • 5) Loops (like For and While loops)
    Example of a While loop: While loops execute a block of code as long as a specified condition is met. while (i < 10) { text += "The number is " + i; i++; } BEWARE!: If you forget to increase the variable used in the condition, the loop will never end. This may crash your program or cause a browser to “hang”, etc. You can make loops conditional, for example: for (i = 0; i < 5; i++) { text += "The number is " + i + "<br>"; } i=0 sets up the variable “i” to be “0”, the loops runs as long as “i” is less than 5, then it stops looping. So in our example here 1 is added to the variable “i” each time the loop runs. To put it another way; Statement 1 sets a variable before the loop starts (var i = 0). Statement 2 defines the condition for the loop to run (i must be less than 5). Statement 3 increases a value (i++) each time the code block in the loop has been executed (we say it "increments").
  • 6) Nested Statements
    You can put a load of “if” statements inside an “if” statement. if (condition1) { // Code here only executes when condition1 is true if (condition2) { // Code here only executes when condition2 is also true } }
  • 7) Arrays
    Think of arrays as like filing cabinets where you store a bunch of values. You can even get really fancy and create “multi-dimensional arrays”, which are basically just an array that itself stores a load of arrays, like a filing cabinet where each file contains another filing cabinet! In JavaScript arrays might look similar to these examples: var cars = ["Saab", "Volvo", "BMW"]; var cars = new Array("Saab", "Volvo", "BMW"); Don’t overlook the power of these simple code elements, they’re used in everything from database manipulation to games design.
  • 8) Functions
    You can write your own magic words in code! You define what you want to happen when you create the function then, every time you “call” that function by the name you gave it, all the code it contains will run. They’re really, really useful. Here’s an example that uses two number variables (v1 and v2), that are fed in to the function inside those brackets after it’s name (“MyFun”): function myFun(v1, v2) { return v1 + v2; // The function returns the product of v1 and v2 } Here “return” means that when you “call” the function in your code you might as well have written the product of the function. One great thing about functions is that, if the value of v1 or v2 is changed elsewhere in your code, the function doesn’t need to be rewritten or updated! It just spits out its result using whatever those new values were. Awesome.

Further Reading

This page of my site is based on an article I wrote over at LinkedIn.

If you've enjoyed reading, this you might like to read the original, and some of my other articles on LinkedIn, on the subjects of Webdesign and Cybersecurity:

Why Should YOU Learn Coding?

10 Top Tips for Web Success!

Ten Cybersecurity Tips You Really Need

bottom of page