3 ms·
I have been the maintenance programmer for multiple legacy projects. I don't have the time or motivation to "master the language at the required level". I want
by theshrike79 3y ago
I have been the maintenance programmer for multiple legacy projects.
I don't have the time or motivation to "master the language at the required level". I want to get in, fix the code, test the fix and get out. That's what I get paid for, not spending weeks to become an expert in Language X's clever code tricks and hacks.
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live."
You can be clever and terse in your own projects, please write readable code with comments. Even if something is 150% clear to you while writing the code, it might not be for the next person - or yourself 5 years later.
- palata 3y agoAgain, you are assuming that I mean "overcomplicated code" when I say "clever". To me, clever code is meant to be readable. Sometimes a recursion is more readable, sometimes it is not. I am just saying that the choice of what is "overcomplicated" comes to the maintainer. My project, my rules. If you don't want me to use lambdas in the project you maintain, that's your choice (and it is my choice to contribute or not). I just don't agree when people say "don't use tertiary operators ever, because I don't like them". Interestingly, I go further than you: good code to me mostly doesn't need comments. Comments are there for the more complicated parts, but most code should be readable as-is. I guess we mostly disagree on what is too complicated :).