40

So, we've all heard of The Programmers Bill of Rights and XP has a similar concept.

It's a common complaint these days that we hear a lot about people's rights but not so much about their responsibilities, so what should be on the programmers bill of responsibilities. That is things that they should do, which they may find unpalatable, but that which separate programmers acting professionally and responsibly, from those who do not.

I'm primarily interested in the unpalatable ones and the ones which tend not to happen. That is the ones that programmers tend to shirk and avoid, rather than the ones which 90% of programmers actually want to do (such as always refactor and use source control).

So, what should be on the Programmers Bill of Responsibilities?

5
  • 4
    furthermore I think it fits guidelines 1,2,4, and 6. Dec 22, 2010 at 18:52
  • 2
    I think it's an important question to ask.
    – HLGEM
    Dec 22, 2010 at 19:11
  • 1
    An important follow up might be 'how do you train yourself to be a Responsible Programmer?' Dec 22, 2010 at 19:31
  • 2
    This question appears to only be generating a list of items. Although the answers are rather impressive (and I commend the answerers who put the time and effort into their posts), they are centered on opinions and the wording of the question strikes me as polling.
    – Thomas Owens
    May 10, 2012 at 17:07
  • 5
    @ThomasOwens strongly disagree that "This question is not a good fit to our Q&A format." This has already generated an answer regarding developer testing, development methodologies, freelancing and business concerns, quality assurance and software engineering, really starting to be uncertain why we even have this site if questions like the above keep getting closed. May 11, 2012 at 15:56

17 Answers 17

