Overview
Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore techniques for effectively managing and improving C++ legacy code in this 49-minute conference talk. Learn how to tackle the challenges of working with large, undocumented codebases that may be over a decade old. Discover practical strategies for adding features and fixing bugs without creating additional complexity or introducing new errors. Gain insights into transforming unmaintainable code into extensible and improvable systems. Delve into topics such as unit testing with GTest, sensing and separation techniques, utilizing fake objects with Google Mock, handling non-virtual methods, addressing hard-to-inherit classes, and overcoming un-fakeable methods. Master the art of using templates for injection, faking private and protected methods, and ultimately taking control of existing legacy code to enhance its maintainability and functionality.
Syllabus
Intro
No longer engineered - continuedly patched
Written by someone else
The good news and bad news
Gaining control over legacy code
This is a unit test (GTest)
A quick reality check
Sensing and Separation
The solution-fake/mock objects
Fake objects using Google Mock
Non virtual methods
Hard to inherit classes
Problem: un-fakeable methods
Using templates for injection
Faking Private and Protected Methods
Taking control of existing legacy code
Taught by
NDC Conferences