Ask HN: How does one overcome the need for instant gratification?

235 points by sidcool ↗ HN
...in the context of programming and problem solving. For me, it becomes intensely boring and border line ADHD while pondering over a complex problem that requires some dedicated attention without worrying about the end result. Instead, I end up taking the easiest solution that may solve the problem only partially, just for the instant gratification it gives. Needless to say, this is harmful for important decisions.

I believe this has come from years of INSTANT dopamine rushes from social media and Hacker News.

How do you avoid it?

138 comments

[ 2.7 ms ] story [ 201 ms ] thread
ZOOM IN. focus on the smallest details discernible.

that is what the idiom "put your nose to the grindstone" is about.

if you dont know/aware that the journey is long or even how long , time will fly.

you put one leg in front of the other , until you realise you finished something.

(comment deleted)
Why (e.g. for whom) are you solving these programming problems in the first place?
For my employer. As in I work with a tech corporation.
Does the employer have a say on how purportedly superficial your solutions seem? I mean, if your "partial" solutions seem to work and don't incur some extrisnic penalty (e.g. technical debt for your colleagues, legal liability for the company, shaming during a salary review, etc), perhaps the satisfaction you seek won't be found at work?

Perhaps this isn't a risk for you, but it is a problem when employees overthink or over solve a problem (e.g. bikeshedding, premature optimization, etc). At the least, maybe your current inclinations aren't a net negative to your employer. What kind of problems do you try to solve that aren't work-related, and do you find that you have that same kind of ADHD as at work?

I don't expect gratification from my work as an employee: I expect money.

Many years of submerging my own will has resulted in the realization that the company does not get any gratification from me, either. A quick and dirty solution that produces the expected results is completely acceptable to them, and making an extraordinary effort to produce a deliberate and solid solution was likely a waste of effort.

If you want to write code that won't make you cringe after a six month hiatus, start a side project at home in your leisure time, or launch your own company. Don't think of the rapid and sloppy fix as instant gratification, but as cost-effective development effort. In general, companies don't want the well-considered, "correct" solution, but the one that represents the lowest costs or the greatest profits. And they don't often consider technical debt in those calculations.

If they cared at all about code quality, they would have a person whose job is to monitor and improve it, with the authority to institute procedures for the other developers. If you don't have a boss (or pseudo-boss) nagging you about code reviews or test coverage or metrics, your company doesn't care. Just fix the problem in front of you with as little effort as possible. Take the instant dopamine hit, if you still get one from solving your company's stupid problems with a scant twitch of your brain.

The real challenge in an office environment is to build personal relationships and trust networks, not the actual work you are assigned. In a way, all of your assigned tasks are a distraction from that.

If this seems wrong in your gut, this is a direct result of the current management culture.

Addictions can't be unlearned, in my experience. It's more like training a muscle. And like with body training it's an additional habit. So if you are addicted to instant gratification when programming, you need to learn an additional habit of keeping to go on. The longer you do it, the easier it becomes. But it will always cost energy. And when you stop training that muscle restarting will become harder again.

Your question contains a second part: The question for motivation to continue training despite having no internal motivation. I'm not good enough in that department to give a short, precise answer yet.

Sure they can. You ever see someone drink too much tequila, get sick, and never want it again? Or go to mcdonalds, see a cockroach, and never go again?

It's called an aversion, and aversion therapy was a common method of habit cessation through the mid 90s. Check out this study on how >50% of 2-pack a day smokers quit smoking after just 6 sessions:

https://www.schickshadel.com/documents/Commercial_Stop_Smoki...

I know a lot of people who don't like to ever drink again in the morning, and I also see them again with a bottle of tequila in the evening.

Joke aside, a successful aversion therapy will also train another habit additionally to the addiction habit, that just has the opposite reaction, and the hope is that it becomes stronger than the original habit. So it's more of a method of application rather than a counter argument. Wouldn't you say?

Break big problems up in smaller ones. Make a checklist of the smaller items. Feel a rush of fulfillment every time you check something off
I recommend reading Deep Work by Cal Newport. There are some good techniques explained in it.
Just bought a hard copy. Thanks.
Several thoughts, somewhat unsorted:

