this post was submitted on 20 Jul 2025
388 points (94.7% liked)
Programmer Humor
25282 readers
487 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
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
You're both right. You're both wrong.
If you only write tests after you've written the code then the test will test that the code does what the code does. Your brain is already polluted and you're not capable of writing a good test.
Having tests that fail is fine, as long as they're not part of your regression tests.
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.
So I can never commit a test without also implementing the functionality?
That's madness.
You can, but not on master.