4 ms·
My dirty little programmer secret is that I've never written a unit test. Thanks for making me feel bad :( I watched the video and, indeed, it did not absolve
by tdavis 18y ago
My dirty little programmer secret is that I've never written a unit test. Thanks for making me feel bad :(
I watched the video and, indeed, it did not absolve me of my sins.
- jhancock 18y agolots of people have this dirty secret. lots of well-seasoned programmers to be certain. I find when writing in scripting languages such as ruby against frameworks that are in constant flux, I have little choice but to write tests against key things like user registration, activation, authentication. I wrote a webapp in erlang 4 years ago. I felt the code "was" the tests since my erlang code was concrete and well guarded. I never had any surprises between test and production. This is not to bash the value of scripting languages. Its a "pay now or pay later" problem. So what about Java? Its static typed so I should get the same benefits as I did with erlang right (btw, erlang is not typed)? My experience tells me: 1 - ruby - "pay later" 2 - erlang - "pay now" 3 - java - "pay now and pay later"
- maxwell 18y agoI never wrote tests until recently, when I started working on a functional JS library, and realized that if you're not writing them, you're doing them in your head (which is slower and more error prone). This only applies to langs/libs/APIs though; for apps, I generally find the UI itself to be the best test.
- tdavis 18y agoYeah, the last thing I worked on like that was a networking engine and I could really see where tests would have helped me a lot (all existing code was covered, but not the new stuff I was writing). Hopefully I will get to work on that sort of stuff more in the future and can get into the habit of writing tests in the process.