http://www.spinellis.gr/pubs/Breview/2007-CR-WCJ/html/review.html This is an HTML rendering of a working paper draft that led to a publication. The publication should always be cited in preference to this draft using the following reference:
|
Wicked cool Java: code bits, open-source libraries, and project ideas
Eubanks B., No Starch Press, San Francisco, CA, 2005. 248 pp.
When I was a schoolboy I got as a gift a Sharp PC-1211 pocket computer. It was powered by a pair of four-bit processors, and had a memory space of 1920 bytes for storing data and programs written in BASIC. With it came a book with tens of example programs: the obligatory moon landing game, equation solvers, financial calculators, physics simulators. Over a period of many months I diligently typed-in those programs, tinkered with their code, and in the process perfected my programming skills. In that time I discovered that programming can be a productive and immensely enjoyable activity—an opinion I continue to hold 25 years later.
Unfortunately, and somewhat perversely, hardware and software advances have significantly raised the bar on what makes a cool program. In the age of photorealistic computer games, the 15-line moon lander that sparkled my imagination will produce yawns if not ridicule. No wonder computer science programs are nowadays facing a dwindling number of applicants.
With his book Wicked Cool Java Brian Eubanks reveals a recipe for bringing back the fun factor in programming projects. By using a wide variety of open-source libraries for the examples he provides, and by pointing to the book’s web site for downloading the complete code samples, Eubanks has managed to make the joy one derives from each project well worth the sweat put into it.
The examples in the book’s eight chapters cover the modern extensions of the Java language, programs using various string parsing functions and regular expressions, the processing of XML and HTML through libraries and parsers, operations on the semantic web, scientific and mathematical examples, graphics and data visualization, sound generation, and many open-ended project ideas.
The idea of basing the examples on open-source libraries is pivotal to making the book inspiring. For example, on excerpt shows how a 20-line program tapping into JWordNet can list all the holonyms of the word “wing” (movable organ for flying, airplane part, building extension, and so on). Other examples extract data from Wikipedia, create visible graphs and neural networks, demonstrate graphics transforms and speech synthesis. In most cases the author successfully combines a neat computer science concept, such as parsing, RDF vocabularies, or functors, with a cool application, and an open source library that takes care of the boring details. Such is the breadth of the covered material and libraries that your reviewer, a habitual open-source spelunker, learned something new from more than half of the topics.
All examples are clear, well explained, and appropriately illustrated. Making the most of this book requires basic Java programming skills, a web connection for accessing the book’s web site, and motivation for experimenting with the code. With these ingredients in place it is certain that the book’s readers will be amply rewarded.