- There could be an underlying medical problem. Mild depression often has low willpower as the most noticeable effect. If it's not too much of a hassle, maybe get your thyroid checked. And whatever works for depression should usually work for your problem as well, exercise unfortunately being the most effective

- If what you're doing really doesn't interest you, it doesn't make much sense to see a pathology where everything is working as intended. Try something new (as a hobby maybe) that requires similar levels of engagement, and see if the problem persists. If not, it's time for tough decisions.

- There's a theory that willpower works much like a muscle. There's a book about that phenomenon, but it really doesn't have much more content than the last sentence. It's one of those results that I don't completely trust, but trying it out doesn't cost much: do anything that requires willpower regularly, and see if you improve. The examples from the book were really small interventions, such as brushing your teeth with the non-dominant hand. After three weeks or so, people were significantly more likely to successfully stop smoking, compared to the control group. That's a rather big effect.

- Try reducing your work hours. Being "always on" just drains your resources. Start with restricting your daily work hours to something like 3h or even less, and only expand again if you're productive in those hours.

- Somehow get your hands on ADHD meds (or, you know, the generic alternatives that fuel the bitcoin boom). You'll be as focussed as you ever wanted to be, and even a one-time experience can be helpful, by reminding you what it actually feels like to be "in the zone".

> Somehow get your hands on ADHD meds

Are you a qualified medical doctor?

> Are you a qualified medical doctor?

You don't need an MD to know that stimulants increase focus.

But you should be one to tell someone to take medication.
(comment deleted)
And what would you say if the author comes back and replies "Yes, I am an MD."

"Oh, okay. Sorry."

?

More likely what lottery numbers I should pick for the week since they must be psychic to diagnose a guy on the Internet after just a few sentences.
Right. So regardless of his qualifications, you would have objected to his suggestion. So why ask at all?
I think brango's point is that it can be dangerous to give medical advice if you are not qualified / not a MD, & even then, it should be given only after proper examination
The MD will not even give a public advice public about sensitive subjects.
I second the suggestion for DeepWork. The bit on "Embracing Boredom" is a really good way to exercise that muscle. Also, think deeply about the axiom "think more, type less." Ideally you're programming to create long-ish term solutions. Programming for the flow or gratification does not lend itself well to that. On the other hand, if you're in competitive programming, think about the gratification you can get by writing clean AND fast code.
Solve the problem on paper including writing code, even if it is pseudo code. Once you have a good grasp of the problem and your hands are just twitching for a keyboard move over.

I find that whenever I am unfocused but have a big problem to solve doing the paper exercise for 30 min to 1 hour greatly help me focus throughout the rest of the day.

ymmv

> taking the easiest solution that may solve the problem only partially, just for the instant gratification it gives.

This isn't necessarily bad. "YAGNI", after all.

In a work programming context, if you're trying to work up the motivation to do it properly rather than hack it, can I suggest a variant on "rubber duck debugging"? Simply find a more diligent co-worker and discuss the short and long solutions. When they say you should do the long one, agree with them.

Bang! Now you're socially committed to the non-instant solution. It's like having a running buddy. Or the old joke about why are mountaineers roped together: to stop the sensible ones going home.

> socially committed

I've found the opposite to be true unfortunately. I can work on a project for hours and hours but the moment I say something about it to a friend, coworker, spouse the motivation to complete it just dies. Very odd effect and sucks when you're trying to release a product MVP

Catholicism. When practised correctly, there is an enormous emphasis on self-control, mastering the passions, letting go of the ego, preferring humility, simplicity and the needs of others over immediate self-gratification. Fasting and chastity are great practices that build spiritual and mental strength.
I'd suggest taking more vacation. I find myself a lot more willing to take on bigger tasks when I come back from vacation.
You don't have an underlying medical problem, you're fine, you're just wired to want to solve the problem as fast as possible. It's not a bad thing. It's an awesome thing, that's what motivates you. I'd have you on my team! for every engineer like you, there's another who's wired to come up with the most insanely flexible solution possible. Sometimes the quick solution is needed, and sometimes the flexible solution is needed. If I was doling out work, I'd give you the important stuff that needs to be done now, and I'll give the infrastructure work to the other guy.
I'd first like to recommend a book called "power of habits" which will help you better understand the mechanics of habit forming & reforming habits.

