The magazine of the Melbourne PC User Group
Learning To Program
- for the bookshelf
Major Keary |
|
The books reviewed here have been selected for their suitability for programming
novices through to those who want to expand their knowledge, or repertoire, of
programming.
A Programming Primer
If you have no programming experience, Beginning Programming for Dummies is a
good starting place. It is a sound introduction to programming with explanations
of fundamental concepts, the different kinds of program (such as assembly,
scripting, and high-level), how programs are written, and programmers' tools.
Liberty BASIC is used for the examples, but other BASIC versions are mentioned
for readers who are not using Windows.
Liberty BASIC is not a toy: it is a real programming language and is used here
to demonstrate how various programming concepts work.
For Windows users the source code examples do real things, and can be easily
modified. Apart from showing on-screen command boxes and pop-up menus, the
examples show how to sort data, work with binary files, store data in arrays,
and create data structures.
A part of the book deals with Internet programming: using HTML, making
interactive web pages with JavaScript, and using Java Applets.
There is also an interesting and useful chapter on other programming languages
and resources. Programming in Linux is briefly discussed, and a companion CD
contains an extra chapter on Python.
The CD (Windows, Linux, and Mac compatible) has a remarkable collection that
makes the book good value. There are some twenty-four free, trial, and shareware
applications for Windows, Mac, and Linux. Borland, always generous in making
software freely available, is represented with Delphi, Kylix, JBuilder, C#
Builder Personal, and C++ Builder. Also on the CD are various BASICs:
Liberty
BASIC (shareware), Future BASIC, REALbasic (demo), and NS Basic (trialware).
Other languages are Python, Perl, Ruby, Dev-C++, and Free Pascal (all freeware).
There are also some interesting games programs, including IBM Robocode, that are
designed for developing programming skills. Most of the files come with on-line
documentation.
This is a sound first-book for anyone who wants to learn programming, or explore
some of the applications on the CD.
Wallace Wang: Beginning Programming for Dummies 3/e
ISBN 0-7645-4997-9
Published by Wiley,
412 pp. + CD, RRP
$50.95 incl. GST |
 |
Perl
Probably the most widely used scripting language is Perl, which as been ported
to all platforms and has an extraordinarily extensive body of literature. The
text that I recommend to anyone wanting to learn Perl is Elements of Programming
with Perl.
It is exceptionally well written, probably because the author has a humanities
background as well as teaching programming. The author of Perl, Larry Wall, also
has a humanities background-in linguistics, which explains why Perl "has the
qualities of a natural language".
The style is formal, but-as one reviewer observed-"straightforward enough for
use by the casual reader but complete enough to stand alone as an excellent
first learning tool". There is no assumption of any prior knowledge of
programming; the introductory part is an excellent overview of programming in
general, the art of writing structured code, and coding style. Hands-on
programming quickly follows, using didactic code to produce working examples.
The next part of the book explains the essential elements: datatypes and
variables, control structures, functions, and so on. The rest is an excellent,
well structured tutorial. Programming novices will find the terminology and
concepts clearly explained.
If you like your technical documentation to be straightforward, lucid, and well
structured, this is well worth examining. Of course, there's a lot more to Perl
than contained here, but this provides the essential foundation for further
study.
Andrew Johnson: Elements of Programming with Perl
ISBN 1-884777-80-5
Published by Manning,
352 pp.,
RRP $69.95 incl. GST |
 |
Python
Python is another widely used cross-platform language that lends itself to
small-scale scripting through to large-scale programming and integration with
high-level languages. Its GUI toolkit is easy to use and should make it
attractive to Windows users.
The Dummies title mentioned above comes with the Python program on CD. The Quick
Python Book is a more formal text; it assumes the reader is already familiar
with some other programming language. If you want to use Python, but have no
programming experience, I suggest the Dummies book as an introduction to
programming concepts and for hands-on practice. This title is highly recommended
for readers who have mastered the basic concepts of programming.
The introductory part of the book deals with installation issues and "the
absolute basics"; from there the water gets deeper, so to speak. Example code is
used extensively, but the narrative (it's far more extensive than annotation or
commentary) and margin notes explain in clear language what the code does. The
author presents a very thorough tutorial.
Linux users will be familiar with Python, at least in name. Many Windows users
may not realise it has application in the Windows environment. A chapter,
Python, Windows, and COM, discusses Python's application in Windows (automating
Office, for example). There is a chapter on using Zope, which is "an open source
application server and portal toolkit used for building high-performance,
dynamic web sites". Zope is written in Python.
Daryl Harms and Kenneth McDonald:
The Quick Python Book
ISBN 1-884777-74-0
Published by Manning
422 pp., RRP $79.95 incl. GST |
 |
