2 ms·
> requires an amount of time approaching the time spent if they had just done it themselves It's actually often harder to fix something sloppy than to write it
by js8 7mo ago
> requires an amount of time approaching the time spent if they had just done it themselves
It's actually often harder to fix something sloppy than to write it from scratch. To fix it, you need to hold in your head both the original, the new solution, and calculate the difference, which can be very confusing. The original solution can also anchor your thinking to some approach to the problem, which you wouldn't have if you solve it from scratch.
- bluGill 7mo agoSloppy code that has been around for a while works. It likely has support for edge cases you forgot about. Often the sloppyness is because of those edge cases.
- js8 7mo agoThat's the incidental (necessary) vs accidental (avoidable) complexity distinction. But I don't think it makes it any easier to deal with.
- bluGill 7mo agothose are different things. Often you don't plan for all the necessary things and so it doesn't fit in - even though a better design evists that would have it fit in neater - but only years latter do you see it and getting there is now a massive effort you can't afford. The result looks sloppy because on hindsight right is obvious
- ummonk 7mo agoIn fairness though, it does give you good practice for the essential skill of maintaining / improving an old codebase.