If you are already familiar with atleast one high level language, this post is redundant for you. You can very well skip this and move on to the next post. Nevertheless there is a very good chance that you missed out something that you could probably get to know from this post.
One of the most popular definitions of a program is “the act of creating software or some other set of instructions for a computer”.
Strictly speaking explaining programming and the concepts of programming in and out is out of scope of this post. All I provide here; is the basics that you NEED to know to understand any language.
Just like we human beings have English, German, French and Spanish, computer has its own language the machine language. Provide it with a series of ‘meaningful’ 0s and 1s and your computer is more than happy to respond. However even the simplest word in this language might drive you crazy. Imagine writing something like ‘11101001001010010100100100100101001010’ for adding two numbers say 100 and 200. This is not at all convenient for a programmer. Imagine a complex application that requires a million lines of code written using this low level or machine language.
So what is the solution? We don’t understand bytes and a computer doesn’t understand anything else. So what is the solution? Have a middleman who can talk both the languages and that is precisely what we do. The middleman in this case is called a compiler or an interpreter where a compiler is like a block translator who waits for the whole message to be completed and then translates it; while an interpreter tells you the line by line meaning.
A program is typically composed of:
Variables – memory locations where you store the data required by your program
Operators – manipulations available on a particular data. For example numbers can be added or subtracted and hence addition and subtraction are operations associated with numbers.
Expressions – typically a meaningful combination of variables and their operators resulting in a value.
Delmiters – most languages employ a delimiter to mark the end of each statement. In other words the compiler/interpreter needs to understand; which is the first and which is the second line.
Grammar – the legitimate ways in which the operators and operands can be combined to form expressions. It’s quite similar to the sentence formation rules in human languages. For example “add one and two” makes sense while “two one and add” doesn’t even though they contain the same set of words and all of them have a meaning when they stand alone.
I believe this basic understanding should be good enough to proceed with. If you are looking for more details on programming, I’d recommend you to browse the web, get a clear idea of programming and then continue with the subsequent posts.
http://en.wikipedia.org/wiki/Computer_programming does provide some information on programming and its history.
Curious about software testing? Checkout http://testinghandbook.blogspot.com
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment