3 ms·
I call that weaponized dogmas. It’s at least better than people who insist on being DRY by writing an inscrutable generic helper function which will only save 3
by flakes 3y ago
I call that weaponized dogmas. It’s at least better than people who insist on being DRY by writing an inscrutable generic helper function which will only save 3 or 4 lines of code duplication.
- laurent_du 3y agoNothing I hate more than a useless "helper" function that wraps a built-in feature of the language and gets buried in a "common lib" package that you need to inspect when you want to understand what is going on, instead of just relying on your knowledge of the language. Do we really need a function to map a dictionary and a list of keys to the corresponding values?
- BossingAround 3y agoOh my god I got a flashback to Groovy's missing method [0] which caused us so many issues, and made our codebase so unreadable. When you discover it for the first time, you think, "huh, neat, why not use it". Before you know it, nobody can reason about your code and if you leave, nobody wants to maintain it (esp. if your test suite is not extensive). [0] https://groovy-lang.org/metaprogramming.html https://groovy-lang.org/metaprogramming.html
- booleandilemma 3y agoI'm a huge hater of these and I think they almost always decrease readability of the code and slow down the development and review process. I want to read and write the language I'm developing with, not the helper methods of some overeager developer who wanted to leave his mark on the codebase.
- brodouevencode 3y agoThe absolute counter to weaponized dogma is itself weaponized dogma. There are times when implementing DRY, 12FA make sense and times when it doesn't. Be careful with hard-lined stances.