LUIDIBLU / tech blog
PT EN
PT EN

Programming fundamentals

13 posts · 8,990 words · 46 min of reading · since 2016

0% read

Programming fundamentals

An introduction to instructions, intent, and automation.

TL;DR Too lazy to read? Click here.

First, when we talk about programming, we need to understand what programming means.

Ultimately, programming is a series of instructions. You write this series of instructions and give it to the computer to execute.

And when the computer executes them, depending on your code, the computer will return an output or simply keep working.

The act of writing this series of instructions is called “coding.” “Programming” is an abstract way of saying that you are telling the computer what should be done. If you write a recipe, you are programming another person to follow that recipe. Which is completely different from coding something.

Okay, but Diego, why do we want computers to do things for us? Well… Humans and computers are very different. If you ask a computer to do a thousand tasks, it will do exactly the same thing a thousand times. Compared to a human, for example, if you ask that human to make 20 hamburgers, those 20 hamburgers will not turn out the same.

Why is that? Humans are inconsistent; they get bored repeating the same thing. It is humanly impossible to always be consistent; there will always be a flaw, some error. Conversely, computers do not get bored, so if you ask a computer to make hamburgers, for example, those hamburgers will turn out the same.

From beginning to end, what I have written so far is the principle of automation: we delegate boring and repetitive tasks to the computer, so it keeps making the hamburgers.

So, we have one point: humans get bored, and computers do not get bored.

But humans are creative. As a human, if you ask me to “get a present for your mother,” we can get many different things, because we have context, feelings, and experience. If you ask a computer, it probably will not know how to respond.

Computers have no creativity. A calculator cannot create a new cooking recipe, but it can multiply 2 numbers faster than any human alive. This means that computers are great at Computation, and we are good at Recognizing Patterns.

Looking at a person and understanding what emotions they are feeling: that is a pattern. (I will not get into Artificial Intelligence now, but Artificial Intelligence detects patterns VERY well.)

So we have humans, with all kinds of creative abilities, but they are not good at repeating tasks. What we can do is give those tasks to the computer, since computers do them perfectly and super fast.

Another interesting thing about computers is that they follow exactly what you ordered, while humans can infer things.

A joke you can already understand about inferring things goes like this:

“A woman sends her programmer husband to the grocery store.”

She tells him:

“I need butter, sugar, and cooking oil.”

“Also, get bread; if they have eggs, get 6.”

  • The husband comes home with butter, sugar, cooking oil, and 6 French bread rolls.
  • The wife asks: Why the fuck did you bring 6 French bread rolls?
  • He replies: They had eggs.

Obviously, in the sentence “Also get bread; if they have eggs, get 6,” she wanted 6 eggs. But this programmer husband was taking the sentence literally, so it means that when he gets to the part about 6, he asks, “6 what?” “6 French bread rolls, that is what they were talking about.”

Computers do not make these mistakes, not because they are computers, but because of the way we communicate with them.

Since we need to be precisely precise with computers so we do not make mistakes.

Visitor dossier

Read only in your browser. The edge answers and keeps no log. Nothing is stored or sent to third parties.

Shortcuts

/⌘K
search and commands
?
this table
p
visitor dossier
t
light / dark theme
.
12-column grid
jk
next / previous post
enter
open the focused post
g hg pg tg sg r
go to home, posts, tags, about, rss
esc
close dialogs