This is a sincere question, please hear me out before downvoting or hitting close.

I noticed last night after having spent hours away playing a new computer game that I had lost all track of time while I was playing it. Someone would have to come and physically drag me away while I was playing to break my concentration. Then, when I woke up the next day, all I could think of was playing again.

Is there any possible way to get the same motivation and interest in programming, where you spend hours away and all you can think of is getting back to it? My life would be so much better if I could get to that point. For one thing, I would be able to finish all my projects on time rather than having them delayed every single time.

Its not about enjoyment, when I'm coding I enjoy myself just as much as I was when playing the game. But during the day when I think about working, I just immediately make myself think of something else to put off working for a little longer.

Do you notice something like this as well? How do you get yourself to look forward to programming? And if you are close to the stage where you'd call yourself addicted or even just get things done on time, please share with me how you got there!

P.S if it helps, I'm a freelancer and work from home.

+4  A: 

What about connecting your game-playing w/programming? If your game addiction is WoW, for example (but, I'm sure, for many other games as well), there's plenty of cool hacks you can do for your game with a little scripting or programming...!

Alex Martelli
Good point, but i'm talking about paid programming here ;)
Click Upvote
+4  A: 

I understand what you mean by this, I often struggle to find motivation to work at home.

Have you tried setting yourself personal targets? Promise yourself that once you've spent x amount of time, or implemented feature y, you'll take an hour out for gaming.

It may sound childish, but a chart of features, with target date/times that you can check off as you complete them would give you a visible representation of how little you're working. If you put this in a place that you'd find hard to miss whilst procrastinating you'd have a constant reminder of what you're missing out on by not programming.

The chart idea is great. I might put that on my wall
Click Upvote
+42  A: 

Quit your job as a programmer and get a job play testing video games 60 hours a week, then you'll think about nothing but programming. =)

Personally, I'm most addicted when the code I'm writing is to solve a puzzle. I suggest you check out project euler

Lol. Actually that's true, if you put a deadline assigned to the game I will likely procrastinate on that as well
Click Upvote
Totally with you ethan. It's all about the game. You against the puzzle, and not letting it win. Give me the problems that none of the other developers in the department can solve and I'll figure it out... even if it takes me a week, I'll figure it out.
This answer is totally me. If it's not a puzzle, I'm not interested. Give me something to make me *think,* not something that's just dumb labor.
Fantastic link! Starting to code right now!
yeah, plus one for the link and yes, make it your hobby, not your job. If it still doesn't suffice, write for yourself, write the software you want but nobody wrote. Or write for fun, create an artificial intelligent bot to do funny things like chatting or playing a game.
the python challenge is pretty solid too
+65  A: 

This is not a programming question, it's a psychology question!

I'm completely bored with programming. I used to be a prolific programmer, and something these days it can become a little bit less boring, but all in all I completely lost it.

What you describe is happiness: experiencing complete fulfillment in what you do (playing). Reaching that point requires one and only one thing: what you do has to be in complete accord with your self-image.

It's easy to see why this works for your - and many others - with games and not programming. Nobody of us grew up believing that playing games was work. In other words, games is a no-responsibility zone. It's an escape hatch.

Programming may have started like this for many of us - innocent, no responsibility - but quickly changed into being work. That complicates things because now your livelihood depends on how you perform as a programmer. That brings self and the outside world in collision for yourself. Hence, programming (work) messes with your self-image while playing games you do on your own terms.

My € .02

Steven Devijver
You explained the why, can you also explain the how now, please?
Click Upvote
There's nothing to explain, it is the way it is. Our self-images are very complicated. Programming is work and programming is work. Anybody in your position will always experience this kind of problem. Unless you're extremely confident in how you're dealing with responsibilities the expectations others have of you have to cause some disturbance.
Steven Devijver
But there must be people out there who /are/ addicted to programming/work. How do they develop that addiction? How can you change your self-image so instead of being addicted to play/games, you get addicted to work/programming?
Click Upvote
Ok, being addicted to something and become happy because of something are completely different things. Being addicted isn't going to make you happy. If anything it's going to make you frustrated. People that become perfectly happy from programming are probably very very good at what they do. I mean, extremely good.
Steven Devijver
I don't know about programming, but I wish someone would help me with my addiction to StackOverflow and pressing F5. Damn it's annoying. Someone come close my browser so I can get back to work!
IMHO, there is no such thing as addicted to programming. It is called passion.
@GONeale, that's because whatever that you feel you're working on isn't that interesting or that you're trying to get high marks in SO, sort of like when you're playing games, :p
@Click Upvote - I think it is more experience than addiction. let me explain: Things that keep me going working on a problem are the fact that I can solve part of it with experience I gained from having solved a previous problem, be it related or not. I look at the problem as a whole and say well "piece A solved by abc" and "piece b" solved by xyz" and then I have a burning desire to fit everything together and solve it. I might stay up all night to do it. The sense of accomplishment when done gets me to the next challenge....
@Click Upvote: I agree with Steven, and also would like to know how to solve it. A couple of years ago, I was very very addicted to programming, but that didn't help me in my work either. I love to code, but what I did was tools, small utilities, samples, etc. Everything but my own job. I was discovering OO and trying to catch every programming language available. I find out that developing jsp pages didn't worked for me and I have not the chance of writing subclasses and polymorphic stuff etc. So I quit that job, and find another. From time to time it comes again and I swap again.
@GONeale: About being SO addicted. There is not much hope. I thought I want to tag questions, so I've got 500 pts. Later I said. "I'll quit when I can edit others post 2,000 pts" Later, ok ok when I'm 3k that's it!.. but it was too late. Later I proposed to quit at 5k, 7k 8k until finally I said: That's it 10k and I won't post any other answer :) Finally that happened. I hope Jeff won't come with a special power available only for 50K user. I have accumulated 700 pts only with the inertia since then. Set a goal an accomplish it
@Oscar Reyes and GONeale : We need an anti-procrastination feature on this website :) Also procrastinator's (troll's?) badges!!
+5  A: 

