3 ms·
More or less the case here; wrote this project, now refactoring and adding tests. Not every part of it could be done while 'distracted'. Good testing still hel
by RangerScience 6y ago
More or less the case here; wrote this project, now refactoring and adding tests. Not every part of it could be done while 'distracted'.
Good testing still helps with distractions because good testing enforces a code style that's very bite-sized; so if your 'tasks' are 20-40m, you can fit a lot of distractions. Also, each task (generally) by virtue of being so small takes up less mental RAM, so you don't have to page out as much when a distraction happens.
Also makes it easy to work "around" the hard part, and come back to it when you know you'll have that uninterrupted time. Or late that night when inspiration strikes and now it's easy :)
- thesz 6y agoI wonder, what kind of problem domain would allow such small and local programming?
- RangerScience 6y agoChat bot. brian.bot The hard / complex part is (first) parsing parts of a Slack conversation to the do the AI part, and (second) the Slack interactive messages, which get weird when you try to use them as a form. a lot of just "if these messages happen in this order, this correct thing still happens", where the difference between different message types is, well, not minimal, but simple and straightforward. This has definitely led to waaay to much copy pasta, but it's well encapsulated within the test fixtures.