this post was submitted on 20 Jul 2025
392 points (94.7% liked)

Programmer Humor

31537 readers
1025 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 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] balsoft@lemmy.ml 2 points 10 months ago* (last edited 10 months ago) (1 children)
  • You write tests for functionality before you write the functionality.
  • You code the functionality so the tests pass.
  • Then, and only then, the test becomes a regression test and is enabled in your CI automation.
  • If the test ever breaks again the merge is blocked.

I disagree. Merging should be blocked on any failing test. No commit should be merged to master with a failing test. If you want to write tests first, then do that on a feature branch, but squash the commits properly before merging. Or add them as disabled first and enable after the feature is implemented. The enabled tests must always pass on every commit on master.

[–] wewbull@feddit.uk -1 points 10 months ago (1 children)

So I can never commit a test without also implementing the functionality?

That's madness.

[–] balsoft@lemmy.ml 2 points 10 months ago

You can, but not on master.