I've been a professional programmer since 1975. A lot of my programming was done without unit testing. I now think that was a mistake.
I'm fond of saying that programming is both really easy and impossibly difficult. Testing is a good example of this. But it depends on the size and complexity of what you are trying to do. There is a size of program that can be successfully written without them. And if you are the only consumer of the code you write, it's less important. But here's the thing. If I come back to code six months later or a year later, I might forget all the requirements of that code. I might forget where one change I made affects other things. If I have a good test suite, that memory loss will show up as a test failure. And when problems that are exposed at the time they are made are inherently easier to fix. But if I'm writing demos, scripts, or 1000-line one-offs, that never happens. So it isn't worth it. Big, complicated systems should never be done without them. I've done it, and I regret it. I've known those places in the code that I don't want to touch, for fear of breaking things that would take days to sort out. Since then, I've used unit testing on medium sized projects and love it. A really solid set of unit tests lets you feel much more free to refactor constantly. So those nasty places cease to exist. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en