What is Computer Programming?

Blinky

Owner
Aren’t programmers just computer geniuses?

Programming is a creative process carried out by programmers and its purpose is to teach a computer do a specific task. Hollywood has played an important role in building the image of the programmers and shows them as omnipresent experts who can hack passwords within seconds or improve the performance of computers by 500% without much effort. Unfortunately, the reality isn’t so interesting!

j7mi.jpg


So, programming is boring? No!


Computers can be programmed to do interesting things. For a few years a system is used in Britain to read the registration plates of vehicles. The car is detected by a camera, it is photographed and image is processed immediately. The data from the registration plate are obtained, checked into the national data base of registration plates and if the vehicle has been stolen, a signal about it is sent within four seconds.

Computers can also be programmed to make dental exams with the usage of appropriate applications. This would be quite interesting, but a bit scary, too!

Two different types of software

Older computers with black-and-white screens and without a mouse usually use console applications. There are still many such computers in use and they are famous for the quick entry of data.

The other type of applications requires a mouse and is known as GUI programmes, or graphical user interface programming. They are used on computers with Windows, Linux and Apple Mac. Programming these applications is a bit more difficult than programming console ones but newer program languages has made things easier. These languages include:

1. Visual Basic
2. Delphi
3. C#

What do the programmes do?

Typically, programmes manipulate figures and text. They are the building elements of all programmes. Program languages allow you to use them in various ways, for example you can add numbers or store information on the disc for repeated search.

These figures and text are called variables and can be managed separately or in structured groups. In C++ one variable can be used for counting and a structural variable works with the payroll data for each employee, such as:

* Name
* Salary
* Identification number in the company
* Total amount of paid tax
* Social insurance number


A data base can contain millions such entries and to invoke them very fast.

Programmes should be written for a specific operating system

Programmes don’t exist on their own; they need an operating system unless they are the operating system themselves!

1. Win 32
2. Linux
3. Mac

Before Java programmes should have been rewritten for each operating system. A programme that functions under Linux couldn't work under Window or Mac. But Java makes it much easier to write a programme once and to use it with all operating system because it consists of a common code called bytecode that is being interpreted. Each operating system as a Java interpreter, called Java Virtual Machine (JVM), which is written specifically for this systems and knows how to interpret a bytecode. C# uses something similar to this.

Programmes use a code of the operating systems

Unless you are selling software and want to use it with all different operating system, you will most probably need to modify it for new versions of the same operating system. Programmes use function and features of the operating system and, if they are changed, the programme also needs to be changed because otherwise it won’t work.
Many applications written for Windows 2000 or XP use a part of register called Local Machine. However, this causes problems with Windows Vista and Microsoft recommends people rewrite the affected code. Microsoft has already done this to make Vista more secure.

Computers can communicate with other computers

When computers are connected into a network, they can even start programmes on one another and to transfer data via ports. The programmes you write can also do this. That is why programming is a bit more difficult because you have to deal with various situations, such as:

Unplugged network cable
A switched off computer in the network
Some modern computer languages allow writing programmes whose elements are started by different computers. This is possible only if parallelism can be used. Some problems can’t be regarded in this way:

Nine women can’t give birth to a baby for just a single month!

Programme peripheral equipment connected to your computer


If you have any peripheral equipment, such as a computer-controlled video camera, it will have a cable that connects it to the computer as well as software that controls it.
Peripheral equipment can also have:

* Application programming interface (API)
* Software development kit (SDK), which allow you to write software in order to control the camera. This way you can programme the camera to switch on and record when you aren’t at home. If your computer can read the level of the sound coming through the microphone, you can write a code that starts the programme when the sound level is beyond a specified limit. A large number of peripheral equipment can be programmed in this way.

Games are just programmes

Computer games use special libraries:

1. DirectX
2. XNA
3. SDL

Thus, they can quickly connect to the display’s hardware. Game screens are updated over 60 times within a few seconds and the software of 3D games should move everything in the 3D space, to locate collisions and other effects and to transmit the 3D view towards a flat surface (the screen) at the rate of 60 times per second. This is a really short period of time but the hardware of the video card is responsible for a large part of the transmitting process. GPU chips are optimised for fast transmit and can carry out these operations up to 10 times faster than CPU working with the fastest software.

Conclusion

Many programmers write software to express themselves creatively. The Internet is full of open code websites developed by non-professional programmers who are happy to share the code they have written. Linux has been created in the same way – Linux Torvalds shared the code he had written.

The intellectual effort required to write a middle-sized programme can be compared to the effort required to write a book. The only difference is that when writing a book you don’t need to eliminate mistakes. Finding new ways to do something or to solve a serious problem brings joy. If you have good programming skills, you can find a full-time job as a programmer.
 

Горе