Showing posts with label productivity. Show all posts
Showing posts with label productivity. Show all posts

Tuesday, August 23, 2011

Test Driven Freedom

Like most programmers, I've been writing bits of test code all my life; but I've never embraced Test-driven development (TDD). There are many reasons, but probably the principal ones were an expectation that TDD would slow me down and a belief that my existing methods worked fine—at least in the context in which I have worked for the past few decades.

Circumstances change and one of the changes facing me is that I appear to have spare cycles that could be applied to some free software development. Finding myself ready to begin creation of a new utility—for myself, but with wider usefulness likely—I thought I'd devote a day to experimenting with TDD. It has been an interesting experience.

Yes, it did slow me down, mainly because I was getting used to a completely new way of writing code and, to a lesser extent, because I was writing more code than I would have in the past. It will take me some time to get up to speed with TDD, but I can envisage a time when I could expect to travel at about the same speed as I'm used to. I take that as a positive lesson from today's experiment.

The more interesting discovery, for me, was something that I had not thought about at all, although it should have been obvious from the reading I had done. The process of small discrete steps (write a little test, watch it fail, write a little code to make it pass, refactor, repeat) keeps things in a state where the usual interruptions are much less of an issue. My usual way of working involves holding a substantial mass of code in mind at any time and interruptions are a real killer. I can usually arrange for blocks of uninterrupted time, but that's not always possible.

Today, while I was at my least amenable to interruptions because I was learning something new, it just so happened that my spouse needed to interrupt me several times. Each time I was able to turn away from what I was doing and resume fifteen or thirty or more minutes later without any stress—the small step that was interrupted turned out to be easy to resume without any difficulty. That alone seems like a reason to keep going with TDD for a few months to see if it can become part of my approach.

And, to return to the original issue, provision of a full unit test suite should make it much easier for other people to take the code and adapt it for their own purposes.

Tuesday, November 2, 2010

Fine Day for a Holiday

Days off work are good for everybody, whether they are workers or employers. In my family, we're mostly self-employed, but we still take days off on public holidays. We have our little rituals of parties and fun. Unfortunately, most of the public holidays in Australia are either religious holidays or celebrations of nationalistic ideas or wars.

Melbourne Cup Day just celebrates the crooks in the racing industry, who can easily be ignored by those of us who don't actually care about horse racing, leaving us with a fun day off at a good time of the year. I'd like to see more silly holidays, scattered through the year, as a sign of good will towards the mental health of the entire community.

Tuesday, September 7, 2010

Where Now?

As I write this, we still don’t have an election result—although I imagine that will change some time today. I have no idea where the country will go once the result is settled, but today I’m thinking of my own immediate future.

I’m about to have a few days off with my sweetie, partly to do some family duties, but chiefly to have a break from our routine. Most of the vague big ideas that I had for 2010 have borne only minimal fruit, so I’m hoping that this time of recharging my batteries will allow me to see what I really want to do in the last third of this year.

Wednesday, September 1, 2010

Gmail Priority Inbox

After wrestling with various Gmail extensions with similar aims, I was pleased to hear about the new Gmail Priority Inbox which I have now turned on for my Gmail. I don't think they have it quite right yet, but I expect it will evolve over the next few months and that it might just become so useful that I end up feeling that I did the right thing moving all my email to Gmail.

I’d be interested to see what other people think about this feature as they try it out.