News for hackers. Stuff that matters.
Re:Flags Are a Code Smell (2014) by patrick451 on Sunday May 22, 2022 @01:55AM (#31465250)
Ehh. All code smells. Especially if it was written by somebody else. Or yourself more than six months ago. Get some nose plugs and move on with life.
Re:Flags Are a Code Smell (2014) by eurasiantiger on Sunday May 22, 2022 @01:57AM (#31465272)
If code doesn’t smell like anything, it probably doesn’t do any heavy lifting.
Re:Flags Are a Code Smell (2014) by rightbyte on Sunday May 22, 2022 @08:15AM (#31467300)
Hiding complexity by smearing it out over abstractions and more loc:s is the name of the game.
Re:Flags Are a Code Smell (2014) by eurasiantiger on Sunday May 22, 2022 @10:24AM (#31468496)
In my experience, complexity arises from a mismatch between data structure and data usage patterns, and it can be eliminated by changing the data structure to match its usage.
Re:Flags Are a Code Smell (2014) by rightbyte on Monday May 23, 2022 @03:23AM (#31476185)
Ye. But if the problem to solve is complex or convoluted enought so will the solution be. Somewhere the code has to actually do something no matter the approuch.