I Can’t Automate This! Many years back I inherited a 30-year-old legacy code base. We were to clean up the C++ and make it work on modern hardware. However, the first step was to get it to even compile. Before us, building the product required 3 specialized build engineers, each with individual knowledge and unusual machine configurations. Each would remap the source, compile, get a partial success and set of failures, then pass it on to one of the other two. […]
Get an incremental solution to a gnarly technical problem every month.
Most technical debt problems in Legacy code are too big to solve. After all, you’ve already solved all the ones that were small enough to solve, given your organization, code, tooling, and techniques.
Every month, the Code by Refactoring newsletter picks one gnarly problem. Our gnarly problems in 2021 will be focused on getting your code ready for DevOps.
- Frames a DevOps blocker so that everyone can understand the underlying problem.
- Provides a step-by-step solution that you can start without permission and continue with the full team.
- Describes the results you can expect at the business level, to support your conversations with leadership.
- Show how to demo your results in a way that will excite your Product Owner and Executive Leader.
Don’t Make Me Touch Ordering! The PM thought the feature was simple. And it should have been. Unfortunately, it requires making a tiny change to payment processing. And payment processing is part of the Order system…which is one monster class. More than half of our code depends on Order to do something. Each part of that code depends on the Order for a different set of responsibilities. Although there are patterns, the Order class’s sheer size and number of responsibilities make […]
My Service Interaction Tests are Slow and Fragile! Any legacy system needs to connect with other systems. However, coding and verifying changes in your legacy system requires the following things. Simulate remote faults and verify your response. Verify that what you send to the remote system will cause it to do what you want it to do. Know when a release, rollback, or failover of the other system will change a behavior that you depend on. Change your released code’s […]
My product is written in the wrong language! Legacy systems tend to be old, and thus written in languages and frameworks that were available at the time they started. It’s no one’s fault, but the code is in the wrong language. This causes: Slow development. Difficult testing – my tech predates the TDD movement. Reinvention – libraries for new techniques are written in new languages. Difficult hiring – my tech predates most developers. More bugs – my tech needs more […]
I hate changing the database! Legacy databases present two challenges: Bad schema that is hard to change. Too much logic in the database. Both delay stories and generate bugs. Both waste your time and each will require thousands of person-hours to fix. We need to find a way to pay that cost incrementally; preferably divided among all the developers on the project. First let’s divide the problem in half by ignoring the logic for now. After all, lots of logic […]
All I want to do is edit the freaking document! Unfortunately, so does everything. CDocument is central to what we do. Users think of documents, and so does the UI. Every piece of code reads the CDocument class…unless it modifies CDocument. And now I need to unit test my code. Also, I want to ship my team’s code independently of the other team. But every single feature touches CDocument. Many of them change CDocument – or one of the 6 […]
I changed a piece of code and 75 tests broke… It was a simple feature. I just added a GDPR approval checkbox when creating a new account. And suddenly half our tests broke. Tests for reporting, tests for core features, all kinds of tests for all kinds of things. Because every one of them needed to create an account. So I added a default to the test mocks. I updated lots of expecteds. I added a startup step to some […]