The times I'm most addicted to programming is when I'm working on a project that I am interested in, usually a personal program that will benefit me or make my life easier, as long as it is something interesting. Sometimes I also find that the right book or learning medium can keep you interested and begging for more. After taking a look at Why's Poignant Guide, and utterly loving how it's all put together, it made learning Ruby an enjoyable experience for me. Sometimes it takes a little something extra to spark that passion you have.

John T
Learning Ruby and trying to do things with it definitely renewed *my* excitement about programming.
+3  A: 

It's two things for me. The drive and desire to create new things and the joy of problem solving. Approach topics from this standpoint and you wont help but be addicted to programming. It satisfies both of these things easily.

In all honesty, it can be a bit tough at first to get in, because you aren't doing anything particularly creative, but it gets much much better :)

+10  A: 

I look at this in terms of what the addictive factor in games is; I believe to a large extent, one of the things that makes games so powerfully attractive is the design; there is a large amount of design that goes into games specifically to achieve a certain challenge / reward ratio. That is, a well designed game will usually (although not always) have a consistent challenge to reward ratio; there is a certain amount of challenge involved, and once achieving it, you get a little bit of reward. The challenge is not too great, because that leads to frustration, and the reward is precisely doled out, so as to encourage the players to come back for more.

How this relates to coding is this: I genuinely believe that some of the more modern software engineering practices (specifically Scrum) incorporate precisely this same attempt at balancing challenge and reward. More specifically, I think a lot of the intent of Scrum is to allow the engineers to choose a level of challenge that they feel comfortable with (either at estimation time or just pulling stuff off of the backlog), and to provide reward in the form of short cycles and clear product improvements.

This is a deep topic, and I don't think there's any definitive answer to this sort of stuff, and it seems like there's certainly a lot of research that could be done on this topic. But to (sort of) answer your question, I think that working in an Agile environment and specifically with Scrum may be useful for your procrastination and motivation problems. If nothing else, working in a structured office environment may help you with your motivation issues; a consistent solid schedule can be surprisingly helpful. It's hard to maintain that when you don't specifically have anyone to report to on a regular basis; having regular office hours can really help.

Shouldn't "and the reward is precisely doled out, so as to prevent the players coming back for more" be "and the reward is precisely doled out, so as to ENCOURAGE the players coming back for more"?
Jon Cage
Ooh, really good point; edited. Thanks for the catch.
+33  A: 

Get something working.

An important component to your motivation is when you get something to work. When it starts to breathe, and you created it, that's a big motivator.

Which is why I believe a common piece of advice is to get something working first, and then make it perfect.

Jared Oberhaus
This is so true, when I've got something which people actually use and love, I feel like I've gotta add new stuff to it.
dr. evil
For me it's when I get something to work and I have to start to make it perfect, that's when the work begins. Up to that it's usually fun.
Best piece of advice in this thread.
+1  A: 

Yeah who knows what the true answer is.

But here are some principals and motto's I try to abide by and would suggest:

  1. I try to think to the future on how great it will be and how satisfied I will feel when project X is done (you've hit your accomplishment, new challenges on the horizon, fresh starts, clear mind again (maybe not for long!)).
  2. Make it FUN. Sometimes it may not be your choice, but try to take on-board programming tasks that are of interest to you and/or you might gain something from, such as learning or understanding. Step out of your comfort zone (thus challenging you), implement new technology or adopt new trends or patterns, which will bring on a new learning experience, work on something unique, fresh and different.
  3. Take some time out from what you MUST CODE, to something you WANT TO CODE. Play around with some game programming if that interests you, work on fun programming tasks that YOU want to do to keep interest levels high.

  4. And something very important I think.. take a break, I always love coming back to programming once I know I feel I have put in some solid real life ("RL") time. ;)

Also as much as it sucks, as I once freelanced from home too, getting out and not being stuck at home and getting into an office or surrounding yourself with other like-minded passionate programmers will really help your mood and outlook on the whole thing!

+1  A: 

non-chemical addiction is based on passion and enjoyment. if you are not experiencing both of these when you program, you cannot be addicted.

+258  A: 

You can all totally laugh at me, but...

I worked a programming job during the day and tried to still have ambition and energy to write my own products at night after my kids and wife went to bed. I tried hard, but never could get motivated and never could get a lot to market. I had one product on the market and it took 5 years to get there.


I left my job for a tech company and took a job as a barista at a Starbucks. 20 hours a week and they give you benefits. I carry a small pad in my pocket for writing down ideas and bug fixes as I work. I work my hours there and come home by 1 in the afternoon ready to code, code, code.... I now started my own LLC, I have 4 products on the market with 2 in the workings. I have the passion again to write good software.

I am happy to elaborate more if anyone is interested.

