3 ms·
For me it's about establishing momentum. 1. Practice TDD: Start out by just writing a test. Then you'll want to write the implementation. 2. Set yourself up f
by luigi 14y ago
For me it's about establishing momentum.
1. Practice TDD: Start out by just writing a test. Then you'll want to write the implementation.
2. Set yourself up for the next coding session when you're wrapping up. Leave a line of code unfinished (dangling =), or leave yourself an empty method/function/block that's just waiting to be filled in.
- bmohlenhoff 14y agoRe: 2: A thousand times this. Stocking the pond with something easy for the first thing next morning is a great productivity hack. Usually I'll do the same sort of thing and leave a failing test case or a dangling compiler error to get my brain moving in the right direction the next morning.
- tomasien 14y agoCouldn't agree more. I usually try to take existing code that I know works, modify it with one of the more complicated functions I'm going to have to do, then when I get that working start writing out the structure for the new code. That way, I've got a reward already set up: a function I know is going to work well!