40
  • A programmer has the responsibility to push back poor requirements instead of blindly implementing them. This includes telling clients that what they want is more expensive than other options or has a particular set of risks. It also includes communicating bad news in a professional way - not screaming, calling people stupid, implying they are stupid or other childish behavior. If he pushes back, he should have a set of reasons (more than, "I don't like SQL Server and won't use it") and an alternative plan to present.

  • However, the programmer also has the responsibility of accepting decisions and using tools or designs they may not like if their pushback was not accepted. If a report was requested in SSRS, delivering it in Crystal Reports (which the client may not have) is unacceptable. If a .net solution was required, delivering it in Haskell is unacceptable. If no one else on the team uses a tool or language that you want to use, it is unprofessional to use it if management doesn't agree that it is the best tool for the particular job.

  • A programmer has the responsibility to test his work. (This shouldn't be the only test, but no professional programmer should send out code he has not tested.) This includes testing even the branches of the code you don't expect to hit very often. If you have a set of nested IFs, test all possible routes.

  • A programmer has the responsibility to handle errors and exceptions gracefully and to write error messages that the user will see that are professional and neutral not jokes or insulting.

  • A programmer has the responsibility to protect private data, protect the proprietary code he writes for the company and to protect the users from catastrophe (even self inflicted catastrophe) from their use of the application.

  • A programmer has the responsibility to make sure his code is maintainable and is in source control.

  • A programmer has the responsibility to coordinate with others to make sure his changes do not adversely affect what they are doing.

  • A programmer has the responsibility to recommend the best choice for the client of tools or languages in the design phase not the tool/language he wants to play with and learn.

  • A programmer has the responsibility to work with all the appropriate personnel for a project including the ones he does not like. It is not your job to like people, it is your job to work with them and be polite.

  • A programmer has the responsibility to produce a product that does what was specified in a reasonable time-frame. If the time-frame is not going to be met, he or she has the responsibility to inform management of that as soon as it is known.

  • A programmer has the responsibility to let project management know about impediments to getting the job done. They can't fix what they don't know about.

  • A programmer has the responsibility to do the whole task not just the fun, interesting parts. Every job has some boring parts, they still need to be done. This includes things like timesheets and adding discussion items to project management software. It includes things like documentation, code review, etc.

  • A programmer has the responsibility to learn the business domain he is supporting not just programming concepts.

  • A programmer has the responsibility to keep his skills up-to-date.

  • When a programmer messes up, he has the responsibility to do all in his power to fix the problems as soon as humanly possible. This may include bearing the bad news to management rather than trying to hide that you just deleted a critical table in the production database.

  • A programmer has the same responsibilities of any other worker - to show up on time, to work the hours contracted, to request vacation time in advance, to answer phone and email messages (heck to read their emails), to fill in required forms for HR, etc.

6
  • 7
    I love joke error messages. The situation is bad enough already, no need to make it more serious than that - at least try to make me laugh while slapping me with an error! Dec 23, 2010 at 8:45
  • 2
    I question the responsibility for a developer to personally test his code in all situations... I would rephrase that to ensure that his code is tested... If the organization has professional testers (both automated and human) and a solid process in place to make sure the code is tested, I don't see why the developer has to do it personally. If I am developing a new feature or fixing a bug, sure I will test it myself, otherwise I won't know if I'm done with my job. However, if I'm doing a large refactoring, it does not make sense for me to exhaustively regression-test the whole product.
    – JoelFan
    Dec 23, 2010 at 16:26
  • I didn't say regression test, but you should be unit testing your changes to make sure they do what you intended.
    – HLGEM
    Dec 23, 2010 at 16:35
  • 2
    What about no exclamation points in error messages... i.e. "Date is invalid!"
    – JoelFan
    Dec 28, 2010 at 4:37
  • 1
    These need to be gender-neutral. Making them imperatives would make this easier, e.g. instead of "A programmer has the responsibility to test his work," should be "Test your work."
    – sigil
    Mar 12, 2014 at 16:28
42

Every programmer should make their code readable by others.

5
  • @Kevin D: That is a responsibility. You have the responsibility to produce human-readable code. Dec 22, 2010 at 16:12
  • 1
    @Axidos, It's because I changed my answer once I realised what I'd done. Dec 22, 2010 at 16:12
  • I'll delete my orignal comment as it's no longer relevant.
    – Kevin D
    Dec 22, 2010 at 16:14
  • 1
    "Readable" by whom? My "peers" (i.e., someone with education and experience similar to mine)? Someone who is really well-educated in the art and science? Or a Flying Code Monkey who has NO business with anything more advanced than Dartmouth BASIC? Dec 22, 2010 at 23:35
  • 7
    @John, others in this context implies other programmers. In the sentence: "The giraffe was bigger than the others.", we don't takes others to mean flying monkeys. 'Others' means "more of the same type who have not already been mentioned". Dec 23, 2010 at 9:41
22

The programmer is responsible for the privacy and security of all user provided data. Especially passwords, credit card numbers, email addresses, and physical location.

9
  • This would really fall under the domain of the system architect. In many, many enterprise scenarios, programmers don't have any say or control over data stores. How can I be responsible for an e-mail address in a database, when all I'm doing is accessing, not creating, that database? Dec 22, 2010 at 19:24
  • 2
    I guess Facebook people need not apply as far as most of the above responsibilities go. :) Dec 22, 2010 at 19:41
  • 4
    -1 that's too much responsibility. Dec 22, 2010 at 20:12
  • 6
    Maybe for large scale systems it might be too much for one programmer to decide. But for the vast majority of sites where one or few programmers work, it is absolutely necessary to properly store data. No encryption when hashing is needed, no custom algorithms or security by obscurity. Real, tested security.
    – Malfist
    Dec 22, 2010 at 20:43
  • @Neal: The system architect is just another programmer. Sure, for big projects he probably won't get to do any programming, but that doesn't mean he's not a programmer. And, that only applies to big projects; on 2- or 3-man projects a programmer is usually responsible for some part of the database or for its entirety; it is his responsibility to make sure that data is saved securely. Dec 23, 2010 at 0:42
20

Don't make the user lose their work.

This is harder than it sounds... work is more than just "data in a file"... it's any time that the user has spent with your software.

For example, if the user filled out your 30-field form with 29 valid items and 1 invalid one, don't clear all his valid data to complain about the 1 invalid one (heck, don't even clear the invalid one... maybe it's long and just requires a minor correction, or the user won't remember what it was before if you clear it)

A non-obvious but important example is what Windows and practically every other "file manager" software gets wrong.... if I spent a half hour carefully Ctrl-Click'ing to select a set of files and I accidentally do Click instead of Ctrl-Click, it should not clear all my previously selected files, making me start over.

Another one that they got wrong... if I accidentally hit Ctrl-A (instead of Ctrl-S right next door), it should not lose my place in the file and put the cursor at the beginning.... I call finding the right place in the file "work" which the program has "lost".

