Live data from Hacker News

Ask HN: How do I program with more discipline and less emotion?

news.ycombinator.com

11–15 of 15 posts

Re: Ask HN: How do I program with more discipline and less emotion?

#11
post #10

One of my main complaints about cs in university is that they didn't teach how to put their effort and energy into their projects in a healthy and sustainable way. Many students ended up learning the 'magic binge' approach you're talking about. It depended on that seemingly random lightning bolt of inspiration combined with almost manic mental energy to work crazy hours to get it done. If you've ever worked through t…

A few, more concrete, ideas about how you might reduce emotional Bing coding:

Experiment with coffee. Most commonly I see bingers drinking a LOT of coffee, that's what fuels and in part causes the binge. If that's the case, try going to zero coffee and then every other day, try increasing your coffee intake just a little, with a rest day of no coffee in between, until you find out what actually works best for your productivity. You're looking for optimally consistent, not max output in one sitting. It's got to be consistently repeatable.

Try meditating. I recommend the app headspace if you've never done it. Basically a large part of meditation is deliberate awareness of your thoughts and emotions, the goal being to better understand yourself and what makes you tick. If done consistently, it seems to help people guide their thoughts and emotions in a positive way, which can really help with something like programming.

Exercise. We all know the benefits, a zillion studies have shown it helps you feel motivated, relaxed, improves mood, and think clearly. Seems helpful to me.

Decide to take the pressure off of each work session, regardless of what's going on. Even if it's crunch time and the sky is falling, tell yourself this is not the be-all end-all, that you won't remember this in 5 years let alone 20, and to relax. Choose to be calm, and just focus on making the project a little bit better than when you started.

Go for walks. I separated this out from exercise, because the best benefit of walking is that it takes very little thought, freeing up your brain and giving it space to run around. Sometimes I just let it go bananas, the equivalent of a dog zooming around a back yard. Other times, I'm just washing out everything else by listening to a podcast or an audio book. Or, just putting on music and letting myself feel more and think less. All of these are like a pressure release valve for your mind.

Make a list. Follow that list strictly. Nothing is less emotional than a cold hard list. Not something I recommend all of the time, it can make your thinking rigid, but a very simple and effective tool when that's what you need.

Re: Ask HN: How do I program with more discipline and less emotion?

#12
post #8
post #7

Productivity isn't about writing lots of code. For example: if you spend 48 hours writing 10,000 lines of code, and then I produce same functionality in a normal 16 hours of work, with just 1,000 lines of code. Who is more productive? So instead of focusing on writing lots of code, focus on solving problems. The less code it takes to solve a problem, the better off you are, because that's less code to maintain. This…

I quite like the point of the article but I have one issue with it. It begins by focusing on "producing times ten" and then goes on to equate that with "lines of code times ten". The issue with that is lines of code isn't production. The real production is the value behind that code. If you do the same thing with a tenth of the code, you _are_ producing ten times more.

both of your comments reminded me of the 'the parable of two programmers' [0] (not original). While I disagree on the concept described that each programmer was 'productive' in writing 'lines of code' I think that the lesson learned is more about approach and how solutions should be evaluated.

[0] http://www.bruceblinn.com/parable.html

Re: Ask HN: How do I program with more discipline and less emotion?

#13
When I get overwhelmed and feel that tension that comes from digging in to a new project here are a some things I do.

1. Schedule clear time to work on the project - I want to be intentional with my time so there is no ambiguity on what I should be doing. ex. 9AM - 12PM work on this feature

2. Win the war before going to war - A lot of the time, procrastination stems from not being clear of what exactly needs to be done. The task is either very complex or simply not clear. Cognitive complexity is the precursor of inaction. So before I start I try to describe what exactly I'm going to do before I even open my IDE. For example, 1. Get the requirements, 2. Create a flowchart of the data, 3. Describe what I think would be the best approach.... etc

I'll even drill down to actual classes and methods I should be making. This really helps get me unstuck

3. I have 5 truths of work that I remind myself of. Here they are

1. No where does it say that work must be easy for me to do it 2. No where does it say that work must be enjoyable for me to do it 3. This work is important 4. You don't have as much time as you believe 5. Your self worth is not determined by the success/failure of this so just attack

Those are some of my personal methods but in the end, it's about experimenting and finding what works for you.

Hope this helps

Re: Ask HN: How do I program with more discipline and less emotion?

#14
post #11
post #10

One of my main complaints about cs in university is that they didn't teach how to put their effort and energy into their projects in a healthy and sustainable way. Many students ended up learning the 'magic binge' approach you're talking about. It depended on that seemingly random lightning bolt of inspiration combined with almost manic mental energy to work crazy hours to get it done. If you've ever worked through t…

A few, more concrete, ideas about how you might reduce emotional Bing coding: Experiment with coffee. Most commonly I see bingers drinking a LOT of coffee, that's what fuels and in part causes the binge. If that's the case, try going to zero coffee and then every other day, try increasing your coffee intake just a little, with a rest day of no coffee in between, until you find out what actually works best for your pr…

I've done all of these.

Coffee - it consistently works, more so if combined with L-Theanine.

Meditation - doesn't help. I've tried headspace, TM, many of the apps. Part of the problem is that it does chill me out, which makes me unproductive. The main benefit is after meetings, where I usually get pissed with coworkers.

Exercise/walks - it feels good, makes me think better, but the data shows no change in productivity. I've been doing med-high intensity exercise for nearly a year.

The list - really the only one that works. The only real problem is when something in the schedule forces me off. I've been modifying it heavily this last week. It's full of if-else statements now, lol. I might just end up putting it in an app to command me what to do, based on the daily situation.

Re: Ask HN: How do I program with more discipline and less emotion?

#15
post #10

One of my main complaints about cs in university is that they didn't teach how to put their effort and energy into their projects in a healthy and sustainable way. Many students ended up learning the 'magic binge' approach you're talking about. It depended on that seemingly random lightning bolt of inspiration combined with almost manic mental energy to work crazy hours to get it done. If you've ever worked through t…

Speaking of writing, Tim Ferriss's Tools of Titans interviews writers heavily. A very consistent pattern is that they do work late at night or morning and often with some kind of music repetitively running or meditation.

A lot of them also procrastinate heavily, some even making it a routine to procrastinate half the day, feel guilty, then use the guilt to channel energy into their work.

Learning this made me question my disciplined attempts and wonder whether it's really possible to be productive without binging. It doesn't help that YC programmers are notorious for working really hard for really long hours.

Post reply on HN