Showing posts with label book review. Show all posts
Showing posts with label book review. Show all posts

Thursday, May 19, 2011

Apache Wicket Cookbook — book review

Some time ago I reviewed the drafts of the new book from Wicket rockstar programmer Igor Vaynberg: Apache Wicket Cookbook. If you are serious about using Wicket, this book is for you. It is fast, to the point, has very clear code samples and teaches you all the relevant (both clean and dirty) stuff you need and which Wicket in Action could not cover.

Conclusion: this is the book to read after 'Wicket in Action'.

Friday, August 1, 2008

Effective Java 2nd edition - Book review

If you are even a bit serious about your java programming, this book is a must read. There is no other book that improved the quality of my java programming in such a dramatic way.

Now this was my opinion on the first edition. After having read the second edition, I can tell you that the same top quality is there, with lots and lots of big and tiny updates on top.

Ok, with that out of way, here are some comments:

  • In the introduction it says 'This book is not intended to be read from cover to cover'. Ignore that, read it from cover to cover anyway!
  • Initially I missed an overview of what changed since the 1st edition. But when I started reading I understood that such a list would be ridiculous. Every chapter has been improved in tiny, and sometimes big ways.
And now for some tiny counter noises:
  • Item 4: This item is about enforcing noninstantiability of classes that contain static methods only. However, except for saying that is nonsensical, it fails to provide a good reason for preventing this. I would say: don't bother. Let silly programmers instantiate the class. Firstly it can not do much wrong, secondly, any good IDE warns you about it.
  • Item 8: When overriding equals, one should use == instead of equals to compare fields of enum type. The item mentions that this should only be done for certain primitive fields.
  • Item 60: I disagree with the advice to throw NullPointerException in case an argument was null while the contract of the method specifies that this is not allowed. NPE is also thrown by the JVM and is therefore more suitable to indicate a programming error. IllegalArgumentException is in my opinion more suited to express that a method is used wrongly. In other words: a NPE indicates an error inside the method, an IAE indicates an error outside of the method.
  • Item 66: I recently saw a neater trick to control threads. More on this in the next post.
  • Item 68: One thing that still puzzles me is how one can write a consumer task with the new executor services. This item does not make this clear. Perhaps this use case still warrants the creation of your own thread.
Happy reading!

Update 2008-08-03: refined my critics on throwing a NPE vs IAE.

Monday, January 21, 2008

GWT in action - Book review

I recently joined JTeam, a self declared GWT specialist. Of course I do not want to stay behind so I started reading GWT in Action.

That was a mistake. There is nothing wrong with GWT, I think it is a very nice component oriented technology in the spirit of Swing and Wicket, which makes it a lot easier to build very complex applications.

But back to the book. Reading the book is a lot like looking at an extremely knowledgeable professor. The kind of professors that know so much that they don't know where to begin. And like with the professor you will eventually get it if you hang on and are able to sort it all out in your head.
Well, I was fed up with it in chapter 5, half way through the 17 chapter book. Here are my mischiefs: 1) the text was constantly referring to chapters further away in the book, 2) it was continuously repeating itself (I had to read at least 4 times that it is okay to use something else then Eclipse), but worse, 3) the text was almost continuously on a different conceptual level then the reader could be. For example implementation details are mentioned (for example the event_bits attribute in the generated HTML) while they have nothing to do with making you understand the API (writing an event callback class). Or the other way around, at places where a simple examples would do wonders there is only some broad goal description.

Since there are many other books on GWT, you are probably better of with another one.

Thursday, December 27, 2007

JRuby on Rails - Book review

So what do you put in a book on JRuby? After all, for the programmer JRuby is 'just' another Ruby implementation. The question must have come up when Ola Bini decided to write this book. The result is materialized in Practical JRuby on Rails Web 2.0 Projects - Bringing Ruby on Rails to the Java Platform. The title is well chosen and also answers the question: JRuby on Rails is a practical book; it guides you through the implementation of several Rails sites and along the way it shows you neat tricks that are only possible in JRuby.

Contents
The first half of the book is all about JRuby on Rails. If you already know Rails it is funny to consistently see jruby instead of ruby, but otherwise this is part is boring for the initiated. If you do not know Rails and like to learn from examples, this chapter is well worth your read.

Right after that is an interesting part for all us that want to mix Java and Ruby.

