REVIEW - Programming.Java - An Introduction to Programming Using Java

Title:

Programming.Java - An Introduction to Programming Using Java

Author:

Rick Decker, Stuart Hirshfield

ISBN:

0534955886

Publisher:

Wadsworth Publishing Company (1998)

Pages:

574pp

Reviewer:

Nigel Armstrong

Reviewed:

February 1999

Rating:

★☆☆☆☆

This is another book that attempts to teach programming to first- year students, using Java. As Nick Efford pointed out in C Vu previously (Volume 10 No 5, July 1998), there are problems with Java as a first language, in that its complexity and level of abstraction give it a steep learning curve for those new to computing. (I don't agree with Nick that C++ is better as a first language, but that is another story). The authors of this work don't seem to recognise this problem: indeed, they jump straight in to the complexities of the AWT before introducing many basic programming concepts. This type of approach is superficially attractive as it means that students get to work with code that does something interesting early on, but I believe that it is fundamentally flawed and leads to 'copy-and-paste' engineering, where code is hacked around without being understood. Worse, their first example includes a switch statement! (I regard the switch statement as an occasionally necessary evil. Code peppered with switch statements is hard to understand and an indicator of poor design). I think this point needs elaboration. In many cases use of a switch statement indicates that the programmer has not considered the potential for polymorphism. However there are many cases where polymorphism is inappropriate. In such cases switch statements are (empirically) known to be less problematic than most other control statements. - Francis Glassborow The first four chapters explore the AWT classes. This might be a highly educational exercise, if the design of the AWT was discussed and criticised in some way, though with students at this level the discussion could not be very deep. However, the AWT is treated as something to learn in itself, with pages devoted to descriptions of methods. This is guaranteed to bore and confuse the unfortunate student. With Chapter Five, the Java language syntax is finally introduced. The description of this is unexceptionable and much of the advice given is very sound. What is galling is where good advice is given in the text that is not followed in the examples. For instance, on page 222 it is advised that when coding if statements braces should always be used, even when only a single statement is to be conditionally executed. On the same page, an example is presented of a nested if with no braces coded at all. In fact the entire text is littered with code like this. The latter part of this book is actually not all that bad. There is little or no discussion of OO issues, but much of the guidance provided on how to approach programming problems is sensible.

The best thing about the book from a learning point-of-view is the large number of exercises, which for the most part are well designed and pitched at the right level. It is a pity that the authors did not take the same trouble over the structure of the book as a whole or the quality of the code examples. Overall, not a book one could recommend.


Book cover image courtesy of Open Library.