How to communicate with a computer

This is the first time for me to learn a computing language and I find python is charming. I’m going to talk about my understanding of computation based what I learned this week.

The core for a computer to function as expected is binary. In fact, before this week, I don’t know what is the language inside the head of a “computer”. Is it English? Does a Chinese computer “speaks” Chinese while the one from Korean “speaks” Korean? These questions once popped into my mind like a flash. But I just didn’t grasp them nor did I explore more about computing language.

From what I read this week, I found the answer: in a computer’s eye, the world is built up with numbers. A computer cannot understand the meaning of the word “red”, but can figure out what “fill (255,0,0)” means. For a computer, the world is a set of “yes or no” questions. The values for these binary questions are “1” and “0”.

As what I learned last week, bit is “a unit to measuring information”, we can use bit sequence to represent a set of things including text, pictures and movies. The procedure for us to do some programming things seems as if we were talking with the computer. The computer is an alien who can neither speak nor understand our language. This means that a translator would be a must if we want to get this “computer-alien” to do anything. This translator is computer languages like python, java script, c++ and so on. However, the translator is not that professional as he can only partly understand our language. The computing language shares something in common with English: words like “variable” and “print” are all what we use in daily life; “del” and “str” can also be recognized as abbreviations of “delete” and “string”. But Evans also cited in his article that natural languages were complex, ambiguous, irregular and uneconomic thus should not be used in programming directly. When we want the computer to print the value of 10, we cannot say, “Hey, print ‘10’.” Instead, we should say as follows:

my_variable=10

print my_variable

And then, the interpreter or compiler will turn these high-level language into commands that can be executed directly by the computer. The CPU will record the value as 1 when there’s currency on the board. As said in her essay, “Computational thinking is using abstraction and decomposition when attacking a large complex task or designing a large complex system”. In this procedure, we break the task of typing out “10” into: set a variable and print a variable.

 

David Evans. (Oct 2011) Introduction to Computing: Explorations in Language, Logic, and Machines.

Jeannette Wing. (March 2006). Computational Thinking. Communications of the ACM 49, no.3. 33 – 35.

James Gleick. (2011). The Information: A History, a Theory, a Flood. (New York, NY: Pantheon).