DEV Community

loading...

Which principles would your Hippocratic Oath for programming contain?

jmfayard profile image Jean-Michel Fayard 🇫🇷🇩🇪🇬🇧🇪🇸🇨🇴 ・1 min read

ἐπὶ δηλήσει δὲ καὶ ἀδικίῃ εἴρξειν

The Hippocratic Oath remind doctors of timeless principles of their craft, like the famous First Do Not Harm.

If you were to write down the principles you want to be constantly reminded of in your programming craft, what would they be?

Discussion

pic
Editor guide
Collapse
ben profile image
Ben Halpern

I'd want this worded in the most communicative way possible, but something along the lines of:

Consider use cases of people in different circumstances than you....

This relates to accessibility, but in general is about having empathy for the whole ecosystem of possible end users... Like, anyone who could benefit from this software should be able to, and take the time to consider them.

Collapse
jmfayard profile image
Collapse
ben profile image
Ben Halpern

It can't be quite that simple because "talk to users" doesn't always scale or can't be the responsibility of everyone... More, like, "learn about users". Getting a sense, for example, of who might be bandwidth constrained vs who might never have to think about that. Talking to users could be part of the learning experience but isn't always achievable.

Thread Thread
jmfayard profile image
Jean-Michel Fayard 🇫🇷🇩🇪🇬🇧🇪🇸🇨🇴 Author

Right, it's one mean to an end. Maybe I can paraphrase Stephen Covey

=> Seek first to understand your users, then to be understood

Thread Thread
afritz profile image
afritz

watching a blind noncoder use a built-in/free screen reader on a slow connection work at adding an MX record changed the way I code forever. It was the most painful user experience I have ever witnessed. 40 minutes into it the new record still had not been added and the NS had almost been wiped out twice - would have been if I had not been watching.

Collapse
thorstenhirsch profile image
Thorsten Hirsch

Our oath might start with...

I swear by Ada, the Countess of Algorithms, and by Alan, John, and Konrad, creators of the Machine, that I will carry out, according to my ability and judgment, this oath and this indenture.

Collapse
mtpiercey profile image
Matthew Piercey

Hmm...

"Write it like it'll last forever, test it like it broke yesterday" 😉

Or something like that. There's probably a better way of putting it, but I think it's vital to keep the future users/maintainers in mind (even if they're your future self).

It's a tough one though; I know if I waited to release stuff until it was "future-proof", then I'd have finished very few projects.

Obviously no code is truly future-proof, but it's incredible to see some examples of legacy systems, long-running open-source codebases, and what's turning into generation-spanning software projects. Just because you think you'll get around to "fixing it later" doesn't necessarily mean you will. On the plus side - especially with open-source code - it means that good ideas generally stick around.

Great discussion prompt; sure got me thinking!

Collapse
icaruscomplexz profile image
icarusComplexz

That is so good I might get it tattooed.

Collapse
jmfayard profile image
Collapse
metruzanca profile image
Samuele Zanca

How about these 2:

Document your code, if not for others but for your future self.

I especially like the last part, it sounds like something that would be in an oath.

Prefer self documenting code to actually documenting your code inside your source

Collapse
jmfayard profile image
Jean-Michel Fayard 🇫🇷🇩🇪🇬🇧🇪🇸🇨🇴 Author

You remind me of Martin Fawler saying

“Any fool can write code that a computer can understand. Good programmers write code that humans can understand.”

That sounds like a nice principle:

Write code that humans can understand

Collapse
metruzanca profile image
Samuele Zanca

Yeah, I like that first one aswell!

Collapse
jmfayard profile image
Jean-Michel Fayard 🇫🇷🇩🇪🇬🇧🇪🇸🇨🇴 Author

Mine would be

Be a life long learner
Keep things as simple as possible
Fall in love with the problem, not the solution

Collapse
andrewbrown profile image
Andrew Brown 🇨🇦

Thou shall not push directly to master

Collapse
jmfayard profile image
Collapse
ronca85 profile image
ronca85

hm, programmers really are like doctors. people respect them and think they're wizards but in reality neither of them know what they are doing.