Personal unit tests

What is this? 10 Sep 2007

These are my personal unit tests. Michal Wallace came up with the idea; here’s how he describes them:

The way I see it, there are certain things I ought to be doing to be productive and effective no matter what my goals are. These are things that are relatively easy to set up, but take discipline and awareness to maintain. I really think that if I focus on maintaining these habits or processes, then the goals will take care of themselves.

Basically, I’ve made a list of personal unit tests: assertions about myself that I’d like to be true.

N.B. These tests are meant to be run daily, first thing in the morning. That’s why so many of them are about yesterday.

While I’ve posted what my tests are, I don’t expect to post the daily results of each question any time soon. I’m twittering the aggregate daily results each morning.

I gave a talk about personal unit testing at BarCamp LA 4, and an updated talk at BarCamp San Diego 2.

The tests  

#1 Exercise (health) 10 Sep 2007

Pass iff I got at least 20 minutes of any kind of exercise yesterday.

When: always

#2 Early to rise (health) 10 Sep 2007

Pass iff I got up at or before 7:30 AM today.

When: weekday

#3 Desk (house) 10 Sep 2007

Pass iff my desk area is reasonably clean and clutter-free.

When: weekday

#4 Dishes (house) 10 Sep 2007

Pass iff I did at least one batch of dishes yesterday.

When: always

#5 Trash (house) 10 Sep 2007

Pass iff I took out the trash and/or recycling yesterday.

When: always

#6 Books (mind) 10 Sep 2007

Pass iff I made progress in whichever book I’m reading yesterday.

When: always

#7 Backups (tech) 10 Sep 2007

Pass iff I’ve backed up my various computers in the last 30 days.

When: always

#8 Tickets (work) 10 Sep 2007

Pass iff I closed at least one Jira ticket yesterday.

When: Tuesday through Saturday (since it’s about the day before, and I want to test that I did this on work days)

#9 Billing (work) 10 Sep 2007

Pass iff I’ve kept my record of billable hours is more up-to-date than it was when I last took these tests, or if it’s fully up-to-date.

When: weekdays

#10 Pride (work) 10 Sep 2007

Pass iff I’m excited to report in our daily scrum about how I kicked ass yesterday.

When: weekdays

#11 OSS (tech) 10 Sep 2007

Pass iff I’ve contributed a patch, filed a bug report, written a test case, or otherwise positively contributed to an open source project in the last 7 days.

When: Monday

#12 Microformats (tech) 10 Sep 2007

Pass iff I made some positive contribution, however small, to the Microformats community last week. This could be a mailing list post, helping out in IRC, editing the wiki, writing test cases, sending patches, etc.

When: Monday

#13 HTML 5 (tech) 10 Sep 2007

Pass iff I made some positive contribution, however small, to the HTML 5 effort last week, be it via the WHAT WG, the HTML WG, contributing to html5lib, helping in IRC, writing test cases, ”-html-wg +www-archive” mail, or whatever.

When: Monday

#14 Emacs (tech) 10 Sep 2007

Pass iff I made some positive contribution, however small, to the Emacs community last week, be it by editing the EmacsWiki, helping a newbie in #emacs, sending a patch to emacs-devel, releasing or enhancing a .el file, or the like.

When: Monday

#15 Sleep (health) 10 Sep 2007

Pass iff I got at a full night’s sleep last night. (At least 8 hours.)

When: always

#16 Alcohol (health) 10 Sep 2007

Pass iff I had at most one drink yesterday, or skip if yesterday was an alcohol-allowed day. The current alcohol-allowed days are:

  • Thursday (dinner @ Rebecca’s)
  • Friday after work, Saturday, Sunday (weekend)

When: Tuesday through Thursday

#17 E.T. phone home (family) 10 Sep 2007

Pass iff I’ve talked to my parents on the phone in the last week.

When: Monday

#18 Love (family) 10 Sep 2007

Pass iff I told Erin I love her yesterday.

When: always

#19 Attention (mind) 10 Sep 2007

Pass iff I managed to keep up with Google Reader, Gmane, LiveJournal, etc. (AKA the firehose) yesterday, or at least took steps to reduce the amount I try to read every day.

When: always

#20 Blogging (mind) 10 Sep 2007

Pass iff I posted to one of my blogs yesterday.

When: always

#21 Three square meals (health) 10 Sep 2007

Pass iff I had breakfast, lunch, and dinner yesterday. Brunch and dinner acceptable on Saturday or Sunday.

When: always

#22 Smaller inbox (mind) 10 Sep 2007

Pass iff yesterday’s email inbox was smaller than the day before.

When: always

#23 Cell phone (misc) 11 Sep 2007

Pass iff I charged my cell phone at some point yesterday.

When: always

#24 Teeth (health) 19 Sep 2007

Pass iff I brushed my teeth at least twice yesterday.

When: always

#25 voicemail (mind) 19 Sep 2007

Pass iff my voicemail inbox was empty when I went to bed last night.

When: always

#26 Meta (misc) 1 Oct 2007

Pass iff I ran my personal unit tests yesterday.

When: always

#27 Old friends (misc) 13 Nov 2007

Pass iff I’ve contacted someone I haven’t been keeping up with in the past 7 days.

When: Monday

#28 Breakfast with Erin (family) 8 Jan 2008

Pass iff I had breakfast with Erin this morning.

When: always

#29 Water (health) 8 Jan 2008

Pass iff I had at least 4 glasses of water yesterday.

When: always

#30 Laundry (house) 23 Mar 2008

Pass iff I did, or helped with, at least one load of laundry last week.

When: Monday

#31 Cooking (house) 23 Mar 2008

Pass iff I cooked, or helped to cook, at least one dinner last week.

When: Monday

#32 Elevator (work)

Pass iff I took the elevator at work at most one time yesterday.

Meta  

ChangeLog 10 Sep 2007

2008-05-26: Added test 32.
2008-05-19: Generalize #9 to whatever billing system is relevant for the job.
2008-05-13: s/Trac/Jira/ in #8.
2008-03-23: Added tests 30 and 31.
2008-01-08: Added test 28. Added ability to take tests on certain days. Initial specification of when I should take each test. Made OSS, µf, HTML5, and Emacs tests weekly. Added test 29.
2007-11-13: loosen billing test—making progress is good. Added test 27.
2007-11-05: s/last night/yesterday/ in #23.
2007-10-30: s/Empty/Smaller/ in #22.
2007-10-03: Tried to make it more clear that I didn’t come up with the idea. Clarified what the firehose is.
2007-10-01: Added test 26.
2007-09-19: Added tests 24 and 25.
2007-09-17: s/30/20/ in #1; s/8/7:30/ in #2.
2007-09-11: Added test 23.
2007-09-10: Initial version, including tests 1 through 22.

Categories 10 Sep 2007

I’d like the number of tests per category to be about the same. That way, I’m not focusing on one aspect of my life to the exclusion of others.

  • family 17, 18, 28
  • health 1, 2, 15, 16, 21, 24
  • house 3, 4, 5, 30, 31
  • mind 6, 19, 20, 22, 25, 27
  • misc 23, 26, 27
  • tech 7, 11, 12, 13, 14
  • work 8, 9, 10

Ideally, there would be no ‘misc’ category. For now, courage.

TODO

Hack up some kind of charts-and-graphs script that feeds on the daily test result data.
Polish Emacs library for this