Wednesday, March 19, 2014

Packt Publishing celebrates their 2000th title with and exclusive offer


Known for their extensive range of pragmatic IT ebooks, Packt Publishing are celebrating their 2000th book title `Learning Dart’– they want their customers to celebrate too.

To mark this milestone Packt Publishing will launch a ‘Buy One Get One Free’ offer across all eBooks on March 18th – for a limited period only.

Packt is one of the most prolific and fast-growing tech book publishers in the world. Originally focused on open source software, Packt contributes back into the community paying a royalty on relevant books directly to open source projects. These projects have received over $400,000 as part of Packt’s Open Source Royalty Scheme to date.

Their books focus on practicality, recognising that readers are ultimately concerned with getting the job done. Packt’s digitally-focused business model allows them to quickly publish up-to-date books in very specific areas across a range of key categories – web development, game development, big data, application development, and more. Their commitment to providing a comprehensive range of titles has seen Packt publish 1054% more titles in 2013 than in 2006.

Here are some of the best titles across Packt's main categories - but Buy One, Get One Free will apply across all 2000 titles:

Sunday, March 09, 2014

Book Review: Test Driven Development with Mockito


Recently I was given a reviewer's copy of Test Driven Development with Mockito from the publisher Packt Pub. The fact that I was given a copy of the book in exchange for a written review has in no way influenced my rating of the book.

Test Driven Development with Mockito by Sujoy Acharya is a good introduction to Test Driven Development (TDD) and should get a person new to this methodology up to speed quickly. There are just a couple chapters that actually deal with using Mockito though.

Chapters 1 through 3 bring you up to speed on what TDD is and how to apply it. Chapter 1 gives a definition of TDD and what the methodology is all about. Chapter talks about refactoring: when to do it, when not to do it and when to stop. Chapter 3 talks about applying TDD.

Chapters 4 and 5 start covering the different styles of testing: outside in (mainly used for acceptance and regression testing) and inside out (mainly used in development). Chapter 5 talks about what the author calls test doubles which are stubs, mocks, dummies and fakes.

Chapters 6 and 7 are where we're introduced and shown Mockito in action and how to use it in a TDD environment. You learn how to stub, mock and spy objects which allows you to better test the code's logic and not external dependencies (database connections, email, etc.).

Chapter 8 talks about patterns and gives examples of replacing conditional logic with both the command pattern and the strategy pattern.

Finally chapter 9 talks about adding TDD to legacy code that had no tests originally.

There are two appendixes in the book. Appendix A talks about different tools such as Eclipse and JUnit, while Appendix B talks about agile practices.

Overall I thought the author did a good job of meeting the objectives he set out to meet when writing this book. I wasn't crazy with how some of the code examples were inline text and others were screen shots and there were a couple issues with the text. This book would be good for someone new to TDD and Mockito, but probably not helpful for those who have some experience with either.

For those who like to see actual ratings, I give the book a 4 out of 5 stars.