How To Get Out of Developer's Block?
Midnight Thunder writes "I have spent the past six months working on a software project, and while I can come up with ideas, I just can't seem to sit down in front of the computer to code. I sit there and I just can't concentrate. I don't know whether this is akin to writer's block, but it feels like it. Have any other Slashdotters run into this and if so how did you get out of it? It is bothering me since the project has ground to a halt and I really want to get started again. I am the sole developer on the project, if that makes a difference."
I take a walk if it's one of those small bugs that holds you up for days and then turns out to be a semi colon in the wrong place.
If I can't motivate myself to work on a particular project, I work on something similar for personal projects at home, because that's always more interesting than doing something because you have to. Once I get into it, I get little moments of inspiration like "Ah, that'd be a really useful feature to use at work." That makes the work more interesting and there are times at work when I get little moments of inspiration like "Ah, that'd be really useful to use on my home project."
Drill baby drill - on Mars
Break your project into manageable steps. It's the only way to tackle large, complicated tasks when you lack motivation.
If you do enough small steps, you'll regain your enthusiasm for the project. Then you'll be back on the rails in no time.
Sole developer is hard. There's no easy answer as people react differently.
I'd say:
1) Get away from the computer for a bit.
2) Do that other project that keeps interrupting your thoughts.
3) Sit down and work out a hard plan with deadlines. Not long term deadlines, but in the near future. If you can't do this, then maybe the project is too fuzzily defined.
4) Do a lot more work with pencil and paper. Only use the computer for programming and post-pencil-paper documentation.
5) Is there anything outside life that's affecting you? Afraid of zombies in red jackets dancing if you fail to finish the project? Is it actually going well, or are you unhappy with it? Ask yourself the hard questions to see if it's that. I.e., you feel it's not worth finishing the project, so you can't.
6) It could just be your work conditions - chair, computer position, desk cleanliness. Or the people around you - interruptions, etc. Make notes of when you get interrupted, and then see what they're like at the end of the week. Like a food diary, you might be surprised.
Work on the software's architecture or design. Draw diagrams on how the pieces are to fit together and how data (and control) are to flow throughout the system. This lets you look at your project from a more abstract perspective and may make it easier to get motivated to code portions.
The dogcow says "Moof!"
That has happened to me on lone-gunman projects. It is particularly troublesome when you are determining your own deadline as the writer's block feeds procrastination.
Because this is a lone gunman project you may have an ordered list of development steps or modules to develop in your head. One thing to try would be to mix up the order of development a little in order to jump-start your brain and motivation with something different while at the same time being productive on the project.
Or set up a development schedule with firm delivery milestones and hand it to your boss, and working against a deadline may get the brain moving.
Start fun and small. Do the fun stuff first, get your mind obsessing over it (sketching up your mockups, database schemas, etc), so that that's all you're thinking about, then starting the coding isn't so much of a hassle. Don't think too big off the bat, or the project will seem too daunting. Focus on getting a small prototype up and running, then once you've got that momentum, you can start adding features.
They say to start but not finish the easy stuff at night so that when you wake up the next morning, you have the easy part to finish, which gets you started. Then, once you've got momentum, continuing on the harder stuff is easier.
How could I say to men: "Speak louder, shout! For I am deaf!"? -Ludwig van Beethoven
Abraham Lincoln said: "If I had six hours to chop down a tree, I'd spend the first four hours sharpening the axe".
The same applies for building an app.
One approach:
Draw a schematic of data flow.
Start thinking about data structures for your app.
Write test cases for imaginary modules that talk to these data structures.
Code the modules utilizing the above test cases.
Write app code that utilized the modules.
Writer's block occurs when the stuff you're trying to write is SO BORING or otherwise uninteresting and unengaging that you, yourself don't even care about it. I've heard at least one writer say that writers block is a good thing, as it tells him when he needs to go in another direction. I would take the same approach to this situation. You've got this piece of code to write, but it's so uninteresting that you don't even care about it. The question then becomes, "Why?" Is it a feature that isn't really needed? Is it an ugly brute-force approach to a problem? Maybe it's just a piece of backend code that you don't really consider "sexy". Once you figure out why you're not interested, you can then address that problem and the coders block will fix itself.
1. Find something really easy, quick, simple to do. Builds momentum. (At the end of the day, I like to leave myself something easy for the next day to get started on).
2. Find somebody to discuss the project with. That alone will often get me going.
3. Get more sleep. This is more of a personal thing, but I find I'm able to concentrate less effectively when not getting enough sleep.
--D
There's a lot more to coding than just mashing away at the keys.
I submit:
- thinking about a project
- coming up with specifications and test cases
Does not rule out someone being a programmer. The real issue is probably motivation. Noone had to tell Michael Jordan to go play basketball. Nobody had to go tell da Vinci to go paint. Nobody hand to tell Kerouac to go write.
You can't force good code... Hell. If coding isn't in your heart, you probably can't even force bad code. He needs to take a look at what he's doing and figure out why he's doing it.
1) Examine your motives. Do you really want to do this? No? Think about the effect on you if you don't. Spend no more than 2 minutes on this stage. Decide.
2) Describe the problem to yourself, written, in a single short paragraph. Display this where you can see it as you work.
3) Determine the absolutely smallest possible component of this job that you need to do. Maybe a 5 minute job. If you can't break down a big job into smaller jobs, you're in the wrong business. Pick that smallest little job and do it. Write it down on a physical list and tick it off. Actually do this step.
4) Determine the next little job. Work a bit to find the next smallest task. Rinse and repeat.
5) By this time you might have momentum. But if all else fails, acquire a McDonald's or Wendy's job application. Have it framed and on your wall in front of you. Nothing will motivate you better than that.
Do not mock my vision of impractical footwear
Sounds a lot like, deep down, you don't really want to be there, or at least you don't want to be working on that project. Are you happy working as a coder? Do you like your particular technical area? Do you truly like your colleagues? Your employer?
Conditions such as depression not withstanding, it sounds like something deeper within you is trying to tell you something.
-- In the beginning was the WORD, and the WORD was UNSIGNED, and the main(){} was without form and void...
Your motivation to work on something has to come from within. That being said, if you are in a depressed mood (understandable in these times), then you are less likely to be productive. I suggest going out for a run, getting your blood pumping, etc. Sometimes caffeine helps. Music helps. Minimizing distractions helps - web browser, cell phone, etc.
One thing you can do if you want motivation is to reward completing the boring or hard tasks with easier, more fun tasks. Mix up the hard problems you have to solve with minor annoyances. That way, if you can't concentrate on a hard problem, you can at least make some progress. Making progress is the way to get through the doldrums.
Go to bed early, next to a window facing East. Wake up in sunlight.
You might also take the approach that video games do - track the work you do. Reward yourself for making milestones.
*** Whoosh! ***
"Michael, I did nothing. I did absolutely nothing - and it was everything that I thought it could be."
Doing it by yourself is, indeed, hard.
I have done too much of this. Far too much. I need to get back to a group ... over a year away from a company, some years away from a team. My sanity is fading a bit.
You get the following problems:
You get lonely
You have nobody to talk over a problem or a design with - and that's bad. You can get stuck on a stupid problem, and if you talked to someone else they'd have said "You idiot, you just need to use this widget" .. and they'd be right. This is probably the worst one
You get very jaded. There's no competition, nor does anyone say "Well done Fred. Nice work"
If you are working at home - the fridge is far, far too close. Nasty
Your designs get corrupt because there's nobody charged with keeping the design and structure in shape. It's far too easy to cheat - you wrote the code, after all, why do I need encapsulation?
What to do?
The fridge problem takes self control, the corrupt design problem is tough, and the loneliness problem is very difficult. Take some external sport, maybe - perhaps some sort of team sport (I skate - in a team. Embarrassing for a geek perhaps, but nice to talk to people completely outside your field).
But you do need some interaction with your peers - Slashdot is not a good way. Too introspective.
You need a friend network, for the occasional geek chat, kick in the head, and the odd war story. Oh, and beer.
Personally I am trying to leap back into the arm of an organisation, with teams. A difficult change, especially in the current climate, but essential for my sanity.
So I wish you luck.
You might try studying a completely new environment - Ruby or something, in an attempt to reinspire the child-like wonder that got you into this area. It's still there. Go for it!
"Cats like plain crisps"
I find that nothing gets me cleaning the apartment like having a project to do. And nothing gets me working on a project like having a clean apartment AND another more urgent, less appealing project to do.
Right now, if your apartment is messy, work on your current project. Of course, instead of working the project, you'll procrastinate it by cleaning your apartment. When your apartment is clean, get yourself an urgent, unappealing project. Soon you'll be using your original project as a means of procrastinating the new one!
-- I prefer the term "karma escort."
Had that happening to me a long time ago. Eventually, I took a two weeks break from programming (I was going nowhere with my work anyway) and enjoyed some much needed relax. When I was back I had recovered enough energies to work as usual and complete the job. Since then, I plan in advance breaks, pauses, days off work and short vacations for any project that lasts more than three months: got downs and ups many times, but never came even close to have to stop working.
"Shut down your web browser", especially that part that involves reading or...posting/submitting articles to Slashdot.
One that hath name thou can not otter
> Given that Michael Jackson died a few hours ago, I would pick another image.
You really don't think the OP knew this?
So far, I remove all technology from my life. Phone kept to essential calls/text only. Turn off (temporarily) Internet at home. Zero tv and movies. No games. Zero technology and information intake.
I'll start to get better after a couple of days but I keep up the detox for about two weeks. Ramp up the reading, jogging, rowing, sport with mates, go for drinks.
You'll feel better and the 'itch' to burn code will return.
.
I wouldn't go so far as to blame management for motivation problems. It isn't really a dev manager's job to motivate a developer who doesn't know why they are demotivated any more than it is to be a developer's therapist. If the developer has a concrete reason (eg. "the lead is abrasive" or "the deadlines are way too unrealistic") then you can blame the manager for inaction.
That said, perhaps the solution to this developer's motivation problems is to become a dev manager for a while. Then he'll find coding far more enjoyable than being blamed for things outside his control.
Love the "Insightful" mod! What if I said "ba-ZING!"
Welcome to Slashdot. Replace this text with your desired signature before replying to a story.
I find that my happiness, productivity, and quality of sleep are all on feedback loops with each other.
If I try to push myself 'too hard' I burn out and reduce my output. Once my output/focus starts to suffer I find that what was fine last week is now 'too hard'. I also start losing sleep because I'm not as happy, making me late of the office making me stay later to get the same hours and lowering the 'too hard' threshold again. At my worst in this loops I can put myself down to 3 grace C productive hours a day. At my best I can put in 8 grade A productive hours a day (so about 12 times more output)
The only thing I've found that pulls me out of these loops so far is time off. If I take time off before I start spiraling down it takes me less time off to keep myself in a healthy mental state than if I wait til I'm sitting at my desk for an hour (with my browser closed) and still only putting out 10 minutes of work. I also find that a walk at 3 PM helps keep me focused and productive (not sure if that's an option at your office).
You might also consider looking for a different job (if you can't find a solution at your current workplace). Is it a product of coding that you hate? The project you're working on? Corporate culture? Personally, I just hate wiring buttons together and that's a lot of what I do.
I personally find that a quick checking of the news is good for a mini break between tasks and can help keep me feeling focused in the long term.
Too right.
I've burned out myself during a large, sole developer project. I thought about leaving programming at the time. Tried to point out the insanity of deliverables at hand; but had a whole multi-tired management chain above me 'wishing' for some absurd counter-real truth. I crashed majorly. Took the blame. Saw a shrink. Apparently it happens to a lot of us and a huge hand in all of this is down to mis-mangement. Unreal-expectations which are out of your hand and 'seem' very end of the worldish; it's easy to get that sort of tunnel vision when you're a sole developer working on something. In my own case it was a project with a rapidly changing and volatile spec and unrealistic timescales, the manager was a thicksh1t who couldn't defend realism in the deliverables of those under him (he was under pressure himself) and I was pressured into agreeing to estimates which his managers wanted to hear. Total Burn Out. My shrink said he was a manipulating SOB. Picked myself up and moved on.
We're often put under undue pressure; if you're a good developer you'll get away with it 9 times out of 10. We started out doing it for fun; so you'll suffer sleep loss; long hours; whatever? We've all been there. It's fun - when you pull it off. Since we usually do, there's an expectation that we'll always pull the rabbit out of the hat. It's unrealistic and unreasonable. I now choose which of my 'own' projects I wish to stress out over. If you can't get past the code-block, just be honest with the powers that be. If they have an issue - move on or propagate up the chain. There are still a lot other roles and life options out there.
Good luck.
Seriously,
Take a holiday.
Take a break, holiday or vacation just get away from it all and don't bring your computers with you. The break needs to be for a min of a week and perferably longer.
Depending on other factors you could also be suffering from burnout
I find test-driven development a great way to break out of the developers block. Just write a small test, the tiniest most trivial test that you can imagine. Now make it pass. And pretty soon you are back in the game.
--
Hate your boss?
It's caused by one or more of the following - Doing something for too long - with a lack of support - without any likely rewards on the horizon - and with a realization what you're doing, while once seemingly important, is truly insignificant.
Burnout is your brain telling you you're on a loser and it's time to walk away and for good reason: There are worse things than walking away from a losing proposition. If you want to push on anyway, at least learn about it. Google is probably your only friend: http://www.google.com/search?q=burnout+"scientific+american"