Computers are becoming so embedded into our daily lives it's almost impossible to imagine a world without them.
But computers would be nothing without the code that tells them what to do.
In this lesson you’ll learn what code is and how coders use it to help the world run smoothly. You’ll also learn about the World Wide Web, and two coding languages that make it possible.
What is code?
Code is sets of rules and instructions, written in a specific programming language, that helps us talk to machines.
Just as humans speak different languages, so do machines. There are hundreds of programming languages, each suited to different tasks.
Coders are people who understand and work with these languages on a daily basis.
So, what does a coder do? Coders are the architects and builders of the digital world. They use code to create programs that run on most of the machines you see and use every day: from laptops to phones, TVs, cars and internet-connected fridges.
In fact, the device you’re using right now to listen to this lesson has a complex program that makes sure the screen, speakers, microchip and ‘you’ work together in harmony.
To build these programs, coders write small sequences of tasks that they want the machines to perform. We call these sequences ‘algorithms’.
For example, cars, have computer programs that monitor all of their systems. An algorithm within a car’s program could be the following: “If a button is pressed on the car’s dashboard, make the engine status appear on the screen.”
The amount of code can range from just a thousand lines, which a simple mobile phone game would need to run, to over 2 billion lines, like the code that powers Google’s search engine.
Let’s focus on one of the world-changing applications of code: the World Wide Web.
Did you know the Internet and the Web are actually different things? In fact, the World Wide Web is just an application that's been built using the Internet.
Let’s break this down further: the Internet is a global network of connections between computers that allows them to transfer information between each other. We use the Internet to send emails, make calls, watch videos and access the Web through browsers like Chrome, Firefox and Internet Explorer.
The Web, on the other hand, is a collection of billions of pages of information that have been made using code. The most well known programming languages on the Web include HTML (Hypertext Markup Language) and CSS (Cascading Style Sheets).
Imagine the Internet as a city, with roads and cables connecting everything and everyone together. Inside this city, the buildings represent the Web. Some of these buildings are libraries that store information, some are cinemas where we go to watch films. But all of them are made out of bricks, or coding languages.
So how do coders use these languages?
Well, when you click on a link or type a web address, you’re actually asking another computer to send you an HTML file. That file contains the information your browser needs to display a web page.
Although you immediately see this page of content as visually complete, your browser actually receives hundreds of lines of HTML code telling it exactly which text, images, videos and spaces to display, and where.
CSS is an additional coding language that shapes the visual style of a web page. If HTML defines ‘what’ is displayed, then CSS defines ‘how’ it’s displayed. It makes sure that colours, fonts, and other style choices are applied to a web page before you see it. This is useful when working with lots of HTML pages. Instead of coding the visual style into every single page, you can just make one master CSS file and link each page to that.
Now that we’ve explored the basics of coding, from computer programs, to algorithms, to HTML and CSS, it’s time to continue your learning. Try your hand at writing a bit of code yourself: it’s not as difficult as you might think. Check out the resources at the end of this video, or explore one of the many coding tutorials available on the web.
Stay tuned: links coming soon.
Code powers much of what we see and do in the online world, but what is it exactly and how does it work? Let's clear away the mystery and uncover what coders do. In this video, we'll explain:
- what code is
- what code looks like
- where you can find it online