I also wanted to add, the number of people I meet is amazing. I have formed a number of solid business relationships and a network of people where we trade tasks, use each other for portions of jobs, etc.
@Toddly, you should so start a blog man, i wouldn't mind to find out how you did it, and i believe so is the rest of programmers here. :)
@melaos, i second that, looks like a interesting story!
Sander Versluys
@melaos - I have actually documented a lot of my thoughts, reasoning, experiences already. So many principles that Starbucks teaches are amazing...I was trying to setup Bloxsom, but I just cant get it to publish my posts that I upload. Know anyone that I can give a few bucks to for help? I have my own Xen CentOS instance at Mosso
@myself - Actually for this, I could just whip this out in iWeb. I was just looking at it (never used it) and I just did a blog publish to my server in the 8 minutes it since my last post. Damn.
Can I just say that you have balls. To dramatically change your career like that - but it sounds like it has paid off!
@lazlow - I must say I was nervous. I spent 6 months on unemployment, my benefits were gone in just a few more days. I went to a hiring fair for Starbucks and I was number 115 in line. I was floored. So I left in dismay. I then went into a store, picked up a card for the district manager and I called her and said " I was number 115 in line, how does a hard working guy like me get noticed with that many people?" She was impressed. I had an interview two days later and I was hired on the spot (which I am told seldom ever happens in Starbucks land unless you are amazing...). Blog to come...
Kudos for balls of solid steel! My wife'd kill me if I did that :P
a blog sounds like an excellent idea!
Great history, but I don't think it helps too much to the main question. I mean, as the most voted. Still very interesting Toddly. Looking forward for the blog and a link to your products!!!
I understand what you mean. My current freelance contracts take away all my energy and motivation. I really want to do something else entirely so I can enjoy coding again.
Simon H.
I had a month doing CAD instead of coding, and I got interested in home code projects that I hadn't touched in years. So I'm upvoting; I can feel what Toddly says. However, I'm not quitting my day job.
Tim Williscroft
I think the trick is, you have to find what works for you. I think the hardest part for all programmers is to understand themselves, and what works for them. Toddly has stepped a bit closer to that goal. Very cool.
i think the essence is that the more far away smth is from coding the more your desire for coding grows.
respect .
Yes, my job drains the desire to program right out of me as well. My admiration for you and your ability to do that is pretty intense.
toddly-- waiting for your blog.
Vivek Sharma
Toddly - im waiting for the blog as well!
Click Upvote
That reminds me of professional musicians I used to know, who were playing so much they got totally bored with it. Personally, I can code day and night if I choose it. But if someone tells me to (i.e. a suit forcing his/ her stupid deadlines on me) I have a very hard time keeping my motivation.
I've given some serious consideration to doing the same thing. It's encouraging to know it's worked out for someone.
Spencer Ruport
When I worked at a restaurant, I came up with ideas every now and then, such as using a shim to bootstrap a compiler, proving that Kolmogorov complexity is undecidable (before I knew that term), etc.. However, for the most part, my 20-hour-a-week job made me less productive as a programmer, not more. I guess it depends on the nature of the work; how much down time you get.
Joey Adams
Someone gave me recent similar advice if I really wanted to step up my coding output. However, the big question is, money is tight as it is now with my developer salary (pretty avg salary at best), so how would I pay the bills by being a Starbucks barista, or installing carpets, or whatever?
+3  A: 

This is an interesting question, because I have definitely felt "addicted" to programming before. There have also been times when I have not felt quite as enthusiastic. I can't give you a guaranteed method for spiking your programming enthusiasm, but I'll share some of the things I've noticed that make me really excited about creating software.

The first (and most obvious) kind of thing would just be a really interesting project to work on. This can just be, at its simplest, an experiment with some cool new tool or technology. For example, I remember after discovering Pygame, I was so enthusiastic, I basically spent an entire month doing nothing but working on building a cool little Tetris game. I think it's safe to say that I was rather addicted to my project. ;)

My other suggestion would be to read some of the stories behind famous software projects. There's this book called Revolution in the Valley, which is a collection of anecdotes about the development of the original Macintosh computer (which are also available online). I found that after reading about some of the inspiration and experiences of the development team, I felt quite inspired myself. I'm not sure why this is—perhaps enthusiasm and passion is contagious. ;) Nevertheless, whenever I feel listless about programming and software design, I just re-read some of those stories, and I usually feel a lot more motivated afterward.

Of course, exactly what causes motivation and drive differs from person to person, so I can't really prescribe the perfect remedy for your situation. But I hope some of what I shared can perhaps help you motivate yourself. To expect someone to be passionate about something 100% of the time is unrealistic, I think—we all need some kind of a catalyst at times.

I like it! Especially the part about motivation.
+3  A: 

