MightyBigCar is a user on octodon.social. You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.
MightyBigCar @MightyBigCar

So I work with a team of people who are extremely bright in a number of ways, but rather knuckleheads in others. f'rinstance, take error handling in their code. Some functions return 0 for success, 1 for failure; some the opposite. Some return negative values for failure. Some throw exceptions. Some return nothing, and most ignore the return values anyway. It all depends on who coded what, so you often have all these commingled in any one file.

Guess who gets to sort that whole mess out now?

Diving further into that code, I find they took my advice from a few years ago to use classes to manage their C++ code...

... but didn't use any subclasses. Instead, they have FooHelper.h, which the public class methods for each Foo-class variant to macros like FOO_INIT, FOO_SETUP, FOO_RUNFOO, FOO_SET_PARAM, and so on for each of a number of classes. There's also a FooHelper.cpp, which implements the parts of that whackyness which don't fit neatly into macros.