Deep work as mentioned by other poster is also another good resource for focus related topics.

Some things I'd recommend, off the top of my head:

- Do not grab phone/computer etc. and mindlessly browse first thing in the morning. (Or before bed. Or at any time really.) But doing it first thing really starts your day on the wrong foot.

- When seeking to relax, do not mindlessly browse the internet/social-media/tv. Read an enjoyable book. This is an order of magnitude more fulfilling and beneficial to you. And genuinely more relaxing: screens are stimulating, and might let you 'relax' in the sense that you can momentarily be completely absorbed in something 'other', and forget your day to day life; but they don't relax you in the sense of being calm and contemplative (in general, in my experience).

- Reduce instant gratification from as many areas as possible. Do things that are rewarding longer term. Like reading, cooking, growing plants, hiking, etc.

- Cut video games.

- Block facebook + reddit + sites you waste a lot of time on, from main computer. Maybe have a secondary device you use to access these sites, for a set period each day (I recommend this mainly because it can be quite difficult to maintain a social life without facebook, (which is a terrible state of affairs)). Have days where you don't go onto these sites at all.

- Spend as little time on screens as is possible -> if you can work on paper do so

- have a regular exercise regime. eg. swim/run. Doing first thing in the morning really helps set your day on the right track, you have already exerted a good amount of self discipline, and achieved something, and this makes it easier to continue being disciplined.

- I recommend reading 'The Power of Habit'.

> already flexed your self discipline muscle

...what? Is there any evidence that self discipline needs to warm up?

It's less of a warm up and more of a habit. You've done it once, you'll be more likely to continue to do it throughout the day.
Current understanding of willpower is that does, indeed, function like a "muscle".

I got this from reading a few books and articles and it might be wrong, but it's my impression.

Actually, there used to be research showing that ("ego depletion" it was called) but it is getting more and more controversial because it's been quote a few years now and nobody managed to reproduce the effect.
Training willpower in general is one thing - doing "warmup" just like a real muscle it's a different thing.
Strangely, this sounds like adults that I observed as a teenager. I always wondered how they could survive in such a boring existence.

Now I know they were just more evolved than I was :-)

(comment deleted)
Really good advice. I tried blocking some sites but whenever my 'bad side' comes up again, I always find a way to get around the block and visit the site anyway. Any recommendations on blocking a site indefinitely?
Block it in your router. Make the router's GUI accessible only on a static ethernet port, so that you have to walk a laptop over to it to configure it. Your urge to goof off will be lower than the cost to unblock it, and your laziness will end up protecting you.
(comment deleted)
I have a weird alternative strategy. First a backstory, when I quit smoking, I tried what you did, making my vice less accessible/desirable using the sort of strategies you'd find in top 10 ways to quit smoking article. After failing at that for the umpteenth time, I did the opposite. I bought my favourite cigarettes, bought some very nice cigars, fresh pipe tobacco and put it all on my desk where I have to study all day.

Now that it was in my face it wasn't about working around myself, bit rather deciding if I actually wanted and had the will power to do what I had claimed I wanted to do.

So, if you really want to reduce mindless browsing and find you can't and little strategies end up being ineffective, perhaps the opposite might be a worthwhile strategy.

All the best.

This is a good point. Those moments where you are ambivalent about a course of action are self-defining moments. If you want to quit smoking, you need to become a person who chooses not to smoke when they have the opportunity to. The problem with habit is that you're no longer choosing. By keeping your cigarettes close, you gave yourself many ambivalent moments in which to build the self that you wanted to become.
And to look at it another way:

When the object is out of common sight, you only encounter your self-defining vice moments when you're at your most vulnerable (because you willfully sought the thing out).