Addiction to any activity results when the said activity continues to provide you relentless excitement and enjoyment, stokes your passion everytime you think of doing it and makes you restless whenever you are not doing it, over an extended period of time. (No, I'm not talking about sex, you pervs! :P)

Most of us are able to get obsessed with any activity for a short period of time till the time the activity can keep us involved and the thrill still remains. Those who can maintain a lifelong passion for some such activity (and are lucky enough to convert that activity into a profession) excel in life.

For me, programming is about solving problems, about charting a mental path through an imaginary maze, about visualizing a solution when the problem itself is not clearly defined. It is about creating wonderful things that follow my instructions to the letter.

At work, when faced with a complex problem that I am unable to solve easily, it weighs on my mind, and I think of it even after work, while driving home, and before I fall asleep, for instance. Invariably, the solution presents itself in the form of myriad ideas that I am eager to try out... which starts the cycle of a new work day again.

I derive my addiction to programming from my insatiable desire to defeat problems.

+16  A: 

Before I begin, I would like to say that I think part of the reasoning for the question is at least, partially flawed.

Video games, movies, TV, etc. have a very low barrier to entry; programming on the other hand can some times be very discouraging, aggravating and time consuming. It is work. Sure, if you can manage to solve a lot of bugs all at once, or lower the start up time for Application X by 15 seconds by taking out a single line of code, it can give a really big adrenaline rush, but most of the time it is much, much more slow going than say, a head shot, or watching Vin Diesel jump out of an exploding submarine and hitch a ride on the back of a whale back to the surface.

Programming is an end goal that you are working towards. Completing that goal with as little code, and as succinctly as possible is the payoff. In video games, you are living in the moment, looking enemies around the next turn, or for more interaction with the users and the environment around you.

Anyway, on with the answer (of sorts).

How do you get yourself to look forward to programming?

I tend to think of people who inspire me and try to figure out how I can build on, and maybe even improve, what they have created, whether it be: a program, a solution to a problem, or even an Operating System.

Knowledge and logic are really wonderful and more importantly, exciting things to gain when improving your programming skills. If you have serious problems getting yourself excited over those types of things, I would have serious concerns for why you are programming in the first place. Or at least why you are programming the types of things that you are. For example: if you are creating a lot of business related code, but it is just incredibly boring, it couldn't hurt to try something vastly different; maybe a 2D side-scrolling shooter, or a 3D modeling software, or a basic imaging program. Maybe start up a small website and mess around with some web apps in a language you've been meaning to try out.

It couldn't hurt to look for some motivational quotes to help inspire you into programming more often. Maybe you could create a simple script to have one pop up each time you open Terminal, that way you would not only be flexing your programming muscles, you may be able to increase productivity as a result.

I would encourage you to look into working on programs that can help you in every day life. Sure, maybe you wont make any money off of them, but if the average application that you create for your freelance work isn't particularly stimulating, this could be something that you could pursue in your down time to help perk up your interests.

Some people may advise you to simply uninstall whatever game you end up wasting a lot of time on, but I think that this is a stupid way of approaching the problem. It is human nature to find a way to keep yourself occupied, and I could just as easily imagine you playing flash games, or Solitare, or reading the newspaper for hours on end, if you had no other way to escape. It is important to have something that you can fall back on if you have been struggling to find a solution for a problem and need to get your mind off the project for a while. The key is moderation.

"So how do I moderate how often I get to play game X, or do this other thing, than?" This is something that really no one but you can answer. You know how good or bad your programming skills are, and how long it typically takes you to solve a problem.

Hope this has helped some.

Michael Hart
@Sawta lol you made me laugh with the head shot comment.
You're spot on. Its the mundane programming that i've done so many times which uninspires me. I do practice with small game programming and that gets me completely addicted. If only that could pay the bills..!
Click Upvote
+1  A: 

"How do you get yourself to look forward to programming?"

Read this very important book,"Unlimited Power" by Tony Robbins.

He describes the techniques to put yourself in empowering mental states. That is the key solution to your problem.

+1  A: 

If you think you can get 'addicted' to programming or any kind of work, you're fooling yourself. Accomplishing work or completing any goal is a matter of discipline and self-control. Get into the habit of doing work when you're supposed to do work, and you will be more productive.

I think a lot of software developers out there would beg to differ…
+3  A: 

For myself, it's all about small victories, in both games and programming. I like winning and I keep coming back for the challenges.

When you're programming for fun; try picking projects that you're really interested in. It's very hard to stay motivated if you're just doing it for the money, a friend. Program for yourself.

I for example enjoy C programming because even when you accomplish small things, like modifying a string, it feels like this huge victory.

  • It compiles, awesome!
  • Found the bug, great!
  • Implemented a new functionality

I'm not sure if this goes for everyone, but solving a software problem really gives me this great feeling of accomplishment, and that's what keeps me coming back.

This might be different for professional programmers, I strictly do this for fun at the moment.

+1  A: 

I can't get you addicted in programming. I, however, may be able to get you addicted to solving interesting problems using programming.

Hao Wooi Lim
+1  A: 

This is not a total answer, but establishing a series of short term achievable goals with a tangible result is important. The idea being that you can work for maybe an hour or two and be able to mentally reward yourself for your work. It could be adding a button, or commenting a source file, or making something new happen on screen. Typically it's bugs fixed/feature added, as long as the features are small enough. You can break larger features down into smaller tangible steps as well. The important aspects are the achievability of the goals, and how satisfying/convincing the mental reward is. Quite a lot of whether the reward is convincing depends on your inclinations.

If you think about it, this is essentially what games are: Sequences of very short term easily achievable goals with a satisfying reward after each one. That's why they are so addictive. That's why languages like python and ruby are so popular, because they have interactive shells where you can see tangible results with far less work than a compiled language. It's the feedback loop that feeds our masculine obsession with controlling things.

+1  A: 

You don't get addicted to programming, you get addicted to stuff it brings you. Just think in terms of what new stuff(e.g. car, new house, latest gadgets, gf, knowing more people, etc) it can bring you if you switch to a new programming language or learn new programming techniques.

Or perhaps you are doing some things which were exciting before, but now become plain boring or mundane to you now. Try to create a code generator around them, so you'll be excited to learn new stuff and be addicted to them, this way mundane things won't drag you to boredom again. Good programmers are born lazy and are very effective with automating tedious task.

Michael Buen
+108  A: 

In my opinion it's all about small successes. What makes games attractive are all the small or big successes you have. This gives you the feeling of progress in whatever you are doing in the game. For example WoW has all these little Quests where you gain experience when you finish them or you get armor or weapons after a fight. These moments keep you playing.

To transfer this to programming: You might consider changing the way you structure your work. You need to set small more easily reachable goals. When you want to write an application you should work towards the low hanging fruits first. Make an easy input form, write some backend code, write tests. All small tasks that you can "normally" do in up to 2-4 hours. The tasks should be that hard that you can gain joy of finishing them but not too hard to get frustrated or that you get the feeling of getting lost in it.

An approach that also fits in this schema is TDD (test driven development). You write your tests first and try to make them pass. This can lead to a similar success-feeling. But this requires a certain way of thinking that many developers are not used to.

Patrick Cornelissen
I totally agree with Patrick here. Coding the first years through zena (open source CMS: was fun because there were many rewards (Pavlov's dog barks). Writing tests, coding and seeing them pass was a joy. To ensure longterm success, we had to refactor many parts. During this period, we had no new features, and no happy customers and it was very hard to be motivated.
Gaspard Bucher
@Gaspard: isn't your comment more about self-promotion than anything else?
Yes!TDD = constant successNo TDD = why did this break? oh god, step into, step over, god i hate my debugger.
@Hippicoder if you stop resenting self promotion, maybe something good will come to you
Tom Dignan
+1  A: 

Well, I have found that the best way to motivate myself and really get myself excited about my programming projects is to set small goals for what I want to achieve every time I sit down in front of the computer. I focus on what I am supposed to deliver and then start to build it. Either from the project specification or task list (for formal work or school related projects) or from my head (for the ad hoc hobby projects).

As soon as code starts to appear on the screen and the functionality grows it quite easy to get that same feeling of satisfaction as leveling up in WoW. As the project grows I find it hard to not think about how things could be improved. Much like the feeling I get when I play great games. It is hard not to think about them even when you are AFK. It can be everything from additional functionality, or existing functionality that could be improved (put in the "nice to have" column in the todo list/specification) or refactoring ideas that you can do when you have some down time (waiting for some other unit to be finished etc).

To me it is all about mindset. If you give it time and really apply yourself you are investing in the programming project much like the way you invest in games. There is an emotional satisfaction to be had when you manage to solve tricky problems. It might not always be as immediately satisfying as playing a game, but in the end I think it is well worth the investment.


Computer gaming gives you some kind of progress, maybe a virtual progress, but still.. Find something else that gives you progress, or convince yourself that something your already do does so.


I've had this illusion before with various video games on various platforms. I'd question whether or not you finished the video game after playing for hours and hours as this is one part of where the flow in a video game can be different than in developing software.

For example, in various role-playing or real-time strategy games there can be hundreds of hours spent building up power and getting stronger and stronger. Does this get to the end result? Not necessarily if the game normally takes tens of thousands of hours or is open-ended like some MUDs and other games are in terms of the game just going on and on.

I get myself to look forward to programming by thinking about how there should be an easier way to do this and what are the variables I need to enter, what processing has to be done and what output would I like it to have. The challenge is to focus on what are the key points that I need to get done. Of course there is a find a bug, fix a bug, re-test loop to run that can take many many iterations before something can be said to be done.

JB King
+1  A: 

Programming for the type of person to be interested in it in the first place is interesting because it requires you to solve problems and learn new things. As long as you do it as a hobby, you can choose to do only interesting things but unfortunately after you have worked in the field for a number of years you get pretty good at some aspects (languages, types of software, etc.) and then your employers want to use you to write more of the same - you are after all effective at it so they get the most bang for their buck that way.

I developed a database application for SQLServer with VB6 for several years (5+) and got totally bored with it so much so that I lost all motivation. I have since worked again with real-time DSP SW (I had had some previous experience with it before my VB6 years) using C and that again ignited my interest in programming.

So, my advice is to try something completely different if at all possible. If you are forced to solve completely different type of problems and you still can't get interested in it, then you might want to try some of the other suggestions (change to a non-programming job and only code for fun).

+2  A: 

You should get yourself motivated again. I believe that the best way to do this is to "code for yourself". You could try your own projects, or puzzles and math problems. The best collection I know you can find at Project Euler, as ethan stated. The very first problems are somewhat easy, and then you find yourself playing with very hard problems, and

although it may take several hours to design a successful algorithm with more difficult problems, an efficient implementation will allow a solution to be obtained on a modestly powered computer in less than one minute.

I think its just a beauty for a programmer like me. Maybe you can dive into it and enjoy as well.

Raphael Montanaro
+1  A: 

Continuity is important. Stick with it even when you are nowhere near a computer. Design, code, refactor. Use paper when you have it, thin air when you don't. By the time you find yourself near a PC, you'll be pretty anxious to try out all the ideas that have built up inside.

Find someone you can discuss code with. Detailed discussions about design, language features, implementation. I usually find that many coders are reluctant to talk about such things (except on the Internet). Bait them with a challenge. Ask for advice; programmers love giving advice.

Watch "How to Protect Your Open Source Project from Poisonous People". Understand that they're referring to you.

Vulcan Eager
+1  A: 

Two words.

Learn Python

...seriously, Python (for me) has put a lot of the fun back into developing software. A lot of the more tedious stuff you have to deal with (I come from a C/C++ background) becomes trivial which leaves you with the fun bit; solving problems.

I often use Python to prototype ideas before I implement them in other languages too, so even if the end result isn't a Python solution, I can take advantage of the speed of development. Python's an interpreted language so there's no need to compile which reduces the code-test-code-test-... cycles we all go through to produce a working solution.

Add to that lot the fact that Python comes with an enormous library of useful modules you can download and it brings back more of the fun of making cool 'stuff' :-)

Jon Cage

Another way to approach this question is to ask, "Why am I not addicted?" or "Why am not doing it?"

There's some research into Writer's block referenced on Wikipedia, that you may find interesting. For example, Blocked: why do writers stop writing? starts with,

... Most of the poems for which [Coleridge] is remembered were written when he was in his mid-twenties. After that, any ambitious writing project inspired in him what he called “an indefinite indescribable Terror,” and he wasted much of the rest of his life on opium addiction. How could he have done this? Why didn’t he pull himself together? ...

+1  A: 

The underlying driver for all compulsive behavior is a system of "Constant Rewards". Casinos do it, and most Blizzard products and PHP games (Planetarion, Mafia Wars) do it. Setting multiple small, satisfying goals that you can achieve in a single sitting should help drive a compulsion to code.

Not that this would necessarily be healthy, or even make you a better programmer. Some projects require hours of unrewarded contemplation, and a compulsion to achieve something quickly won't always help the project. It'll just drive you to produce more code.

Here's something on that subject:

I 've noticed that my motivation for programming is very dependant of the project I am working on.

So I would say that you should work on an app that is very interesting for you. here are some ideas to find the right project.

1) Is it useful?

2) Is it challenging?

