Computers do 3 things. They:
- Display things
- Store data and retrieve that stored data
- Do math
That’s pretty much it. Now, yes this is simplified, but hopefully to the point that it is useful. Let me explain…
They display things:
When we use a computer or a phone we see what the code said to display.
They store data and retrieve data:
This is what allows a developer to go from creating a simple, beautiful website to that website being able to do some amazing things…like Pinterest or Instagram or Twitter!
They do math:
This makes some people nervous but it shouldn’t. Computers are simply good at math. And by math we mean 1 + 1 = 2, and a + b = c, and first name = Lisa. These are all math.
Developers write code so computers can do those 3 things
Without code, a computer is an ornament. Code is written to tell the computer what it should do and what order it should do it in. Code tells a computer: display this, store this, retrieve this, add this together.
From code to the computer
So how does the computer know? Compilers. The compiler is something like a translator. I tell the computer to display a headline, the compiler converts my code into the 1’s and 0’s the computer understands, then the computer displays a headline.
To get your code out into the world you upload it to a web server with a domain name pointed to it. People can then use your code through the internet.
This sounds easy! Ummm…
That’s because I’m trying to make this as easy to understand as possible while still being helpful. Writing code is hard and it is hard because computers are very literal. They will only do what you explicitly tell them to do in the order you tell them to do it. If what you tell them to do doesn’t make sense to the computer, it will just stop. If the computer doesn’t know what to do because you left off a semi-colon, it will stop. If your code tells the computer to do something, and it makes sense to the computer, it can still be wrong because you might be asking for the wrong thing. Not so easy.
So with this in mind, let’s have fun with all the ways we can combine display, data, and math to create cool things!