As we put (what really should be but aren’t) the finishing touches on our final projects, I’ve been thinking about the role of test driven development (TDD) in the development of minimum viable products(MVPs). Do you code without tests to get something out there ASAP, or do you write tests, knowing that you’ll benefit in the long run? A fully tested MVP can be a great foundation for a production ready app but there’s not going to be a production app if you can’t get it finished in time for the pitch.
Before we get going, just a quick recap if you’re late to the show. TDD basically says that every piece of code you write should have an accompanying test. In fact, you shouldn’t write code without first writing a failing test. It is the failing test which provides justification for the code that you write. The process is
I) Write failing test
ii) Write code to make test pass
iii) Refactor code
iv) Repeat.
MVPs on the other hand refer to the business end of web application development and stand for minimum viable products. The idea is to just get something out there. It doesn’t have to be perfect, just the minimum needed to prove that your business idea and concept has some real substance.
Given the strict timelines we’ve been working to during this final project, we’ve had to move away from TDD to just work on getting our MVP ready for Friday’s graduation. While that does speed up the coding process at the very beginning, a lack of tests has meant a lack of focus as we write code. The consequence has been more features implemented at the expense of easier to modify/maintain code. As we seek to pivot and reimplement features, we’re starting to suffer for our lack of tests.
Gem of the day: It seems to me that straight up coding without TDD, while quick at first, soon has diminishing returns. In the same way, TDD is slow going at first but soon pays dividends.
So how do TDD and MVPs relate? Well, I think it depends on the scale and complexity of your MVP and it’s purpose. If you’re coding a fairly static website then you can probably do without TDD. Pitching for Series A funding? Or coding a rival to PayPal? Then you’re probably going to want comprehensive tests! In fact, if a security based app developer came to me for funding(if I had the money, of course) with an untested MVP, things are probably not going to go too well for them. Untested apps greatly increase the chances of a failure or error during your pitch. Recoverable if its only a school project, catastrophic if it’s for funding.
From what you can probably surmise, today involved lots of manual bug identification and fixes. It’s taken a while but at least we had more to talk about during our daily presentation run through this evening. At the end of the day, I think we made the right decision to leave TDD and work towards a more fully implemented MVP. Sure testing is important, but at least we’ve had the opportunity to demonstrate our TDD proficiency in previous apps (penny bid auction, classifieds) and at the end of the day, I’d rather get something out there which wows from a user perspective. You did TDD of a two page app? Uhh, good for you.
On a less serious note, did I mention that our cohort went out to The Rotary on City Road to get lunch together? The food was great and there was a crazy hot sauce which contained way too many habaneros. Good times. I wonder where we’ll all be a week, a month, a year from now.