Every guy has heard of “man code”. You know, the unspoken code of ethics that all men are bound by. If you are a man, don’t ever violate “man code”. You might get your “man card” suspended for a while. How could you face the world after something like that? *cringe*. Nobody wants that! And so, by that decree and upon their honor, men abide by the rules of “man code”. So let it be written, so let it be done!
Well, the same thing exists for programmers. It would be easier to draw the parallel if you could call it “Programmers’ code” but you cannot, because it sounds too much like “source code”. Derr, um, abide by source-code?! No, that is grammatically awkward. So, there is no catchy name that helps perpetuate the concept, and yet, this code of ethics for programmers exists and it is very strong. Every bit as strong as “man code”.
A few times, in my career, I have worked on programming projects run by EEs. I learned that EEs are not like other programmers. They don’t think the same and some are not aware of the inherent “code of conduct” for programmers.
On more than one occasion, I have actually interacted with an EE, who voiced a word of concern to me, that I might edit some source code and check it in without consent of the team.
…I tell you, I was cut to the quick! What kind of programmer(/man) would consider doing such a thing?!
To even imply that I could be capable of such heinous mayhem! He might as well have said something about my mother or unplugged my USB HDD without ejecting first. You can almost imagine the range of shock and emotion that I went through.
Somehow, I managed to regain my composure, after taking a silent moment to consider the fact that I was talking to an EE. He might not be aware of the programmers code of ethics.
I spent several days recovering from the emotional trauma and took the time to itemize the unspoken code of conduct that inherently binds all programmers. Please savor these foundational principals.
- Any piece of code has exactly ONE owner. That owner makes all of the laws for that code (good or bad). If you want to change that code, you need to make arrangements with the owner. If the owner is evil, you could possibly arrange a coup on his code, but you risk your eternal soul by doing so. Be sure it is the right thing to do.
- If you look at the code and you have a better way of refactoring it, you are obliged to discuss it with the owner until you are able to form a consensus or understanding about the better way. If you just change it, then you are wrong and you should expect it to get changed back because you made a mistake.
- If you own some code and you are closed-minded, you are already wrong and must be fired. Don’t bother protecting your turf or subverting the code, because somebody has already made backups and you will be easily replaced by somebody who is a better programmer than you (eg. not closed-minded). Your only hope is to learn humility and work with anyone who can expand your mind (pretty-much, anybody).
- Comment your code for the next person.
- Your programs are your children. So don’t make fun of another person’s ugly program.
- Acknowledge the sweet ninja-moves of your colleagues, when they are demonstrated. You deserve the same respect, but you have to be willing to give the respect first.
- Be honest about what you know and don’t know. If you’ve tried a technology before, you should say “yes, I know about that technology, here is some example code” or “no, I’ve never used it, but I’d really like to. Let me make an example for you”.
- Be supportive of your support people (server administrators, PMs, BAs, Testers and the like). Pretty-much, everyone who is not a programmer. Those people’s jobs are not as glamours as ours. However, that work needs to be done and we should be thankful for their support. They have egos and don’t like to be mocked when they click “next” a dozen times and give you a new server. Somebody had to do it. So, just say thank you.
So, there you have it. Of course, other office ethics apply too.
Last thought: most non-programmers might not see why this is a big deal. Well, it just is! I know it, you know it and if they don’t know it, then send them a link to this article and emphatically point-out how insightful I am and how I am a real spokesperson for the entire programming community.