this post was submitted on 06 Jul 2024
1532 points (99.4% liked)

Programmer Humor

19623 readers
2719 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] humbletightband@lemmy.dbzer0.com 7 points 4 months ago

I follow these simple rules and encourage my colleagues to do so

  1. If I'm just shuffling jsons, then yes, the code should be self documented. If it's not, the code should be rewritten.

  2. If I implement some complex logic or algorithm, then the documentation should be written both to tests and in the code. Tests should be as dull as possible.

  3. If I write multithreading, the start, interruption, end, and shared variables should be clearly indicated by all means that I have: comment, documentation, code clearness. Tests should be repeated and waits should not be over 50ms.