Skip to Content
Modern C++ Programming with Test-Driven Development
book

Modern C++ Programming with Test-Driven Development

by Jeff Langr
October 2013
Intermediate to advanced
368 pages
9h 20m
English
Pragmatic Bookshelf
Content preview from Modern C++ Programming with Test-Driven Development

8.19 Moving a Method via Mikado

We could consider a WAV snippet, or possibly a WAV snippet writer, as an abstraction of its own. The name of our primary class, WavReader, already suggests that anything to do with ​writing​ snippets is an inappropriate responsibility. Further, we are making extensive changes to the snippet logic and want to isolate the changes to a class with smaller scope.

As a short-term Mikado Goal, we want to extract the ​writeSnippet​ function into its own class, ​Snippet​. Once we complete the immediate goal, we plan to clean the ​Snippet​ code considerably. One goal at a time, however.

Given the space constraints of a book, this is a smaller example, but it’s no less real than your regular refactoring challenges. It’s also ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Effective Modern C++

Effective Modern C++

Scott Meyers
Modern CMake for C++

Modern CMake for C++

Rafał Świdziński
Embracing Modern C++ Safely

Embracing Modern C++ Safely

John Lakos, Vittorio Romeo, Rostislav Khlebnikov, Alisdair Meredith

Publisher Resources

ISBN: 9781941222423Errata