this post was submitted on 26 Feb 2025
711 points (98.0% liked)

Programmer Humor

20906 readers
438 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
[–] merc@sh.itjust.works 2 points 3 days ago

I believe that, because test scripts tend to involve a lot of very repetitive code, and it's normally pretty easy to read that code.

Still, I would bet that out of 1000 tests it writes, at least 1 will introduce a subtle logic bug.

Imagine you hired an intern for the summer and asked them to write 1000 tests for your software. The intern doesn't know the programming language you use, doesn't understand the project, but is really, really good at Googling stuff. They search online for tests matching what you need, copy what they find and paste it into their editor. They may not understand the programming language you use, but they've read the style guide back to front. They make sure their code builds and runs without errors. They are meticulous when it comes to copying over the comments from the tests they find and they make sure the tests are named in a consistent way. Eventually you receive a CL with 1000 tests. You'd like to thank the intern and ask them a few questions, but they've already gone back to school without leaving any contact info.

Do you have 1000 reliable tests?