4 ms·
One of my direct reports once fixed one of my "simple bugs" with the astonishingly direct commit message: "Const, motherfucker. Do you speak it??!?" (which, I
by glangdale 5y ago
One of my direct reports once fixed one of my "simple bugs" with the astonishingly direct commit message:
"Const, motherfucker. Do you speak it??!?"
(which, I hasten to add, would have been unthinkable if it had been a bit of peer-to-peer banter, much less senior-to-junior, but as a way of winding up your boss, it was a absolute masterwork)
- lagadu 5y agoCan't really go wrong with a Pulp Fiction reference either!
- darkerside 5y agoHe was probably talking to the code and not you. You're right he should be tactful, but as a manager, please don't take it personally. It's kind of your job not to.
- glangdale 5y agoNah, he was talking to me. We had that kind of a relationship where this stuff was always going to be considered funny, not offensive. We did tone it down a lot when other people were around because this kind of banter can be misinterpreted by third parties ("oh my god, what terrible things is he going to say to me if they speak like that to each other").
- tialaramex 5y agoConst should be default. Kate Gregory has a C++ talk where she discusses being brought in to clean up code and she's like OK step one, mark everything const. Of course some of it isn't const, but the compiler will point out every place where this made no sense, so next you can remove the consts that the compiler is unhappy about until you get a const-correct program.
- glangdale 5y agoYeah, pretty much agree. The problem of being lazy about constness is that when you finally get your act together and think about it, you'll wind up having these huge "viral" chains of const-fixes to do. The code will be better for it, but you'll wind up changing long chains of things to be const.