Over a million developers have joined DZone.

TDD Checklist Shortcut on Mac

DZone 's Guide to

TDD Checklist Shortcut on Mac

· DevOps Zone ·
Free Resource

If you read Kent Beck's book on TDD, he sets forth the idea that developers should work from a little scratchpad of tasks. I like this idea a lot.

A big part of his suggestion is that you strike through items as you complete them. This is kind of critical because you can still read it, but you know it‘s done. Yes you could use a todo list (there are 10 million of them) with checkmarks for each item but they are kind of distracting. I thought about how you could do a thing (if you wanted to break down and write some code) where it would send all checked items to the background by making them grey or something. (Read on…)

The big idea here (from Beck):

  • work on one thing at a time
  • keep track of both what you are doing and what you need to undo before next checkin (e.g. fakes)
  • keep your focus on what you need to do on your current piece

Since reading that book a decade ago, I have gone through all these stages, e.g. the denial of thinking that there would be an agile tool that was lightweight enough that I would make each of this minute things into full blown system tasks. That‘s just downright stupid. And the fake unrolling breaks that idea anyway.

I looked at a lot of ways to do it with TextEdit, mostly centered around making keyboard shortcuts. Today I happened on to a pretty awesome solution: paste the strikethrough style to the clipboard. Yeah you will have to do this potentially once a session, but then you can just highlight the line you are on and paste the strikethrough style on to it.

I know what you are thinking. It‘s going to be a nuisance because what you really want is the ability to toggle. Well, of course, CMD-Z will undo the style paste.


  1. Go to the Formate/Font/Styles dialog.
  2. Select the Favorites radio button
  3. Select Struckthrough
  4. Apply
  5. Go out and do CMD-OPTION-C to copy the style to the clipboard
  6. Now go to another line in the file and do CMD-OPTION-V and it will strikethrough that line

The mac is still not as keyboard friendly as it should be. A little bit of thinking could probably go a long way in a coming OS release…


Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}