4 ms·
Pain is like a compiler warning. 99% of the time it's telling you that something is wrong, and so you should only ignore it if you're 100% positive that you kno
by kstenerud 14y ago
Pain is like a compiler warning. 99% of the time it's telling you that something is wrong, and so you should only ignore it if you're 100% positive that you know what you're doing and the warning is a false positive.
The Jane and Joan example is a case in point. Rather than "merging often" to take small pain now rather than big pain later, they should be taking a step back and looking at WHY there's pain. They could, for example, choose to stagger their work (work on stories involving unrelated files as much as possible) such that they're not stepping all over each other all the time. Are nicer messages REALLY that important RIGHT NOW? Couldn't Jane just work on the purchase system instead on this sprint and do messages later and save everyone a lot of pain?
Pain exists for a reason. Don't ignore it. And for the love of Pete, don't just blindly push through it!
- biot 14y agoIn the Jane and Joan example, merging features and error messages into the same file is what the underlying problem is and doing it more often or staggering their work isn't the solution. Most languages have the concept of a resource file where you can say "Retrieve the error message for condition XYZ". If no such error has been defined, the code returns "Unknown error" otherwise you get the error message. As a result, to add or change error messages Jane only needs to go in and update the error messages resource file which has zero impact on Joan's code. They can both work simultaneously because they're no longer baking error messages into feature code. Imagine the pain they will go through when they next need to internationalize the application into multiple languages. If the errors are in the feature code, they'll need to strip them out and convert it into what they should have been doing in the first place which would have avoided the initial pain altogether.
- pbreit 14y agoThat was an example whose point I think you missed.
- kstenerud 14y ago"Imagine the pain they will go through when they next need to internationalize the application into multiple languages." Actually I did just that late last year. It took one day to write a parser to find string constants in source code and put them into a CSV file, then another day to write and test a mutator script to replace the text with i18n constructs and generate the resource file. Meanwhile, we sent out the csv file to multiple translators to translate into 8 different languages. Total development and implementation time: 3 days. Getting good translations made, on the other hand, took weeks and required multiple verifications and lots of pain. I'll take a possible future 3 days work any day if it avoids daily pain from implementing annoying localization constructs that we may never actually need.
- biot 14y agoIf it ain't broke, don't fix it. It sounds like for you merging of simultaneous changes to the same file by multiple developers due to one person coding features while the other writes error messages wasn't a pain you needed to address so it made sense to delay the work to a future date.
- kstenerud 14y agoI think you've mixed up the stories... The merging issue was a fictional story. With us, we simply didn't bother writing for internationalization to begin with (following the principle of YAGNI). And it turns out that when the unlikely DID occur (we actually needed it after all), the pain was minimal after a little creative thinking. Merging often is something I like, but not for the reasons laid out in the article. I like it because it lowers the chances of a freak ugly merge, and more importantly because smaller merges means smaller code reviews (my eyes-glaze-over point is about 200 lines or so). But I wouldn't use it simply as a way to make painful merges more frequent yet less intense. Recurring painful merges are generally a sign that something could be structured better. That's where strategy separates the good teams from the mediocre.
- biot 14y agoYes, I get that Jane and Joan are fictional and that your story is real. Perhaps I didn't state things clearly so I'll try again: If you'll allow me to propose a hypothetical: let's say you did have recurring painful merges because (borrowing from the fictional story) someone was continually adding new features while someone else was continually tweaking error messages such that there were many conflicts which needed resolving upon every code check-in. You likely would have put the error messages into resource files much sooner and avoided these recurring painful merges. But because you didn't have this hypothetical situation (it ain't broke, thus you didn't fix it) it made sense to push the pain of localization off to when it was actually needed.
- sirmarksalot 14y agoIt's a bad example, but the principle still applies. All the things you're talking about doing are also painful, in the sense of what the article is getting at. Designing a system where you don't have to merge as often? Sucks. Figuring out your schedule weeks or months in advance instead of just doing it? Sucks. These are painful things that you have to do, and have to get better at, and by doing them early and pushing through the pain, you avoid the real pain, the dangerous pain later on.
- kstenerud 14y agoYou don't need to plan weeks or months in advance. All you need to do is push that particular story onto the backlog and wait for a more opportune time. There will always be files in a project that are more conflict prone than others, so it makes sense to be mindful of that when working on features in parallel. Perhaps it would even make sense to split the file to minimize further conflicts. Pushing through pain that can't be avoided is fine. Pushing through pain that could be avoided with a little strategic planning is silly and wasteful. What I'm seeing in this admonition is "when you feel pain, push through it now to avoid more pain later" instead of "when you feel pain, look for a strategy to reduce total pain over time".
- sirmarksalot 14y agoAnd what I read was "quit procrastinating just because something makes you uncomfortable." All the strategies you've described require you to face the problem head on and make an informed judgment about it, instead of just keeping on doing whatever you were doing. They're better strategies than the example that the article came up with, but they still require you to think about something that you've been avoiding.
- bguthrie 14y ago> Rather than "merging often" to take small pain now rather than big pain later, they should be taking a step back and looking at WHY there's pain. They could, for example, choose to stagger their work (work on stories involving unrelated files as much as possible) such that they're not stepping all over each other all the time. I guarantee you that the people who invented "merge more often" tried this approach first.