Things I never, ever, want to hear. Ever.
- In theory,… No, I don’t want to know what you think the code does, I want to know that it actually does—especially if you’re the one that wrote the code. If you haven’t verified, validated by actually testing stuff in a systematic manner, you have failed. Have you validated the functions with stringent unit testing? No? then get out of my face and go write code to test your code. Validate your hypotheses. Always.
- It compiles correctly. This one also irks me quite a lot. It compiles, so, wow? Want a medal? You think that because a 10 LOC program compiles it works correctly? I fart in your general direction. Have you checked that the code does what it has to do, every time, on every input? That’s what interests me. If not, get out of my face and go back do your homework.
- The compiler/OS/library has a bug. While it is nice to be able to think that the bug may be somewhere else than in your code, you should definitively start by suspecting your own code. When I hear stuff like “we have a bug when we compile using -O3, so the compiler is bugged” I have a hard time not to laugh at the person that uttered that. Unless you can prove me that the compiler has a bug and make a simple 5 lines program that reproduces the bug every single time in an explicable way, I’ll consider that you’re the source of the bug. Memory and register allocation change dramatically when optimizations are enabled, so a perfectly harmless buffer overflow in debug mode can cause an immediate crash with optimizations enabled. Seriously. Do you think that the guys that wrote the compiler didn’t check their code? The same holds when applied to an OS or library function.
- I haven’t checked. I’ll do that later. This one really makes me want to bitch-slap silly whoever say this. Checking code is not some kind of cute endeavour to be undertaken if we have some spare time. Correct code is the core of a coder’s business. Incorrect code isn’t code. It’s garbage. I really wish everyone could fully realize how hard and how important it is to write perfectly correct code. Of course, we do not always succeed, but if we fail at writing perfect code, at least, let it not be by nonchalance and negligence.
I’ve heard a couple of other nice ones. One that made an epic facepalm moment is: strange, my program seems non-deterministic. Well, that’s worrying it you hear that about a single-threaded program… That pretty much tells me that there’s bug somewhere. O rly? ya, rly.