Why should YOU Learn Coding?

Why should YOU Learn Coding?

For anyone considering learning a little Coding (and all my learners keen to continue the great progress they’ve made already) here’s an article to provide some helpful information.

Why learn to Code? 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.

No alt text provided for this image

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!

Why learn to Code? Because 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.

No alt text provided for this image


Why learn to Code? 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? (click the image to play a game)

No alt text provided for this image
click the image to play a game

A lot of people ask me "which language should I start with if I'm learning to code?" and there's no single "right" answer to this question, which isn't very helpful. So, for those who insist, 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)

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:

1) 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 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) Integer a whole number (1,2,3,4…).

3) Variables A kind of receptacle for a value, be it a numeric value or a piece of text, 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 for example, 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 for example, 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 and 1 is added to the variable “i” each time the loop runs.

In this example

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 (increments)

6) Nested Statements

For example, you can put a load of “if” statements inside an “if” statement. 

if (condition1) 

{

   // Code here executes when condition1 is true

   if (condition2) 

   {

      // Code here executes when condition2 is 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 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 p1 and p2

}

Here “return” means that when you “call” the function in your code you might as well have written the product (or "output") 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.

No alt text provided for this image
Logic. It's definitively useful, or is it?

9) Operands & Operators- Logical Code Symbols

Learn the various forms of mathematical and logical operator.

https://www.tutorialspoint.com/computer_programming/computer_programming_operators.htm

For example, in JavaScript these are used as symbols like “||”, which means “or”.


Alternatively you might write “and” as “&&” to use it in testing statements like 

if (hour == 12 && minute == 30) {

  alert( 'The time is 12:30' );

}

It’s a little more subtle and involved than that, but it’s not nearly as hard as it might seem at first. You can read more here:

https://www.w3schools.com/js/js_comparisons.asp

https://javascript.info/logical-operators

There are also things called Booleans, which deal with whether a statement is True or False. You can read up on these here:

https://www.w3schools.com/js/js_booleans.asp

Top Free Coding Resources:

  • Codecademy- has an app
  • CodePen- a great online testing ground for code
  • W3 Schools- these guys pretty much run the web, learn from them
  • SoloLearn- like W3 Schools but with a prettier interface
  • CodeCombat- learn Python and JavaScript in a beautiful gaming environment. Offers in app purchases!
  • Git Hub- a serious place where the coding world hangs out
  • Stack Exchange- a less formal coding community forum
  • Freecodecamp- oddly retro but with a fun interface for free learning

Of Interest:

Frequency analysis in Poe’s “The Gold Bug”

Sherlock Holmes and the Case of the Dancing Men

Google: Pig Pen / Rosicrucian code and Caesar Cyphers, these are examples of simple “Substitution Cyphers”, where a letter of the alphabet is replaced with another or a number or a symbol. Also look up “Futhark”, which goes a step further in making your encryption difficult to crack.

Finally:

If you’re confident you’re getting to be a skilled Coder and want to see some mind-blowingly advanced and insanely efficient Code, check out Regular Expressions, or “RegEx”:

https://www.regular-expressions.info/

You may need a stiff drink afterwards though :)

Gifts for Coders? 😁

The Code Book, by Simon Singh

The Name of the Rose, by Umberto Eco

The Room game, from Fireproof Games 

Now you've read this, why not sign up for a free Introduction to Coding course at your nearest Google Digital Garage?

There are currently (8/12/2019) two Digital Garages offering free training in Portsmouth and Belfast, UK.

For those who've already attended the Introduction to Coding course, message me here for the secret link that unlocks the enormous hoard of Coding treasure that is the "Study Guide". This was hidden on the last slide in the presentation!

As usual for articles on LinkedIn, here's some links to the other articles I've written here:

10 Cybersecurity Tips You REALLY Need (01)

7 Real Principles of Logo Design

WiX Pros & Cons (+ 2 Bug Fixes!)

Digital Marketing List for Creatives

To view or add a comment, sign in

More articles by Tom Myfield

  • The Dark Side of AI 🤖

    I'm sure you've learned to love AI as much as I do, and if you're hooked into all the AI gurus on LinkedIn then you'll…

    1 Comment
  • Agents are here! (oh no they're not!)

    Heard the term "Agent" or "Agentic" when people talk about AI? The old pantomime is starting again. Just like back when…

    1 Comment
  • Index of Articles

    Welcome. It's likely you arrived here because someone (probably me) sent you a link.

  • Get Started with KALI Linux!

    Get started in ethical hacking with this quick, simple step-by-step guide. It's crazy just how many Cybersecurity…

    1 Comment
  • Hey, Let's Take Out a Country!

    Remember remember the 5th of November, gunpowder treason..

  • Good and Bad Actors

    Who made a better Joker- Heath Ledger or Joaquim Phoenix? No, that’s not the kind of actor we’re talking about here…

  • Happy Cyber Security Awareness Month!

    1. Foundations of Cyber Security: Safeguarding Your Digital Future Everyday you go to work on a digital device, but how…

    2 Comments
  • Vote for YOU!

    Introducing "Vote for Yourself" a new party agnostic, non-partisan, campaign for an equitable future. Are you still…

  • The Rebirth of Art: How I learned to stop worrying and love the AI-bomb

    Last year there was a devastating explosion of effective AI art tools. Many artists are still reeling.

    2 Comments
  • Fight the Fear of Presenting

    Everyone dreads the big presentation. That big day when the clock runs out, the deadline comes around and you’ve got to…

Others also viewed

Explore content categories