Yet another: TortoiseSVN's "commit" dialog has a long list of files. Before hitting "Commit", you can go down the list of files, double-clicking on each one to see its changes in a 2nd dialog. To do this quickly I sometimes use the keyboard only, hitting <Esc> to close the 2nd dialog and go back to the 1st. If I accidentally hit <Esc> twice, it also closes the 1st dialog, which results in me forgetting which file I was up to.

6
  • 5
    Try not to make keyboard shortcuts that do oppositie things assigned to the keys right next to each other (CTRL-C and CTRL-V for example, can't tell you how many times If copied when when I intended to paste and vice versa)
    – HLGEM
    Dec 22, 2010 at 19:33
  • 5
    @HLGEM, Paradoxically, whoever designed this probably thought he was doing us a favor by putting them next to each other
    – JoelFan
    Dec 22, 2010 at 19:39
  • 4
    And he wasn't? I mean, you don't have the full power of Emacs or anything, but you can copy and paste without moving your hand around a lot.
    – compman
    Dec 22, 2010 at 20:24
  • 1
    Use Total Commander. Right click to select, and right click to unselect. Unless you navigate somewhere else or lose focus for a long time while the current folder being watched is changed, you won't lose your selection. Dec 23, 2010 at 0:49
  • 1
    For the last example (Ctrl-A loses my place in the file), I have recently found a partial workaround that works in many programs... Ctrl-Z, Ctrl-Y.... that will undo my latest edit to the file contents, then "redo" it, with the result that the contents are the same as before, and I'm located at the place of the edit. This is not necessarily the same as the place my cursor was right before my mistaken Ctrl-A, but it's often close enough... this of course does not excuse the program's bad behavior on Ctrl-A... it's only a partial workaround and took me a while to hit upon
    – JoelFan
    Dec 23, 2010 at 13:51
15

A programmer has the responsibility to respect the system his program will be running on. After development and testing is finished, the program will be deployed to be used for its intended purpose, and that usually involves other people running it on their computers. The programmer needs to keep this in mind: his program is running on someone else's property, not their own, and needs to behave itself as a guest in their home instead of barging in like it owns the place.

For example, his program should not:

  • change global settings without the user's consent. (Including shared library management issues.)
  • delete or modify data that belongs to the user or to another program without the user's consent.
  • update itself without the user's consent.
  • make itself difficult to uninstall.
  • make itself difficult to shut down.
  • disable itself or interfere in any way with proper functioning of the computer if the program is unable to pass some fallible license check.
  • assume that it is the only significant program running on the system and hog system resources accordingly. (Exceptions can be made for actual single-tasking machines, of course, or for programs that the user could be reasonably expected to run alone, such as heavy fullscreen games.)
  • jump out in front of the user with a popup window while the user is doing other things in other programs. (I'm looking at you, Yahoo Messenger!)
7
  • 1
    I really like those both as a user and a programmer. Bouncing icons in my dock are my number one cause of rage towards people I never met.
    – Agos
    Dec 23, 2010 at 0:05
  • 7
    I like all of them except "update itself without the user's consent". I find the way Chrome updates itself refreshing - I love just finding new features. The way other programs do it, however, is abominable. I'm looking at you, Java, and at you, Acrobat Anything. Do not ask me if I want to update you every day. I said no once, take a hint! Dec 23, 2010 at 0:46
  • 2
    If a program is to update itself automatically, at least it should ask the user for consent the first time.
    – gablin
    Dec 23, 2010 at 13:27
  • Another violation by TortoiseSVN... doing just about anything with it causes the system to grind to a halt
    – JoelFan
    Dec 28, 2010 at 4:21
  • @SpashHit: Hmm? I use TortoiseSVN on a daily basis and I've never noticed that... Dec 28, 2010 at 5:05
8

From the Manifesto for Software Craftsman:

As aspiring Software Craftsmen we are raising the bar of professional software development by practicing it and helping others learn the craft. Through this work we have come to value:

  • Not only working software, but also well-crafted software

  • Not only responding to change, but also steadily adding value

  • Not only individuals and interactions, but also a community of professionals

  • Not only customer collaboration, but also productive partnerships

That is, in pursuit of the items on the left we have found the items on the right to be indispensable.

8

Have a look in the mirror and possibly recognize the worst qualities of a programmer in himself. Then work on eliminating them each day.

  1. Not learning anything new
  2. Not seeking to extend your skills
  3. Not being open for new, sticking to old habits
  4. Not caring about the quality of your work
  5. Not seeking to improve the quality of your work
  6. Being a 9-to-5 worker with no passion
  7. Not having own opinion of the things
  8. Accepting others' opinion without questioning
  9. Believing you've learnt it all
  10. Not tolerating any criticism
  11. Not listening to external input
  12. Being ego-centric, know-it-all individual
  13. Having a negative personality and criticizing other people
2
  • +1, but phrasing it this way around makes it quite negative. Dec 24, 2010 at 18:49
  • 1
    I find #13 highly ironic, since that is essentially what you're doing here, albeit in a general sense. May 23, 2012 at 18:34
6
  • A Programmer's responsibility is to create software that satisfies the needs of the requirements, analysis, design, and specifications as set in any contracts between the programmer and the client.
  • A Programmer's responsibility is to create software that is economical, reliable, and works efficiently on real machines.
  • A Programmer's responsibility is to work as efficiently, ethically, and with as much integrity as they can and conduct themselves with utmost professionalism.

Some of that applies to "A Programming Company's" Responsibilities.

4
  • The programmer should know and use the core libraries and platform used.

Specially when the programmer comes from other platform/language. Is terrible to find the programmer struggling for something the core library provide or to misuse the platform advantage due to ignorance.

  • The programmer should create self documenting code

It's very important to have the code documented for other to use, but when it comes to maintainability, self documenting code may literally save hours and hours of frustration.

For instance compare:

// validates if is leap year
if(  year % 4 == 0 && (year % 100 != 0 || year % 400 == 0) ) { 
     doSomethingWithFebruary();
}

to

if( isLeapYear( year ) ) { 
    doSomethingWithFebruary();
}
4

Programming is a profession, not a skill. This means that a programmer has the responsibility to stay current in his field on the latest tools, techniques, and technology.

This may mean pushing back to managers to give time to allow for continuous learning and training, or doing it on your own time.

2

1) Explain clearly that a solution to any problem is going to have trade offs between performance, cost, time, and quality.

2)Complete relevant documentation, be they releases notes or test plans. (documentation will vary with company type and size)

