Open Source Java Programming book review

So, I’m at Barnes and Noble and manage to see the bottom shelf of the java rack chockablock with that worthy tome, Java Open Source Programming. Needless to say, i could not possibly be any less likely to spend any money on it. However, I thought it’d be worth taking it for a test drive in the enjoyable B&N cafe area.

Thus, said book and I made the long trek to the cafe, and sat down for an intimate book-to-man-to-book chat. It said some words, I said some harsh words, I nodded sometimes, I frowned at other times, and mostly I scoffed and snorted in disgust. It sat there and was eventually flung aside without being returned to the appropriate shelf. I tried to teach it a lesson in the only small way I could.

So, why shouldn’t you all rush out to buy this book? Well, where does one start? The title I suppose is as good a place as any. A more apt title would be ‘Developing web apps by avoiding all J2EE’. Perhaps ‘Stuff You Can Mash Together’ would have worked too.

The JUnit chapter, for example, is surprisingly trivial. Granted, it’s early on so perhaps the assumption is that the reader is still pretty ignorant and stupid and needs a serious amount of babysitting. We’re taught how to construct baby testcases, we’re promised a treatise on TDD (top down development or test driven development, depending on Joe Walnes’ time of the month). We’re told that to handle exceptions, we just declare the methods to throw Exception, yet there is no mention between the difference of a testcase error vs a testcase failure.

Moving on to the mock objects chapter. Here we have some frantic hand waving about how testing big system can be difficult, due to the problem of marshalling resources, environments, external API’s blahblah. All makes sense, and is a sensible intro to mockobjects. The author of this chapter however seems to have gotten bored of the idea fairly quickly, as the example provided is a trivial one which doesn’t really address any ‘real world’ situation where mocks might actually be useful (there’s no environment, resources, or complicated deps to mock).

The XWork chapter of course continues the fine tradition of outright lies to sell the benefits of this miracle cure. It claims that OSWorkflow uses/supports xwork, which of course is a complete lie. It also says that JPublish uses it (it was considered at some point as ‘the’ command framework then ditched, now it’s just supported), and has a misleading comment about webwork 1 being based on the same command framework (misleading at best).

It’s pretty clear that when that little gang of four got together, they politely listened to one another, then promptly went ahead and did what they individually wanted to do anyway. The transitions between chapters are jarring and confusing. There’s little to no warning of what’s coming up ahead (except of course where they say stuff like ‘in 10 chapters, you can read more about this!’).

Of course, we have the Atlassian plugs, JIRA is recommended, and they even manage to sneak in a Confluence mention in a login screenshot. Very cunning! The JIRA mention is actually interesting, because it’s a good example of a fairly insidious tack taken throughout. Whenever there is an alternative to a ‘recommended’ solution, they almost always mention a horrifically bad alternative. The only other issue tracking tool mentioned alongside JIRA is Bugzilla, for example. The IoC alternative mentioned for XWork is Avalon, to ensure xwork is shown in the best possible light.

The XDoclet chapter is also somewhat confusing. For one thing, it seems to go against the choir by giving helpful information about EJBs, and making it clear that EJB development can be made very easy with proper use of xdoclet. Earlier, needless to say, we have the usual EJB disinformation churned out, with furious flailing of arms regarding bad performance compared to hibernate (due to transactions, and security, apparently!), and how even with xdoclet ejb dev is too difficult since the descriptors are not very…human readable. The xdoclet chapter shits all over this theory though as it then shows us how to generate the hibernate xml file and how it’s equally easy to generate ejb descriptors. If the hibernate file is so damn easy and ‘human readable’, why the hell would you use xdoclet to generate it?

To be fair, the xdoclet chapter is one of the few that actually lists pros and cons, instead of the condescending shit-eating grin the other chapters provide, where the powers that be are kind enough to tell us what we should do.

At some point, the book just completely loses the plot and starts telling us about how we should all talk to each other within our teams. I had to rub my eyes a number of times to make sure I wasn’t going blind, they did indeed have a cute little chart that points out synchronous modes of communication (face-to-face!), and asynchronous ones (email! mailing lists!). If you’re the kind of person who needs this sort of advice, you’re hopelessly fucked.

The security chapter gives us some more frantic flailing of limbs; it discusses the downside of custom authentication (difficulty of propagating credentials) but then promptly pretends the problem doesn’t exist.

