complogo
Course home      Hardware      Software      Internet

Lesson 5:  Computer languages - part 1   |  part 2

 

Read the text below and then answer the questions on the right. 'Check your ansewers' when you finish.
Computer languages Questions

Sometimes it seems as though there are as many computer languages as human languages! So what are they and what do they all do?

Computer languages come in many forms - here are some of the main groups.

Languages can be compiled, or run-time. All languages have to be changed from what the programmer wrote to something the computer can understand - this change is called compiling. Compiled code can no longer be understood by humans, so once a program has been compiled it is very hard to change. Run-time languages are translated into machine code at the computer runs them, so these are easier to understand and change.

Most languages used on the Web are run-time languages, because they have to work on many different kinds of computers. Therefore it is easiest to let each computer convert the language into machine code for itself as it downloads it. This is why many web languages run happily on computers as different as Apples and PCs.

You are reading a very basic type of code at this moment - it is called HTML or HyperText Mark-up Language. If you look at 'view source' on your browser menu, you will see the HTML code. Sometimes, when the designer wants to make a page more interactive, he will use code called JavaScript, which is downloaded with the web page from the internet, and run on your computer. He can also use another kind of code called Visual Basic Script or VBS to do the same thing.

Code that is downloaded from the web and compiled by your computer is called 'client side script'. However, most of the pages in this computing section are written in a different language called PHP. (This is why come of the pages in your address bar end with .htm and others with .php) PHP is an example of a 'server side script'. This means that the server which runs the English for Everybody website writes the php into HTML before it is sent to your computer. PHP is a modern language - Perl/CGI is an older language that does almost the same thing, as does another modern web language ASP which stands for Active Server Pages.

The most popular compiled languages today are Visual Basic, C, and Java. Most of the programs on your computer were written in one of these languages. Visual Basic is one of the easiest languages to program with (the original Basic language was invented to teach beginners how to code). Because Microsoft have kept updating Visual Basic, it is a modern powerful language which is often used for communicating with databases. (Though there is also a language developed just to talk to databases called SQL. Most internet databases run on combination of SQL and PHP or ASP.)

C is an older language, which has several flavours such as C++ and C# (pronounced See sharp). It is very popular with professional programmers, and almost everything that can be done with a computer can be done by writing a program for it in C++. It is also difficult to learn and has some very strange ways of doing things.

Java is a modern idea - it is half a run-time language and half a compiled language. Most modern computers have a Java Virtual Machine which compiles your entire Java program once it is loaded. (This is why your web browsing stops while this happens). The advantage of Java is that like run-time languages, it can run on many different kinds of computers.

There are many older languages such as Ada and Fortran, which many people still use today, and some very specialist languages such as Smalltalk and Python. There is also a language which the computer equivalent of English, a language understood by most computers all over the world. This is called Assembler - it is halfway between machine code and human code, and is very slow and difficult to write.

1. Which language would you use to show text on a web page?
c#
HTML
fortran
assembler

2. Assembler is understood by most computers because
it is simpler
it is like English
it is an older language
it is nearer to machine code

3. What would you create with PHP?
a script
a server
a compiled language
a database

4. Which of these languages is compiled when it reaches your computer?
C++
PHP
Visual Basic
a compiler

5. Which of these two languages do almost the same job?
SQL and ASP
ASP and PHP
PHP and Ada
Ada and C++

6. Which of these can't run the same code on different types of computer?
HTML
C++
Java
PHP

7. Which is the hardest language to write?
Java
HTML
Basic
Assembler

8. In a 'client-side' script, what is the client?
The computer that sends the code
The computer that receives the code
The program that writes the code
The computer which writes HTML code

back