When you bring yourself into more frequent contact, you provide yourself with more training opportunities when your willpower is greater (because maybe you're already busy, or happy, etc).

Thus, even if you fall victim to the poor choices you're trying to avoid the same number of absolute times, you've drastically increased the number of times you make good choices. And the percentage of times you choose good choices over bad.

Counterintuitive, but I like it!

Good advice. I have a similar anecdote.

When I was 18, I worked at a produce clerk at a middling grocery store. Day after day of stocking fresh fruits and vegetables while watching the same customers (and even my co-workers!) come in and eat the same horrid prepared slop really motivated me to lose weight.

I lost 50 pounds in 2 months.

And also, speaking from experience, please, never attempt to lose 50 pounds in 2 months; my lung popped. Fortunately, I survived.

i actually did some pretty extensive research on this. there's very few high-quality apps in this area. the only software i found to be genuinely effective is this very obscure program called sprintworks (windows only). dunno how it works but so far i haven't been able to figure out a way to bypass the block.

to my mind, an effective blocker is extremely important and far superior to using willpower to resist your bad side. the fact is that when gratification is impossible or really difficult, you don't need to spend any willpower at all, you can just count on your other bad side, i.e. your 'lazy' self, to kill off the social media impulse. when a little person inside you says "go check out facebook!", previously you yourself have to step in and say "no, f* off*!" but now you can just sit back and watch with quite amusement as another little person (your lazy self) steps up and say "nah man, it's too much trouble" —— and bam! the impulse is gone.

the ego depetion theory in psychology may have turned out to be less empirically well-founded than people think, but personally i found it to be very useful. avoid using willpower as much as possible. instead, cleverly design your environment and play the little bad people inside your against one another to your advantage.

Use SelfControl app on Mac

Just don't look under the hood of how it works - anyone reading this and familiar with the app please don't comment saying how to circumvent it).

Another story here, when I started working in an internship, the environment was conducive for me to work but I still didn't. What saved me, was a repetitive strain injury preventer app. Whenever it said to take a break I would sincerely take a break. This makes your mind more relaxed and I could work for 8-10 hrs a day without any mindless browsing. Hope this helps :)
"Do not grab phone/computer etc. and mindlessly browse first thing in the morning..."

Expanding on this... Don't use mindless browsing as a filler at all. Ever.

If your build is gonna take a minute, don't reflexively switch over to Facebook/email. Sit there and think/meditate. Stand up or do some pushups.

Browsing Facebook is fine when that's the activity you're doing. Set aside some Facebook browsing time, timebox it, and stick to that.

"multitasking" is the devil. Don't do it. Better to be blank and let your mind rest for a moment instead of trying to timeslice something in. Focus on each thing separately and you'll end up more productive and efficient and also feel more personally gratified after accomplishing specific tasks one by one vs. a mishmash of "multitasking" where you're not really sure what you even did at the end of the day.

This is great advice.
// If your build is gonna take a minute ...

Same applies if you read a tutorial post while you wait your build to finish ?

Wonderful advice. Thank you for sharing.
I agree with this and other suggestions to seek for deeper habits. In addition, I'd suggest keeping a journal of what deeper habits you develop: when I'm tempted to kill some time browsing or watching cat videos, I look at my notes (both in a journal and as Emacs org files), give myself a little pat on the back, check some things on the list, and write down a little more of what I've been doing. I find that doing some "gardening" on my notes is useful in the long and provides me with a small dopamine hit in the moment.
Along these lines, I switched my book-reading back to paper. It really helps.
From kindle on your phone or physical kindle? I have all the regular problems if I kindle on my phone, but the physical device is single-purpose enough that it's as good as a book to me.
For me, it's the difference between an LED screen and an E-Ink screen. I get fatigued when reading on backlit screen. E-Ink is pretty much paper. There's no strain when staring at it for long periods of time.
I so much agree wih your post. All your advice is right and should help but there is one thing I am wondering:

Why are you on Hacker News?

Reading and in particular commenting which is an instant gratification activity (quick post, many likes paired with non-stop checking of the thread).

Is this not against your advice or is it the end of the work day in your time zone?

May be that he doesn't follow his own best practices every day. Got to be careful that we don't let that undercut the usefulness of the advice.
He reached enlightenment and so has returned to samsara to guide the rest of us.
Only to reflect back on this at a later day and head to the river.
I don't feel HN is about instant gratification at all. I come here to see more about what is going on in the tech community. For me, it is about awareness of what is going on, reflection and analysis of where I currently fit and where else I may want to go.

