this post was submitted on 14 Aug 2025
282 points (99.3% liked)

Programmer Humor

25699 readers
1276 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
 

Its definitely a bad idea writing new code that builds up on your old code, that has not been tested properly, because you quickly have to start debugging multiple layer is code at once.

you are viewing a single comment's thread
view the rest of the comments
[–] cows_are_underrated@feddit.org 1 points 16 hours ago (1 children)
[–] HappyFrog@lemmy.blahaj.zone 3 points 16 hours ago (1 children)

Test driven development. Having a well designed automated test, and then developing until the test succeeds.

[–] cows_are_underrated@feddit.org 1 points 16 hours ago (1 children)

Ah thanks. That sounds like not that bad of an idea, but for the scale that my projects are at thus is quite an overkill. I usually try if it works in The best case sz scenario and then try to deliberately break it by calling certain functions with garbage as parameters.

[–] 9point6@lemmy.world 7 points 15 hours ago (1 children)

No project is too small for tests

Tests double as your documentation for your intent

Take it from me who has 20+ years of personal projects behind me, the ones that I've kept around are typically the ones that have some form of test suite.

It's easy to build on something if you know you're not breaking something in the process

[–] cows_are_underrated@feddit.org 2 points 13 hours ago (1 children)

Yeah of course I Am testing. I Am usually just not writing very extensive tests. I try to break it as much as possible with as little effort and try then to prevent it from breaking.

[–] AnarchistArtificer@slrpnk.net 1 points 3 hours ago (1 children)

That sounds like you're doing TDD, albeit informally.

[–] cows_are_underrated@feddit.org 1 points 3 hours ago

From what I understand the difference between how I code and what has Ben described as TDD in this thread is, that I set up everything first and then try to think of ways people could break the code and then test these vases/try to prevent them.