Reviewing The art of Unit Testing with Examples in .NET, by Roy Osherove

From time to time I like to spend some time reading up on a subject that’s work related. Today I’ve finished the art of unit testing, with examples in .NET, by Roy Osherove:

The art of unit testing with examples in .NET

Unit testing has become an important aspect of software development and as a developer I should be able to write good and maintainable unit tests. To be able to do so, I need to understand the basic concepts about unit testing and that’s why I bought this book.

Personally I think the book did a good job in explaining the basic concepts of Unit Testing:

  • Why unit testing
  • Fakes: Mocks and stubs
  • How to design code for unit testing
  • Why and how to use mocking frameworks
  • Best practices on how to organise your unit tests / integration tests
  • Trustworthy, maintainable and readable tests

However, there were also some points I found somewhat irritating:

  • Roy Osherove is also designed Typemock Isolator, a commercial mocking framework. Throughout the book you’ll notice a bit too much commercial sales about his product.
  • I had the feeling that some things were repeated multiple times throughout the book

The book is a great introduction into unit testing, and it’s clearly written. The book doesn’t go into technical depth, which makes it an easy and fast to read book. However don’t expect you’ll be able to just write all sorts of unit tests for real world applications after you’ve read this book. You’ll understand the basic unit-testing concepts and have a changed mindset towards unit testing. From that point on, it’ll be by practical learning experience. I’ll let you know within a year how that’s going 🙂

I would rate this book 3,5 out of 5.

Cheers,
Robbin

Advertisements
By Robbin Cremers Posted in Books

Reviewing Design Patterns: Elements of Reusable Object-Oriented Software by the Gang of Four

It’s been half a year since I’ve acquired this book and it has taken a huge effort to go through the book. The Design Patterns book is a highly recommended book within the IT industry and has been labeled as on of the most influential books towards code quality. On amazon the book has a full 318 customer reviews of which 216 rate this book 5 out of 5. The statistics speak for itself and that’s also the reason why I bought this book:

DesignPatterns

Many of the reviews state if you are a developer, this is a must-read book. Improving your code with design patterns, a wisdom distilled though experience of others, will make you write better code. After having done some maintenance, I have to agree on the fact that everyone can write code that works but that the difference in quality and readability of code can be huge. However, this book has been published in 1994, which makes the book almost 20 years old. The examples in the book are mainly written in c++ or Smalltalk which might make the book sometimes harder to read if you only know how to write c# or VB.NET. Many of the Use Examples of some of the Design Patterns give examples of uses of 20 years ago, which will be totally unknown to you. How am I supposed to know a text editor of 20 years ago ?

Perhaps I’m not the fastest learner, but I found this book quite difficult to get through. Some of these design patterns are not always that easy to grasp and some of the patterns are quite related, which sometimes makes it difficult to see the clear separation. The Design Patterns book is not light-reading … I’ve had to reread some patterns multiple times to realize I still barely grasp the concept because I have no experience with it and have a hard time relating it to current examples. Not to mention if you read through 23 design patterns, you’ll probably almost forget half of it again within the next 2 months. This book is not a book you’ll be reading every evening because you just can’t stop reading it, unless you’re really goofy. For me personally, it was a struggle to keep reading the book and multiple times I caught myself picking up another book because I just kept losing interest in it.

At some point I was disappointed with the book, but as many have stated before me, it’s a good book to grasp some object-orientated concepts. However I would not immediately recommend this book to other people and definitely not to a starting developer. Even though the concepts of some of the design patterns should be widely known by developers, I believe there perhaps might be books out there better suited to get the hang of design patterns, with familiar code,  familiar examples and common uses.

I’m quite confident that I will be picking up this book again in the future to check up on a pattern again. Even though many people rate the book a 5 out of 5,  I would rate this book a 3/5.

Cheers,
Robbin

By Robbin Cremers Posted in Books

Reviewing the developer bible: Code Complete, Second Edition, by Steve McConnell

When searching for recommended books for developers, Code Complete always made the recommended book list. A lot of industry experts, for which I have high admiration, suggest Code Complete as one of the must-read books. I mean … if these people say this book is a must-read, who would I be to discuss that. Unnecessary to say, Code Complete 2nd Edition made it to my real Bookshelf.

Code Complete Second Edition

The first edition of the book was published in 1993, while the second edition was published in 2004. At first, I was really sceptical about this book, whether it was still up-to-date since this book has been around for almost 2 decennium.

However, there is not discussion possible. This book rightfully deserves it’s title as one of the must-read books as a developer. The book focusses mainly on software construction and managing complexityProgramming style and code readability are discussed thoroughly. The examples in this book are mainly in c++, Java or Visual Basic, but they are understandable for people not familiar with those languages.

There is not much to be said about it … If you have not read the book, you might just aswell buy it. You won’t regret it!

Cheers,
Robbin

By Robbin Cremers Posted in Books

Reviewing Framework Design Guidelines: Conventions, Idioms and Patterns for Reusable .NET libraries

I finally managed to get through the Framework Design Guidelines book, written by the people behind the .NET framework. They explain their experiences and insights on 4 versions of the .NET framework though a series of guidelines, that are being used by the Microsoft for the development of the .NET framework:

Framework Design Guidelines

The guidelines are provided in the following chapters:

  • Naming guidelines
  • Type design guidelines (Reference vs value, classes vs structs, abstract classes vs interfaces, static, …)
  • Member design guidelines (Methods vs properties, member overloading, optional parameters, params, ref, in and out, enumerations)
  • Designing for extensibility (Sealed vs unsealed, private vs public vs protected, events, virtual, …)
  • Handling exceptions
  • Usage guidelines (Arrays vs collections, ICloneable, Nullable, Object methods, …)
  • Common design patterns (Async pattern, IDisposable pattern, Factory pattern, Template method pattern, …)
  • Coding style conventions (brackets, spaces, indenting, comments, regions, …)
  • FxCop or Visual Studio Code Analysis

Continue reading

By Robbin Cremers Posted in Books

Reviewing the pragmatic programmer, from journeyman to master, by Andrew Hunt and David Thomas

I finished reading the following book “The Pragmatic Programmer” by Andrew Hunt & David Thomas.
The book was published on October 20 1999, yet 13 years later, this book is still one of the renowned books for developers to read.

It’s a short 300-page book looking like this:

The pragmatic programmer

This book is not for people who look for language guidelines, framework information or what tools to use. It does not explain how to build web or desktop applications. It’s not a technical book whatsoever, but it discusses the mindset a pragmatic developer should have or work towards. The Pragmatic Programmer is a collection of ideas, observations, and recommendations for software developers, a philosophy on developing software.

Continue reading

By Robbin Cremers Posted in Books