If you are constantly non-stop checking for responses and your scores, that doesn't match what I do. I tend to comment, then come back a couple days later, and see what discussion ensued.

(comment deleted)
HackerNews doesn't have a message notification system, right? You have to purposefully look at your older comments to see what transpired? That's probably one of the saving graces of this community.
Absolutely agreed. @dang, please never implement a notification system.
"Do as I say; not as I do"
Non-ironically, I watch this video every couple months to remember all my problems are first-world problems and I need to remember how good I have it:

https://vimeo.com/69662330

That helps with the instant gratification problem for me.

I watch https://www.youtube.com/watch?v=8CrOL-ydFMI http://www.metastatic.org/text/This%20is%20Water.pdf

This is Water - David Foster Wallace Commencement Speech.

I watch this from time to time for a similar reasons.

That was pretty eye opening indeed. I feel that companies as well as schools should be attempting to instill more conscious and empathetic behaviour in their execs and employees.

After all - as Foster states education never really ends - considering the immense time and commitment we give our employer I think their reinvestment in our skills and mental well being will reap dividends for both parties.

Growing older always helps with this.
1) You could try doing TDD. Each passing test will give you instant gratification. You could even try doing Acceptance Test-Driven Development. Basically you start by writing end-to-end test and implementing minimal code to make it pass. After that you will go one level deeper etc. I would suggest reading "Growing Object-Oriented Software Guided by Tests", this will give you a good overview of the method.

2) Also, if you can choose language to work with, you can try languages that allow you to work in the REPL. That way you can have instant feedback loop and feel satisfied even when you get some small functions working.

3) Pomodoro technique.

Stop consuming sugar and caffeine. Fruits are a great suppliment until your body adjusts. You cannot have an abundance of attention without the fuel to power it. - It was one of the hardest things for me to do.
Fruits contain fructose, which is another form of sugar, and not quite good when consumed in large quantities.

https://paleoleap.com/10-reasons-why-fructose-is-bad/

I doubt this. Anything naturally occurring and has existed for millions of years cannot be bad for us. No matter, what the "research" says.

