What is code?
Code is how we tell computers what to do, like if I said to you Can you shout "HELLO"
you would know what I wanted you to do as we both understand the same language and understand what each bit of that sentence means.
Code is a lot like this, and also like talking languages there are hundreds if not thousands of programming languages which can be used to tell a computer what to do.
Im being super high level with things here, under the hood the code is transformed from human readable text to machine instructions, which is eventually consumed as some machine language. Its a big rabbit hole and we wont go down it, but just be aware the code we write is just a human readable way for us to communicate with a computer.
Programming Languages
You may have heard of some of the more popular ones like C Sharp (C#), Java, Javascript (JS) (nothing to do with java, well kinda...), PHP, Ruby, C/C++ (it's said C plus plus) etc.
Semi boring/interesting fact.
So Java and Javascript have nothing in common (apart from they both contain the word Java) BUT as it turns out JS was originally called LiveScript and as a marketing thing they made a deal with Sun (who made/owned Java) to call it Javascript to ride that sweet sweet Java adoption wave. So to this day Oracle (current owners of Java) own the trademark (FOR REALSIES).
Some programming languages are harder than others to get to grips with, but most programming languages share some commonality in terms of how we can tell the computer what to do.
So if we look at spoken languages I could say:
Hello
Bonjour
Hola
Salam
Kon'nichiwa
They all mean the same thing, but can be expressed in almost each spoken language, and like that we can express the same sort of stuff in loads of different languages, in programming this is known as Syntax.
Syntax
So as we go through we will hopefully see how we can tell a computer to print out text to the screen. The action we want achieve will always be the same but the Syntax required will be slightly/moderately different depending on the language.
Dont worry too much about this for now, we will touch much more on it later as we learn more about basic code and see how it differs between languages.
Now that we have covered this high level stuff lets look at the most basic thing in code, a variable.
Last updated
Was this helpful?