To do lists are wonderful things. When you have a lot of things to do they help you to organise and prioritise all those things, they give you satisfaction when you cross something off your list, and they give you feedback on how you’re doing and whether you need to put some things on the back burner for a while.

Visual studio offers a built in task list to which you can add user tasks, assign priorities and tick off completed tasks.

User Task List – I wish my real to do list was this empty 😦

There’s more though, the Task List will also scan your code for token comments – which are special comments containing specific strings.

// TODO: Refactor constructors to use constructor chaining

#region Constructors


// HACK this works but it is bad practice to make this method public
 public int GetNextAccountNumber()
return m_NextAccountNumber;

By looking at the comments section you can see a TODO comment and a HACK comment that have been picked up automatically by the task list which read the comments in the code. Once the task is done the comment is deleted.

These tasks have been generated by reading comments in the code

You can even specify your own tokens. They say that you shouldn’t worry about making code more efficient until efficiency actually becomes a problem.

Adding a new INEFFICIENT token – it’s low priority though because efficiency isn’t an issue yet

You can add your own tokens by selecting Tools ->Options -> Environment -> Task List. Here I’ve created an INEFFICIENT token, so that if I write code that I know could be more efficient I can give it the INEFFICIENT token, and if I have to look for ways to speed up code later I can look for all the pieces of code that have been given this token.

Now if I ever want to speed up my code I’ll know just where to look!