top | item 13301032

(no title)

therealgimli | 9 years ago

For me, I started the practice of writing tests when I got to the point where I was applying for senior level positions and failing to get past code reviews with feedback like "looking for someone with more experience". This motivation could be described as external.

My internal motivation for writing tests came from doing a lot of parallel/distributed computing. I had to write tests just so I could know what the heck was going on in my data transformations. I couldn't run my code on the full dataset while developing but with tests and small subsets of data I could develop with more confidence that my code would run efficiently and correctly on the full size set.

Though it took some time to really sink in, the end result was that I began to write code naturally that in addition to being easier to write tests for was clearer and more easily understood by colleagues or even my future self.

discuss

order

No comments yet.