Then, quite suddenly, the book ends. There’s no wrapup, no conclusion, no gentle let down, nuthin’!

Still, there is one silver lining to this miserable little cloud. The Lucene chapter is well written, educational, and manages to put the ideas across without insinuating that a) the author is a genius, and/or b) the reader is a moron living in a cave. Good job whoever wrote that, you get a belated Christmas pressie of not having to work with the other 3 again. The rest of you, there aren’t enough lumps of coal in the world to punish you for your style and ideas (mostly the lack thereof).

32 Responses to “Open Source Java Programming book review”

  1. Carlos Villela Says:

    …and I just bought it this week. Damn!

  2. anonymous coward Says:

    this is some funny sh&?. Personally, I think it’s a good book, but your eval is pretty damn funny. haha

  3. Poomonkey Says:

    I took that book into the B&N bathroom, had a great big dump, and then wiped my hairy little butt with it. It was great.

  4. Anonymous Says:

    Great book review. I read one chapter at borders and was also disgusted.

  5. Damien Says:

    There is some good stuff in it, but for the most part I agree.

    Another thing… The writers have the freedom to write about whatever they want, but it seems kind of lame to spend so much time on beta software (WW2). Will these examples still be valid when it goes to final release?

    It’s too bad also that the sample application is so trivial. I do like the notes in the sample app that have some explanations on the code behind that page, as well as references to the book. Again though, it’d be nice if the app wasn’t so simple. A whole book on how to do CRUD in a Java web app? C’mon.

    If you’re thinking about buying this for the Hibernate documentation - don’t. The Hibernate team has far better doco included in their distribution and on their website.

    All that being said however, I did get some useful info out of it. I paid about half price for it and am satisfied with having shelled out that amount.

  6. Ara Says:

    Damn Hani! I was thinking of bribing you not to write a review, ’cause no one has ever heard a good word from you about anything ;-)

    Anyway thanks for the review. What a good gift for the new year :-)

    It’s interesting for me to read so many different opinions about this book. I’ve heard things like “chapter x is shit” to “chapter x is awesome”! Something I’ve learned is that in book writing it’s very important to accurately select your audience. A book not suitable for Hani could be very suitable for someone else, and vice versa. It’s just about the adience and what he wants from the book.

    Ara.

  7. Anonymous Says:

    This book is not suitable for any mediocre programmer. All the examples are trivial.

  8. Anonymous Says:

    Yup it’s a crappy book, not worth the cost of all the trees that got axed for the prints.

  9. Robert Nicholson Says:

    It’s a book written in the true WROX style of having multiple authors writing about topics they are familar with. The worst chapter in the book IMHO is the one on Sitemesh.

    Hani, where are located?

  10. Keith Lea Says:

    I like Bugzilla better than JIRA, and I definitely wouldn’t call it “horriffically bad.” In fact I think Bugzilla is my favorite bug tracking system.

  11. Anonymous Says:

    That’s very bad PR for you Mike, if Keith Lea prefers Bugzilla over JIRA. Mike is by the way the most biased person I ever met. What’s up with the Webwork people- they all seem to lack objectivity.

  12. Thomas the Baboon Says:

    Ooh ooh ooh ooh ooh I am a babooooooooooooooon!!!

  13. Giant Jakarta Turd Says:

    Its not just Webwork people but the whole OpenSymphonhy crowd. They always complain how crappy the Jakarta stuff is and how it always gets the publicity and know one cares about poor wittle OpenSymphony pwojects. I don’t know why Hani but would you please stop whining about it.

  14. Kristopher Schmidt Says:

    javablogs.com is built with a big mishmash of great opensource technology that will one day rule the world. the other day the daily email I signed up for 6 months ago did start sending email! Alright so the list of most popular entries from the last 24 hours was completely blank, making it kind of superfluous, but hey, what do you expect from free software and a free website, anyway? one day when it is working javablogs will show you the true power of these technologies.

  15. Patrick Lightbody Says:

    My comments are at http://www.lightbody.net/~plightbo/archives/000043.html

  16. Anonymous Says:

    Hani, I have to admit that you have some serious balls. I have a new found respect for you. You care more about the integrity of the world famous bile blog followed by several dozen java programmers than having any friends. Wow, this alter ego is consuming you my friend…

  17. Jason Carreira Says:

    You know Hani, I like your writing much more when it’s based on real problems and not just personal differences and bashing people for the sake of bashing them. I think, whether you like it or not, you have some responsibility to be fair and accurate in your writing, as you’ve gained a cult following of shit-throwing monkeys here.

    I won’t go into specifics, but your personal problems with individuals, projects, and technologies shone through brightly here, and it’s a real shame.

  18. Chiara Says:

    what the fuck is wrong with all you morons, and why the fuck Patrick is whining? Why shouldn’t Hani write a critique and express his opinions. Just because he is a friend? Oh my goodness, if one becomes a friend to you only by kissing your arses, then, hopefully, one will never want friends like you. Hani wrote what held true for him. I don’t always agree with what he says, but i would defend with my life, his right to say it. He is being attacked for the wrong thing here. Like he had a duty to shut up and keep silence in the sight of a (what he considers a crappy book,) just because he is your friend? Oh Please, do you realize pitiful you all sound. You want to write a book, write it for God’s sake, but do expect public reaction to it, whether this being praise or criticism.
    Frankly, from all i read, and this not from Hani’s comments, but rather from all you whining arses that book is very mediocre.
    Next time write an awesome book, put Hani to shame.

  19. Anonymous Says:

    LOL, There is a difference between a honest objective review and a very public and humiliating bashing presented to their prospective buyers.

  20. Poomonkey Says:

    In the end you are all just silly poomonkeys like me. Now take your ludes and laxatives and relax like a good primate.

  21. Anonymous Says:

    Chiara, precious…..

    One of the funny things about free speech is that if one exercises their right to free spech then one should expect others to exercise theirs - by in this case, criticising Hani straight back.

    There is nothing in the notion of “free speech” that suggests that if someone writes offensive shit then others have no right to be offended by it.

    Personally I think Hani has lost it and hasn’t been funny for months. This review was stupid. I’ve read parts of the book (not just skimmed it in the bookshop as Hani admits he did) and they are quite good.

  22. Joe Walnes Says:

    Well I knew eventually the book would be biled. Ermm thanks, I think. I do somewhat think you’ve missed the point of the book though.

    Read my response here: http://joe.truemesh.com/blog/000154.html

    cheers

  23. Geoff Says:

    Well I bought it and read it and to be honest I couldn’t agree more with Hani. Money well and truly wasted.

  24. Toy App Maker Says:

    “My comments are at http://www.lightbody.net/~plightbo/archives/000043.html

    Who cares? I would have never bought the book, and I wont read yours or Joe’s comments.

    We’re all proud that you all wrote a book. It reminds me of this jackass I went to school with who wrote an Introduction to HTML book back in the mid 90’s.

    All he did was slap some shit together that anyone with half a brain could have found themselves by clicking “view source” a few times in their Netscape .9 window.

  25. anonymous Says:

    So I went and looked at the book hoping it would cover the JBoss server. it didn’t. I wonder why that was.

  26. thomas winblerg Says:

    JIRA is gay

  27. Toy App Maker Says:

    “So I went and looked at the book hoping it would cover the JBoss server. it didn’t. I wonder why that was.”

    Because Mark has threatened to kill (with his bare fucking hands, no less) anyone who rips off the JBoss for pay documentation.

  28. Chiara hater Says:

    Chiara, you are such a fucking hypocrite. When is the last time you weren’t kissing the arses of all your little virtual cyberspace buddies. There is some sappy ass happy b-day to some guy named Cedric on your blog right now.

  29. Cameron Says:

    Cedric, is that you posing as “Chiara hater”? Nobody told anybody that you’re 34 years old now, so don’t take it so personally, OK?

  30. Reinhard Says:

    What’s wrong with Avalon?

  31. Toy App Maker Says:

    “What’s wrong with Avalon?” –Reinhard

    Uhhh…it sucks. That’s what’s wrong with it. Need more explanation? Look at the code.

  32. Reinhard Says:

    >> “What’s wrong with Avalon?” –Reinhard
    >
    > Uhhh…it sucks. That’s what’s wrong with it. Need > more explanation? Look at the code.

    This answer “… look at the code” is too simple. What’s wrong in detail?
    I know the Avalon Framework which is well-thought, IMO.

Leave a Reply