|
Introduction to programming.
My first encounter with programming was in my form 6 vacation....I heard of proramming from a tight mate who was in his first year by then, He tolld me a lot about programming but soecifically QBASIC programming. Ofcourse the first thing i did was look up a couple of tutorials on the language and the compiler. I do not remember so much, but i remember writing a programme that added two numbers. After a little while things got boring and complex....actually i gave up.
A few days later, a friend told me about HTML and what it does. Well i always like challenges and so i tried it out. I created a couple of pages with tables, forms and the likes. What bored me was that i could not process the form entries. So i asked a teacher who i looked at as a computer geek. He told me that the solution to that was to make an action listener. (I wish i knew). After days of google search, i gave up and promised never to program again!
It was not untill my first year that my desire to program was awakened. I tried out c programming with a litlle help from a friend. This time a vowed not to quit. After about a semister of reading and research, things started to make sense.
The reason i almost gave up on programming is because i lacked the reason to program, and i was not inspired. Also, i lacked the proper guidance and tutoring from the people who taught me. This will most likely happen to you if you are subjected to the same conditions.
Computer programming is one of the fields that are most hated by students. Infact about 95% of the students who ever get the chance to test programming, regret ever having chosen the courses in the first place.
This tutorial is aimed at giving you a good introduction to computer programming and a reason why you should become a programmer.
What is programming?
If you are new to programming you mus be asking your self this question....What's up with programming anyway?
Well, when you go to the shop to buy a personal computer and you take it home, it's just as useless as your P1 home work book. Then you load the operating system (say windows xp, or if you are in Russia....Linux OS) and then you can start it up and login. The operating system is a software (call it a computer program) written in a cartain programming language. But to a new user, even the operating system is not that helpful. After you install Office (Call it microsoft word for now) so you can type a letter to your mate. Then may be a friend tell you about Power DVD, VLC Media player. These are all examples of computer programs that are produced using various programming languages.
So we can say that programming is a process of producing software that is aimed at making the computer wiser. Here is tha analogy. When you had just been born, you could not say a word. Then little by little you started to learn a few words and now..God knows how much you can say. You have continued to learn a couple of words that have made you wiser. Programming is a process of producing that programs that enable a computer to carry out well defined tasks...like displaying this page!
Why should i even think of being a programmer?
Programming is really a fun proffession. The world's richest man, has built his company on programming! It's a field that is not crowded by people (as a fact, most countries, comapnies, still use foreign programmers due to the scarcity of them), lets you work from anywhere (office, home, on a bus, plane, train, TREE), pays well, and lets you work at your pace. And by the way, you do not need to be physically strong, it require more of your brain than the muscles.
Now that is what i call a nice proffession! Many people will tell you that programmers never leave their offices, they are always thinking...and i'll tell you that those are the programmers that do not work smart.
Who should program?
The experience i have got is that programming is not for desparate people looking for tomorrow's meal. It is for anyone who is fascinated about computers and the IT world. You need to be smart, sharp, analytic and with a never say die attitude. It requires a high level of commitment at first. Programming also calls for self motivation and good time management. A good IQ also helps a lot. So far the best programmners are those that ventured into it when they were as young as possible. I've not got a testimony from any programmer that started programming at an old age. My advise to you is that you start it as quickly as you can.
Programming languages, compilers, assemblers?
All computer programmes are witten in certain programming languages. A programming language defines a set of rules that determine how instructions to the computer (in a computer program) are to be produced. Look at English for example...it has certain constructs that define the spelling, the grammar, etc. If you use words that are not in English, then there is a problem in the conversation. Frech, Italian, Kiswahili, Chinese all have their own rules.
A computer only understands one language. This is called machine language. It is a set of 0's and 1's that specify what the computer should do. Programs written in machine language are rather comlex to write and do not have a lot of programmers. I've never witten it myself. Programs produced here are machine dependent, i.e a program witten for one computer may not work on another computer.
With the increasing limitations of machine code, the revolution of a other programming languages started to take it's toll. Assemlby languages came into existance. Instructions are written with special pnemons (call then short words). Because the program is not in machine code, the computer would not be able to undersatand them. It's like you speaking English to a person that does not know it. To effect a convversation you would need an interpreter. In the Assembly language world, the interpreter is called an assembler. The assembler changes that assembly language code into machine code.
Later, high level languages came into existance. In this case, instructions are written in a language very similar to that of the programmers. For example you would have something like, printf("BINGO!!!"); That instructs that computer to display the string BINGO!!!. Because these programs are not in the language that the compueter can understan, there is need for an interpreter. The interpreter in this case is called a compiler. Most computer programs today are written in high level languages. Some of these languages are C, C++, QBASIC, V BASIC, C#, PEARL, PYTHON, PHP, HEITML, COLD FUSION, JAVA, etc.
Just before programming you need...
1) Choose a programming language
2)Choose a text editor and a compiler.
A text editor is just an area where you can type text or where you can 'type' your program. this could be notepad, wordpad, etc.
Every language has it's own compiler.
IDE- Integrated Development Environment, for now we can call it a combination of a text area and a compiler. Some of these include DEV CPP, Ms VISAUL STUDIO, etc.
Okay, can we write a computer program now?
Nice question! The answer is yes. If i were you i would fasten my seat belt. We are going to write our first computer program in C programming language. make sure you have DEV CPP installed on your computer. Start DEV CPP. If it displays a dialog with tips..just close the dialog. Then click on file -> new
|