2025 Public Training Schedule
January 14 – 17, 2025 – Agile Analysis and Design Patterns – Half-Day Sessions
(c) 2024 To Be Agile
I’ve been getting back into some research interests of mine that require data acquisition from a variety of sensors so naturally, I’ve gravitated towards using the Raspberry Pi. If you’re unfamiliar with the Raspberry Pi, is a full-blown computer on a card about the size of a cigarette pack and offers a graphical user interface, several programming environments, and a range of other applications, all for forty bucks.
The thing that I really like about the Raspberry Pi is that it makes interfacing hardware very accessible. The GPIO bus can plug in a variety of different sensors and actuators to interface with the outside world. It’s been a lot of fun.
They call us makers. There’s even a national community with a local chapter in Seattle where you can go and learn about electronics or use their 3D printer. This is a national movement so there is a lot of people who call themselves makers.
There’s another movement that I identify with as well but they’re a much smaller group. We call ourselves menders. When I asked developers in my classes if they prefer building new features or integrating features into existing systems the vast majority of them tell me that they prefer greenfield projects as opposed to working on legacy code. The reasons are obvious, legacy code is often not ideal. It requires learning the existing system which invariably doesn’t do things the way we would do them. Oftentimes, integrating software is a matter of shoehorning it in any way we can because we weren’t taught discipline techniques for extending software safely.
But there is another group of people. We are in the minority. We call ourselves menders and we actually like working in legacy code. It’s kinda like being thrown into the deep end of the pool. If you don’t know how to swim, then you run the risk of drowning but if you have the tools to keep yourself afloat then it can be a pleasurable experience.
Menders have techniques that allow them to safely work with legacy code and then once you understand these techniques the same code that terrifies most developers is actually exciting to a mender because we know how to safely transform it into something better and that is a valuable skill.
How do we get this magical skill of mending? This is a path that has been well illuminated. Martin Fowler wrote a book called “Refactoring: Improving the Design of Existing Code”. This book shows simple code transformations that are safe, incremental, and repeatable.
Knowing how to refactor code in a consistent and disciplined way is a critical skill that I believe every developer should have not just because it helps us get ourselves out of tight spots that we find ourselves in but also because it teaches us not to make the same mistakes that others have made.
What I noticed after I’ve refactored bad code into something better is that my own code started to improve, and I don’t make those same mistakes myself. I realized some of the benefits of refactoring other people’s code. Instead of it being drudgery to refactor code it turns out to be great practice for me to improve my skills as a developer and this is what I want to encourage other developers to do. Use refactoring as a way to propel yourself into writing better code.
Previous Post: « Core Developer Practices
Next Post: Radiators and Silos »