by kstenerud · 1w ago · 0 comments
You end up with drifting implementations that may or may not come from the same root at different points, where the same fix has to be applied multiple times as each team learns the lessons for what not to do, etc. Effectively what DRY is about.
Code duplication is fine as long the duplicates don't drift apart. Keeping them in sync is a bit tedious for people. And people tend to cut corners. So there's a potential to end up having to fix the same kinds of issues several times. But with AIs doing all the tedious work, staying on top of that is pretty doable. It's more a question of whether that's a good use of time and tokens. You could just make it fix things properly.
In the code base I mentioned, we had a few different component libraries that at some point were selected, used, and then later abandoned. We also had taken into use tailwind at some point but we never completed the upgrade to tailwind 4. And we had a bunch of manually styled html as well. It's an application with a lot of different functionality, lots of different screens, etc. So there was a bit of pressure to not break things. I fixed all of that in a few prompts. The application still looks and feels the same but is much more consistent in terms of look and feel (we had several varieties of buttons and input fields with subtly different behavior). We found and fixed a few minor issues since then.