News for hackers. Stuff that matters.
Re:Good Software Development Habits by Aeolun on Sunday November 17, 2024 @07:07PM (#42168489)
Having it all in one tested function means it’s much easier to keep in line. Woe be the one that decides to change a common section in something coopied all over the codebase.

Modifying those boolean flags within the context of your tests is practically free. Trying to merge 4 files into one is… not.

Re:Good Software Development Habits by tasuki on Sunday November 17, 2024 @07:10PM (#42168515)
Have four public api functions, which call a private function underneath to avoid the duplication. Everyone is happy.