3) Do you learn new things?

4) Is it something that you can be proud of?

5) Is it fun?


Oddly, my office doesn't care about any of these things when it assigns work to me.
I can imagine. That's why I am trying to run my own business

Why not take a few lessons from the games and the gameplay in them. Lessons like:

  • constantly ending up in situations you know not a thing about
  • having to face things which look tougher and bigger than you and arguably are but you keep going back until you have proved you are bigger and better
  • why not take risks, you know you won't die, its just something you are doing
  • and yeah, never, ever, go back to places and things you have already been to, you would begin losing it. That is known to be the best way to get someone off some addictive game.

The moment you try to get comfortable in anything, you must always know, you will get bored very soon. Push yourself, you won't die. So for programming, start a small project to dab in artificial intelligence, evolutionary algorithms etc, the newest technologies in your field of interest and work, and read and experiment.

Do something new each day.

+2  A: 

I think a lot depends on the individual, I don't think there's a single right answer here. I do know folks who are completely "addicted" to programming - who clearly can't wait to leave the party, go home and code. And I know folks who love programming, but will never be addicted to the point of wanting programming to be the first and only activity for the day.

I think the key to motivation is to figure out what drives you and align your work so that you get more of what motivates you and less of what doesn't. In the end, it might be that they call it "work" because you have to be paid to do it, even if you enjoy it. I know that's true for me - I love software, but not enough to do it for free.

