4 ms·
Speaking of The Zone: I often see programmers on HN talk about building mental castles of their programs, but I feel like I don't really code the same way. Ins
by tastyface 9y ago
Speaking of The Zone:
I often see programmers on HN talk about building mental castles of their programs, but I feel like I don't really code the same way. Instead, my thinking seems more "functional". For a given problem, I can often make out the faint outline of an optimal solution, but there's a lot of cruft and misplaced bits in the way. Most of my work involves mentally simulating the consequences of different options and then bending the architecture into such a shape that the whole thing just sort of assembles on its own. I'm only "in the zone" when I have to make that final leap. There's very little castle-building along the way.
As a result, I feel like I'm somewhat incapable of working on massive, multi-part architectures, since I just can't see the running state in my head. Once I zoom in to work on a single component, the rest fade from memory and I lose the big picture. On the other hand, I have no problem working in open-office environments: I don't mentally deal with a lot of program state, so I'm able to just dive right back in. This also influences my code to be more functional, as I know I can rely on e.g. idempotent methods to keep doing what they're supposed to regardless of any finicky global state.
I wish I could get better at building those "mental castles" since it's a huge barrier to designing complex architectures (like games). I don't want to be stuck forever working on the leaves of the tree. Might be related to OCD: I've had the disorder for a long time and I've sort of conditioned myself to avoid keeping running thoughts in memory before the "OCD daemon" distorts them into something horrible. As a result, much of my thinking is necessarily spontaneous and intuitive, or at the very least wordless.
Can anyone else relate?
- synthmeat 9y agoI relate. > I wish I could get better at building those "mental castles" since it's a huge barrier to working on complex architectures like as games. If you truly wish to do so - go make technically challenging systems like games. From start to end. Solo.
- tastyface 9y agoYeah — trying to do that right now! Hope it gets easier over time.
- freehunter 9y agoThat's actually how I got into that mode too. I picked up Phaser.js and started making something and quickly realized that games give the opportunity for states to change very quickly and often in unpredictable manners especially compared to CRUD or web apps. It's not as easily defined, so you kind of are forced to hold it all in your mind to understand the ramifications of some code you're running. Especially when that code can run 60 times per second, constantly, if you put it in the update loop. Plus testing is not just running RSpec, you have to play the game, play it a ton, play it in stupid and unpredictable ways, and when something breaks try to figure out where it broke. So you have to hold that code in your mind the entire time you're playing, too, to keep an idea of what methods are triggering at any moment. Games are an amazing way of forcing you to "see the Matrix" and read the code in your mind as it runs in real time.
- deanCommie 9y agoI also don't relate to programmers who write about their mental castles that evaporate with a tap on the shoulder. Frankly it sounds to me like people are doing it wrong. When I have a castle to build, I: * sketch out broad strokes on a whiteboard * write stubs and placeholder in code and see how it all connects * brutally refactor and iterate The last part is key. I may refactor and reorganize my architecture a dozen times before I'm done, including going back to earlier discarded ideas that seemed subpar at the time (either because of new developments/additions, or because alternatives turned out to be much worse). If I get distracted, there is few artifacts or mental state that is lost.
- majewsky 9y agoThat's a good practice, but it's more orthogonal to the concept of flow than you think. I do basically the same thing when I design new components or systems, but I'm very much in a flow state while doing so.
- goldfeld 9y agoIt's all about the narrative in your head, the running thoughts as you say. Thinking back to my first years progressing in system design and architecture, I would lose myself for hours in these day dreams of code and relations and practical uses; being in this interconnected mental place so often creates familiarity, this mental castle product. But yes you get lost there and face a lot of your own fears too.