4 ms·
> When coding, I feel a great anxiety if I am mid solution and have a large amount of the current batch left to complete. This doesn't work for all types of co
by twh270 6y ago
> When coding, I feel a great anxiety if I am mid solution and have a large amount of the current batch left to complete.
This doesn't work for all types of coding, but I've found that TDD (test-driven development) helps a _ton_ with eliminating large batches, as well as reducing cognitive load. The trick with TDD though is that it's simple to learn, but hard to master.
Another good practice is to reduce the "blast radius" of changes so that you're dealing with one thing at a time. For example, don't introduce a new type (class, interface) as a method parameter while implementing the new type while writing tests for it while changing all of the callers of the method to use the new type. One (small) thing at a time, and prefer to keep everything compiling and working except for that one thing you're working on.
As for cooking etc., I differentiate between "tidy" and "clean". Mid-process dirty is common, but I strongly prefer to keep my working area relatively tidy throughout.