Accelerated TDD: For More Productive C++ is a three-day online training course with programming exercises taught by Phil Nash. It is offered online from 11AM to 5PM Eastern Time (EDT), Wednesday September 9th through Friday September 11th, 2020 (before the conference).
We all know that writing tests for our code is “what we should do”, and maybe we’re even doing that already. But it feels like extra busy-work that slows us down – and they hardly ever catch any bugs anyway…
Maybe we’ve even tried TDD, and felt that it was just adding even more ceremony to the problem with no real advantages.
But the advantages are definitely there! We just need a good grounding in what TDD _actually_ is (and isn’t) and how to do it properly – especially in the context of C++, which brings its own idiosyncrasies and bottlenecks to the matter.
That’s what this workshop aims to be. Whether you’ve never written a test before, or you’ve had some mileage with TDD already, be prepared to ratchet up your productivity by thinking about things in new ways and gaining more approaches to breaking down problems in sustainable ways.
- Be comfortable with the basics of C++. Being an expert not required
- A laptop with a reasonably modern OS.
- A compiler capable of running C++11 (ideally gcc, clang or VC++) – don’t worry if it’s not what you use in your day job.
- A development environment you’re comfortable with. I can provide short term CLion licenses if you’d like (please let me know beforehand if possible)
- An open mind and motivation to find better ways of doing things.
- Why “Accelerated”?
- Why test?
- What is a test?
- Type of test (unit, integration, system, regression, acceptance…)
- Roles of a test
- How testing makes us go faster
- Why test first?
- Coverage = Courage
- Design pressures
- Mental modes
- Focus and flow
- Never more than 5 mins from green
- How to TDD
- The TDD Cycle
- The Art and Craft of TDD
- Are we done yet?
- Relevant Design Principles
- Separation of Concerns
- Single Responsibility
- Low/ Loose Coupling
- Growing Software, Guided By Tests
- Putting it all together
- Treat test code like production code
- Negative paths
- Avoiding brittle tests
- Pruning tests
- Dependent Tests
- Tests as documentation
- Decelerated TDD
- Slowing down to speed up
- Deliberate Practice
- Pain points and Limitations
- Slow running tests
- Flakey Tests
- Brittle tests revisited
- Testing the implementation
- Orthogonal concerns (e.g. logging, error handling)
- Premature Generalisation
- Beware a false sense of security
- Getting legacy code under test
- Getting team buy-in
- The Transformation Priority Premise
- Beyond TDD
- Property based Testing
- Mutation Testing
- Fuzz Testing
- Treat test code like production code, except when you shouldn’t
- Risk Planes
- Next Steps
- Keeping the momentum going
- Forming habits
We’ll work through several demos and exercises together and will often work in pairs.
Phil Nash is the author of the test frameworks, Catch – for C++ (and Objective-C), and Swordfish for Swift. As Developer Advocate at JetBrains he’s involved with CLion, AppCode and ReSharper C++. He’s previously worked in Finance and Mobile as well as an independent consultant and coach specialising in TDD on iOS.