3 min read

Hello programming.

Everything in this article will be captured in the realm of the mind. No programming languages will be discussed.
Hello programming.

Everything in this article will be captured in the realm of the mind. No programming languages will be discussed.

Programming is…simple.
Programming is…language.
Programming is…communication.

If you understand any of the above presuppositions then you’re on your way.

Let’s begin with the “programming is a language” part.

If you have ever spoken ANY language or given any instruction to anyone to carry out (whether it was carried out successfully or not is of absolutely no consequence here) then to some extent you have programmed. The only difference is that while general communication is seen as interchanges between humans, programming is simply humans communicating with machines…in this case, PCs.

So…let’s use common inferences in languages and try to compare them to daily interchanges so that you can properly understand the bridging between human and computer language.

I am Nigerian and Yoruba by tribe; even though my Yoruba sucks to heaven and back, I do know some words and I use them to their full destructive might whenever I can. For example, the word come when translated in Yoruba is , but how does the human brain interpret both to mean the same thing so that whenever either of the two is said, the outcome is the same? It’s simple. Our minds work like a massive registry of information and we are largely components of “monkey see, monkey do”. So when given an instruction, we watch to see how others have implemented that instruction, and the implementation gets stored in our registry and KAZAM!!! We can now carry out that instruction ourselves. When we learn a new language, we implicitly begin to seek out similarities between new words vs what’s in the registry and a kind of mind map forms… that’s when we understand the connection between words like come and .

It’s not so different for computers too.

To teach, you must first learn.

Every successful relationship has a sound footing in the communicating seams of both parties thus, for a person to become a budding programmer, you and your pc must understand one another. Okay, not so much “one another” as it is “one the other” but you get the drift.

So, you understand come in English and Yoruba… but how can you tell a pc what come means? First, you need to understand that the computer has its own language and to teach it, you must first become its student.

Let’s have some exercise to drive this home.

Computers work on pieces of information that they understand as 1s and 0s. 1 for lights on, 0 for lights off. 1 for yes and 0 for no. 1 for go and 0 for stop. We could go on and on but you sure do get the drift and it all lays out a foundation for the extra work involved in telling something that’s supposed to only understand 1 and 0 what come should be. Lucky for us, all that has been abstracted out in programming languages such as ActionScript 3.0, C++, etc. So all we really need to figure out for now is the theory of how come works in the computer world.

Computers have a foundation in Mathematics and one thing computers love so much are coordinates (x, y). Think of it, you cannot interpret motion or position without relative transversals which in human terms are dictated and understood through coordinates.

So for come, we should understand that this means there should be at least two objects, let’s say A and B. We want A to tell B to come and have B obey that instruction. If A is at the top left corner of our screen (0, 0) and B is all the way at the other end (100, 0), what come would mean in this line is that B should change its coordinates to (0, 0) or (1, 0) so that A and B are still visible and B is closer to A. What we are basically implying is that B should reduce its x-coordinates by 99 points (100 - 99 = 1). So, come would look something like this in pseudo implementation:

Declaration

come, amount → object should subtract from its x-coordinate by the total amount decided by the caller (in this case A).

Implementation

A(0, 0) come B(100, 0), 99 → B(1, 0)

This can be read as

A at coordinate x = 0 and y = 0 tells B at coordinate x = 100 and y = 0 to come by moving 99 x-coordinate points towards it

This in itself will need a lot of refining for a PC to actually interpret and execute it but this just gives an overview of how instructions should be understood and fed to a pc

You could play with this concept in lots of ways but it’s all basically illustrated below:

B has moved from its 1 position to its 2 position by subtracting from its x position.

Feel free to suggest improvements to the article and do ask questions.

Thanks.