Ethical dilemma No. 11: How bulletproof should code really be
Sure, the minimal calculation, simple data structure, and brute-force approach works well in demo when the problems are small. The users try out the code and say, "Gosh this works quickly." Several months later, when enough data has been loaded into the system, the cheap algorithm's weaknesses appear and the code slows to a crawl.
Developers must often decide exactly how hard to work on the final product. Do you whip off a quick and cheap solution or spend weeks adding bulletproof code that deals with extreme cases? True, clients and users should assume some of the responsibility during the requirements and sign-off phases, but developers are often better equipped to anticipate potential contextual hiccups of running code.
Ethical dilemma No. 12: How much should future consequences influence present decisions
Many projects don't make waves. The information goes in and never escapes. Some, however, take on a life of their own, escaping into the wild where they may do untold harm. Security, penetration testing, espionage -- these are obvious candidates for considering the collateral damage of your code.
Take Stuxnet, a virus widely considered a tool for attacking the centrifuges used to purify uranium in Iran. Perhaps it succeeded, but now it lives on, floating along in Windows systems throughout the world.
For most developers, the collateral damage is less obvious. We code for today -- a hard enough proposition -- but we should also consider the future.
Some programmers, for example, love to write complex code that integrates with the operating system and installs new or more complicated drivers. Is that going to work in the future? Will it play well with other new drivers? Will it work with the next generation of the OS? Or will your software leave people with a computer that runs slower and fails more frequently even when your software isn't running?
It may seem simple, but choosing whether to stick with the APIs or follow the standards is an ethical decision. Yes, technology is evolving quickly, and a slavish devotion to outdated mandates can be a hindrance to progress. But we need to consider our part in writing code that lasts a bit longer and not take the decision to swim outside our lane lightly. We can always ask for changes to the standards or the APIs if we need them.
- 12 predictions for the future of programming
- 15 hot programming trends -- and 15 going cold
- Dev-olution: Saluting 19 generations of computer programmers
- Quiz: "Hello, world": Programming languages quiz
- Quiz: Programming IQ test: Round 3
- 15 workplace barriers to better code
- 9 key career issues software developers face
- Top 7 dilemmas facing today's developers
- 7 programming myths -- busted!
- 10 hard truths developers must learn to accept
- 11 programming trends to watch
- 12 programming mistakes to avoid
- Safeguard your code: 17 security tips for developers
- Download: InfoWorld HTML5 Deep Dive
This article, "12 ethical dilemmas gnawing at developers today," originally appeared at InfoWorld.com. Follow the latest news in programming at InfoWorld.com. For the latest business technology news, follow InfoWorld.com on Twitter.