Beginner's Guide To C++
If you want to learn how to program with C++, or simply acquire a working
knowledge of the language, this book is a sound resource for self-teaching.
Throughout the text are progress checks and mastery checks, which are questions
for self-assessment; answers to the progress checks are provided in footnotes,
and answers to the-more detailed and extensive-mastery checks are on a companion
web site. The code examples can also be downloaded from the web.
No previous programming experience is required, but would be a help. This is not
an easy, no-effort-required, tutorial. The reader has to consciously take on the
role of student, and pay attention. Do that, and you will master the
fundamentals of C++. The author says, "this book is just a starting point", but
it lays an essential foundation and shows the student the proper way to code
with C++.
The code examples work with modern C++ compilers, including Visual C++ and
Borland's C++ Builder.
Instead of conventional chapters the book is divided into 'modules', each of
which is a self-contained lesson on a concept. The format is to state the
specific skills covered in a module followed by a discussion and tutorial with
illustrative code. Exercises in the form of projects provide the student with
hands-on application. The example code is accompanied by annotations that
explain the particular programming techniques.
A thorough and well-organised training program for anyone who wants to learn
C++; it will also serve as an ongoing reference during any further study of the
language.
Herbert Schildt: C++: A Beginner's Guide 2/e
ISBN 0-07-223215-3
Published by McGraw-Hill/Osborne,
552 pp.,
RRP $44.95 incl. GST |
 |
Assembly Language
Assembler was widely used during the first half of the 1960s. It relied on
mnemonic codes (such as MOV and POP) that were translated into machine language;
assembler was the tool used for writing CP/M and early DOS utilities. Since then
assembler (or assembly, its a matter of choice) has quietly come a long way;
modern implementations handle 32-bit x86 architecture. Assembly is not part of
the popular repertoire of programming languages, but is used in various forms,
can be interfaced with high-level programming languages, and is used as a
teaching tool.
There is some literature on assembly language, but many of the titles are out of
print. A search of Amazon returns several pages, but the most recent text is
from No Starch Press, which has published a comprehensive and thorough
manual-cum-tutorial, The Art of Assembly Language.
A companion CD contains the HLA program, its 'standard library', and "over
50,000 lines" of documented sample code, and further documentation. A group of
PDF files contain drafts of the first several chapters of another
(work-in-progress) book, Windows Programming in Assembly Language.
The resources on the CD equip the reader to put the book's information into
practice. However, don't expect to find a neat, ready-to-run executable file
that installs everything; HLA is something like an all-singing-all-dancing
computer desk from Ikea: everything is there, but you have to put it together
yourself. There's plenty of documentation, especially an HTML readme file (in
the CD's root directory) that describes installation in detail.
Readers are assumed to have some familiarity with programming in languages such
as C++ or Pascal.
The author gets down to business very quickly. The first example code appears on
page 2. The writing is concise and direct; explanations are not truncated, but
there is no hand-holding. For programmers coming from another language the book
says everything they need to know, but does not waste words. Programming is in
the context of the Intel 80x86 CPU family, including those with the MMX
instruction set. It caters to both Windows and Linux programmers.
This is a large (over 900 pages) book that is comprehensive and detailed. I have
seen many books that have been, in one way or another, padded out for the sake
of appearing substantial. There is no padding here. The author and publishers
have done a remarkable job of packing so much in without making the explanatory
text terse.
Randall Hyde: The Art of Assembly
Language
ISBN 1-886411-97-2
Published by No Starch
Press,
903 pp. + CD,
RRP $115.00 incl. GST |
 |
Reprinted from the October 2004 issue of PC Update, the magazine of Melbourne PC User Group, Australia
|