Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Java Books Media Programming Book Reviews

Wicked Cool Java 108

Simon P. Chappell writes "Every now and then, as a book reviewer, you just have to take a chance. The way it works is that editors ply their wares to you, sending you lists of available books on a regular basis and tempting titles catch your eye. The problem is that until you've committed to review the book, received it and read it, you don't know whether you've found a good one or have just been a victim of drive-by marketing. This was such a book. The title sounded good and I just had to try it out. But would it live up to the name that it bore?" Read the rest of Simon's review.
Wicked Cool Java
author Brian D. Eubanks
pages 224 (12 page index)
publisher No Starch Press
rating 8/10
reviewer Simon P. Chappell
ISBN 1593270615
summary Programmers and technical leads will love this book.


Most of the books that I review are targeted for programmers and this is no exception to that rule. If you code Java for fun or profit, then this book is for you. That said, as one whose day job is a technical lead for Java development, I actually appreciated the book more than I expected. For a technical lead, just knowing that something is possible and seeing clear examples of how to do it, is a huge relief. When you're the guy who has to lead the efforts to fulfill I.S. management's promises, it's good to know that your team can do some of the things they said we could, using language features in conjunction with available open-source and free libraries.

The back cover calls it an "idea sourcebook" and I'm going to concur with that description. It contains a very wide range of subject matter and so each chapter addresses a portion of that spectrum. The first three chapters cover core Java skills and will be applicable to every reader of the book. The balance of the chapters are more discretionary and will appeal to different readers to differing levels. Each of the chapters brings about a dozen thoughts or tools concerning the subject area to the reader. Most of these tools are explained and short code samples are given for their use.

The first chapter covers the Java language and some of the core APIs. It looks at a few of the forgotten gems of the Java language while mostly looking at some of the fancy new features of Java 5. Chapter two addresses String utilities, primarily through the regular expression capabilities introduced in Java 1.4. String handling is a first order skill, even in these days of objects, so this chapter is very welcome. Chapter three looks at processing XML. Like string handling, XML processing is becoming a first order skill, that even if you don't like (and I don't), it is still important to be able to handle the vast quantity of the stuff that we are surrounded with.

Chapter four looks at the semantic web. This is a world that speaks RDF, RSS and Dublin Core. If you already speak that dialect of geek, this is your chapter. The fifth chapter examines scientific and mathematical applications; calculation engines, arbitrary-precision arithmetic and neural network drivers. Chapter 6 brings us graphics and data visualization; graphing and report generation are the order of the day here. Chapter seven looks at multimedia and synchronization. This is the chapter for learning to make music, having your computer talk back to you and having more fun with threads than you ever thought possible. The last chapter, number eight, is titled "Fun, Integration and Project Ideas". It's a veritable grab bag of ideas, ranging from using Java to control a LEGO robot to writing in JVM Assembly Language.

While I don't wish to steal any thunder from the book, perhaps an example or two would be appropriate at this point? The JScience API is discussed in chapter five and it's unit framework is explored from pages 109 to 111. Calculations with values of differing units can be problematic; just ask any NASA engineer. The JScience framework allows you to work in the appropriate units for a value and have all calculations with those units convert themselves correctly. There are many practical uses for this, but I enjoyed the furlongs per fortnight example that the book provides: did you know that the speed of light in a vacuum is 1,802,617,499,785.253 furlongs per fortnight? In chapter two there is a great example of generating random text. This can be useful for suggesting pronounceable passwords and just such an example is given on pages 34 to 36.

If you have the desire to explore some of the uncharted waters of the Java world, then there's a good chance that you'll like this book. If you are the kind of person who loves to hear about new and interesting things that you can do with Java and are happy to have them served up in a book where they're categorized and presented with code examples, you'll love this book. As I mentioned earlier, this book is also useful for those leading teams of Java programmers; where knowing that something is doable is of great value in and of itself.

If you are one of the large number of Java programmers still working at the 1.4.x level, or who needs to target 1.4.x JVMs, the first chapter will be the least useful of the whole book, with the majority of it's examples based on Java 1.5. If you are not really much of a one for interesting Java coding suggestions, with examples, then perhaps this is not the book that you thought you were looking for.

The book has a website, the cunningly named wickedcooljava.com that provides links to all of the libraries and code projects mentioned in the book.

This is a great book. I loved it, but then I fall into the realm of the perpetually curious and I love to explore new and interesting things to use Java for."


You can purchase Wicked Cool Java from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
This discussion has been archived. No new comments can be posted.

Wicked Cool Java