3)Request the correct tools for their job (so many just moan about it but never approach their boss with a reasonable case for getting what they need)

... Others no doubt to follow.

2

Question anything - A programmer should have the responsibility to inquire on anything that a system may be required to do or handle. This can include asking what users may see as silly questions as there are various sites devoted to showing just what users can be capable of doing. Daily WTF and SharkTank being a couple of examples though I'm sure there are others.

1

A programmer is responsible for converting user stories in the product backlog into working and shippable software increments

That's why managers should ensure that they have everything to their goal.

1

Here is my proposal.

  1. A programmer should require the working conditions exposed in the Programmer's Bill of right, in order not to lower the standards for the position.

(For "programmer" I mean "programmer", not "weekend hacker", so all the standard thing a programmer should do are implied.)

1
  • -1. I don't think a responsibility can be one which "require[s]" a right.
    – Craige
    Apr 23, 2012 at 18:15
1

5 precepts of the programmer's guild

1.) check in his/her code weekly and on holidays.

2.) provide for the needs of the programming community.

3.) read at least one programming book per year.

4.) go to at least one programming conference per year.

5.) own up to your mistakes.

2
  • "check in his/her code weekly and on holidays"? You mean hourly, right? Dec 23, 2010 at 0:54
  • @configurator I mean these as a bare minimum to call yourself a programmer. But the more checkins the merrier Dec 23, 2010 at 1:08
1

I'll add "always document any assumptions made" to the list. :-)

2
  • Or... never make assumptions? Dec 22, 2010 at 22:00
  • 2
    @Stephen Furlani - That's unfortunately pretty much impossible on a project of any size. Dec 22, 2010 at 22:04
0

A programmer should not do or implement anything which is unethical or illegal, such as write viruses or hack others' systems (unless it is to discover security holes and then inform the victim about it and what he or she can do to avoid this from being exploited by any malicious hackers).

Not the answer you're looking for? Browse other questions tagged or ask your own question.