And if you do want to go by research, please read the works and watch videos of "Robert Lustig" (http://profiles.ucsf.edu/robert.lustig )

Not sure if satire or not, but plenty of naturally occuring things which existed for millions of years are bad for human beings. Poisonous plants for are an example.
> Anything naturally occurring and has existed for millions of years cannot be bad for us. No matter, what the "research" says.

Like plutonium?

The difference is, that fruit tends to contain a lot of fiber, which makes the fructose harder and slower to absorb. So fruit is okayish.

However, fruit juice is just sugar water worse for you than Coke, so keep that in mind.

Sugarcane is naturally occurring. As are the beets used for producing beet sugars.
That's right. Here's some hemlock. Eat it. It's all natural and good for you.
Fruits also contain a lot of hard-to-digest fibers. Both the fructose and the fibers taken together are fine.

It's when you refine the fruit (e.g. juice it) that you separate the fiber away and therefore loose the counterbalance. The fiber and relative inconvenience in consuming the fruit also help to regulate the intake. Contrast a tall glass of orange juice, which is about 4-5 oranges minus their fiber, with manually pealing and eating that same number of oranges. One can be gulped under a minute, or maybe a few minutes if you drink it slowly, the other will take quite a while to eat and leave you with a feeling of being full.

That's why if I'm offered juice, I try to sip it slowly.

Where would some blended fruit come in that regard? Would it be still good, or are we losing some fiber benefits?
I second this. Sugar does much more harm to our body than we usually realize. After stopping sugar, my health tremendously improved. But the first few weeks and months of stopping sugar, (I used to consume too much sugar earlier) I noticed the worst possible games my mind can play against me. My mind used to say that it is ridiculous and I am being impractical, childish and what not!. It was a war and I won it. And now I am reaping the benefits. I am able to focus better. I am having better energy and my memory has improved.
How much of that is sunk cost fallacy? Of course you'd feel better
I too second the recommendation for "Deep Work" by Carl Newport (http://calnewport.com/books/deep-work/ ). This is one book which is a must-read for all the current generation technology workers like us. I started reading this book about two weeks back and I have finished reading 90% of the book. Already I am seeing tremendous improvement in my day-to-day life.
The exact answer to your question is explained in this book and Carl calls it as "Deep Work".
Cal Newport (not Carl) -- just in case anyone is searching by author.

Thirded. Read his book. Do what he says.

Just bought the book.
Neat. It is one of that books that really helped me change my habits. I don't think there is anything revolutionary in there for the average knowledge worker, but the presentation is compelling and it offers very practical advice and examples. I often think we "know" a lot of things that are good and work well, but without picking some of those good things we "know" and just working them and doing them "knowing" that stuff doesn't help. Books like this offer a practical framework to narrow the scope of the doing and can surpass the mental hurdles to commit to things you already "know" or have a good idea about.
Cal also did a recent podcast with Ezra Klein (formerly of Washington Post and now leading Vox) about his book and the ideas behind it [0].

I'm skeptical of most "self-help" and business books but Deep Work was helpful for me and I come back to the book any time I feel myself slipping. I admit I may be biased towards his work since he is a theoretical CS professor [1] who happens to write books about work and productivity.

[0] https://soundcloud.com/panoply/cal-newport-on-doing-deep-wor...

[1] https://scholar.google.com/citations?user=EhodjeAAAAAJ&hl=en

Just bought the book.
Yep. This book develops a solid basis for why this matters and offers many practical techniques for implementation, including seriously questioning whether each and every online service you visit is truly required to support your work and who you are, and ditching the ones that aren't.

A key tip from the book is to practice building resistance to caving. Set a time limit for the next time you will check. However short that limit needs to be is fine; the key is to build resistance and extend it. The book argues you need to maintain this ability to resist during off hours, too. It's fine to have long sessions of surfing online and do it more often than during work, but continuing to set limits and resist the urge to just grab it and check is important for not losing everything you may have built up during the day or week.

There is a whole section and recurring theme on the finite, depletable nature of willpower and the end to set up a routine to build habits to protect your willpower reserves. It's very tactical.

I found the many examples of real people applying the principles to their personal situations inspirational, such as from the author himself, professor colleagues, Carl Jung, Don Knuth, and various business and tech folks he interviewed.

that book is incredibly good! Especially, since he earned enough street credibility as a Computer Science professor compared to other self-help/productivity/life coach gurus
Meditation. Coursera have a course called "Demystifying Mindfulness". Check it out.
Simple. (Purely my personal opinion)

1) Divide the complex problem into small yet challenging chunks of problems.

2) Totally forget about the large/complex problem.

3) Focus/Solve one problem at a time, the way you already do.

4) In the end, ask someone else to weave the individual solutions to solve the original problem. (or DIY if you prefer to!)

Solve the problem the first way. Take a step back and see how the solution might break or doesn't work. Solve the problem again. Repeat.
one thing that really helped me is working out, when you are building muscles, the result is only visible after a few months, that is how i got to enjoy and grasp the benefits of delayed gratification
I'm surprised no one mentioned meditation yet!

A regular meditation practice helps with impulse control (sitting still for X minutes requires exercising self control) and that will help with resisting the urge to do tasks which are immediately gratifying, which will free up time and energy for activities which lead to long term growth.

Two things really helped me with meditation: setting a timer, and meditating every day.

Insight Timer (not affiliated) helped with both of these, keeping track of how many days in a row you've meditated, and allows you to set daily reminders.

There are also guided meditations available (in the app or YouTube if you prefer) if you are just starting out.

Best wishes!

This is one of the two things I miss about my more religious days as a younger man.

I would pray a lot and it was a great way to run through things I was both thankful for and the people in my (pray for) list who I needed to reach out to and make sure they were OK. I cut it because I stopped thinking it had an affect on the external world, but should have kept it because of how it affected me internally.

I also miss the community, but you can get that elsewhere it's just harder for me personally.

Insight Timer looks good but - to hijack a little bit - how does it make money?