What is Programming
An introduction to programming for a non-programmer
What is programming ?
What can we compare it with ?
Programming may look so complex and out of reach at first glance, but all it really is a set of instructions. Do this first and do that later, thats all it is. If you want to convey a set of instructions to another person, how would you do that,by using some language of course, like English, French or something else.
Programming languages are nothing but different languages that a machine can understand and then carry out the instructions. While a person might understand the instruction and may or may not follow it to the thoroughly, a machine will always carry out the instruction exactly as instructed(as far it’s not limited by processing or memory).
Just to give a brief on how programming started, initially Punch cards
as show below were used.
Using Punch Cards, 0s and 1s could be stored.
But what is 0 and 1 in world of an electronic device? 0 is when current does not flow, and 1 is when current flows. So basically nothing but a ON and OFF switch. Its kinda weird isn’t it ? all that a computer can understand is ON and OFF and still we are able program it to do so many complex things.
So now the question that arises is , how does memory storage work in a computer system, How does the computer remember ? At the basic level, it boils down to the concept of gates.
Basically Gates are electrical circuits and using different combinations, we can control what the output will be based on the given input. Explaining about of gates would put me in pretty much another tangent, so just to summarize, computer is nothing but combination of switches and controlling the flow current through it is it basically it a computational device.
Coming back to programming languages, where do they fit in the whole 1s and 0s arc. We can’t basically write so many 0s and 1s for everything that we want to be done. Also it would be very difficult to memorize. Imagine we want to add two numbers, doing that would involve so many combination of 0s and 1s. Wouldn’t be nice if we had intermediary to translate a low level language to 0s and 1s.
This is were micro-controller/microprocessor languages come in.
Micro-controller/microprocessor are basically thousands of circuits connected together so that, together they can do complex tasks.
So if 0s and 1s was the first layer, micro-controller/microprocessor languages are the second layer. To make it even easier, Operating Systems like Microsoft 10/ Mac OS have an another layer of programming language on top of it. After this comes we get well-know programming languages like Python, Java, C++ and others.
We can use these languages to basically run computations. When these languages are run, they are converted to byte code(machine language) and are provided to designated micro-controller/microprocessor byt the Operating System.
As a basic introduction to Programming I will start with Python. Python being one of the most used languages is also very easy to learn. It very readable and easy to understand.
Head over to the next article to get an intro to Python programming language.