Things about video games that might serve as inspiration for finding programming motivation:

  • Great design/great features - Video games generally push technology. They have teams of developers working very hard to make an experience you want to have. That's not so true of most programming environments - but programming can be made more fun with better tools. Even if you don't hate your current programming environment, it may be worth it to try something new - whether it's a new development widget, new paint in your home office, or a spiffy Aeron chair - it might be nice to have a treat that you only get when you are programming.
  • Direct and obvious feedback - Most video games motivate the player with some form of feedback. Levels, new character powers, new things you can discover or collect - almost every game matches added adversity with added rewards and they make the rewards very obvious. Getting paid every week is not necessarily a reward - it's easy to take it for granted. Finding some other way to "get a gold star" might be in order. I can how it would be especially hard as a freelancer - you don't have a work reward program that most regular employees might get... but maybe you can create your own program of rewards for clear accomplishments.
  • No risk - Granted, video games offer in-game penalties. But in the end, there's no risk. If you spend 1000 hours screwing it up, you will have lost nothing so long as you enjoyed that 1000 hours. Not so much for work. Even if you don't care about the product, you care about your reputation, your personal sense of "good practice", and having your career progress. So there's always some risk. I don't have a good answer to this one. I know personally, that this is the single biggest reason why you don't need to pay me to play a game... it's quite fabulous to do something risk free.

I know, personally, I'll never be an "addict", but I can usually pull myself away from distrctrations (hmm... like Stack Overflow...) and get going on work by changing something about my work environment and how I reward myself.

+4  A: 

I was addicted to programming while I was growing up, and I can give you the EXACT answer you are looking for, and I can tell you right now you will NOT like it and that it is totally the truth.

The answer is:

You have to completely give up gaming.

I'll probably get downvoted and nobody will believe me, but give it a try. Playing completely saps my love of programming.

When I'm playing a game, that's what I'm thinking of when I'm not playing. I'm trying to figure out my next move, or what armor I'm going to get, or how to take over a town...

When I'm not playing a game, my mind is filled with algorithms and object models and I can't wait to get home to implement the next part.

So many times I've been stuck on a difficult problem and figured it out the next day in the shower--my mind crunched on it all night. There really isn't room for more than one obsession though (by the definition of obsession!) and when I'm playing, that just doesn't happen.

I play a lot--this isn't bullshit, I really like it. Every so-often though I go cold-turkey so that I can concentrate on programming and other parts of my life.

Damn Oblivion.

Bill K
Dropping my favorite game DID increase my productivity. Admittedly.But I'd like to think in a few weeks, I'll be able to take an entire weekend and totally waste it on a couple of games I'm just itching to play and still haven't finished.Drop (whatever game addicts you) for 2 months.
Trust me, that is not going to work. Whenever you start gaming, it breaks down the mental barriers you put into place to successfully prevent yourself from gaming. It will take a mountain of dedication to stop gaming after those two days.
You have to drop it forever. Any excuse to get back into it (in my experience) will degrade into you being as addicted as you were before.
Bill K
I gamed a lot as a child but when I got to about 13 or 14 I started programming. At that point **games were boring and programming fun** and so it went on. I didn't get back into playing games until earlier this year(age: 19) when I got a job programming and programming both night and day burned me out. You definitely do need downtime from programming, rather it be gaming or spending time with friends or whatever. If you do nothing but program **you will** get burned out.
+1  A: 

I believe that kind of addiction to the computer games comes because

  1. the game remains as an unfinished task.
  2. you wonder what will happen next.

So I usually find it useful to leave some of my ideas/bug fixes uncoded before leaving the PC. This way they remain as unfinished tasks and you wonder if your ideas or 'possible' bug fixes will work! This even helps you to think of other possible approaches to your problem as it leaves you some mandatory thinking time before actually getting into coding.

Can Bal
+6  A: 

