03 October 2013

Ethics for Developers

Ethics for Developers? Does this cow even exist? Well yes, it does, and I just thought to be the first one to write about it.
Why? Because Computer Programmers /Developers work with people. And when you work with people there's not only a discussion of what's legal, but of also of things that may be legal, but could get you fired. And no, I'm not talking here about misusing the Printer. Or the Internet. I'm talking about some other stuff...

The first issue when we discuss ethics, is the burning issue of documentation. Best practices do cover that (over 126 Million result in Google!), and the reason is that it is pure ethics. Give meaningful names for your functions and parameters, and comment everything which isn't obvious. No need to write documentation just for the sake of writing. Follow the book Code Complete for once (960 pages!), and your company guidelines.
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.  - Martin Golding
Another part of Documentation is: do not use less known feature of your programming language, as this way you're locked to the project in order to achieve maintenance. No 'goto' in C, No pointers to functions in C++, no your-own-inventions Design Patterns. If you're reaching in your design the case of "Multiple Inheritance" (Outside of COM) "Private Inheritance" or other weird functionality in C++ you should seriously re consider your design. Maybe it is the best practice for this particular situation; more likely you're way off track.
I would add to Documentation the clause: Do not use undocumented functions. Documented function is a legal term. It's a feature that is sure to stay between one version of the product (SQL, programming language, running environment, operating system) to another. Undocumented function wouldn't. You're very likely to crash your product once the next version comes out. So don't use undocumented functions. Whenever I read a forum post recommending the use of undocumented function I shy away from that. Surely there's a "legal" way (I always find out there was one).
Another issue is hacking. You could say that Hacking is BAD, but I'd claim that Hacking (as long as it's not meant to cause harm) is actually GOOD. More often than not it will tell you about the system that you've been working on more than any documentation.
As long as you make sure that you report the results of your search to your boss, I don't see anything wrong with that.Seriously. Unless you travel to the "illegal" area.As long as it's not for profit, you can probably still get away with it.

But there are other issues that you may have missed but I've encountered as an end user. And it wasn't a pleasant experience.
Beware of unfunny jokes!
Exception Handling. In a nice little educational computer game that my daughter once received as as freebie, whenever there was an error instead of just dumping you outside of the game, the computer programmer probably recorded himself making a scary laugh with some sound affects. So my 5 years old refused to touch it. Pity.
General QA - acknowledge your testing
You need to create a test user? Call it "Test User". You can get away with "Darth Vader", after all, you're probably a geek.. You can't get away with "Fat Cow". It's unacceptable. The name will probably stay in the system, and somebody (who may or may not be horizontally challenged) will find it offensive.
You need to send a test email? say "This is a test email". If the test goes wrong (a possibility, after all, it is a test) and it is being sent out. If it goes to the wrong person it could be very embarrassing.
and what do you think is Ethics for developers and not being regarded as such? Please let me know via the comments below!

No comments:

Post a Comment