juancmandev logo
🇲🇽 Top Navigation

How Computers Works

Open laptop An open laptop. Photo by Philipp Katzenberger on Unsplash

Today we use, in some way, the computer in almost every activity in our lives, it could be for work or just fun, but if we think carefully, computers are an invention from the previous century, and have changed our lives.

New works have appeared, new careers to study, and new problems to be solved.

However, do we know how computers penetrated our lives? Do we know how a computer works? How does the Internet work?

Many people use their smartphones to communicate with family and friends and to share their lives, but they don’t know how all this is possible.

I’m not saying that everyone needs to be a Software Engineer or IT Expert, but knowing about this could be outstanding knowledge.

The power of computers

Computers can expand our brains, such things like sends messages to people from the other side of the Earth, to create an app that speeds up delivery.

All these things are possible by flipping 0’s and 1’s, but how is this possible?

If you’ve watched The Imitation Code, maybe you know this story.

Computing Fundaments

Alan Turing was the inventor of the Turing Machine, a simple but powerful machine that can receive instructions to move along a long tape, changing the state of each slot. This three things, a head, a long tape and a set of instructions are the bases for the modern computers.

The head is the Central Processing Unit (CPU), a piece of hardware that can be used for general purposes, receiving instructions (Algorithm) whose are transformed to electric pulses, understanding if electricity pass trough or not, if it’s true or false, 1 or 0. All these instructions are saved in a Random Access Memory (RAM) for a quick access of the work that needs to be accomplished, and using a Read-Only Memory (ROM) to store persistent data that needs to be saved even if the computer shuts down.

An algorithm’s like a recipe, declaring ingredients (variables) and the steps to follow to achieve the result (functions).

A variable is an identifier that points to a slot of memory in the RAM, storing a value that can be a number, a text (known as “string”), a boolean (true or false), or an object (a set of multiple variables and functions that can be instanced), etc.

Functions are blocks of instructions that achieve a task, like obtaining your current location or sending a message.

And maybe you are asking, how do I tell a computer how to do what I want?

Programming languages

If you try to speak with someone who doesn’t speak the same language as you, you try to use a translator or use gestures, something that you know that both can in some way understand, the same is for computers.

Computers are powerful, but they need someone to tell them what to do, this is work for humans, and to achieve it we use programming languages. With a programming language you use a specific syntax to tell a computer your desired task, then you compile that file where you type all your instructions, when a file compiles, is transformed to a computer nature language (1’s and 0’s) and then the computer executes the task.

There are different programming languages, and all of them are designed to achieve specific needs, like the programming languages C and C++, both are low-level languages, which means that are close to how a computer “speaks” and are used to control and administrate memory in high-efficient apps, or to illuminate the screen of your computer.

There is Java, is a language that can create an environment when is compiled, meaning that can be used on almost every computer.

JavaScript (is NOT Java or something like that) is a language that our browsers understands, with the help of JavaScript, we can access to a web page and see nice interactions when we click a button, login with a username and password, and more.

JavaScript is a high-level language, that is easiest to learn than Java or C, but not that is worse or better, just resolves a different need.

The Browser

A powerful software that can access other computers using the Hyper Text Transfer Protocol (HTTP), it means that thanks to this protocol different computers can send and receive information to communicate, even if they’re far away. The browsers receive data in the form of a file, mainly three:

HTML

Helps the browser to structure data like texts or images, using a markup language (tags). The browser can know where to put an input to type your email or a button to subscribe to your favorite artist.

CSS

It gives colors and forms to the HTML tags using selectors. It can be used to change page’s background color, change button’s rounded borders, modify text color, and everything your creativity can give.

JavaScript

Combining HTML and CSS with JavaScript creates an interactive web site, or web app (like this one). You can for example, add a button that changes the theme to dark/light, or store items in a shopping cart and show a number of items you have.

For all this you need to store your files somewhere, letting people access a computer to download all these files using their browsers, that’s the functionality of servers.

Servers are computers that are connected to the Internet, and store files that can be downloaded or uploaded using protocols and security rules. Some companies like Google or Microsoft have multiple centers with many servers in different regions of the planet, called Data Centers, and can be used with a fee for storing your web app, these multiple Data Centers are called Cloud.

The Cloud

Administrating a powerful computer can be difficult, but if you know how to use it, you can save a lot of money instead of maintaining local computers that need to be turned on 24/7. Thanks to the cloud we can deliver the fastest apps, and we can have a 24/7 service for our customers with a marginal cost.

Computers Changed Humanity

Computers simplifies our daily tasks, software can be easy replicated and distributed without need of logistics like a tangible product. You just need an Internet connection to reach someone’s project.

You don’t need a factory or natural resources like wood to produce paper, you need a group of engineers, UX/UI designers, digital marketers, and more IT people to reach billions of customers.

The reason that computers are too powerful is that the marginal cost is minimal, you don’t need to extract something from the earth to build an app, you need a group of talented persons that uses their brains to create solutions.


Posted: May 29, 2023