Save Big On Open-Box & Pre-owned: Buy "Modern C++ Programming with Test-Driven Developmen...” from Amazon Warehouse Deals and save 10% off the $40.00 list price. Product is eligible for Amazon's 30-day returns policy and Prime or FREE Shipping. See all Open-Box & Pre-owned offers from Amazon Warehouse Deals.
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
Modern C++ Programming with Test-Driven Development: Code Better, Sleep Better 1st Edition
Use the Amazon App to scan ISBNs and compare prices.
ITPro.TV Video Training
Take advantage of IT courses online anywhere, anytime with ITPro.TV. Learn more.
Frequently bought together
Customers who bought this item also bought
Special offers and product promotions
"Jeff Langr has written another excellent book. This time he brings Test-Driven Development to the world of C++. Jeff’s starting example brings us face to face with the stark simplicity of good TDD. He explains why we work that way and then provides key practical details, all the way through test doubles, working with legacy code, threading, and more. This one is a keeper for anyone working with C++!"
"Jeff Langr has written the best C++ book in years. Modern C++ Programming with Test-Driven Development is the perfect mixture of theory and practice. The abstractions are explained with clarity and gusto, but the details are right there when you need them. It’s sure to be an instant classic, in C++ and in TDD both."
"Jeff is an expert software craftsman, and in this book he shares his considerable wisdom about crafting great software. This book is not about testing, though you will learn valuable testing techniques. It is about improving your skills, code, products, and life through test-driving. Whether you’re a novice, expert, or in between, Jeff will show you the how and the why of an expert who test-drives better products with C++."
About the Author
Jeff Langr wrote Agile in a Flash with Tim Ottinger. It's a unique set of reference and recommendation cards that you can find tacked to many monitors and walls in agile shops. He has written other books and more than one hundred articles on software development, and trains and consults in software development, including test-driven development.
If you are a seller for this product, would you like to suggest updates through seller support?
Top Customer Reviews
Uncle Bob as indicated in the foreword, the title is not the best. Nor do I agree with the title suggests Robert Martin. The title that best describes it is "Introduction to TDD by examples in C++". You will not find anything they have not seen in tutorials and in common internet discussions. The book is not very long and most of its contents are the examples with the refactors step by step. Langr makes a good attempt to explain what it does as it develops the examples, though often repetitive and a bit inconsistent at conventions.
Some of his thoughts on occasion contradict, but understandable since he tries to be pragmatic in his decisions through the examples, which should be better explained. An inexperienced reader might take quite literally many of the tips that in my opinion are generally not the best options. This kind of advice and rules, out of context cause many developers to perform stupid things.
All you have modern C++ is the use of some things in the new C++11 standard: use of 'auto', range-based for loop, some lambdas, not consistently use uniform initialization. Disuse many features and best practices in C++11.
The idea of the review is not to touch all points and tips that I have an opinion. I will probably make a more extensive review on a blog. For now, I recommend to any reader to read it critically and do not accept the ideas without seeking alternatives, understand the context in which it is developing and consult with more experienced colleagues.
I was so excited when I found Jeff's book on unit testing (TDD) and C++11x along with Google Mock (and Google Test) for C++ based testing.
Reading through one of the free chapters was eye opening and providing some great advice on testing.
Do as little as possible, even if that means taking shortcuts to write tests faster.
Jeff provides the example where he puts the Soundex class in the same file as the SoundexTest.cpp file, instead of breaking it apart. The reason being is that you'll spend too much time switching between files as you work between tests and implementation. It's the little time saving tips like these, which I really appreciate learning from an expert.
"It’s a calculated effort to save time in a manner that incurs no short-term complexity costs. The hypothesis is that the cost of splitting files later is less than the overhead of flipping between files the whole time. As you shape the design of a new behavior using TDD, you’ll likely be changing the interface often. Splitting out a header file too early would only slow you down. As far as “dangerous” is concerned: are you ever going to forget to split the files before checking in?
Langr, Jeff (2013-10-10). Modern C++ Programming with Test-Driven Development: Code Better, Sleep Better (p. 19). Pragmatic Bookshelf. Kindle Edition. "
The main reason why I gave this 4 stars instead of 5 is that the author creates unnecessary roadblocks to getting the exercises up and running. Yes, there will always be some setup investment, but many exercises needlessly depend on a variety of external libraries. I would be so excited to dive into a new chapter, only to find out that I first needed to download and build yet another library that I never have and probably never will use outside the context of this book. Most of these are easily avoidable; for example, the production code for Chapter 5 uses cURL, which ends up getting mocked out in test anyway. Chapter 6 relies on boost::gregorian (which is separate from the main boost library) when it could instead use time_t and save the reader time (no pun intended).
Adding insult to injury, Chapter 8 randomly switches unit test frameworks, from GTest to CppUTest. Unfortunately that was the chapter I had most been looking forward to exploring, but when I got to that point I had already far surpassed what I'd time-boxed for this book and could not afford the overhead of getting another framework up and running. The author could have also provided more support for commonly-used IDEs. These symptoms all bring me to the conclusion that the author did not recruit a diverse enough base of beta testers to provide brutally honest feedback before the book went to print. I can only hope that he releases a more user-friendly revision soon.
I would also like to echo another reviewer's dismay about the lack of community support. Why set up a Google Group instead of using a forum with more regular activity like stackoverflow?
Despite the aforementioned shortcomings, this book is an absolute must for anyone trying to get started with unit testing in C++. It is well-written, well-organized, and keeps the reader's attention, unlike other programming books which provide a sure cure for insomnia. Take the time to work through the exercises - you'll be glad you did.
Most Recent Customer Reviews
I found especially interesting the part about testing in a multithread environment.