Journal Articles
Browse in : |
All
> Journals
> CVu
> 321
(11)
All > Topics > Management (95) Any of these categories - All of these categories |
Note: when you create a new publication type, the articles module will automatically use the templates user-display-[publicationtype].xt and user-summary-[publicationtype].xt. If those templates do not exist when you try to preview or display a new article, you'll get this warning :-) Please place your own templates in themes/yourtheme/modules/articles . The templates will get the extension .xt there.
Title: The Ethical Programmer
Author: Bob Schmidt
Date: 05 March 2020 23:12:34 +00:00 or Thu, 05 March 2020 23:12:34 +00:00
Summary: Pete Goodliffe considers an ethical approach to programming.
Body:
Ethics is in origin the art of recommending to others the sacrifices required for cooperation with oneself.
~ Bertrand Russell
I often describe how the quality of a coder depends more on their attitude than their technical prowess. A recent conversation on this subject led me to consider the topic of the ethical programmer.
What does this mean? What does it look like? Do ethics even have an appreciable part to play in the programmer’s life?
It’s impossible to divorce the act of programming from any other part of the coder’s human existence. So, naturally, ethical concerns govern what we, as programmers, do and how we relate to people professionally.
It stands to reason, then, that being an ‘ethical programmer’ is a worthwhile thing; at least as worthwhile as being an ethical person. You’d certainly worry about anyone who aspired to be an unethical programmer.
Many professions have specific ethical codes of conduct. The medical profession has the Hippocratic oath, binding doctors to work for the benefit of their patients, and to not commit harm. Lawyers and engineers have their own professional bodies conferring chartered status, which require members to abide by certain rules of conduct. These ethical codes exist to protect their clients, to safeguard the practitioners, as well as to ensure the good name of the profession.
In software ‘engineering’ we have no such universal rules. There are few industry standards that we can be usefully accredited against. Various organisations publish their own crafted code of ethics, for example the ACM [1] and BCS [2]. However, these have little legal standing, nor are they universally recognised.
The ethics of our work are largely guided by our own moral compass. There are certainly many great coders out there who work for the love of their craft and the advancement of the profession. There are also some shadier types who are playing the game predominantly for their own selfish gain. I’ve met both.
The subject of computer ethics was first coined by Walter Maner in the mid-1970s. Like other topics of ethical study, this is considered a branch of philosophy.
Working as an ‘ethical’ programmer has considerations in a number of areas: notably in our attitudes towards code, and towards people. There are also a bunch of legal issues that need to be understood. We’ll look at these in the following sections.
Attitude to code
Do not write code that is deliberately hard to read, or designed in such a complex way that no one else can follow it.
We joke about this being a ‘job security’ scheme: writing code that only you can read will ensure you will never get fired! Ethical programmers know that their job security lies in their talent, integrity, and value to a company, not in their ability to engineer the company to depend on them.
Do not make yourself ‘indispensable’ by writing unreadable or unnecessary ‘clever’ code.
Do not ‘fix’ bugs by putting sticking-plaster workarounds or quick bodges in place, hiding one issue but leaving the door open for other variants of the problem to manifest. The ethical programmer finds the bug, understands it, and applies a proper, solid, tested fix. It’s the ‘professional’ thing to do.
So, what happens if you’re within a gnat’s whisker of an unmovable deadline and you simply have to ship code, when you discover an awful, embarrassing, showstopping bug? Is it ethical to apply a temporary quick-fix in order to rescue the imminent release? Perhaps. In this case, it may be a perfectly pragmatic solution. But the ethical programmer does not let it rest here: he adds a new task to the work pool to track the ‘technical debt’ incurred, and attempts to pay it off shortly after the software ships. These kinds of Band-Aid solutions should not be left to fester any longer than necessary.
The ethical programmer aims to write the best code possible. At any point in time, work to the best of your ability. Employ the most appropriate tools and techniques that will lead to the best results – for example, use automated tests that ensure quality, pair programming, and/or code review to catch mistakes and sharpen designs.
Legal issues
An ethical, professional programmer understands pertinent legal issues and makes sure to abide by the rules. Consider, for example, the thorny field of software licensing.
Do not use copyrighted code, like source provided under the GNU GPL (General Public Licence) [3], in proprietary code when the licence does not permit this.
Honour software licences.
When changing jobs, do not take source code or technology from an old company and transplant parts of it into a new company. Or even show parts of it in an interview with another company.
This is an interesting topic, as it leads to a large grey area: copying private intellectual property or code that has a clear copyright notice is clearly stealing. However, we hire programmers based on their prior experience – the things they have done in the past. Is rewriting the same kind of code from memory, without duplicating exact source lines, ethical? Is re-implementing another version of a proprietary algorithm that conferred competitive advantage unethical if you’ve hired the designer of that algorithm specifically for their experience?
Often code is published online with a very liberal licence, merely asking for attribution. The ethical programmer takes care to make sure attribution is given appropriately for such code.
Ensure appropriate credit is given for work you reuse in your codebase.
If you know that there are legal issues surrounding some technology you’re using (e.g., encryption or decryption algorithms that are encumbered by trade restrictions), you have to make sure your work does not violate these laws.
Do not steal software, or use pirated development tools. If you are given a copy of an IDE make sure that there is a valid licence for you to use it. Just as you would not pirate a movie, or share copyrighted music online, you should not use illegally copied technical books.
Do not hack or crack your way into computers or information stores for which you do not have access authority. If you realise it’s possible to access such a system, let the administrators know so they can remedy the permissions.
Attitude to people
Treat others as you would want them to treat you.
~ Matthew 7:12
We’ve already considered some ‘ethical attitudes’ towards people, as we write code primarily for the audience of other programmers, not for the compiler. Programming problems are almost always people problems, even if the solutions have a technical nature.
Good attitudes towards code are also good attitudes to other programmers.
Imagine yourself as a heroic coder. The kind of programmer who wears your underwear atop your trousers, and not simply as a geeky fashion faux pas. Now: do not abuse your super powers for evil. Only write software for the good of mankind.
In practice, this means: don’t write viruses or malware. Don’t write software that breaks the law. Don’t write software to make people’s life worse, either materially, physically, emotionally, or psychologically.
Don’t turn to the dark side.
Do not write software that will make another person’s life worse. This is an abuse of power.
And here we open a wonderful new can of worms: is it ethical to write software that makes some people very rich at the expense of poorer people, if it doesn’t break any laws? Is it ethical to write software to distribute pornographic content, if the software itself breaks no laws? You can argue that people are exploited as a by-product of both activities. Is it ethical to work in these industries? This is a question that I can only leave for the reader to answer.
What about working on military projects? Would an ethical programmer feel comfortable working on weapons systems that could be used to take a life? Perhaps such a system will actually save lives by acting as a deterrent against attack. This is a great example of how the ethics of software development is a philosophical topic, not an entirely black-and-white affair. You have to reconcile yourself with the consequences that your code has on other people’s lives.
Teammates
The people you encounter most frequently in your programming career are your teammates – the programmers, testers, and so on, that you work with closely day by day. The ethical programmer works conscientiously with all of them, looking to honour each team member, and to work together to achieve the best result possible.
Speak well of all people. Do not engage in gossip or back-biting. Do not encourage jokes at the expense of others.
Always believe that anyone, no matter how mature or how experienced, has something valuable to contribute. They have an opinion that is worth hearing, and should be able to put forward points of view without being shot down.
Be honest and trustworthy. Deal with everyone with integrity.
Do not pretend to agree with someone when you believe they are wrong; this is dishonest and rarely useful. Constructive disagreements and reasoned discussions can lead to genuinely better code design decisions. Understand what level of 'debate' a team member can handle. Some people thrive on intense, passionate intellectual debate; others are frightened by confrontation. The ethical programmer seeks to engage in the most productive discussion result without insulting or offending anyone. This isn’t always possible, but the goal is to always treat people with respect.
Do not discriminate against anyone, on any grounds, including gender, race, physical ability, sexual orientation, mental capability, or skill.
The ethical programmer takes great care to deal with 'difficult people' in the most fair, transparent way, attempts to diffuse difficult situations, and works to avoid unnecessary conflict.
Treat others as you would like them to treat you.
Manager
Many issues that may be seen as agreements between you and your manager can also be seen as ethical contracts between you and the other members of the team, as the manager acts as a bridge with the team.
Do not take credit for work that is not yours, even if you take someone else’s idea and modify it to fit the context a bit. Give credit where it’s due.
Do not give an unnecessarily high estimate for the complexity of a task, just so that you can slack off and do something more enjoyable on the pretence of working hard on a tricky problem.
If you see looming issues that will prevent the smooth running of the project, report them as soon as you notice. Do not hide bad news because you don’t want to worry or offend someone, or be seen to be a pessimistic killjoy. The sooner issues are raised, planned around, and dealt with, the smoother the project will go for everyone.
If you spot a bug in the system, report it. Put a bug in the fault tracking system. Don’t turn a blind eye and hope that no one else will notice it.
The ethical programmer takes responsibility for the quality of the product at all times.
Do not pretend to have skills or technical knowledge that you do not possess. Don’t put a project schedule in danger by committing to a task you cannot complete, just because you think it’s interesting and you’d like to work on it.
If you realise that a task you’re working on is going to take significantly longer to complete that you expected, voice that concern as soon as possible. The ethical programmer does not keep it quiet in order to save face.
When given responsibility for something, honour the trust placed in you. Work to the best of your ability to fulfil that responsibility.
Employer
Treat your employer with respect.
Do not reveal company confidential information, including source code, algorithms, or inside information. Do not break the terms of your employment contact.
Don’t sell work you have done for one company to another, unless you have express permission to do so.
However, if you realise that your employer is engaged in illegal activities, it is your ethical duty to raise it with them, or report their malfeasance as appropriate. The ethical programmer does not turn a blind eye to wrongdoing just to keep her own job secure.
Do not falsely represent, or bad-mouth your employer in public.
Yourself
As an ethical programmer, you should keep yourself up-to-date on good programming practice.
Ethical programmers do not work so hard that they burn themselves out. This is not only personally disadvantageous, but also bad news for the whole team. Hours and hours of extra work, week in, week out, will lead to a tired programmer, which will inevitably lead to sloppy mistakes, and a worse final outcome. The ethical programmer understands that although it’s nice to look like a hero who works incredibly hard, it’s not a good idea to set unrealistic expectations and to burn yourself out.
A tired programmer is of no use to anyone. Do not overwork. Know your limits.
You have a right to expect the same ethical conduct from others you work with.
The Hippocodic Oath
What would the ideal programmers’ code of ethics look like? The ACM and BSI ethics documents are formal, lengthy, and hard to recall.
We need something pithier; more of a mission statement for the ethical programmer.
I humbly suggest:
I swear to cause no harm to the code, or to the business; to seek personal advancement, and the advancement of my craft. I will perform my allotted tasks to the best of my ability, working harmoniously with my team. I will deal with others with integrity, working to make the project, and the team, maximally effective and valuable.
Conclusion
How much you care about this kind of thing depends on your level of diligence, your professionalism, and your personal moral code. Are you in the programming game for fun, enjoyment, and the development of great code? Or are you in it for yourself, for career development (at the expense of others, if necessary), to make as much money as you can, and to hoist yourself above others on the professional ladder?
It’s a choice. You can choose your attitude. It will shape the trajectory of your career.
I find my attitudes shaped by my desire to write good code and to participate in a community that cares about working well. I seek to work amongst excellent developers whom I can learn from. As a Christian, I have a moral framework that encourages me to prefer others over myself and to honour my employers. This shapes the way I act.
I conclude from what we’ve seen here that there are (at least) two levels to the ethical programming career: the mandate to ‘do no harm’ is the base level, to not tread on people, or be involved in work that exploits others. Beyond this is a more involved ethical mantra: to only work on projects that provide sound social benefits, to specifically make the world better with your talents, and to share knowledge in order to advance the programming craft. I suspect that many people ascribe to the first camp of ethics. Fewer feel the urge, or are able to devote themselves to the cause of the second.
How do your beliefs and attitudes shape the way you work? Do you think you are an ethical programmer?
Questions
- Do you consider yourself an ‘ethical’ programmer? Is there a difference between being an ethical programmer and an ethical person?
- Do you agree or disagree with any of the observations in this article? Why?
- Is it ethical to write software that makes bankers fabulously wealthy if the money they make comes at the expense of other people, who are not able to exploit the same computing power? Does it make a difference whether the trading practice is legal or not?
- If your company is using GPL code in its proprietary products, but is not fulfilling the obligations of the licence terms (by withholding its own code), what should you do? Should you lobby for the licence terms to be met by open sourcing the company’s code? Or should you ask for that GPL code to be replaced with a closed source alternative? If the product has already shipped, should you be a ‘whistle-blower’ and expose the licence violation? What if your job security depended on keeping quiet?
- What should you do if you identify another programmer acting ‘unethically’? How does this answer differ if that programmer is a co-worker, a friend, someone whom you’ve been asked to give a reference for, or a coder you’ve met but do not work directly with?
- How do software patents fit into the world of ethical programming?
- Should your passion for software development have any bearing on how much you care about ethical issues? Does a passionate programmer act more ethically than a career coder?
References
[1] ACM Code of Ethics and Professional Conduct (Association for Computer Machinery): http://www.acm.org/about/code-of-ethics
[2] BCS: http://www.bcs.org/server.php?show=nav.6030
[3] GNU GPL (General Public Licence): http://www.gnu.org/licenses/gpl.html
is a programmer who never stays at the same place in the software food chain. He has a passion for curry and doesn’t wear shoes.
Notes:
More fields may be available via dynamicdata ..