When you code, it’s often you come up with an idea or shortcoming of your function. It’s easy to code on and think you can remember it later. You don’t, trust me.
So what do you do when you’re in an editor like IntelliJ? Well, you add a TODO: entry.
// TODO: This should probably be shortened // TODO: Perhaps add yield on each result to support generators? // TODO: Add callback? var fibonacci = function(pos) { if (pos===0) return 0; if (pos===1) return 1; var result = 1; var last = 0; for(var i=2;i<=pos;i++) { var newLast = result; result = result+last; last = newLast; } return result; } console.log(fibonacci(10));
We came up with three ideas when writing that function. Then you switch to another file, do you stuff. Before you know it, it’s gone two weeks since you added the TODO blocks. So what do you do in IntelliJ? You press win-6 (Windows) or cmd-6 (Mac) and get your TODO-list up and running. Choose Project (or File or Scope), and find all your TODOs. And if you wonder how to remove the list again, just press the same win-6, cmd-6
Recent Comments