Coding Katas are a way of developing your skills as a programmer. I thought it might be informative to tackle one of the classics as a blog post. Depending on how this works, I may or may not do another one quite so publicly.
The rules I’m going to try to adhere by.
- I will document what I am doing as I go.
- This is not a pre-coded blog post. You’ll get to “see” me code as I go.
- I will write all tests first.
- I will only write enough code to make the current tests succeed.
You see, the more I practice Test Driven Development, the more inclined I am to believe that there are only three reasons for arguing against 100% code coverage.
Continue reading “3 Reasons You Believe 100% Code Coverage Is Impossible”
As I mentioned last week, I’ve been learning React JS over the last month or so. Up until the start of this project, I would learn a new framework, and then I would try to paste in Test Driven Development after the fact. I would use the excuse that because I didn’t know the framework well enough, I wouldn’t be able to properly write tests for it.
But this time, I decided to do something different. What if I wrote tests for my demo application as I was learning this new framework? My reasoning was that learning how to test code written in the framework was just as important as learning the framework.
What follows are the lessons I learned from this wildly successful experiment.
Photo credit: twm1340 via Visualhunt.com / CC BY-SA
Continue reading “Test Driven Learning – An Experiment”
I had this thought this past week that we tend to believe that if we are in motion, we are accomplishing something. That being busy somehow equals being productive. And then I started thinking about how this is almost universal. It doesn’t just impact how we program, which I’ll get to eventually, but it impacts all of our life. Continue reading “The Fallacy of Motion”
Way back in the day when lines were first being painted on roads. The early lines were painted by hand. In those days, a painter was hired and given a stretch of road to paint. The first day he got on very well. In fact, he was one of the best line painters they had ever had. His lines were perfectly aligned, there were no unpainted areas in the space where there should be paint, and he managed to get 500 yards of road painted. The average line painter normally did 250 yards in the first day. The managers who had hired him were quite pleased.
Well, the next day, he came to work and set off on his task of painting the road. He still had another 500 yards of road to paint. And yet, for as fast as he was, he was only able to get 350 yards painted that day. Not quite what his managers expected given his performance on the first day. But still, better than their average painter, and so they reasoned to themselves, “Maybe he hit an extra hilly patch of road or some other unforeseen obstacle got in his way.”
Finally, the third day, he came in and finished the patch of road he had been given.
Continue reading “The Parable of The Road Line Painter”