Although not a direct answer to your question, I think you'll find that this Newsweek article on procrastination has a lot of relevance:

Essentially, we procrastinate about tasks that are abstract and nebulous because our brains have a hard time comprehending them. Programming definitely falls into this category. You never know exactly what every single line of code is going to look like in advance.

On the other hand, playing a game is a concrete, well defined, easy to comprehend task. Your brain wants to do it just because it's easier and simpler.

I have the exact same problem as you, so my solution has been to create very granular to-do lists for each programming project, so that I break them up into tiny but manageable chunks. They're so small that I'm checking off a box every 5 minutes, rather than every hour or two(like I'd done in the past).

Another thing that works is giving yourself a hard rule like "I'm not allowed to play any counter-strike today", instead of saying "I'm going to try to play counter-strike less today". You're much more likely to follow a rule like that if it's very strict and specific.

Matt Rix
+1 This has to be the best answer so far.
Interesting, I agree with granular todo lists, but every 5mins? Well, 30mins don't work for me, so I guess I should concede to 5mins. I suppose it adds even more successes when you really write those 5min accomplishments down.
+1  A: 

I think this is a perfect metaphor for programming or any creative and intellectual work.

"If you have built castles in the air, your work need not be lost; that is where they should be. Now put the foundations under them."


Tom Dignan
+1  A: 

In this quote lies the key to getting "addicted" to something positive.

The incentive of attention is interest; the greater the interest, the greater the attention; the greater the attention, the greater the interest, action and reaction; begin by paying attention; before long you will have aroused interest; this interest will attract more attention, and this attention will produce more interest, and so on. This practice will enable you to cultivate the power of attention.

The quote comes from this link

It was written about a 100 years ago by a man named Charles F Haanel in a book called The Master Key System

Hope that helps.

+1  A: 

Find your own language. Some will say "Learn Python", others will say "Learn C". But the truth is; you must find your own path.

And I don't think you should see it as a quest for addiction. I think, perhaps, a better word would be immersion. Learn to become one with your chosen language, and when that language no longer serves you, learn a new one. And then a new one.

The "addiction" to programming itself, as a tool for productivity, may not be an achievable goal; but when you learn, and I mean really learn to learn, then, as what you have seen as parenthesis give way to structures, what you have seen as numbers give way to meaning; when you no longer see the numbers, but blondes, brunettes, redheads; when you become as one with the computer; then an addiction may arise.

Williham Totland

I cannot answer the "how", I'm afraid. For me it just happened. For a few years in the 90ies, while the company I was working for did in-house developing for customers, I was spending more hours at work than at home. Each time I walked home I was already looking forward to coming back a few hours later. I consider those years the best time of my working life so far. Of course, it had to end one day, because in-house development needed a paying customer, which were hard to find in at the end of the 90ies.

I can relate to some of the factors already mentioned by other posters:

  • I learned something new every day
  • it was a series of very interesting projects
  • it was a mix of activities (pure coding, customer support, bug hunting, teaching users, feature discussions/brain storming sessions, ...)
  • over all I had a lot of fun

But something else was very important to me: The people I was working with. The colleagues had found different ways to become programmers, which lead to differing ideas to solve problems. They were proficient in different things. To talk openly with each other, be it about aspects of the software we developed or about private things, was in my opinion the key factor, why I was so focused on my job back then.

On the gaming side, it is similar´for me. I enjoy playing WoW and Diablo2 with people, that are fun to play with, who know what they are doing, who are open to criticism and also offer criticism freely. Some of them I have known for over six years now.

Perhaps the "right" people to work with in a team (if at home or in an office should not be relevant) would be a motivational factor for you, too?

Juergen Hartelt

Take a look at A Theory of Fun.

+2  A: 

I've been programming as a .net developer for almost 5 years now, and I often find myself getting bored out of my mind doing the same CRUD code over and over again ad infinitum. To get myself out of this funk, I bought myself a Macbook to program against the iPhone for a change. Learning a new language (objective-c) has been both a challenge and a joy, as I'm now trying to shift my energies to developing games instead of business apps.

FYI I was sick of Crud code as well, so I've made some classes which handle it all, i just tell them the entityName and the fields and it handles all the CRUD + pagination :)
Click Upvote
+7  A: 

I used to be addicted, and I want to be again... so this questions comes at just the right time. Here's what I would do...

  1. Find lots and lots of free time. Obsession requires time. Lack of free time, thanks to work, is one thing that prevents me from bothering with starting a new programming project. Quitting your current job can free up time, but there are other ways.

  2. Organize everything you've ever coded. Don't ask me how, but organize it. Craft things into libraries, or at least write down the types of applications you like to code or have coded. Disorganization can become overwhelming, and can prevent you from wanting to add to the disorganization.

  3. Code code code. You have to just do it. Make time if you don't have it. You will never find something interesting that you never do. You're imagination will only go so far. The more you code, the more questions you will have, the more you will learn; your brain will have no choice.

  4. Get other people to use your software and provide feedback. Helping others is a huge motivating factor, not only to get it done, but to make it better.

  5. Associate yourself with other addicts. If everyone else is coding, you'll want to as well. Plus, you can share code and ideas.

+1  A: 

It is possible to get addicted to an abstract pleasure like solving programming problems if you have enough good experiences.

A good start is to learn how to quote time since there are few things as depressing as having to kill yourself to deliver half baked solutions because you quoted frivolously.

Hans Malherbe

I can get addicted to programming when I have a project that I'm really motivated about, and I continue to push myself to achieve my goal. It helps to continue to push yourself as you accomplish your goals, and just try to get something done. If you spend to long on theory, programming can start to get really boring.


The things that constantly pulls me back to the coding is solving problems. I often find myself thinking about a problem that should be solved when I walk to the buss etc. I think that's the thing that makes you addicted to programming; solving the problems. So try to come up with projects that include some kind of problem for you to solve, not just the usual mindless using of old solutions. It doesn't need to be big projects, write a program that indexes and searches a file or try to come up with an own compressing algorithm. You probably won't create anything that doesn't already exists, but as long as it is an challenge for you it doesn't matter.


PETER But is there any way that you, you could just sock me out so there's no way that I'll know I'm at work? Right here? (points to his head) Can I just come home and think I've been fishing all day or something?

DR. SWANSON That's really not what I do, Peter. However, the good news is, I think I can help you.

From here. You either love it or you don't. For example, I hate fishing. :)

JP Alioto

I would say work on programs that help you get your job done easier. It helps when your primary job isn't programming but some sort of engineering or science. Tools, automation, things like that.


You should ask yourself if you would really enjoy programming? If yes, what sorts of programming do you enjoy? If not, nothing in the world can get you that dedication and addiction. Addiction comes when you have adrenaline flowing when you do something - and that happens when you deeply enjoy doing something.

If in the heart you "feel" you might enjoy programming, then at least search for what you would enjoy programming the most - games? databases? websites? user interfaces? mobile apps?

Often you will discover that you enjoy things that you can relate to very easily - so may be you should try getting a job to program at a game development company!

Charles Prakash Dasari

I understand where you come from completely. I am both a n00b programmer and a WoW addict.

Lately, though, I've had much more of a passion for programming than for WoW. What made the change?

-- Easier projects. When I started studying Python, the guide I was following had some really difficult example projects. The guide's examples were all based around stuff like computing primes that not only didn't interest me but really made me feel stupid. I don't have a strong math background and the difficulty of those projects made me feel as if that was going to keep me from ever programming. Later, by just browsing at the library, I found the Head First series of books which has projects that start off simple and grow gradually more difficult. Like another commenter said, games like WoW offer just the right amount of challenge v. rewards, and so did the exercises in the Head First books.

-- Relevant projects. When I started looking at PHP and SQL I could immediately see uses for it. For instance, I'm moving a lot of my possessions into storage and I used SQL to create a database telling me what items I put in which box. I could have accomplished the same thing with just a list in Microsoft Office, but it gave me a chance to play around with SQL and incorporate it into my life. When I studied programming in school I knew that I was programming just for the sake of my education, and wasn't motivated at all. Now that I'm doing it to create specific things in my life, I want to do it. It's like the difference between mowing the lawn and gardening.

Depending on what game you play, you may be able to work programming into it. For WoW, you can program addons (and there's a book available for that). Oblivion offers a construction set that lets you make your own spells, characters, quests etc, and is not quite programming but is a first step to game development.

Sara D Gore

Oh man, I hate programming so much that I just want to punch anyone who talks about programming in the conversation. Why i hate programming so much back then? Well, i picked CS as my major and college years were my worst years in my life, I just hate it more than anything! All those N-gate, nor-gate, link list, push pop jump, quick sort bubble sort, algorithms, recursive, database, network programming, turing machine... etc. Every time i see system.out.println makes me throw up. Now I'm back to coding because you can make cool stuffs. Well I only code to the things that I think its cool and useful for people. why can't we make cool apps back then instead of building stupid calculators in assembly language ? My point is that you have to be interested in what you are programming.

I think you could have made your point better. This way it reads more like some random ranting about programming.
+1  A: 

There's a few things that have gotten me to be "addicted" to programming. The main one is that I have an intense interest in learning new things. Another is that I realize that the better I get at programming, the more interesting, meaningful, and high paying jobs I'll be able to get. The third is making to do lists.

I love notepads. When I get requirements, I break them down into a sheet of small work items. As I finish each item, I cross it off the list. When everything is done I put it in a pile on my desk. It's very satisfying to see 1,000 things crossed off as accomplished.

If you're looking for specific new things to learn, I would recommend getting into java, google app engine, google web toolkit, restful web services, and a social networking api like twitter, facebook or buzz. Also, the android platform and mobile/location in general is another good one, and what I'd like to master next. Sure, there's a steep learning curve, but you can really do some amazing things when you master these particular technologies.

Of course, not coming from a wealthy family helps. At some point, I decided I wanted a nice sports car, and one day I went out and bought one. I ended up working my ass off so that I could make the payments, this was also a great motivator. Sort of like how some people say having a child can do the same thing for you.

One last thing, monetize your work. Whether you are building a web app or a mobile app, employ google adsense advertising. It's really something when I look back at the open source projects and free books I've created, and see that I am getting a check from google every month for doing literally nothing, for the rest of my life, for work I did seven years ago.

Hope this helps to inspire everyone. Best wishes to all.

Oh, and if you drink, stop! It's hard to code while you are drunk or hungover, lol.

Also, take a look at design patterns and object oriented programming, they are really fun.

+2  A: 

English is not my native language, I hope that all of you understand what I mean. In my opinion, programming give me chance to study new thing. I am very enjoy on research stage, learn a new programming language, study language features and etc. In research stage, I can explore a new place in my mind, it's very exciting and funny.

Moreover, debug is also a funny stage, I am become a detective to find where the bug is, eliminate other possibility and find out the bug in tons of file and tons of line in a file.

+6  A: 

Based in the discoveries of behaviorism, to become addict you should aim for Positive Reinforcement of Variable Ratio. Here is a graph, where the variable schedule is in red:

Variable Reinforcement is the red line

I recommend to develop using TDD with a test runner that displays a green light when all your tests are working. The green light is really addictive. Follow the other advice in this question, use small tasks etc. I really like Kent Beck's book TDD by Example.