Later in the book, Ola goes through the trouble of explaining how to use JRuby with all the non interesting things in Java: session beans, message beans, JMX, XML processing and SOAP. I have been in Java business for 7 years and have been luckily able to avoid these for most of the time. The integration provided by Spring could have been a very nice replacement for these subjects.

A bit hidden between this stuff, the book again shows it practicality and goes through all the options of deploying JRuby on Rails applications.

The book ends with some convenient JRuby specific references.

Conclusion
I strongly recommend this book when you are a Java programmer (of any skill) that knows some Ruby and want to start working with (J)Ruby on Rails. If you know Rails well, but little Java and you want to start with JRuby on Rails, the book is probably too heavy and will teach you only a few useful things. Do not start on this book with zero Ruby knowledge. Though appendix A helps, for seriously learning Ruby, the old Pickaxe (dead tree version) is an excellent first read.

Saturday, May 5, 2007

Agile Web Development with Rails, 2nd edition - Book review

About time for another book review: Agile Web Development with Rails, 2nd edition, written (mostly) by Dave Thomas.

The book shows you all facets of developing a Rails application. This is actually a big improvement over the first edition. That one did not even talk about migrations. There have been a lot of changes in Rails, and these are reflected in the second edition.

Just like the first edition, the second edition is well written and has the same structure: the first chapters walk you through creating a new application, the latter chapters provide more insight in the separate building blocks of Rails. Unfortunately the book never really goes to the bottom of things (though its pretty good in the Active Record area); there is simply too much to cover. So this book is probably not a good buy if you are already an experienced Rails developer and are prepared to find information about new Rails features on the internet.

So although it took me a couple of months to read this book from cover to cover, my conclusion on this book is short: this is a must-have for any new Rails developer.

Monday, October 2, 2006

Wicket getting serious, Pro Wicket - Book Review

One of the interesting new web frameworks that saw the light recently is Wicket. Wicket is quite radical in that it relies solely on Java programming and does away with configuration and JSP/PHP/Rhtml type html generation. Although not unique in this approach (e.g. Barracuda, Tapestry) many web-developers will have a hard time getting up to full speed quickly. Luckily this has changed with the publication of the first Wicket book: Pro Wicket by Karthik Gurumurhty.

The book 'Pro Wicket' guides you through the development of a simple and sometimes not so simple web application. Page by page the application is extended and shows more and more Wicket features. Sometimes a 'mistake' is made. That mistake is then later 'corrected'. Unfortunately this makes the book less suitable as a reference book as you always have to flip through the chapter to see if you have the complete example.

The contents of the book varies nicely. The basics and way of thinking in Wicket are explained with lots of examples. Also the internationalization features are thoroughly explained (although I find it disturbing that the example mixes up languages and countries). There are well set up explanations and examples on how to integrate popular technologies like Spring and Hibernate. The AJAX examples cover the basics (which are quite good in Wicket) but a lot is left to be discovered. Testing is even less well covered, but at least here some good pointers are given to the manuals. A nice touch is to take a brief preview of Wicket 2.0.

The book is completely written in speaking language. The following sentence is typical: "As you might have guessed by now, this method returns false by default.". For some people, like me, this is a turn down, but most are probably okay. What is worse is that on every page you'll find pronouns (like 'it' and 'that') for which it is quite unclear what is referenced.

The Achilles' heel of the book is in the end of chapter 2 where there is a totally incomprehensible explanation on how to use repeating page elements in Wicket. I find it a shame that such an important subject is tucked away at the end of a chapter on a different subject (validation), and that the reader is suddenly confronted with a page full of abstract terms and such a small example.

I had a hard time reviewing this book. At many points I thought that the book was not finished enough to be published. Of course this was okay as I was reading the beta, but when the final book came out I noticed that only the code examples had been thoroughly updated. I am afraid that either the publisher pushed this one too hard, or the author just was out of time.

Conclusions
Despite some of the remarks above I am going to recommend this book anyway. First of all because it is the only Wicket book on the market, secondly because it does teach you Wicket. And that is a Good Thing.

Thanks to Apress for providing the book for this review.

Update 2006-10-05: Added link to Karthik Gurumurhty's blog, removed spelling mistake, deleted all comments related to the spelling mistake.

Sunday, August 6, 2006

The Pragmatic Programmer - Book review

