this post was submitted on 28 Jun 2023
454 points (97.1% liked)

Programmer Humor

19623 readers
1 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
[โ€“] [email protected] 26 points 1 year ago* (last edited 1 year ago) (1 children)

One rule of thumb I've heard and follow is that every time you encounter a bug, you write a unit test that would catch it. I find that does a pretty good job of getting high code coverage, though maybe that's cause my code is naturally buggy ๐Ÿ˜….

[โ€“] [email protected] 2 points 1 year ago
  • Writes test to trigger the bug
  • Test is green without fixing the bug.
  • Dafuq?