MianPage | ![]() |
Derive | Programing | ![]() |
Links |
Programing
Ok If you are in engineering then you should
heared about programing language, Compilers and interpreters, low and high
level languages. But this is the internet, means any oe can visit and read
this page. Any way i wrote the known stuff in red so if you don't want
to read it, it's your choice. I have read 5 books on C and C++ and every
time i begin, i read the same subjects (at least 25 pages) untill i find
new information but every time i read it, not only i remember it, i find
out new things that the other book did not mention. So what, If i were
you i would have read it...
First, computers are
electric equipment, means that they use electric current such as lamps,
motors,...
so how computers work? This is
like the MORSE code: dot-dash-dot-dot is equivalent to a (not true just
an example).
People or scientists were used
to transform every character into zeros and ones, zero ,means zero cuurent
or zero voltage, one means a known value for the current or the voltage.
this is called binary code. Of course this was too hard so they though
of making an easier way to communicate with the computer, which is the
Assembly language. It used some symbols to replace orders such as LDA.
Great job but this required a proffesional to program and the programs
where designed for one type of proccesors and required the detailed knowledge
of every part of the computer, such as the ALU, the Stack the heap...
Then other languages
were invented like BASIC, PASCAL, COBOL. They are classified in several
ways:
1- Compilers And Interpreters:
A compiler is just a program written in assembly that Compiles the orders
you write to the computer into some machine code that the computer understands
and can execute. This is the same for the interpreter but the compiler
take a program and gives an executable, means that it compiles all the
program once.
This is not the case of the interpretter that takes every line (order)
and transform it into something computers understand then execute it, if
he succed, he look for the next line and so on, so when you write a Basic
program to divide two numbers, you ask him to divide 1/0, once you input,
the program stops, why? ;-) this is not the case of compilers.
In summary we can imagine a compiler as a man that takes a letter in french
then translate it in english. If there are grammar or strucural faults,
he fails. An interpreter is a man that translate sentence by sentence so
if the president makes a fault he can still ask him the correction. Probably,
any exe file is made by a compiler.
Examples for compilers: C,Pascal, C++,....
For interpreters i only know BASIC.
2- high and low level langauges:
For this i havn't
mich to say, the higher the level, the easier the language, the less the
contorl. The lower the level, the harder the language, the more the control.
Low level : Assembly
Language.
Meduim level
: C, C++.
High level :
Basic, pascal, fortran, cobol,....
It is really good to be an expert in C or Visual C but, any GOOD programer know at least three languages, you have to determine what you want, for example, if you want to write a program that shows some pictures or displays some text, it should be silly using Visual C, but you can use Visual Basic as an easier alternate. But for more complex program, requiring more control ( Chatting, Trojans,...etc ), it is reasonable to use Visual C or C++.
I recently got intrested in other subjects
like Java Scripts and CGI-BIN scripts, an excellent page for cgi-bin can
be found at http://www.execpc.com/~keithp/bdlogcgi.htm
, in two words, cgi-bin programs are used in search engines, loggers, Voting,
...
Java Script is used in chatting through the brouser like
yahoo chat and much more intresting stuff, for example, the messege that
appeared when you open the main page saying " WELCOME" is a small java
script you can add to your web page like this:
<script type = "text/javascript">
<!--
alert("Welcome \n Hope you Enjoy");
-->
</script>
The main diffrence between Java and cgi, is that
java scripts are executed on the user's computer, hence, bad java scripts
are dangerous for users computers, but, cgi-bin are run on the server itself,
so bad cgi hurts the server.