Skip to content

Comment on Ask HN: How do you concentrate?

Comments

One thing I had to work hard to figure out is that I code in two different ways, and I need to alternate them. They are physically incompatible -- I can only be doing one or the other in a given hour or so.

One of these is design. When designing (software, not visually) I need to avoid getting into ruts. I need to rethink constantly and brainstorm frequently. I should consider wildly different or thoroughly impractical structures for code and programs, because those frequently lead to more practical but non-obvious ideas. Design mindset is facilitated by having enough sleep/rest, having eaten reasonably (especially protein, but not too much), and not having much else on my mind.

The other mindset is for execution. I need to take that design and churn through it. I'm not rethinking, I'm building. This mindset is excellent for churning out a lot of code fast when I have a good understanding of it. I do less of this in Ruby than in C (less grind-work!), but it's still important on occasion. Execution mindset is helped by minimal distractions, caffeine or other stimulants, and being slightly tired and undernourished, as long as it doesn't get too extreme.

These states alternate, and different coding tasks call for different proportions of one versus the other. Planning which and making sure I'm physically well-adapted to the appropriate kind of work for the task help me a lot.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.