this post was submitted on 07 Jul 2025
665 points (99.3% liked)

Programmer Humor

24993 readers
212 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
[โ€“] PurplebeanZ@lemmy.world 9 points 1 week ago (12 children)

I've never actually tried or got the point of this test stuff tbh. It didn't exist when I started so I never really got the point of it. I tried reading up on it a bunch of times and it seemed like extra work for nothing ๐Ÿคท

It seems popular though so maybe one day I'll get around to it....

[โ€“] BehindTheBarrier@programming.dev 15 points 1 week ago (5 children)

Code normally works fine after you write it and then hopefully at least test by hand. The new guy 5 years later, which do not fully grasp the extent of his actions, and the guy reviewing the code also not being too familiar with it, will not make sure everything does as intended.

Tests are correctness guarantees, and requires the code and/or the test to change to pass. They also explain how something should behave to people that don't know. I work in a area where there are so many businesses rules that there is no one person that knows all of it, and capturing the rules as tests is a great way to make sure that rules remains true after someone else comes to change the code.

[โ€“] ChickenLadyLovesLife@lemmy.world 3 points 6 days ago (2 children)

capturing the rules as tests is a great way to make sure that rules remains true

Capturing the rules as documentation is also a great way to make sure that rules remain true.

Lol just kidding! Documentation ... can you imagine?

[โ€“] Shanmugha@lemmy.world 2 points 6 days ago

Yeah, good luck reading 20+ pages of interlinked rules of what is what, what does what and in what order, then comparing that to how system behaves after your changes

Lol just kidding. No business rules are harder than five lines of text

load more comments (1 replies)
load more comments (3 replies)
load more comments (9 replies)