Recently, I was approached by Packt to review a book on TDD, particularly RSpec. This one is written by Charles Feduke. While he's not someone I am familiar with, some of the reviewers have familiar names.
Being naturally interested in anything has to do with software development, I feel it is most sensible to give it a try.
A Quick Read
The book title by itself should give you a hint that it's more of a quick read than a definitive guide on Test-Driven Development. The books I have read on TDD and BDD (Behaviour-driven Development) are about four to five times lengthier. Verbosity is not needed when you want to learn something quickly probably for a new job or a new project. You still might find yourself googling a lot after reading those lengthy books anyway.
I could skim through the book in less than an hour but because it's for review, I read it word by word for a much longer time and tried to see if there are any gotchas.
- It started off by explaining about conventions and how to use the "rspec" command with the options like showing the progress.
- The author did not fail to explain the "Red-green-refactor" process throughout the book.
- The author followed the community-accepted standards of writing better test code. To learn more about that, you can read the open source book called Better Specs
- There are practical examples for all chapters.
- While it is a quick read, the author did well in explaining the difference between "stubbing" and "mocking". Beginners will initially find this confusing but as you code more, it won't be confusing anymore.
- Like many books, there is a typographical error. But I like this one because it is funny: "it is important to execute the verify it fails step for new code to ensure you're not a monkey..." I think that error should have been an intentional pun. It's more fun that way so people will remember to follow TDD. I made several mistakes by skipping that process. I should remember that and not think like a "monkey."
- There are examples on the first few chapters which I could have written differently. I could have used let instead of defining the variable within the it block for example.
- There's nothing ugly about the book. I didn't see an overzealous tone on promoting TDD.
- The ugly truth is that you will have to read the documentation to completely understand RSpec features.
Test it, don't guess it.
Enjoy reading this book published recently.
I am writing about some free TDD guides for upcoming workshops. If you are in Baguio, please let me know if you are interested with these free (sponsored) workshops.comments powered byDisqus