The most common “presenting” pathology in the hoarded codebases I’ve seen - by far - is that developers don’t feel they have time and/or permission to refactor code.
-
Show this thread
-
Frequently occurring alongside that pathology is another - that developers see “refactoring” as a completely separate activity from building features or fixing bugs. A key indicator of this pathology is seeing stories in the backlog like “refactor user class.”
4 replies 41 retweets 235 likesShow this thread -
Just like its physical analog, a hoarded codebase only improves if you intensively work on changing those habits. This means deciding you will always do small, opportunistic refactorings when they appear to you in the course of fixing a bug or adding a feature.
4 replies 31 retweets 189 likesShow this thread -
I’m not talking about taking three extra days on a 1-point story to totally rewrite the user class. I’m talking about noticing a method you’re working in is out of place, and moving it - even if you don’t have time to extract the rest of the concept from the 8000-line file.
4 replies 11 retweets 126 likesShow this thread -
Just like when you’re dealing with its physical analog, your number one most important mantra when you want to improve a hoarded codebase is: Improvement Over Consistency.
6 replies 80 retweets 346 likesShow this thread -
This is SO HARD for us as developers. It gets drilled into us from day one that consistency is key to good code. And if you had good code, then sure, that would be true. But right now you don’t. Improvement Over Consistency.
2 replies 37 retweets 238 likesShow this thread -
One book on the shelf and five in the pile is better than six books in the pile. Improvement Over Consistency.
5 replies 31 retweets 232 likesShow this thread -
So where does communication skill come into all this, you might ask? Is this another rambling thread that took an unexpected turn into philosophy and isn’t coming back? (I mean, that’s a fair cop. I do a lot of those.)
1 reply 1 retweet 79 likesShow this thread -
Well, let’s say I’ve convinced you that you need to do those small, opportunistic refactorings. You’re all in! You’re ready to work through the discomfort of introducing deliberate inconsistency in the name of improvement over time! Fantastic! HOW do you do that?
3 replies 3 retweets 71 likesShow this thread -
Replying to @sarahmei
Well, if you can "break it up into services", then it must have some separable units of code. Instead of breaking it up as is, you could identify regions that could be refactored. If you're changing the code language, you could create refactored services to get language agnostic.
1 reply 0 retweets 0 likes
P.S. - Please don't mistake this for mansplaining. I strongly suspect you are already well ahead of me in this area. I'm simply trying to take part in the thought experiment and see if I'm on the right page.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.