this post was submitted on 24 Jul 2026
428 points (98.2% liked)
Programmer Humor
32452 readers
1507 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 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Designing your unit tests before you've written your algorithm is - in my experience - a bit ass backwards.
Agreed, you find the right shape for the code as you build and try stuff, adding the tests right after makes most sense, unless maybe you're just testing an API or something
I mean I'm theory for any planned method you would know the input and expected output before the coffee is written.
Except that then you'll shape your interfaces to drive tests nicely, instead of being, you know, sane and useful (been there, done that).