I am a university student. I have been working a lot with Android lately on my own time, and I cannot help but to feel that what I’ve been taught about good programming practices such as the importance of logging and writing unit tests don’t hold true.
The reason I am saying this is because Android apps are usually small apps that are not complex (a couple of activities, maybe a service, and perhaps a few other classes). Therefore, the effort and time spent on these ‘good practices’ don’t produce much better code.
In other words, I understand the importance of these practices when developing applications with large amount of classes, but when it comes to android apps, I find it much better to just write ‘not-so-good’ code and then just test by actually using the app on my own time on real devices for a few days or weeks.
Am I wrong about this? Why?
Unit Testing and Logging are most definitely still important on Android (or any other small applications).
The benefits are still there (your code is going to be better quality and you can automate the testing much more easily).
If you go by your original logic, when are you going to draw the line between “good practices” and the “test via the app as you go” strategy?
The line gets blurred and it’s easy to start leaning towards the “easier” way of test as you go which will eventually lead to a large and complex application that was not properly designed with flexibility/testability in mind.