No Test No Beer
I tweeted an image a while back and thought I would share it here as well. This is classic and would make for great motivation, but there is a good point behind it.
In my limited experience it has been hard to get across the point of why I write things test first. Often I come back to code just to find that the tests are failing. This makes me sad and fell a bit defeated as I took the time and the care to create something that was testable. I don’t blame the developers who forget about the tests but a lack of professionalism in the software development field. For me this goes back to my training, I was simply not taught about TDD and had to discover and learn about it on my own. I believe that the responsibility of creating better code falls to three parties.
Developers need to think more about who is the next person that will be working with the code you are currently writing. Also make an effort to see what others are doing out there in terms of creating software. This is not just about TDD but caring about your code.
Employers need to understand what time is spent on different aspects of creating software. Often the developers get the short end of the stick with analysis, UX and design taking longer than estimated due to feedback from clients. This should not take away from the quality of the code that is produced. Rushing is not a solution, you might make short term progress but eventually you will go backwards.
This party also includes developers and employers. Employers need to make sure their developers are creating code that is maintainable, providing training in techniques to enable this. Developers need to educate their employers about the cost of bad code. When I was at university there was no real focus on creating quality code. I like the idea of a software apprenticeship after university, so you can learn about things like agile and programming design patterns that don’t seem to be covered in degrees (well not at least the one I did).
I guess my point is I want more people to care about code, if you care about code (in my mind), successful software and business will follow.