Juri Strumpflohner
Juri Strumpflohner Juri is a full stack developer and tech lead with a special passion for the web and frontend development. He creates online videos for Egghead.io, writes articles on his blog and for tech magazines, speaks at conferences and holds training workshops. Juri is also a recognized Google Developer Expert in Web Technologies

Let tests guide you through development

2 min read

I'm currently working on my MSc thesis work which is divided into a project that has to be developed (in my case an Android application) and then the according paper that has to be written. Now since I'm also working part-time as a software developer, a usual day in front of the computer, solving computing tasks often becomes quite long and intense. There are a couple of issues related to this...

  1. As all of us know, the longer you sit in front of the computer, the more tired you get and consequently the more errors you commit to the code base.
  2. Moreover there is the well known context-switch problem. I develop .Net in the morning, Java in the afternoon. I mean you get accustomed to it, but you have to carefully keep track what has to be done in each of the projects, at work in the morning and for the thesis project in the afternoon. This needs a lot of organization. How to do that? Task lists??

How to approach those problems?

My answer: use TDD style and automated tests. How that works? Well, simple: tests guide me through the development and build up a regression testing suite that ensures even in conditions like in (1) that I'm on the right path, not destroying my codebase. Moreover by approaching with test-first, I implement my skeleton classes and then write extensive automated unit tests against it. Of course, they'll all fail, but that's what helps me remembering the next day where I have to proceed which, btw addresses point (2) mentioned above. The next day I open the IDE, launch all tests and those which are still failing will be the points where I continue with the implementation. No need for task lists. My tests will indicate whether the features are implemented or not.
Questions? Thoughts? Hit me up on Twitter
comments powered by Disqus