| ▲ | munificent 2 days ago | |
I wrote both "Game Programming Patterns" and "Crafting Interpreters" largely in chunks around half an hour between work, parenting, and other life duties. Likewise lots and lots of hobby programming projects. Context switching is a skill that gets easier the more you practice it, just like any other. There are techniques like leaving good notes to yourself to pick back up where you left off more easily, but a lot of it just mental training. You sort of learn to hold some of the context in your head all the time but keep it idle when you aren't using it. When I'm hacking on a hobby programming project, I can often fix a bug or tweak a small feature in fifteen minutes, make a commit, and get a little serotonin hit, all while I'm waiting for the wife and kids to get ready to leave the house. It doesn't always work for all kinds of tasks. Sometimes for more challenging stuff I really do need a larger chunk of time to load it all in my head. But you'd be surprised how easy it is to eat an elephant one tiny bite at a time if you really try. | ||
| ▲ | mhaberl 2 days ago | parent [-] | |
..and the Wren compiler :) > Context switching is a skill that gets easier the more you practice it, just like any other. Totally agree with this!! I learned this when I started off as a junior dev. We had some shitty machines and the project compiled for like almost 10mins. Most of the people just read the news and stuff and for some reason I started reading Clean code from Bob Martin (probabbly someone sent me a pdf of it or something). I remember reading it all in a few weeks using those breaks. Then I just kept the habit for almost a year (until we got some better workstations). | ||