leakyabs
Re:Low Hanging Fruit of Programming Language Design
on Wednesday November 22, 2017 @02:40PM (#15759836)
> When done properly, yes. When done to the point where a five line function is created with ten inputs (yes, this is real), no. But DRY tells us that the five lines of duplication is unconditionally worse.
I work with people I would describe as... junior at best (lots of boot campers) and I see this all the time. Functions that just return an anonymous function for no reason, half JSON blobs returned from functions that are called with one string instead of just repeating the blob in the code, etc.
Re:Low Hanging Fruit of Programming Language Design
on Wednesday November 22, 2017 @01:52PM (#15759371)
I feel this in my soul. I work on a JavaScript project now where sometimes two duplicate pieces of code are “refactored” into one function unnecessarily. Just because there are two similar lines doesn’t mean they need to be their own function/class/whatever, especially when it makes it harder to generalize later when you need similar code that DOESN’T make sense to lump in with that abstraction.
I keep having to simplify the code and it’s exhausting.