JPDev@programming.dev to Programmer Humor@programming.dev · 10 months agoBug Fixingprogramming.devimagemessage-square47fedilinkarrow-up11arrow-down10
arrow-up11arrow-down1imageBug Fixingprogramming.devJPDev@programming.dev to Programmer Humor@programming.dev · 10 months agomessage-square47fedilink
minus-squarelorty@lemmy.mllinkfedilinkarrow-up0·10 months agoGreat time to find out your tests are useless!
minus-squaregravitas_deficiency@sh.itjust.workslinkfedilinkEnglisharrow-up0·10 months agoThey’re not completely useless. They’re conditionally useless, and we don’t know the condition yet.
minus-squareCanadaPlus@futurology.todaylinkfedilinkEnglisharrow-up0·edit-210 months agoSo how do you write a good test? It’s like you have to account for unknown unknowns, and I don’t really have a good theory for doing that. Right now, I usually end up writing tests after the code is broken, and most of them pass because they make the same mistakes as my original code.
Great time to find out your tests are useless!
They’re not completely useless. They’re conditionally useless, and we don’t know the condition yet.
So how do you write a good test? It’s like you have to account for unknown unknowns, and I don’t really have a good theory for doing that.
Right now, I usually end up writing tests after the code is broken, and most of them pass because they make the same mistakes as my original code.