|
FREAKIN' COMPUTERS MAN!
by
James Lehman
Like me, many of you use computers every day, but did you ever
stop to think just how does your computer know how to do all of that
stuff? The answer is that someone (or probably many people) wrote
programs that do all that work for you. What is a program? It is a
set of instructions that tells the computer how to do something.
Computer programs may be written in a wide variety of languages. Your
computer really only understands one language: machine code, and each
type of computer (PC, Mac, DEC Alpha, etc...) has its own flavor of
machine code. A language is a model by which a person can enter
instructions into the computer in a way that is a bit more easily
understood and much more efficient than pure machine code. This set
of instructions is then saved as a file (or files) and is referred to
as source code. Source code is either interpreted as machine code on
the fly, or compiled into machine code, saved as an executable file
and run as that.
BASIC (Beginners All-purpose Symbolic Instruction Code) is easy
to learn and is also an example of an interpreted language. There are
many, many versions of BASIC that run on all kinds of computers.
There are many other languages as well: Pascal, FORTRAN Cobal, C,
C++, Perl, Lisp, Ada, etc... Most of these different languages have
versions that will work on all of the popular types of computers. One
of the big problems with all these different languages is that they
don't easily let a person write a program for one type of computer
and run it on another. That is where a great deal of development is
going on right now. Since the Internet connects all kinds of
computers together, it would be nice if there was one defacto
programming language that could be used to provide instructions that
all of these different computers could understand. JAVA is an attempt
to do just that. As a matter of fact, JAVA was created just for the
Internet. The idea is that just by visiting a site on the World Wide
Web, your computer could be given a program (distributed over the
Internet) that would run right then, on your computer. So, the WWW
won't just be a bunch of pictures and text. Now a site on the
Internet can be a running application. There are obviously a lot of
security risks involved here. What if someone writes a program that
wipes out all of the data on your disc? Or, worse yet, grabs all of
your personal data and sends it back to someone else? There are a lot
of special circumstances built into JAVA to keep that sort of thing
from happening.
Another big difference in the types of languages that are out
there is whether they are procedural or object oriented. Procedural
programs run, more or less, from top to bottom, completing a set of
tasks and usually either giving the user the option to do it again or
quit the program. Object oriented programs are ones that let the user
control the flow of actions. Windows, for example (any windowing
environment; PC, Mac, UNIX Xwindows, etc...) is a good example of an
object oriented program. The computer has no way of knowing which
icon you are about to click on. I has to be ready for anything.
Object oriented programming is the most advanced there is and is
usually best done in C++.
JL :o)
|