Programming



=Definition=

Programming is the act in which one enters a specific set of instructions which directs a machine to accomplish the given set of tasks (today ussually with computers).

Modern Programming languages strictly deliver instructions to computers or other computer programs. Most modern day processors calculate algathorims

Brief History
The first programmable devices appeared around the 13th centaury. The man credited with creating the first perpously programmable machine was Al jazarhi. The machine made music powered by flowing water with an assembly of gears, pins and cams. To program it to change the beats one would just arange the pins.

The revolution in programming came parallel to the revolution in computation. The computer's revolution came with two inventions. First was the micro integrated cicuit (which miniturized all electeral equipment) and the silicon transistor. These inventions enabled computers to built much, much smaller and to contain many more chips thus allowing more computational power in less space.

The first programmable electrical computer was Z3 in 1941, built by Konrad Zuse in Germany. It was controlled by its own unnamed language and took up an entire floor of his building space at his universaty.

Once computers began to become more and more complicated they required more then just pins and push cards to instruct them what and how to accomplish their instructed tasks. And from the earlier languages evolved new more powerful ones because new programming languages must be programmed by previous ones (all the way back to the push cards of the 1940s).

Some of the first Programming high level programming languages or generation 1 programming languages were Fortran, CBL, ALGOL, BASIC, APL, CPL, CORAL, HYPERTALK and LISP etc. = =

Mordern Programming:
All modern computers contain a CPU or central processing unit. The CPU is what processes the binary code which is compiled from teh written language of a computer program. Once it processes the binary it translates and directs the computers "actions". The binary the CPU recieves is translated from the actualy program code (typed or put in by a programmer, scientist or mathmatician) by a compilar. Each program language has its own compilar (somtimes already built in). Thus all programs once compiled all are in binary no matter what different language is used.

Structure/Syntax:
Modern programing languages are usually catagorized by there paradigm. What the paradigm is, what the program can control and how the program does what it does. There are two main paradigms, object oriented and procedural (high high level programs impliment both). Once you have entered these catagories however they are split up further into different groups. Languages can also be //safe// or //non safe//. A safe program is one in which functions in one area can only be manipulated in one way for that particular procedure. In a non safe language all functions can be used for any procedure whether they make sense or not. The most popular languages today are object oriented, and since it would take the time of a collge course to explain how each works it would best to only explain the popular type.

=C++:=

C++ is one of the most popular high high level programmigng languages in use today which makes it a perfect candidite for explanation. It is a very libral, multi prodigm language, but is ussually used in the object oriented sense. C++ evolved from the earlier C programming language in the early 90's ( C was from the 70's). C++ is used is programming many popular computer programs in all subjects. It is even used in the programming of operating systems. C++ is most popular in the UNIX "world". C++ is so popular because it can be used and manipulated in almost anyway the programmer sees fit. It is highly ecclectic fast and gives the programmer choices in every way he wants. C++ is a non static language, non safe language*. C++ is difficult to contemplate to non programmers because it does not contain a defined structure which makes it one of the hardest languages to learn and almost never learned first.

All C++ programs have a function which is the action you want the computer to do. All C++ programs contain a object which is to be manipulated, and all C++ programs must contain "proper grammer" so that the computer can understand what you are commanding it to do. An example of the simplist C program. . ..
 * 1) include //provides std::cout
 * 2) include // provides std::ostream and std::endl

int main { std::cout << "Hello, world!" << std::endl; return 0; } ..

All this program does is display the words 'hello world" on the screen. . . The following program can be broken down: · This C program starts with #include . This line includes the "standard I/O library" into your program. The standard I/O library lets you read input from the key board (called "standard in"), write output to the screen (called "standard out"), process text files stored on the disk and so on. It is an extremely useful library. C has a large number of standard libraries like stdio, including string, time and math libraries. A library is simply a package of code that someone else has written to make your life easier (we'll discuss libraries a bit later). · The line int main declares the main function. Every C program must have a function named main somewhere in the code. We will learn more about functions shortly. At run time, program execution starts at the first line of the main function. · In C, the { and } symbols mark the beginning and end of a block of code. In this case, the block of code making up the main function contains two lines. · The printf statement in C allows you to send output to standard out (for us, the screen). The portion in quotes is called the format string and describes how the data is to be formatted when printed. The format string can contain string literals such as "This is output from my first program!," symbols for carriage returns (\n), and operators as placeholders for variables (see below). If you are using UNIX, you can type man 3 printf to get complete documentation for the printf function. If not, see the documentation included with your compiler for details about the printf function. · The return 0; line causes the function to return an error code of 0 (no error) to the shell that started execution. More on this capability a bit later.screen. This program has not been compiled so it is useless until then.

To learn more visit:

http://en.wikipedia.org/wiki/C%2B%2B . . To completly understand programming you must read many books and be tought in a class room because it requires college level mathematics and a near complete understanding of how computers work.

By Pablo Grillo