Hacker News new | past | comments | ask | show | jobs | submit login

I don't mean well-considered and documented libraries, I mean the thing where someone goes to DRY up a codebase and keeps thinking "oh, if I just add a parameter this function can also handle this one-off case over here..." over, and over, and over, until you've got this function with a name that makes it look straightforward but for some reason it wants three strings, two of which should actually be nulled in most cases (and god help you if you fill in a value when you don't need them), an integer for unclear reasons but it's the same value in every call you can find, and half a dozen booleans that you'll have to go read the source to figure out, because some of them do more than the variable name in the signature implies.

Good intentions at every step, but a Frankenstein's monster of a function (or entire class, sometimes) in the end

It's the DRY equivalent of having 20 slightly-different copypastes all over a codebase.




Ah yes :)

The Django monolith I worked in for some time was like this - 30, 30, 40 parameters on the methods to handle completing a purchase.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: