8 ms·
In my view the only way to handle this is to make constant refactoring part of the work without telling management. If you ask for permission for refactoring yo
by maxxxxx 10y ago
In my view the only way to handle this is to make constant refactoring part of the work without telling management. If you ask for permission for refactoring you will almost always get a "No".
- humanrebar 10y agoThis is mentioned in the article as possible only for small changes. When the refactoring involves more systemic problems, it becomes impossible to make the change in the course of making other client-facing changes. I'll add that some subsystems are a mess but stable. It's difficult to make refactorings with other changes when there aren't other changes to make. I see this in particular with old but stable subsystems that will need to be ported to new environments someday, but it's never a good day to lay the groundwork for that inevitable change.
- lmm 10y ago> I see this in particular with old but stable subsystems that will need to be ported to new environments someday, but it's never a good day to lay the groundwork for that inevitable change. I think it's correct to defer that work until you need it. You may end up never porting that subsystem, in which case refactoring the currently-stable implementation is wasted effort. As and when porting becomes an actual business requirement it can be prioritized appropriately.
- humanrebar 10y ago> You may end up never porting that subsystem, in which case refactoring the currently-stable implementation is wasted effort. I understand this approach, and it works many times. But when the porting is delayed until the last possible minute, it's more likely that hacks are put in because the requirement turned into a hard deadline. Instead of defining a sensible OS abstraction layer, the developers might find and replace "Windows XP" with "Windows 7".
- lmm 10y ago> I understand this approach, and it works many times. But when the porting is delayed until the last possible minute, it's more likely that hacks are put in because the requirement turned into a hard deadline. Instead of defining a sensible OS abstraction layer, the developers might find and replace "Windows XP" with "Windows 7". Which may well be the right choice for the business at that point. More generally, it's not like doing it now makes it faster than doing it later: you have to put the same amount of total work in either way. In fact you have to put more work in if you do it now, because you will have to ensure that any subsequent changes don't break the porting. If you have other tasks that are a higher priority than porting, you should do them first, almost by definition. Of course if the port is your highest priority then that is what you should be working on (again almost by definition). Porting should be left as late as possible, but no later.
- humanrebar 10y agoYou misunderstand. If more than a small minority of your code cares what OS it's running on (beyond obvious excepted), you have a large amount of technical debt. Cleaning that up, either by refactoring or replacing the offending code, is in the business's best interest because it keeps costs down and keeps more options available to the business. The 'business people' are not qualified by themselves to say that the cost-benefit analysis of the refactoring is worth the effort. Because while they may have a good idea of the customer benefits, they generally have little insight into what the future costs of technical debt are. You see this obviously demonstrated by 'business people' who are shocked that there is work to do on five-year-old code that has been working fine for years. Any reasonably experienced developer, any many junior developers besides, can tell you that code rots if it's not maintained properly.
- lmm 10y ago> Cleaning that up, either by refactoring or replacing the offending code, is in the business's best interest because it keeps costs down and keeps more options available to the business. IME that's very rarely the highest-value thing you can be doing for the business. It's not worth paying for flexibility that you're never going to use, and it's not like it's going to take longer to refactor later than it would to do it now. > The 'business people' are not qualified by themselves to say that the cost-benefit analysis of the refactoring is worth the effort. Yes they are. Cost-benefit analysis is their job. It's your job to give them an accurate picture of the costs and the benefits. > Because while they may have a good idea of the customer benefits, they generally have little insight into what the future costs of technical debt are. You see this obviously demonstrated by 'business people' who are shocked that there is work to do on five-year-old code that has been working fine for years. Any reasonably experienced developer, any many junior developers besides, can tell you that code rots if it's not maintained properly. Yes and no. If you don't need to make changes to a given system then it's fine for it to "rot". Presumably there is a business reason they want to make changes, in which case bringing the code up to a point where you can make those changes is part of the cost of that business-level deliverable.
- blub 10y agoWhy is management getting involved? The PO should try to balance this with feature impementation and the team + SM should make it clear when it's needed. This seems to work fine in an environment based on collaboration between PO,SM and dev team, but will probably fail in an adversarial one.
- JustSomeNobody 10y agoBecause managers have to report to other managers and they don't want to report that the devs are working on something that already has been implemented and "works".
- maxxxxx 10y agoI have rarely seen a PO as the single contact to the "business". Most of the time there are multiple project managers, product mangers and line managers who have a say and put pressure on the dev team.
- cel1ne 10y agoIndeed. That's sometimes the case with other stuff like playability too. I've added simple animations which delighted users from time to time. If I had asked beforehand to invest time for this, the response would be "let's postpone this (forever)".
- JustSomeNobody 10y agoCan't do that for deep refactoring. You'll need QA involved and the boss will never sign off on that because, well, he's a boss not a proper manager.
- s_kilk 10y agoThis is how we ended up with the "Shadow Sprint" at a previous workplace. A whole bunch of utterly essential engineering work was left out of the sprint process, so many of us would just go ahead and do what needed to be done anyway while working on whatever tickets we'd picked up frome the "real" sprint. Utterly dysfunctional of course, but if it's do-or-die, I'd prefer to 'do'.
- bmj 10y agoHow did you handle regression testing of the refactored functionality? That's our biggest hurdle. QC is swamped with "regular" sprint work, so there's no way they manage any additional load during the sprint.
- s_kilk 10y agoWe had pretty good (but not amazing) unit and integration tests in many of those systems, and a willingness to manually test the systems where we didn't have tests. If we had to lean on a QA department to get this stuff done, I'm not convinced we would have been able to actually deliver that project.
- ktRolster 10y agoOnly refactor things in sections of code that you're changing anyway. That way QA already needs to test those sections of code, and gets no extra work.
- matthewmacleod 10y agoWe tend to bundle that work up and include it in tickets with the full acknowledgement of the rest of the team. "Oh, since we're adding new email features, we'll need to clean up some of the old email code. That will add additional complexity to this task, so we will estimate it higher." It works, allows us to still track the impact on velocity, keeps everyone informed, and makes technical debt clear and trackable.
- xwkd 10y agoI believe this is the correct approach. You're not hiding the complexity of the work, and you're also not compromising on quality. This leaves only the task of saying "no" when asked if you, "for now, could just..."
- maxxxxx 10y agoThis is how it should work in my view. You just need managers that are disciplined and don't tell you to not clean up old code because of deadline pressure.
- abritinthebay 10y agoThis is exactly what is supposed to happen in a Scrum system. If someone is not doing this they're not doing Scrum - just something they called Scrum to pacify people
- fsloth 10y agoIn a non-broken organization technical leads (or equivalent) have same level of authority to guide development as feature driven personnel and the necessity of features vs. quality can be triaged in bright daylight. If the organization is not sane, that's another thing of course (and often the case, sadly).
- maxxxxx 10y agoTrue, but don't forget that non-broken organizations are very rare :-)
- clifanatic 10y agoDo you know of one? I've been looking. For 25 years.
- gedy 10y agoTBH this is what I've always assumed it should be from day one with Scrum, after training with Ken Schwaber etc. The backlog is not a Todo list. It's the only way that seemed sane without twisting user stories into weird refactoring or architecture stories and keeping team from writing garbage code waiting for these "tech stories" to clean it up.
- Zigurd 10y agoThis is a typical way that agile and related approaches become a barrier between implementers and management. The fault is almost all on the management side because, ipso facto, they're the ones making the decisions that drive this outcome. In the real world, there are outcomes that are much worse than this. But this does have the effect of neutralizing the value of scrum: Management gets what implementers decide they get, and scrum is just the way middle management is told the story that they pass up the chain.