I'm not trying to endorse the software (though I personally find it invaluable) but 1) refactoring really is much less of a pain than you would think with VAX (which, at the end of the day, might be a better option if you're stuck with a truly cryptic codebase) and 2) I was not implying it makes code easier to read, but rather that if you're going to be abusing long names in the code, always use as much itellisense/autocomplete functionality to start with. That's what it's there for. The prod wasn't at ChaosEngine, but rather the person who wrote the code.
Share your wisdom! Sage thoughts related to programming you've discovered over the years
My grandfather once said
"The time taken to think something through before doing it is often well spent."
-Jørgen Jørgensen
I've yet to prove him wrong.
I never come up with anything clever to say. On purpose, at least.
Aside from perhaps...
"Always listen to Bregma."
I'm not trying to endorse the software (though I personally find it invaluable) but 1) refactoring really is much less of a pain than you would think with VAX (which, at the end of the day, might be a better option if you're stuck with a truly cryptic codebase) and 2) I was not implying it makes code easier to read, but rather that if you're going to be abusing long names in the code, always use as much itellisense/autocomplete functionality to start with. That's what it's there for. The prod wasn't at ChaosEngine, but rather the person who wrote the code.
I didn't take it as a dig at me, and I'm familiar with VAX; it's a great tool.
But in this case, the goal was to replace the legacy C++ code base with new functionality written in C# (with unit tests, yay!) so any refactoring effort on the C++ ultimately wouldn't have been worth it.
I'm just going to throw this out there because I've suffered a lot from it:
Don't copy and paste code!
a) Common and large enough code should be in a function
and
b) Copy-pasting will lead you to copy your mistakes, cause you to forget to rename variables and generally be bad for you
It's 3am here, and I just realized that the reason my code crashes at runtime is two lines that I copy-pasted but had forgotten to rename one of the parameters accordingly. F*ck me.