Posted tagged ‘java’

Test Driven – Lasse Koskela/Manning

septembrie 2, 2008

I have read this book a few weeks ago and now I am getting started to really apply it in a project.
In the field of TDD, this book is one of the best books I have ever read.
The book is easy to ready, easy to understand and well-written.

The author divided the book in three parts:

The first one introduces the concepts/the topics: TDD and Acceptance TDD. It presents an overview of TDD, a nice tutorial that presents you TDD from the ground and even how to apply it to a working code (welcome to refactoring ). Nice introduction to ATDD.
The part is well written and will make you understand very well the concepts.

The second one tries to demonstrate how we can apply TDD in working examples, in working situations so we may say that is entirely a part dedicated to the concrete world of development.
Some key concepts here: fixtures, test doubles, web development (servlets, Spring, JSP, Velocity, Wickets), jdbc database, ORM tools like Hibernate, thread testing , concurrency testing, GUI testing (Swing), tools for GUI testing.
I think the part is a little bit exhaustive, I was getting tired trying to understand all these examples, but anyway it’s a nice reference for all of you that might be interested.

The last part deals with Agile programming /Extreme Programming and presents the concept of building
an entire application in a test-first manner with Acceptance TDD. It presents an application build
properly for such Acceptance TDD named Fit. I think that you have to read also some other books covering this topic in order to be fully documented. I think this part does not covering enough all the concepts behind “write the test first”.

It’s important to mention also the appendices: they present JUnit and Easy Mock,
both are well known in the Java world (especially the first one).

I may say that I really love this book, I do not agree entirely with some concepts in the third part of the book but I think that except these points, even if I should read it 10 times I discover every time something new.


Bitter Java – by Bruce Tate / Manning

august 28, 2008

A few years ago when I first read “Refactoring: Improving the Design of Existing Code” by Martin Fowler & Kent Beck I realized how many mistakes I have made in my projects.
Now reading “Bitter Java” by Bruce Tate I am somehow in the same situation:
I wish I had this book a few years ago.

The book is really full of antipatterns and ways to avoid them. Understanding antipatterns will help software developers prevent and recover from situations like spaghetti codes or ineffective algorithms to name only some of them.

The focus of this book is Java antipatterns and how to eliminate or reduce them.
The book has 3 parts and 11 chapters, a detailed table of contents, also a detailed index and, as a plus, a bibliography for additional resources. The book contains also examples of Java code that address specific issues in corresponding contents.

In my opinion the book is addressed to intermediate Java programmers or advanced programmers which know Java very well but they develop without a clear set of patterns in mind so they might identify here a lot of common mistakes (antipatterns).

As I said, it has 3 parts.
The first one is about design patterns, antipatterns, and about the Internet standards /technologies used in  server-side Java. Part 2 covers the most largely chapters of the book and provides detailed antipatterns in Java programming: about servlet antipatterns , MVC antipatterns, JSP antipatterns , cache management (why use cache, how to use a cache, problems/solutions, synchronizing the cache),
memories issues (memory leaks, lapsed listener leaks, problems/solutions)
and  also a very interesting example of an antipattern for String manipulation and for Collections .

A nice chapter and very useful for me was the chapter that talks about antipatterns related to connections and coupling, pool of connections, how to reuse a connection, how to clean-up a connection , why and how to use XML in order to decouple, even when to use XML and when the XML tends to become rigid.

The second part concludes with a chapter dedicated to Java Beans: old EJB technology (not 3.0). My opinion is that this chapter should not be “refactored”, but completely rewritten in the next edition of the book. Without this chapter, the book even if it is written in 2002 has the same actuality in 2008.

Part 3 talks about coding standards guidelines and performance: the author explains why study the programming hygiene, why should always addict to a coding standard (for naming conventions, braces, indentations, comments, structure of a method and of a class), why adopt convention for testing and why build a good style guide.

The last two chapters address scalability & performance issues:  topologies for performance, workload management, session management, tuning.
As it starts, the book ends also with a chapter dedicated to patterns/antipatterns.
I think that the main reason to read this book is written by the author here in the last chapter:
“Good programmers learn from their mistakes, but that costs time. Great programmers learn from the mistakes of others”

If your Java project isn’t going well or think that your team took a wrong direction I highly recommend reading this book.

You may buy this book from here:

Or from

Ionel Condor,
JUG Cluj Napoca, ROMANIA