On Tue, 01 Sep 2009 23:38:02 +0100, Lyle wrote:
> Chapter 2: Programming and Computers
>
> A basic computer consists of CPU, RAM and a HDD with input devices
> such as keyboard and mouse, output devices such as VDU and
> printers. The CPU processes requests based on the 86 instruction
> set. Early computers were programmed in binary a series of 0’s and
> 1’s. 1 byte = 8 bits of binary i.e 01001010. This made programming
> a lengthy process so assembly language evolved and then on to C
> programming. C is the foundation for most programming languages we
> have today. Higher level languages such as Perl, Java and Python
> use richer syntax making it easier to code larger more detailed
> programs. A program that's hundreds of lines of C could be just
> tens of lines of Perl.

This bugs me in a similar way to how Nell was taught programming in
The Diamond Age. A lot of potentially useful and interesting stuff was
presented as if it was required preliminary reading, but didn't really
contribute to the complete understanding of the subject, so was at
best an unnecessary distraction, and at worst a confusing
contradiction. All that allegorised guff about binary, Turing machines
and lisp was quite amusing and entertaining, but would have been
better presented to Nell as a comparison or supplement.

I'd write it more like this, which isn't necessarily any better, but
gets me off this particular hobby horse:

Although computers can process information very rapidly, they need to
be given explicit instructions to tell them exactly which kind of
processing is required. These instructions are supplied in the form of
programs, which may be written in any of a multitude of different
programming languages. Most of these languages are designed to be
relatively easy for humans to understand, at least in comparison to
the "machine code" which is all the computer can directly understand,
and to which all such programs are translated to before being acted on
by the computer.

A very broad spectrum of programming languages is available to choose
from. At the very low-level, the machine language for each type of
processor has a corresponding "assembly language", which is an almost
direct one-to-one mapping from the computer's machine code
instructions (10110000 01100001) to mildly human-readable mnemonic
codes (mov AL, #61h). Most programming languages used nowadays are at
a much higher level than this, with each line of code being translated
into a sequence of many machine code instructions. Thus, a given
program might consist of thousands of machine code instructions, but
would only be many hundred of lines if written in C, but would only be
a few lines if written in a high level language like Python, Java, or
indeed Perl.

-- 
        Peter Haworth   [email protected]
``Even if the word "pity" is in a Dalek's vocabulary banks, it may be listed
  as a synonym for "errorcode 7 (failure to exterminate caused by temporary
  targeting failure or neural dysfunction)".''
                -- http://www.xibalba.demon.co.uk/jbr/lingo.html

This email (and attachments) are confidential and intended for the addressee(s) 
only. If you are not the intended recipient please notify the sender, 
delete any copies and do not take action in reliance on it. Any views expressed 
are the author's and do not represent those of IOP, except where specifically 
stated. IOP takes reasonable precautions to protect against viruses but accepts 
no responsibility for loss or damage arising from virus infection. 
For the protection of IOP's systems and staff emails are scanned 
automatically.” 

Institute of Physics Registered in England under Registration No 293851 
Registered Office:  76/78 Portland Place, London W1B 1NT  
_______________________________________________
BristolBathPM mailing list
[email protected]
http://mailman.bristolbath.org/mailman/listinfo/bristolbathpm

Reply via email to