... ok, but is there any actual evidence that TDD or even unit tests lead to less bugs in production?
>>109600241TDD is dumb, because you spend more time figuring out you built the wrong thing to begin with.Unit tests are okay, but they end up on the wrong code. Mature code that no one touches doesn't need unit testing, because nobody is touching it.They also tend to be applied too low level. If you're testing getters and setters, you're just goldbricking. If you're testing simple functions, not much better.The real utility is putting unit tests on code that mgmt constantly wants to tweak and it always results in regressions. Sukdeep is going to blindly change that code, fuck it up, and you're going to be back in there doing boolean algebra to fix the mess again because the boss wanted "just one more flag."
>>109600407Like, just imagine you have a boolean decision tree. It decides if we are going to send a message. Each level is another flag. Flags are like; Did the sender flag the message to supress it? Did the receiver opt-out? Is the message more than X hours before the appointment? Is the appointment cancelled? Four flags, you already have 16 possible outcomes. To mgmt, another flag seems like an easy thing to add, but to the program, every flag doubles the complexity. Ranjeet is too stupid to do boolean algebra, so he has no idea what he is doing, adds a flag somewhere on a branch, but doesn't consider it for the rest of the tree. He too is a codelet like the management who thinks this should be easy.Eventually, you either add unit tests to stop Ranjeet from fucking it up, or you drop "the plinko chart" on the desk of mgmt and tell them, here is your new flag, please fill out all 128 new possible outcomes. Once you do that once, the boss stops asking for flags.
>>109600407What an actually insightful post on /g/?
>>109600241>Mature code that no one touches doesn't need unit testing, because nobody is touching it.That's only true if has no dependencies or if its dependencies haven't changed.
>>109602400>he puts his balls in other people's hands so they can squeeze them without a moment's noticeIt's crazy to me how people will just run unvetted code downloaded from a repository uploaded by some random dude and won't even read it and think everything is fine.
Tdd unit tests. English motherfucker do you speak it?
>>109602539Your /g/ pass is revoked
>>109602539test driven development
>>109602598Don't lie, we all know it means Tranny Dilation Developement
>>109602511Even vetted libraries can have bugs.