3 ms·
If the function is ass-backwards and fucked up, add your feature or bugfix in the same fashion. It's probably that way for a reason. Every time I tried to cle
by bluedino 6y ago
If the function is ass-backwards and fucked up, add your feature or bugfix in the same fashion.
It's probably that way for a reason.
Every time I tried to clean up code, I ran into the following:
Some arcane bug was exposed
The previous developers couldn't understand it
Something else broke
So unless you have a way to 100% test your change, keep the status quo.
- ironmagma 6y ago> it’s probably that way for a reason I find this assumption to be harmful. There’s really no probably about it; it’s just the way it is, might have been intentional, might have been completely unwitting. The solution should be to refactor if you have to but in a way that doesn’t change the underlying functionality. If you think about it, there is an extreme case as a contractor where the code you need to change is so convoluted and impossible to understand (imagine a neural net without the training set) that you just can’t change it without refactoring. So I would argue refactoring is necessary sometimes.
- bluedino 6y agoOne example was a quantity field that could say “warehouse”, which meant there was quantity in the warehouse but some manual process needed to be done. Why were they using a quantity field for more than just numbers? Why was it only being used in some corner of the code in a totally different module?