Forgot your password?
typodupeerror
Java Books Media Programming Book Reviews

Wicked Cool Java 108

Posted by samzenpus
from the totally-super-programming dept.
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:
  • by Anonymous Coward
    Is there a way to get a list of windows printers without using native calls?

    Is there a way to print "straight through" to local or network connected printers in Java? Eg. printing a few lines of text and escape codes (not an entire "page") on a line printer (dot matrix, thermal, whatever.)

    Is there a way for a java app to trap keypresses when the java app is out of focus, without using a native interface?
    • Re:Java Questions. (Score:5, Informative)

      by AKAImBatman (238306) <akaimbatman.gmail@com> 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.
      • Re:Java Questions. (Score:4, Interesting)

        by dkf (304284) <donal.k.fellows@manchester.ac.uk> on Wednesday January 25, 2006 @05:17PM (#14561915) Homepage
        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.
        It's also a really sucky interface. I can remember using an app that once trapped certain keypresses for its own purposes (OK, it wasn't Java). Never ever again. There is no circumstance where having some random annoying program pop up every time you're trying to write something complex in some other program is going to be counted as anything other than bad. If you think you need it for some app, think again. Better yet, change careers to something where your psychopathic and sadistic tendencies can be of marginal benefit to society, like flower arranging or tax collection.
        • It's also a really sucky interface. I can remember using an app that once trapped certain keypresses for its own purposes (OK, it wasn't Java). Never ever again.

          Konfabulator is one that springs instantly to mind; ICQ is another. Both trapped key presses that were meaningful to my choice of IDE at the time (JBuilder when I was using ICQ, Eclipse when I was using Konfabulator). Very annoying, until I found the config option to disable or change the trapped keys.
        • If you think you need it for some app, think again.

          I disagree. I love having global keyboard shortcuts for winamp. Off by default, completely customizable. Focus stays at whatever it was previously on.

          As I'm typing this, I throw in 'Ctrl+Alt+Shift+C' and keep typing, and the music pauses as I still type in Firefox. Works wonderfully.

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

      by malraid (592373)
      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);
    • Somewhere like JavaRanch [javaranch.com] is probably a better place to ask this sort of question.
    • Is there a way for a java app to trap keypresses when the java app is out of focus, without using a native interface?

      Maybe by just pretending to lose focus and instead establishing a giant transperent window covering desktop that would capture and rebroadcast all the keyboard and mouse events?

  • APIs he forgot (Score:5, Informative)

    by AKAImBatman (238306) <akaimbatman.gmail@com> 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.
    • PDFBox has been a lifesaver, it's really a must have for anyone trying to work with PDF content.
    • I've been using JExcelAPI [andykhan.com] for a while, and it's dirt simple to use for reading and writing Excel files. It's fairly complete feature-wise, and it's been able to do everything I need. It also has an easy learning curve, which was helpful when we were in a crunch.
      • Or just spit out XML (Score:3, Informative)

        by nobodyman (90587)
        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
    • Re:APIs he forgot (Score:3, Interesting)

      by Heembo (916647)
      PDFBox does not scale, it's horrible for server applications that need high load. PDFBox is also a memory hog trying to scale images. I know this cause' I built a massive image processing server and get SLAMMED from using PDFBox during high load. I moved to a System.process ImageMagick native solution to solve this problem.
      • Re:APIs he forgot (Score:5, Interesting)

        by AKAImBatman (238306) <akaimbatman.gmail@com> on Wednesday January 25, 2006 @03:45PM (#14561041) Homepage Journal
        PDFBox is also a memory hog trying to scale images. I know this cause' I built a massive image processing server and get SLAMMED from using PDFBox during high load.

        Are we talking about the same thing? PDFBox is a low-level parser for the PDF format. AFAIK, it doesn't scale anything. Maybe you're referring to the new PDFtoImage functionality? You know, the tool that has the following disclaimer on it?

        Warning
        This is new code and should be treated as beta quality!
        • Indeed. Number 1, why is "production" version of PDFBox releasing beta code? AH! Cause it's only at version .7! Any why was the PDFToImage disclaimer on the website [pdfbox.org] but not in the actual JavaDoc API [pdfbox.org], which is what Java programmers use to understand 3rd party libraries? PDFBox is cute but is NOT ready for PDFImaging in a prime-time way, which is why I moved to ImageMagick and other toolkits.
          • Re:APIs he forgot (Score:4, Informative)

            by AKAImBatman (238306) <akaimbatman.gmail@com> 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. :-)
            • > PDFBox is ready. The new tools you want to use, aren't. That is a fair comment. I thank you for your comments and intelligent commentary in this thread.
              • Re:APIs he forgot (Score:1, Informative)

                by Anonymous Coward
                Thanks to both posters, I work with PDF's (unfortunately) and I'm glad to hear about your real-life usage of the library.
    • MiltiValent [sourceforge.net] might be a better suggestion than PDFBox.
  • by iBod (534920) on Wednesday January 25, 2006 @02:25PM (#14560162)
    or "Wicked Cool Philately"
  • 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. That's something that a relatively high level language such as Java lends itself all too well to. It seems, from this review at least, that this is a cookbook, but rather than the very useful code in something like the Perl Cookbook, this is full of trivial examples that rarely apply to the real world. Not much good to learn from, not much good
    • by Anonymous Coward
      I doubt it'll be appearing in my collection any time soon.

      Yeah, your collection full of tentacle manga and Star Trek novels doesn't leave room for this book.
    • I think the reviewer's point was: I'm a knowledgeable Java lead. I know almost all of the core Java 'cookbook' recipes by heart, or I have them in a book already on my shelf. Where can I find a compilation of some of the more risque, edge-case type usages of Java? How can I continue to fill up my bag-o-tricks when I already have so much core knowledge about the language?

      Not every cookbook has to be core, or even based around a common subject. Your conclusion that the book is "not much good to learn fro
    • Depends on what "real world" you're trying to apply the examples to, I guess. In my real world, where I do data visualization in Java (and want to further myself), and where there is a quickly accelerating Semantic Web project just down the hall that relies heavily on RDF etc., this book strikes me as something worth checking out.
    • The guy from PHPGD.com doesn't like Java! What a suprise! Javalord replies to him questioning that he ever worked in the 'real world'. What a suprise!
  • by $1uck (710826) on Wednesday January 25, 2006 @02:28PM (#14560209)
    Was I just biased against the book originally b/c the rather childish/dumb name? I read the headline... got the impression the reviewer disliked the book. Decided to read the review anyway and kept thinking to myself the book sounds decent waiting for a "but" and never found one. I may have to check it out.
    • I agree with your observation that the headline and review seems a bit at odds.

      I have looked through this book at the local borders and I agree with the outcome of the review. There is a lot of neat stuff in this book and the only reason it's not currently in my collection is that I've had a more pressing need for other titles (job related).

    • Yep, mostly the fault of this

      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.

      This was such a (good|drive by marketing) book? I assumed the latter (why else would he phrase it that way?)

      After reading the review it does sound interesting and I added it to my wishlist.
  • by ls -la (937805) on Wednesday January 25, 2006 @02:39PM (#14560338) Journal
    Must be from New England.
  • Why... (Score:5, Insightful)

    by GigsVT (208848) on Wednesday January 25, 2006 @02:50PM (#14560469) Journal
    Why don't we ever see a book review on here that says, "This book is a total joke, a scam to make money on a buzzword?"

    I'm sure such a book review might not pay as well in kickbacks, but it sorta devalues the point of doing book reviews if you never see negative ones.
    • Re:Why... (Score:3, Insightful)

      by gEvil (beta) (945888)
      Are you going to take the time to write a scathing review of a book that you can't stand? I know I wouldn't. If I bought a book that's not worth it's salt, I'd stick it up on the shelf or give it away, note it as a bad decision, then move on (most likely find a book that does meet the goal). I most certainly wouldn't sit down and pound out a 500 word essay on why I won't ever touch the book again. But that's just me.
    • Re:Why... (Score:3, Interesting)

      by daviddennis (10926)
      Sometimes, a really good negative book review can be interesting to read, yes, and even interesting for people to comment on. So as someone who wants to enjoy their reading time on Slashdot, you have a point.

      That being said, it's not particularly useful unless you were seriously considering buying the book, and the review came just as you were making up your mind. To tell the truth, the reviews on Amazon do an excellent job in solving that particular problem, so we don't really need to worry about that.

      Th
      • 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
    • it sorta devalues the point of doing book reviews if you never see negative ones.

      I'm the editor for a publication, and we used to have a "book review" page. I had the same objection you do--"review" implies review and not necessarily recommendation--so we started calling it "Recommended Reading" instead.
    • 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:Why... (Score:2, Insightful)

      by LinuxRulz (678500)

      This may be a bit offtopic here, but I need to say it. There are not too much bad book reviews because there are not too much bad books. A book is a point of view on a topic. Everyone can't always find a book that matches him. Some books may seem plainly useless for you, but people having trouble understanding some concepts may appreciate them.

      I believe the work of the reviewer isn't to judge if a book is good or bad. It's job is more into orienting the reader and helping him know if this is the book he

      • by jefu (53450)
        Oh, so wrong.

        There are so many bad books. But as an occasional reviewer, I try to pick books that look like they might be interesting and over time I've managed to get pretty good at that - so I don't review books all that frequently that are all that bad.

        But they're out there. Take a look at the shelves in many bookstores. At least half those books are junk - aimed at the "gullible and confused consumer" market. Also, almost anything that is entitled something like "Foo for the Bar platform" tends

    • Why don't we ever see a book review on here that says, "This book is a total joke, a scam to make money on a buzzword?"

      Ok, I have one. "Bluetooth for Java", which I bought when I was going to write a J2ME demo game. The technical specs part of the book is ok, but I'm guessing is just copy and paste from the official specs from Sun and the BT concertium. The code. though.. when you get to the coding, the examples he gives are buggy and incomplete. Check out the code available at http://www.javabluetooth.com [javabluetooth.com]
  • OK (Score:5, Funny)

    by gowen (141411) <gwowen@gmail.com> on Wednesday January 25, 2006 @02:51PM (#14560476) Homepage Journal
    inheritance + abstraction = crazy delicious
  • by digitaldc (879047) * on Wednesday January 25, 2006 @02:58PM (#14560546)
    This is a world that speaks RDF, RSS and Dublin Core. If you already speak that dialect of geek, this is your chapter.

    Great, now I am going to have to buy several other books just to be able to read this one chapter.
    • This is a world that speaks RDF, RSS and Dublin Core. If you already speak that dialect of geek, this is your chapter.

      Great, now I am going to have to buy several other books just to be able to read this one chapter.

      Or save buying several other books since you now know enough to convince your boss that its a bad idea.

      That said I have this book and I like it, there are enough new thngs that I might try out (and might even use at work) to be interesting and a few things I already knew and a few that I'

  • by Chris Mattern (191822) on Wednesday January 25, 2006 @03:07PM (#14560646)
    Ick.
  • Text Book Material (Score:4, Interesting)

    by TCFOO (876339) on Wednesday January 25, 2006 @03:13PM (#14560723)
    This would make a great text book for advanced java programming classes.
  • by mmThe1 (213136) * on Wednesday January 25, 2006 @03:22PM (#14560826) Homepage
    "For a technical lead, just knowing that something is possible and seeing clear examples of how to do it, is a huge relief."

    If you're leading a good programming team, you don't need a book to know if something is doable.
    If the team isn't good enough, then the book won't help.
    • In this case 'good' must mean skilled people
      but also
      - senior enough - a lot of things are technically possible for a good junior while a good senior look for what is actually possible ( and that is company / project dependant ).
      - available - you need your answer, if your team is 150% busy they may not be available to do the required research for you.
      - cover the right skillset for the technologies you need to take some decision. Server Side dev. vs UI Side. C++ dev vs Java dev, ...
      - complete - you could have
    • I really want to agree, but life has too many variables and programming teams even more than that. Add in the rate of change of technology and you have situations where being six months behind on your reading can make the difference between knowing you can do something with your prefered programming language and thinking it's still impossible.
  • The title sounded good and I just had to try it out. But would it live up to the name that it bore?"

    No.

  • 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?

    Abe: "The metric system is the tool of the devil! My car gets forty rods to the hogshead, and that's the way I likes it!"

  • by Tim Browse (9263) on Wednesday January 25, 2006 @05:44PM (#14562198)
    "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.

    So, what he's saying is, you have to read the book to find out what sort of review to write, instead of just believing that every book you get is brilliant and regurgitating the associated press release?

    Life certainly is tough as a book reviewer. I bet sometimes they even put favourable quotes on the back of the book to throw you. But they're no use with our wily correspondent!

    • As the reviewer in question here, I can assure you that I actually read the book before deciding if I like it. No ... really! I do try to stack the odds in my favour by requesting books that are for subject matters that I'm interested in, but that is no guarantee of wonderfulness.

      Simon
  • The author wants to show off an evolutionary computation (genetic algorithms, genetic programming, evolution strategies, etc.) package in Java and he picks ... jgap? Too simple. IMHO, and I think in the opinion of most EC Java coders, the system to beat is ECJ [gmu.edu]. [and I know]
  • Wicked Java, I get. Cool? Doesn't fit in the same sentance as Java.
  • I'd really like to see a book that covers in-depth the use of reflection in java. I've played around with it a bit and it seems like it's a really nice way to supplement some of the problems caused by the lack of pointers in Java. Unfortunately, it also seems to be one of the things for which the documentation is a little lean. Anyone know of a good book that covers this aspect of Java?
    • When dealing with Java's lack of pointers, I found I needed to learn more about JNI. Addison Wesley's Java Native Interace [oreilly.com] contains some of the more useful info I found regarding the classloader mechanism, which is about all you should need to supplement the java.lang.reflect API docs.
      • thanks, I'll take a look at it. I've used JNI a bit and found it to be really nice...all the way up until I had to work with someone who didn't know (and refused to learn) C++.
    • If you're having issues with the lack of pointers in Java, it means you're not yet fully acclimated to the Java style of development. A common mistake of new Java programmers is to look to the Reflection APIs to allow them to replicate some of the functionality they had with pointers. Here's the advice that every one of those programmers gets:

      DON'T DO IT!

      Reflection can easily make a mess of your program if it's abused. If you have a problem with your coding style, take it up on JavaRanch, JavaLobby, JavaGam
      • one thing i find reflection usefull for is where classes (which you don't control) declare the same methods but there is no interface in place to allow you to use it on all of them.

        an example is setText/getText both labels (JLabel) and edit boxes (JTexfield) support it but they don't have a common interfacing declaring it. reflection lets you write a single peice of code that works with both!

        another thing it can be usefull for is to support something as optional (for example the jnlp load/save mechanism) wi
    • Manning Reflection In Action [manning.com] would probably be the book you want
    • reflection is pretty simple really, and the docs aren't that bad. just start playing arround with it until you feel comfortable.

  • "This can be useful for suggesting pronounceable passwords and just such an example is given on pages 34 to 36."

    That's one hell of a long password. I guess it's implied in the phrase `pronounceable passwords' that one is allowed to take coffee breaks ;-)

COBOL is for morons. -- E.W. Dijkstra

Working...