4 ms·
None of the requested changes involved more testing or risk-reduction. They actually increased risk by insisting on refactoring a bunch of nearby things as the
by woooooo 3y ago
None of the requested changes involved more testing or risk-reduction.
They actually increased risk by insisting on refactoring a bunch of nearby things as the "cost" of the change.
- morelisp 3y agoThe audit trail likely represents actual risk reduction of someone undoing or misunderstanding the change later, since the change has no meaning outside the context of the request. "Fixing preexisting errors that violate new company policy" also arguably involves real risk reduction; you gotta do that work sometime, and if everyone in the company agrees the time is now, the best time is now. Using Marge instead of Homer is not "risk reduction" but presumably testing accounting close is also critical. Tony's request is also reasonable, unless you want to leave the next dev in the same shithole you were in re. the wiki state.
- cratermoon 3y agoOn the flip side, if nearby things are never updated to match changing understanding of the system, then very shortly the code will be cluttered with possibly dozens of different styles: multiple naming conventions, constants in some places, hard-coded values in others, and values read from a parameter file in others, and other kinds of variations. The result will be a chaotic scramble that has no clear structure, and requires programmers to know and understand multiple different ways of expressing the same business concept. Now that is truly increased risk.
- woooooo 3y agoLong term vs short term. It's a bad idea to rush through refactors.
- cratermoon 3y agohttps://wiki.c2.com/?RefactorAsYouGo https://wiki.c2.com/?RefactorAsYouGo
- woooooo 3y agoNot when you have an exec-inspired one liner patch that has to get rushed through at great impact to the business. You can't just stack up a bunch of aphorisms and delegate your thought to them, some situations have context.
- cratermoon 3y agoYou said, "It's a bad idea to rush through refactors". What constitutes "rushing through" a refactor, and what forces and context make it bad to do so? What can we do, if anything, to make it so that refactoring is as much a part of everyday development as the CI/CD process, and thus becomes just part of the work that's done, not something to be put off until the business decides there's nothing else with a higher priority?
- woooooo 3y agoIn the linked article, the situation was that they absolutely needed to change some hard-coded MONTHS value from 3 to 4 in order to keep the factory running. That change should be shipped in isolation. With manual testing to cope for the lack of coverage, presumably. Refactoring doesn't have the same urgency as keeping the factory running, no matter how much we all believe in keeping the campground clean. It can wait until Monday in this particular case.
- cratermoon 3y agoOK, but that's not the question I asked. What I want to know is how we can make refactoring as much a non-negotiable part of the process as code review, tests, CI/CD, or whatever you consider essential, non-skippable, even under a short timeframe?
- woooooo 3y agoIn the context they were in, the answer to all of those questions is "shut the fuck up, we can talk about it later". In the normal course of business, it's a different conversation. Even then, if you're making some poor dev refactor a bunch of code because they had the misfortune to touch it, maybe you should have done the work yourself a long time ago. Or written a linter and ticketed owners. You don't want to make feature development some sort of pain lottery.