In the late 80s, Tim Berners Lee, a British computer scientist, was working in a physics research laboratory in Geneva and he recognised that scientists coming to work at his unit from all over the world were having a problem, beyond the problem of like, working out particle physics, and that problem was how to share information, scientific documents and other media, with one another across the world.
Maybe you'd use a fax machine like this but it was awkward, it wasn’t easy to update a document once you’d sent it, it was a faff, it just wasn’t ideal.
He decided there had to be a better way and he began to work on fixing this problem. The infrastructure was there - telephone lines, connected devices, routers, yet it was not easy to send, retrieve and view written information from anywhere in the world currently. The technology he invented was the World Wide Web, which was built on top of the infrastructure of the internet, which was already in place. The Web would make all kinds of media immediately available from anywhere in the world at the click of a button, it would allow simple linking from one place to another, and real-time communication which was really quite revolutionary.
By 1990, he had developed the 3 Key technologies that underly the Web, and which still underly it today. Those were:
This is the language that allows us to describe the structure and content of web pages allowing for a large range of different content types.
This is a sample - it might be familiar to you. Even now, you can't have a web page without HTML. It's still one of the key building blocks that we need for sharing content on the web and it's not going to go away any time soon.
This is the convention for describing how to locate resources on the internet, how to find this vast amount of content that would just be sitting there on other people's computers, waiting to be viewed. When one person uses their computer to go to a webpage, their computer has to figure out who's computer, where in the world (and whereabouts ON that computer) the requested file can be found. Yes, all webpages are just files!
This is a URI and again, it probably looks familiar. We are still used to accessing resources on the web using addresses that look something like this. Addresses can be complex but the basic building blocks are:
A protocol (how the two computers - the requesting computer and the serving computer - communicate with one another to access this resource). In what standardized format should they write their messages to one another so that they understand one another? This is a protocol, HTTP is the protocol invented for the Web.
A domain name (which is human readable, but maps to a number describing exactly which computer the content is located on).
A path, which describes where abouts on the specified computer the particular file can be found. Paths can be more complex as there are more sophisticated ways of interpreting them, but this was the original general idea.
As mentioned above, this is the name of the formalised protocol for how computers would talk to each other to send these pages back and forth.
These 3 technologies together underpinned and still DO underpin the Web today.
By the end of 1990 the first web page was live. And it looked like this.
The amazing thing about these 3 technologies that Berners Lee invented are that even now, almost 30 years later, these 3 technologies still underly how the web works and this initial page, built with HTML, located by a URI and served via HTTP protocol - still works, even on a modern computer on a recent browser. How many other technologies from 1990, before I was born actually, still just work like that today? And I think this shows just how well designed and thought out these technologies are.
Here's the HTML for that first page:
As the Web grew in popularity, people began to see that its real power would be unlocked when rather than just displaying information, web pages could encompass some kind of interactivity. It was great to be able to view a document at the click of a button anywhere in the world, and a user could even fill in a form stating what they want to buy, and the computer at the other side of the world could receive that input, complete the order and debit the account. But people began to imagine a more interactive experience.. where maybe the page itself could respond to your input and clicks, tell you whether you were filling in the form correctly, and give you real time feedback.
To do this another programming language was needed. HTML was great for laying out content and form fields but it didn’t have the ability to execute the kind of logic that would be needed for jobs like this.
Arrays are lists of related data, allowing us to keep a list of cute animals together for example, whereas an object is a way or representing a real world entity. Objects have key-value pairs. You can almost think of it as a table. When you’re representing something in your program its up to you to choose what type of data type is most appropriate. If you’ve got a lot of cats to represent, you’d put them in an array. If you had just one cat, which is obviously the less exciting option here, you might represent more detailed information about that cat as an object.
See how the above data types have names? Those are variable names (e.g.
cuteAnimals is the name of my array of cute animals) and if I want to refer to that array (e.g. to add or remove cute animals from it), I can use its name to do so.
Be warned, there are also nothing-y type values that represent no data, unset values or a gap in a dataset. These two data types are undefined and null.
We can compare values, and comparisons always give us a boolean value. Above are some example of comparisons and the boolean values they return. You will see that many of the signs look familiar from maths.
This means taking different directions, usually based on a comparison or evaluation that has been made. Either do one thing or another. If we couldn’t branch our logic we’d have extremely limited applications, they would always do the same thing!
Functions allow us to create reusable sequences that can be run whenever we want. Functions are like recipes. We start by writing a recipe for adding VAT to a purchase, for example, where the placeholder variable ‘price’ is standing in for the actual price. We can then perform that recipe, or function, whenever we want by passing it an actual price to use.
If I haven't convinced you yet, here are a few final reasons:
⭐ It also runs on your browser with 0 setup and on your computer with minimal setup which makes it a great option for getting up and running with. If you create HTML, CSS and JS files you can create an interactive web app with absolutely no difficult configuration needed and no extra tools to download.
⭐ It’s really popular at the moment. It was listed as the no 1 most popular language on the 2017 Stack Overflow survey and lots of companies list JS as one of their desired languages. You can’t get away from it as a web developer...
⭐ It runs on all sorts of devices and places, which also influences its popularity. And this also makes it ideal as a first language as you’re not committing yourself to a particular platform
⭐ It has a friendly and active community online and offline. In most big cities there are JS meet ups and even more specific meet ups for JS libraries such as React. It is easy to find people talking about JS problems on Stack Overflow and creating up to date articles and tutorials about how to do certain things, which is a huge bonus.