Comments Filter:
  • APIs he forgot (Score:5, Informative)

    by AKAImBatman ( 238306 ) <akaimbatman@gmaYEATSil.com minus poet> on Wednesday January 25, 2006 @02:24PM (#14560151) Homepage Journal
    Looking at the APIs used by the book [wickedcooljava.com], I think he forgot two very important ones:

    PDFBox [pdfbox.org] - A library that gives you complete parsing control over PDFs. You can create documents from scratch, extract text, merge pages, change text/images/fields, populate forms, etc. With the use of PDFs in corporate environments on the rise, you just can't go wrong with PDFBox in your toolbox.

    POI [apache.org] - Does your company use Office documents in any way, shape, or form? Then you need POI. Create spreadsheets and word documents from scratch, modify existing documents, create spreadsheet computers and reports on the fly. The possibiliies are endless, and your boss with thank you for not having to deaL with ANOTHER CSV file.
  • Re:Java Questions. (Score:5, Informative)

    by AKAImBatman ( 238306 ) <akaimbatman@gmaYEATSil.com minus poet> on Wednesday January 25, 2006 @02:38PM (#14560323) Homepage Journal
    Is there a way to get a list of windows printers without using native calls?

    Look up javax.print.PrintServiceLookup. More Info [sun.com].

    Is there a way to print "straight through" to local or network connected printers in Java?

    I haven't tried it, but supposedly you can change the DocFlavor to do what you want. In absence of a forced flavor, the system will auto-select the best method.

    Is there a way for a java app to trap keypresses when the java app is out of focus, without using a native interface?

    No. This is a huge security issue, and is unlikely to ever be included in Java. However, the java.awt.Robot class lets you do stuff like capture a screenshot, send events, etc.
  • by Valdier ( 398217 ) on Wednesday January 25, 2006 @03:25PM (#14560863) Homepage
    ebay.com... some might call it successful.
  • Or just spit out XML (Score:3, Informative)

    by nobodyman ( 90587 ) on Wednesday January 25, 2006 @03:30PM (#14560900) Homepage
    If your customer/employer works with OfficeXP and later (or OpenOffice, for that matter) you can use the XMLSpreadsheet format. This format has 90% the functionality of the native xls format (no macros or graphs, but can do tabs, pivot tables, etc. This way you aren't tied down to a particular api or programming language. Plus you can use design your spreadsheet as a php/jsp page, or use xslt to transform from your xml data to the excel format.

    Best of all, Microsoft has published very good documentation as well as the XML Schema (which comes in quite handy for text editors that use schemas for tag-completion. They are also much easier to "debug" because the file format is human readable (well... it's ugly but still better than looking at bif8 in a hex editor).

  • by bcl ( 200161 ) on Wednesday January 25, 2006 @03:44PM (#14561031)
    In the old Perl Journal there was a review of Perl for Dummies. It was two pages long and it must have ripped every single chapter in the book (oddly enough I never picked up a copy of the book to check). It was one of the best book reviews I have ever read because it meshed so well with everything I think is wrong with most popular press computer books (too much cognitive overhead too early in introductory texts and too much recycling of on-line documentation in all of the books). Not sure what it did to ad revenue to publish such a scathing review but it made me swear udying loyalty to the Perl Journal.
  • Re:APIs he forgot (Score:4, Informative)

    by AKAImBatman ( 238306 ) <akaimbatman@gmaYEATSil.com minus poet> on Wednesday January 25, 2006 @04:04PM (#14561246) Homepage Journal
    Number 1, why is "production" version of PDFBox releasing beta code?

    Only the rendering system is in beta. The parser (which is what most of us are interested in) is reasonably stable at this point.

    Any why was the PDFToImage disclaimer on the website but not in the actual JavaDoc API, which is what Java programmers use to understand 3rd party libraries?

    That's a good question. I suggest you mention it to the PDFBox developers. The fact that the rendering subsystem is in beta should be made as clear as possible. It just isn't ready for this sort of usage yet.

    PDFBox is cute but is NOT ready for PDFImaging in a prime-time way, which is why I moved to ImageMagick and other toolkits.

    PDFBox is ready. The new tools you want to use, aren't. If you need to merge PDFs, populate PDF forms, and do other parsing-type duties, PDFBox is an excellent option. And this comes from someone who used to directly manipulate the PDF objects before PDFBox even included tools for most of this stuff. :-)
  • Re:Why... (Score:5, Informative)

    by The Masked Rat Fink ( 68826 ) on Wednesday January 25, 2006 @04:53PM (#14561706) Homepage
    As the reviewer of this book, I can offer a few observations.

    Firstly it's a pretty thankless task. If you're lucky the author will send you a thankyou email. (That's always nice) But, if you slam the book, you can also get hate mail from the author. (Not so nice)

    Second, while the books are generally sent to you for free, that's all you get. We don't get paid people! Oh, and lots of polite emails asking if you've had an opportunity to look at the book yet. Translation: hurry up and get writing!

    Third, there is just no way to please everyone on Slashdot. Grow some tough ol' skin if you're going to offer up reviews because every man and his dog is going to think that you're lower than a script kiddie.

    Fourth, there's no money in this. I created a website to host reviews at and signed up for a google ad account, but I make about $5 a quarter, so I'm not making any extra money on the side.

    Fifth. I love reading books and being opinionated, so I love doing this, but it has to be love because there is no money and precious little appreciation.

    Simon
  • Re:Java Questions. (Score:3, Informative)

    by malraid ( 592373 ) on Wednesday January 25, 2006 @06:04PM (#14562425)
    I've done the printing of raw characters and you just need the correct device, it's quite easy. You can use "/dev/lp0" "LPT1" or even "\\printeserver\FX890". Works on windows, linux ..... Heres some simple source code that's actually in production and working nicely:

    FileOutputStream os;
    PrintStream ps;
    String device="LPT1";
    os = new FileOutputStream(device);
    ps = new PrintStream(os);
    ps.print(escapeChar);
    char c = 64;
    ps.print(c);
  • Re:APIs he forgot (Score:1, Informative)

    by Anonymous Coward on Friday January 27, 2006 @05:05PM (#14582951)
    Thanks to both posters, I work with PDF's (unfortunately) and I'm glad to hear about your real-life usage of the library.

Kleeneness is next to Godelness.

Working...