I.
PROGRAMMING - BASIC
CONCEPTS
What is a computer?
An electronic device that accepts input and produces output. It accepts data, it can store it or
process it, and then produces an output.
What is the difference between programming and coding?
Programming is set of instructions that define a behaviour. It’s the logic behind coding, that’s
why it is similar to Math’s. This is why companies prefer programming rather than coding and let you
choose your own language. It refers to problem-solving, designing algorithms, testing, debugging etc.
Coding refers to the act of writing code in a specific programming language, the implementation of
the logical programming solution. It’s the process of translating human logic into a language that a
computer understands.
The ideology between dogs and coding
Imagine this: you have an unintelligent friend. He doesn't know how to do anything, if you
don't give him the instructions. For example, you want him to build a house. You give him
instructions, but you forgot to tell him to build support pillars or you tell him to build them out of
cardboard. In result, the house collapses. This is basically programming, but replace your friend with
the computer. You want the computer to do something, give him the instructions. If you forgot to tell
it something important, the result won't be as expected. He did exactly as you told him to do. That's
the thing about computers: they are not that smart. We made them smart. Now imagine your friend
doesn't speak any language that you speak. This is where programming languages come in hand.
What is a programming language?
A programming language is exactly like any other language. It has syntax and different rules
that you have to follow. It’s like a set of instructions you use to produce different outputs. It’s a way
programmers communicate instructions to the computer. The difference between a human language
and the programming language is that we speak to computers rather than people. There are a lot of
programming languages you heard about, like C++, Python, C#, maybe even Ruby, Rust etc. Each of
these languages have a level. The lower the level means the more similar it is to machine code, to
binary.
What language does the computer speak?
Short answer: Binary, which is a numeral system. There are more types of these numeral
systems. There is unary and decimal for example. Unary involves one component. You could say, for
example, counting with your fingers. Binary refers to two components. In this case being zero and
one, on and off. We can represent those components using switches, or transistors if you will, which
are either on or off. Your CPU (Central Processing Unit) has a vast number of those transistors
(billions). They are used to create logical gates (AND, OR etc.), which perform computations. There is
decimal, the one us, humans, use. “Deca”, which means ten, refers, again, to the amount of
components that we have: the numbers 0 to 9. (Here I will draw different numbers and represent
them using unary, binary and decimal as well as explaining how are they being formed)
What is a compiler?
It’s a program that transforms or translates computer code written in one programming
language into the target language (ex. Machine code). The process of the compiler translating code is
extremely complicated and complex including a lot of stages so we are not going to discuss about it
right now.
How do we write code?
In order to write code we use IDE’s, which stands for Integrated Development Environments.
It’s like a toolbelt. It has all of these different tools for code creation, building, and testing put
together in a simple application, framework or service. Things like text editors, compilers, code
libraries etc. overall improving the developers productivity. They also include built in Error-checking
and Auto-fill for frequently used words. Their role is to make developers not waste time on searching
different tools, learning how to use them etc. which takes a lot of time. These IDEs have everything
you need in order to write code. There are other interfaces you could use to write code, such as text
editors (notepad++, visual studio), command lines (Bit Bash), online code editors etc.
Video about IDEs: https://www.youtube.com/watch?v=gr0xT1xnbTg
QUESTIONS?
II. PROGRAMMING - CODING
The most basic thing in coding is printing. In C++ it’s called cout<<”hello” And in python it’s
called simply print(“hello”).