In my ongoing struggle to find a todo list app I like, I took a look at Todo.txt. I ended up going back to GoodTodo, but I was intrigued by the text based system. I wanted to build something in Excel to be an interface to Todo.txt and I used a test-first methodology to parse the file. You may remember my first foray into test-first development when I converted numbers into words.
Later this week, I’ll post how I wrote the parser using tests. If you’ve ever wanted to try to write code using test-first, here’s your chance. Download the workbook below. I’ve setup all the classes and the tests. I even wrote enough code to make the first test pass. If you’re interested in this exercise, follow these steps:
- Download, unzip, and open the workbook
- Go to the MTest module and run the TEST_All sub and see that it passes
- Uncomment each link in TEST_All one at a time
- Run TEST_All to see that it doesn’t pass. If it passes, uncomment the next test
- If it doesn’t pass, go to the Raw property in the CTodo module and write just enough code to get the test to pass
- When your code looks cumbersome or you see a pattern emerge, refactor Raw
- Repeat until all the lines in TEST_All are uncommented
Check back later this week to see what I came up with.
You can download TodoTxtTestFirst.zip
I just get “The file is corrupt and cannot be opened”
Hmmm, it works fine for me. Here’s a non-zipped version
TodoTxtTestFirst.xlsm