Discussion summary

A discussion on Hacker News highlights the potential benefits of meditation for programmers, referencing resources like Sam Harris’ 'Waking Up' and Buddhist talks. Some users suggest physical activity and unionizing as alternatives or complements to meditation.

What the discussion says

  • Meditation can improve productivity and mental health.
  • Resources like 'Waking Up' and Buddhist talks are recommended.
  • Physical activity and unionizing are suggested as beneficial.
  • Some users criticize the industry’s state, implying a need for change.
Waking Up is a great option for meditation.
nickvec
Just go for walks or do something physical without a screen.
throwthrowuknow

Join the discussion

Write your take first — we'll ask for email only when you're ready to publish.

  • Hacker News
  • Meditation is great, but there might also be other options available when it comes to dealing with the effects of context switching.

    For me, I find the Pomodoro technique really effective, but there's a key caveat, which is that you try to focus on one thing at a time (which flies in the face of using multiple AI agents working on x number of things at the same time).

    Another angle to explore is how much of the process of software development that we do manually can we automate, particularly the parts that still require human input (like code reviews). That may also help with reducing the cognitive load.

  • >Another angle to explore is how much of the process of software development that we do manually can we automate, particularly the parts that still require human input (like code reviews). That may also help with reducing the cognitive load.

    Get your vibe coded software with zero human reviewers away from the public infrastructure.

  • I was so stressed at work a few years ago. Burnt out. Exhausted. I started meditating. Shared with my manager that I started, and it’s been helping me process all the chaos at work.

    He told me that wasn’t normal, and I shouldn’t have to meditate just to function at work :’)

  • What a strange opinion. If it helps you do better at work, why wouldn't it be something to encourage?

    Was he a judgmental person in general? Or do you think he had an aversion to meditating?

    I do have to say, if you were encouraging him to ALSO start meditating, I'd hate that too.

  • I think the more stressful part is the management expectation that things will speed up more, especially when you can generate plausible looking frontends relatively quickly. And if you have out of touch control-freak management without any technical experience, you waste more life time arguing with them.

    Of course you also might exhaust yourself to some degree, as your own expectation might be that you can develop multiple things in parallel, while also having to review a lot of code where you might not have context, so in a way you have to hold more high level context in your brain state, what might be somewhat stressful. However, when you have been tech lead once, all of that is somewhat familiar.

  • I can’t agree that meditation and flow are very equal. In fact they are rather the opposite: while being in the flow (of programming) means been absorbed by your thoughts and you are most likely not be aware of being aware or or being thinking. In most meditation practices the goal is to be aware of your thoughts and inner processes
  • Agree, flow state is self-forgetting, and meditation is selflessness.
  • I noticed how relaxing and meditative programming can be. It might sound that after day job basically solving other people pronlems I sit down late at noght to just write code for hours on end. But I really enjoy it. Using LLM’s to generate the code ruins it.

    I have also done meditation, but I struggle to keep it up for long. I think you should really do it consistently to get majority of effects. Coding, exercising, drawing has always been an easier form of meditation for me.

  • My favorite metaphor for programming is playing chess. Your opponent in programming is the complexity, you don't see its moves before the coding and design progress, before you make your choices/moves. You solve a problem by writing some code but that causes new problems down the line you didn't know existed before you made your choice of writing some specific code. or choosing a specific design.

    Chess-players too are in a very "meditative" state when they play, and they enjoy it, I assume because it let's them focus on the game and forget about everything else.

  • For anyone interested in Vipasanna mediation in the tradition of Mahasi Sayadaw: https://sirimangalo.org/text/how-to-meditate/
  • As someone brought up in a Hindu household (with Brahmin orthodoxy at that and all the casteism that came with it) and having learnt to shun all of that culture, and the religious indoctrination, here's the essence of mindfulness meditation that I was taught that I still practice and find useful.

    1. Sit somewhere comfortable. Sitting "cross legged" or with your "back straight" as the guide linked to above advocates is not necessary. A comfortable chair/couch is fine.

    2. The room should preferably be quiet. Though if you have the privilege of access to an outdoor courtyard that's quiet other than birdsong and chirp of insects, you'll probably enjoy it more. But a quiet room is good enough.

    3. Phase 1: Set a timer on your watch/phone for 5 mins. Close your eyes. And let your mind wander. Doesn't matter what your mind drifts towards.

    4. Phase 2: Restart the 5 min timer. Now, try quieten your mind of thoughts and focus instead on just your breathing. Be gentle with yourself. Your mind will wander again and that's fine. Just gently nudge it back to your breathing.

    That's pretty much it. Slowly, over months try and increase Phase 2 from 5 to 10 mins.

    When I described this to my partner, I used the analogy of treating your mind like a curious eager pup. In the first phase, cutting of external stimulus of sight by closing your eyes is like having the pup with you in a closed room.

    In phase 2, you gently hold the puppy near you and get it to quiet down and stay still.

    She mentioned that this analogy helped her a lot.

    Honestly, this is pretty much the gist of it. I suspect that you will likely get most of the benefits of advanced meditative techniques with just the 2 simple steps from above. YMMV.

    Be patient though. Getting to a fully calm state of mind takes months of practice.

  • I've been doing this for 25 years professionally and let's just say I'm more the 3 coffees, 1 redbull, headphones and bassdrive kind of programmer.

    So no, I will not be "meditating". My meditative states tend to be beard stroking and occasional F bomb.

  • Programmers need to stop listening to obnoxious people who are proudly destroying our industry while simulataneously farming our anxiety for attention and validation.

    Software enegineering is not the kind of field that should require adoption of some universal coping mechanism. The fact that you're suddenly bing told to adapt to something harming you should raise all kind of qustions and red flags.

  • >> I’m clearly much more productive now. I’m doing five things at once very effectively, switching between multiple agent sessions from morning to night.

    Joel Spolsky disagrees here: https://www.joelonsoftware.com/2001/02/12/human-task-switche...

  • Also neuroscience disagrees.

    This really isn’t a debate. OP is wrong.

  • I rate Joel immensely, however, that post is 25 years old.
  • Does Joel still disagree today?

    Worth noting that this article is 25 years old. The world was very very different back then, especially when it comes to software engineering.

    Context switching is a problem when the cost of switching contexts is non-negligible -- but in the age of agentic development is that still really true? Surely yes for some problems, but for many others I would argue it no longer is.

    A personal anecdote for you:

    At my company we have a local development CLI our devX team built, it allows for agents to interact with standing up, tearing down and managing local stacks for our software suite. When I receive customer feedback about a broken button, or a poor UX experience, I simply start up a prompt:

    /metal user X reported an issue on the trial balance page, they encountered a blank page when using the inception to date filter. We need to investigate the root cause, spin up a new stack, and resolve the bug.

    Then off to the next task, maybe some few hours later I'll check back in on the session and I'll see:

    > PR created: https://github.com/company/repo/pull/12758295 > QA URL: http://localhost:8400/<url> > Summary of root cause and fix: lorem ipsum lorem ipsum

    After a quick QA session I validate the fix, confirm that our claude reviewer has approved the PR and merge the PR to deploy. The mental burden of switching to this task is quite low, orders of magnitude lower than it would be 25 years ago.

  • That was 2001 today Joel seems to think this is the future: https://hash.ai/
  • I feel like it depends on the task, and that's why people seem to disagree on this. Think about a manager managing 5 devs. If he is working on planning and managing work for his dev team, we don't say he is task switching, he's just taking a management role where he takes a high level view of the task at hand and then delegates the deep dive. Where it differs for devs is that we could in theory run multiple agents concurrently, but frequently, currently, we have to dive in and give the agents significant steers and this pulls us in to the detail. The same will happen for managers. The variables are the complexity of the task, the capability of the agent and the number of tasks. There are lots of scenarios where devs can run multiple tasks without too much mental overload, but I think what is hard is that we don't know when an agent will underperform on a task and we will get pulled back into developer mode. Maybe it's a case of running for as long as you can in manager mode and then accept that when one agent needs help, you have to single task with that agent (I think this is what makes us feel like we are the bottleneck, and that's where the feeling of stress creeps in). I thought about this a lot while working on https://www.agentkanban.io which I use to help me partition agent chats by task, run separate worktrees etc
  • Meditation - «getting used to»

    A most elementary form of meditation, is getting used to placing your attention on a sensation and keeping it anchored there - even when other sensations or thoughts arise.

    Following the breath- place your awareness, your attention, on the sensation of air passing through your nostrils. Count one inbreath and outbreath cycle as «1», and count until 10 or 21. Decide before you start, how many repetitions of 10 or 21 you will do.

    If at any point your attention has drifted to a different sensation - seeing, hearing etc, or thinking, visual imagery etc, then congratulate yourself for noticing, and restart from «1».

    I recommend «The attention revolution» by Alan B. Wallace

  • thanks
  • Why 21?
  • So you can place your attention on a single session of Claude Code, count to 21, and switch to another? :)
  • Thank you. I like the comparison of "meditation" with "sport": it is not all the same, even if there are commonalities between some disciplines.

    It is rare to see laypeople discuss some of the different types and which one may be best suited for a particular goal.

    If the goal is simply relieving stress, performing some sport outdoors —especially team sports— is probably more effective than any meditation, for most people.

  • So attention is all we need?
  • This isn't the worst article, and it's triggered a decent amount of discussion (despite being very short). However, I really dislike "What you're doing wrong/failing to do" titles. They are intended to trigger anxiety, which is manipulative and (in this case) precisely contradicts the concern the author is purporting to have for the rest of us.

    On the subject: some people find meditation very helpful, others find it a net negative, or useless, or impossible to do. So a categorical "you should do this" isn't correct or particularly helpful. Try it, if it works for you, great; but don't put it about that people who aren't doing it are being negligent in some way.

    by ajb
  • > "They are intended to trigger anxiety, which is manipulative and (in this case) precisely contradicts the concern the author is purporting to have for the rest of us."

    What? That's a very uncharitable take.

    I wrote this blog post and it was a sincere attempt to genuinely help people. It seems to have been very helpful for some people, based on the responses/messages I've received.

  • > On the subject: some people find meditation very helpful, others find it a net negative, or useless, or impossible to do. So a categorical "you should do this" isn't correct or particularly helpful. Try it, if it works for you, great; but don't put it about that people who aren't doing it are being negligent in some way

    Absolutely. I've tried mediation in many situations and some classes but it's just not for me. My ADHD brain doesn't work that way. It's painfully boring and not relaxing at all. What does work for me is a walk through nature after a stressful day. There's another thing that works even better but too fringey and a bit nsfw to go into detail :) But anyway mediation definitely does not.

    You need to find what works for you.

  • I have certainly noticed my stress skyrocket in this new mode of working. I was used to getting a lot done very quickly, with intense pockets of work followed downtime. Now it feels more like a steady stream of medium stress, and there is no opportunity to stop or drop the thread.

    I must admit, if this is the new way of doing software development (eg: not actually programming but working with LLMs) I am not going to stick around for that long. It's not what I fell on love with, it's not what I trained for etc. I may as well do a job I don't enjoy that lets me rest my brain for later.

  • I feel the complete opposite. I am much more relaxed now since I can be way more effective while actually working less.