A colleague from the company that currently hires me, proudly told that they have a copy of the The Pragmatic Programmer for every 3 employees. Having just finished the Spring MVC book, I thought lets see what this is about. So I read the book and here I will convince you to read it as well.

After only a few chapters 2 strong thoughts came up and remained there for most of the rest:
1. What a dull book, I am already doing this stuff. But more importantly:
2. This is Good Stuff, I wish more people would read this book.

Though the book is old (2000) it is still very relevant. It contains a large set of well described programming practices and attitudes. You can read the entire book in any order. From experience I can say that what this book says, will really help you build better code more quickly.

One point I loved, is when the authors write off the construction metaphor (which is so previous century) in favor of the gardening metaphor. 'Gardening' is much better for explaining to business people why you sometimes need to spend time with no visible improvements.

I wondered why I had never seen iContract before, which is I think a hidden gem of the book. Apparently it is only recently resurrected.

As a totally unrelated bonus, I finally understand the use of Linda like technologies (Rinda/JavaSpaces).

Some minor points:
- I only noticed one trend away from this book: things like Active Record makes the section "Code generators" a bit redundant. Of course it can still be useful. Just watch out for software in which you don't need it.
- Exercise 23 states that it is a good idea to set java references to null after you are finished with the object. I disagree. You can consider doing this when you are writing code for a particular (old) JVM version that you happen to know intimately. And even then I would say that your methods are too long.

Anyways, the book does justice to its title; all tips are practical and executable. The more people will use ideas from this book, the less bad software I will have to work with. So here is my request to all colleague programmers: please go and read this book!

Author blogs: Andrew Hunt and David Thomas

Saturday, July 22, 2006

Expert Spring MVC and Web Flow - Book review

I just finished another book: Expert Spring MVC and Web Flow. This time I really enjoyed reading the book. The tutorial and the example applications distributed with Spring are excellent, but to get a good feel for the complete Spring MVC this book is a gem.

Here are some of its strong points:
- The book has clear subjects per chapter (an obvious requirement, but not always met).
- Your time is not wasted; the language is concise without being to cryptic. Really, the books reads as if it has been reviewed and corrected by at least 30 knowledgeable persons.
- You're not coerced in how you must use Spring MVC, but you're told how to make the appropriate choices from the options Spring MVC provides.
- The book not only shows you how stuff works, but also why, learning you valuable design principles that stretch way beyond Spring MVC.
- The appendix on DWR integration is short but very sweet.

Some minor nitpicking:
- The books regularly refers to Spring 1.3, though by the time of writing it was already known that version 1.2 would be followed by 2.0 (the chapters on Spring Web Flow have this correct).
- There is no information on the new form tag libraries.
- There is no mention of Spring Portlet MVC, except for a short reference in the chapters on Spring Web Flow. (Note that you'll find switching from Spring MVC to Spring Portlet MVC quite easy.)

If you are considering learning another web application framework: buy this book.

Saturday, May 13, 2006

Ajax in Action - Book review

Last night I finished reading Ajax in Action. And although I have great respect for the authors' abilities, I found it to be a disappointing activity. Please read on why it may still be the book for you.

I found the book lying around on a table at my office. To prevent being the last developer in the world doing something with Ajax, I thought I'd better read it. Initially my heart jumped when I read the mini JavaScript introduction in an appendix. As a hard core Java programmer (with teachings in diverse range of currently somewhat old languages) I was completely in the target group. I found out that JavaScript is really different with respect to a lot of other languages and that I must have done some horrible wrongs in my previous JavaScript ramblings. However, this was my only really positive experience with the book.

The first chapters of the book were still okay as they give a nice overview of the Ajax world. In addition they managed to tell me how to do requests from JavaScript directly (the XMLHttpRequest) and how to handle the responses. I did not know much about this. The later chapters work out some very specific things which may be interesting if you currently need to build those. Some frameworks are touched upon, but never described more in any detail.

My main complaint about book is that it contains lots of descriptions of what you will be able to read instead of just giving it to me directly. It takes a lot of text to get to the point and when it gets really interesting you're referred to somewhere else. Equally interesting is that the code examples are almost all completely lacking any comments which is compensated with tedious descriptions of that code.

In conclusion, this book may be for you if 1) you need a good overview of what Ajax is about (first chapters), or if 2) you are already a good JavaScript programmer, have plenty of time to read the book and then some more to the understand the frameworks you inevitably need to use (with which you may have started with in the first place).