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."
Get to work. Guess why it's called work?
There's only one thing you can do...... drink this..... and plenty of it.
Mhmmm.... get a job as a project manager ?
Sit yourself down for a half hour, promising yourself that at the end of the half hour, you'll get up and take a break.
Repeat.
Expand to 45 minutes. Repeat.
Etc...
Oh, and stop whining.
LSD and Weed, just stock up on Doritos and Grateful dead CDs beforehand.
A Magic the Gathering Article and Forum Aggregator
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
..whether because you think your project will make the world a better place or just cause you think your coding style is gonna get you laid.
Motivate yourself - doesn't matter how or what, as long as it's something you care enough about to put ahead of other stuff you obviously find more fun. Like asking questions on Slashdot.
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.
echo '0.0.0.0 slashdot.org' >> /etc/hosts
Drink enough beer and you will wake up with the project completely finished.
You won't remember how, plus there might be some residual traffic cones and hookers in your office.
Try taking 2 weeks off and going to Japan.
Once I was a four stone apology. Now I am two separate gorillas.
You're fired.
This will terminate your code block.
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!"
Both of these make me want to get back and code as soon as possible. Another idea is to stop trying to code and instead concentrate on what has inspired you in the past. Think of the possibilities! New ways to format or generate those TPS reports will have you coding again in no time!
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
...post on Slashdot. So, you're off to a good start!
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.
Ditto :-/
from 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
to 45 2F 6E 40 3C DF 10 71 4E 41 DF AA 25 7D 31 3F
I've found this to be immensely helpful. http://www.bevmo.com/Shop/ProductDetail.aspx?utm_source=froogle&utm_medium=cpc&utm_campaign=froogle&ProductID=18374
as bullet points.
The expand o each bullet point until you have psuedo code.
Then call some guy in India to finish it.
The Kruger Dunning explains most post on
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.
Usually it's the flow of the room, clean it, rearrange it, paint it, something.
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
Once you figure out why you're not interested, you can then address that problem and the coders block will fix itself.
So what you're saying is I need to quit my job?
The others can inspire you with ideas and coding desire.
It's a quick read. The main thing to do in this situation is to mull over the project and decide on the single next thing that needs to be done. Then do it.
But if you aren't careful, you will work back too far and become overwhelmed with non-coding issues and optimize too-early. "Research version-control systems" may be important but it can just as easily be a non-productive stalling technique.
~~~~~~~
"You are not remembered for doing what is expected of you." - Atul Chitnis
It invigorates the mind.
I swear to God...I swear to God! That is NOT how you treat your human!
I've never had a problem STARTING.
It's that last 20% of a project when I'm trying to nail down the last and hardest bugs, while the client is trying to slip in "edits" that imply major functional changes.
That's when have to pick up my @ss with both hands and drop it in front of the keyboard.
Read Code Complete in your breaks. It will not only be refreshing, but will also give you hints on how to get past mental blocks and bad habits
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.
Sit down and force yourself to write something, anything, that moves your project forward in some way. I find that I feel least motivated when I'm being unproductive, which is an unfortunate downward spiral. However, if I can find a way to get things moving again, momentum builds and I'm able to keep working.
I've done some simple coding projects on my own, and what I usually do is try to get a minimum level of functionality first, then add features. It helps you see your work in progress, unlike code that is useless until 100% completed.
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
You're right, it does mean he's not a coder, he's a developer. Coder's don't take the time to do any of the things you just described, they're more interested in just rushing in and in all likelihood making a mess of things. Developers figure out what, when, where, how, and why before they do anything. Developer's can't wait to get start either, but they do because they want to do it right. I'll take a developer over a coder any day.
God, schmod. I want my monkey man!
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...
is for some guy to put a gun to your head while some hottie blows you.
The Kruger Dunning explains most post on
A five-mile run followed by 50 continuous push-ups followed by sex with a girl
Funny, for me it's usually trying to have sex with 50 girls, ending up doing what amounts to one push up during the act, and watching her run a mile.
Seven puppies were harmed during the making of this post.
I occasionally have a really hard time with this myself.
Two suggestions which have helped me:
1. Get a really good night's sleep. Get to sleep early if you can. Get to work late if you have to. I can do lots of kinds of work without enough sleep but writing code isn't one of them.
2. Break out the headphones and the mp3 player. Music can help block out the rest of the world and put you back in the groove. Lose your IM and email while you're at it. Whatever they want, it can wait.
3. Pick the smallest task you can do on the project and focus on it, excluding any other potential improvements.
If all else fails, you may simply be burned out on the project. It happens. If so, the solution is to hand the project off to someone else and move on to another one.
Moderating "-1, Disagree" is simple censorship. Have the guts to post your opinion.
I occasionally get writer's block. The solution that works for me is to write down my thoughts as simple as possible, in Dick and Jane style, as very simple sentences or even sentence fragments, on separate lines, without trying to put them in any particular order. Repeat until I run out of ideas.
Then, go back over what I've written, delete the obvious redundancies, and sort the ideas in rough order.
Then, go back and connect the fragments together.
Then, leave it alone for an hour.
When I go back and look, it'll be (roughly) my story, but seemingly written by a nine-year-old. Fix it, done. It's almost trivial to fix a badly written story, compared to writing a good story from scratch.
In this case, your ideas are functions, loops, database calls, matrix operations, or whatever is appropriate for what you're doing. The solution is rattling around in your head, but you're having trouble getting it out in one piece. Take it out in small, simple pieces, and then paste them together later.
Oliver's law of assumed responsibility: If you're seen fixing it, you will be blamed for breaking it.
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.
This isn't really a troll. It may well be an excellent idea to just say fuck it and start coding without caring whether you are doing it wrong or whatever. Just throw some code together that roughly does the first or next few things it needs to do, compile it (if necessary), and debug it just barely enough for it to produce more or less desirable results. Then forget about it until the next day.
Next day, either refactor what you did the day before, or just keep moving crazily forward. Eventually you will refactor it into something reasonable, and you will have achieved forward movement.
Don't worry, nobody's watching. Like the man said:
Plan to throw one away. You will anyway.
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."
Cause I want to work for them too!
Any project where you can get away with working 6 months on a project with zero code to show for it has got to be a GREAT place to work!
I kid, I kid... But in all seriousness, something that always helps me is trying to inject something to the project that I am actually interested in doing. If you don't care too much about the project, it can be hard to get motivated to put effort into coding, so I try to put in tech or routines that I find interesting. You can later go in and remove them, but the key is to try to accomplish the project goals while staying interested.
Enjoy reading slashdot until the weekend before the project is due. Then panic will set in, and you can load up on pizza and Jolt cola and code in a frenzy. Don't worry, you can fix all the bugs when they come back from QA. Works for me anyway...
The sun is the same in a relative way, but you are shorter of breath and one day closer to death
I came to that realization about myself over the past few years, which is why I'm going through a career change right now. Couldn't be happier about leaving it behind.
-- I prefer the term "karma escort."
You're probably just joking, but.... If you find that you are completely uninterested in every aspect of your job, then yes, you probably should think about a career change. Honestly, if you dislike your job that much, you'll probably be a much happier person if you find some other way to make a living.
rub one out, then get back to coding.
The question of whether a computer can think is no more interesting than the question of whether a submarine can swim.
Go beg for change at a busy intersection for ten minutes. If that doesn't motivate you, nothing will.
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.
Whenever I can't really concentrate I put my head phones on, helps me focus on what I'm doing. Something really fast paced works best for me because it doesn't afford laid back mind wandering (like Rise Against, Alensa, Atreyu, and of course Machinae Supremacy)....it puts me in "rock out" mode....except its just me...rocking out to coding...err..I'm such a dork. But really, moving from the desktop speakers to headphones for a few hours really helps me.
neorush
When this happens to me, it's usually because either (1) I've done the design and I'm at a point where things are becoming mechanical, or (2) I'm blocked in the design phase by some sort of circular dilemma. I need to do two things. First, get away from the project for a few days. Second, use the time away to learn something new.
When I get blocked and can't work on a project, I tend to do meaningless things. Surf the web, reading various news sites. Check my email over and over and over, I do things instead of working to pretend that I'm taking a short break, and that I'll get back to it right after I check xkcd one more time, in case it's not REALLY Thursday.
If I'm going to be away from the project, I need to be really away from it, and away from the computer completely. I go and buy a dead tree book about programming, or a new language, and spend some time reading. I'll usually find a technique that is interesting, and get interested in coding again.
--I'm so big, my sig has its own sig.
-- See?
> Given that Michael Jackson died a few hours ago, I would pick another image.
You really don't think the OP knew this?
I go through exactly the same thing, and I have no real solutions, but here are some things I sometimes try:
- Try doing something creative outside programming. Do you play an instrument? I sometimes take a hiatus and concentrate on learning a new piece. Or compose something.
- Try doing something you don't know how to do, but always wanted to. I always wanted to write a short story, but my writing skills are horrible. I try sometimes, and I always fail. But it sure does make me want to return to something I *am* good at.
- Try reading some interesting books.
Try anything. Eventually, you'll throw an exception and restart your process.
uh am i the only one getting a sarcastic vibe from grandparent? it actually feels like pretty plain and direct sarcasm even, although it kinda misses the point of this topic.
and i agree that it can be a good idea to just start writing whatever you feel like sometimes, don't think just go for it, get fast and ugly results. if it helps you get over the whole 'it's such a huge thing in my head and i really don't feel like systematically writing this all out' everything is allowed. you can always come back and delete or change it, not writing anything on the other hand is not gonna get you anywhere (unless you have guys to code of course).
You have project meetings?
Every time I start to have faith in humanity, I ruin it by driving to work between 7 and 8 am.
Learn to understand your moods. It took me ages to realise that I have "thinking" moods and "doing" moods, and they're not really interchangeable:
Great insightful designs, or even just a clear understand of what needs to be done and in what order, usually comes to me when I'm relaxed, and often when I'm away from the computer, possibly hiking or something like that. In that mood, however, I rarely actually want to drag myself back to the computer and implement stuff.. "Doing" moods, on the other hand, have a slight edginess to them, a need to make progress (or fear of not making it) which unfortunately tends to inhibit deeply creative thinking. The only solution is to make fairly detailed plans in thinking mode (and bludgeon myself into jotting them down if necessary), so that I know what I need to do in the next doing mood. Non-trivial problems that arise while "doing" have to be put off until the next "thinking" time, but it's a system that works for me.
Your ideal system will probably differ, but with a bit of introspection and practice, you can probably find it..
Just quit doing it.
Don't tell Lumberg.
Also knock down those cube walls, go fishing and hit on the hot chick.
'You been working for piece, now it's time to get a piece of what you've been working for!' (para. Benny Hill)
However you do it you must get away from the project for a period of time. Getting a piece of what you've been working for is always nice.
John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
Whatever personal reasons you have for the block are your own, and you'll have to deal with that yourself (boredom, burnout, etc.)
In the mean time, start writing out your code in near-final form on paper. I'm not talking design, I mean statement-for-statement.
Approach the computer. Kill email and the web browser. Maximize your editor, get rid of any file lists, error lists, status bar(s), and toolbars -- until you just have a plain white empty screen.
Sit up, have a drink (soda, tea, whatever relaxes you). You've already done the hard part and fought both demons (the code and the computer). Relax for a minute.
Type the code in. Treat it as a typewriter with glass paper.
Save the file. Close it up and bring up a new blank document.
Leave your chair, go somewhere else, and write out your next chunk of code.
Relax a bit.
Go back to the computer.
Repeat as needed.
Eventually, you'll have to compile the thing, but just worry about syntax errors for now.
Pencil-paper are best for debugging, so use them! It'll be faster than when you're on the computer, and you can basically program the same way most of our parents did: input program, wait a few days for it to run, analyze output. Repeat.
Care about electronic freedom? Consider donating to the EFF!
Solo coding is tricky because you're working in a vacuum. Pull someone else in to put some accountability and focus your direction. You don't need pair programming, but having to explain to someone what the next step is really makes it clear what the next step is.
You can't face the whole project, fine. Break it down to pieces so small that you can face up to one of them. Find something that takes a minute to do. Surely you can force yourself to spend a minute with it. Take a brief break and then do something else that takes a minute or two. Do two of those before taking another break. Put enough of these small pieces together until you've reached a milestone of say 10% of the project. If not 10%, how about 5%. Suddenly this thing is underway, which it wasn't before. If you can do 10%, then you can push through to the next 10%. Suddenly this task isn't so completely overwhelming. Continue all of the above in small steps that you know you can accomplish with the energy and motivation you have and suddenly it will be completed.
"It's the height of ridiculousness to say for those 9 lines you get hundreds of millions."
We all got the sarcasm. We preferred to focus on the kernel of truth it had inside. ;-)
I ain't really a developer... just a musician. And whenever I have trouble finishing a song, I open up a digital implementation of the Oblique Strategies. The advice they give is pretty vague, so they might be able to help you developers too...though I'd imagine you folks would need your own deck, suited to your field. Should break mental blocks of all sorts.
Also, have you tried meditation?
An easy way to get motivated for writing code is to write code you don't absolutely need to write but, enjoy writing. Do programming challenges, find some part of your OS that has never worked just how you wanted it to and change it, help people on programming forums, etc. When I get stuck on a bug, I find that most of the time, just a 10 minute cigarette break helps me find the answer or at least revitalizes me. For bigger Developer Blocks, doing something completely unrelated but still coding has been very useful to me in the past.
Have someone else look at your code or design. Most likely, they will suggest something that could be done better, or in other ways.
Other people in your organization have seen similar problems before.
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.
.
is to take a walk. Hopefully, you have a scenic random route you can walk. The random imagery of the walk "primes" the brain. Try not talking the same walk for this purpose, but sort of pick random directions. Ten minutes of this should really help you focus.
Any guest worker system is indistinguishable from indentured servitude.
Every time I'm in that predicament, its because I am trying to code too early.
Sit down and design each module, each interface, each file, and then the next steps will become obvious.
Sig Battery depleted. Reverting to safe mode.
I get out the headphones and listen to some music, depending on the mood I'm in sometimes it's NWA, sometimes it's Tori Amos, whatever works. I find it's also best to make a list of goals, I am using Mantis right now to track the goals. Short of that, sometimes a rum & coke helps. If none of that gets me going .... eff it! Play Call of Duty.
Just continue staring at your screen pretending to work. Eventually management will change priorities and the project will killed anyway through no fault of your own. When the next project gets assigned, repeat.
If you don't have goals set (even if you have allowed them to slide), setting them with the use of some type of tool can get you inspired again.
Ask yourself:
What is the itch you're scratching? Do you still have it?
Am I on track with the goals I have set for myself, no matter how soft?
Do I need to refactor and "Do Things Better" (TM)?
If you haven't relit your fire, it may not be time. Something in your life may be wedging in.
It sounds like you need to grab a Venti Americano and have a good discussion with the group about what you want to accomplish (set a timeframe). Then sit down with another coder and start haqqing away. It doesn't matter if you start coding absolute garbage, just get it flowing. Don't worry about best practices or getting it perfect, that can come later - just make code. If it stinks, replace it with a prettier version next time around. I usually get coders block from a lack of stimulation.. if the project is not interesting/stimulating enough, you may need some synthetic supplimentation (ie. C8-H10-N4-O2).
Eat some cruel negative calorie vegetables like cellery and carrots as this will cause your body to metabolize fat and release endorphins while creating natural o-zone which results in a slight euphoric/un-burdening countenance. It's easy to write code that way.
Your ideas intrigue me and I would like to subscribe to your newsletter.
Do not mock my vision of impractical footwear
Get yourself an enormous piece of paper (butcher paper, or something from an art store), and make a big drawing, in pencil, of the entire project and how everything will fit together. Do it at an appropriate detail level to fill a good portion of the paper.
This has multiple benefits... it gets all your ideas written down, it gets the project organized (and helps identify potential problems before they're in code), it makes for nicely visible pieces of a larger puzzle, and, perhaps most importantly, it gets you away from the computer where you have coder's block.
The one best piece of code I've ever written, which had all sorts of interprocess communication and synchronization problems to overcome, etc., I started with a big drawing, which lent itself very nicely to a fully pseudocoded skeleton of the program (fully doxygened and line-by-line commented before any code went in), followed by the actual code, which practically wrote itself at that point. Not only did this keep the process going, but it also helped me eliminate and compensate for a whole bunch of technical and design issues, before I had even written the code that I would have had to fix. After addressing a few rogue syntax errors, the program ran correctly the first time.
Unfortunately, while effective, this process left me completely spent. Having written what was, by my standards, a perfect piece of code, I saw little further for me to accomplish in my career, and I was especially devastated when I saw that it was fairly likely that my contribution would not make it into the final product. A mere shell of a programmer remained, and I have steadily lost interest in programming since. I'm enrolling in graduate school for music in the fall.
-- I prefer the term "karma escort."
Good programmers are, IMHO, natural perfectionists. We all want to write perfect code. We want to write code that anticipates every possible situation and, even in the worst case scenario, handle things gracefully. It's worth waiting another day because your code will then be that much better with a little more planning...
Sometimes it's not about being perfect however, it's just about getting it done (wait, they paid what for myspace?!!?!). Just tell yourself that you need to get something up, and that you'll improve it later. Most likely, you'll never look at that code again but who cares, it's all about tricking yourself into accepting 'mediocrity' (reality?). But you will, more often than you think, surprise yourself and end up writing code you are proud of.
Either that, or you're being a bitch and think you're too good a programmer to spend time writing 'these mundane' solutions. In that case, suck it up or shut up.
There is some GREAT advice buried in the depths of this thread. One near the very top ( GREAT ADVICE ) is particularly good.
You left no details as to what it is you normally end up doing instead of work but I have found a good way to concentrate on what actually needs to be done once you have a clear idea of what you are going to be working on (which is seems you can get this far) is to work on a computer that is NOT connected to the internet. I can't tell you how many times email, StumbleUpon, and various other net related activities have kept me from doing work even when motivated to do that work.
As a director of a software development organization, I won't be popular for saying this. But... it is your boss' fault. Not yours.
You simply aren't motivated. I want to slap the person somewhere in another post who said... "motivation comes from within". It *rarely* comes from within.
When one of my managers or peers comes to me and complains about "unfocused" or "unmotivated" employees, I tell them to get off their collective ass and motivate their team or their employee. Psychologically, as an employee, you should feel driven by your surroundings to achieve a goal. That feeling should be driven by your team, your boss, your organization.
Being "self-motivated" is the single, biggest path to burnout in existence. Don't even begin to blame yourself.
Here is what I would recommend. Go to your manager. Tell your manager that you simply aren't feeling very motivated about the work you are doing. Have an open and honest conversation about it. You might be surprised. Your boss might actually bring some out some of the motivational mojo that you need. If your boss doesn't come through for you, then think about going to another organization.
But don't quit programming. You probably love it and you probably are pretty decent at it. You just need to be motivated, that's all.
Did his joke make you feel Bad? Was it Dangerous? or just to Off The Wall?
When he has his funeral, will you feel like you Got To be There?
Clearly, you feel he will go down in History, but not for being Invincible.
I guess you will say goodbye Forever, Michael it's be a real Thriller.
Well, there will always be the music and me.
Damn, I wish you were named Ben.
Did I miss one?
Sorry for AC apparently I posted too much.
Vyvanse is a controlled release adderall. I had it prescribed to me about 2 years ago. The stuff truly rocks. You become focused as a laser beam, creativity goes up too. Being an amphetamine I lost some weight while on it as well.
(1) Get out and go for a long walk. Sometimes it helps clear my head.
(2) Sometimes my mental blocks occur because I can't seem to solve a design problem because mentally it's just gotten to big for me to hold in my brain. Re-examine assumptions and try to simplify--while you're out walking, of course.
(3) Take a day off, and give yourself permission not to look at the problem for that day. If you're sitting there not working, you may as well go have fun--you'll accomplish just as much and you'll feel better.
(4) The two things that get me excited again is watching a good science fiction movie, and listening to music like Supertramp and Rush. Your own turn-ons will probably be different than mine--but sometimes getting excited about something else then bleeds back into being excited about what I do.
For me, I only write great software when I'm excited about writing great software. All of the management tricks, facing reality tricks and the like don't mean squat if I'm not excited and refreshed and relaxed.
Remove the browser icon from your desktop - make sure you can't just do a quick twitch to your favorite distraction.
Play loud, repetitive music through wired headphones. This cuts distractions, gives you something to do during compiles, and tethers you to your desk all at once. I'm partial to Philip Glass and VNV Nation.
Work on a test suite that exercises the code you already have. You'll discover new things about your code - and once you have a decent set of tests in place, you'll be able to dive in and refactor large chunks of code that you'd otherwise feel reluctant to touch. Once you've done that - write some tests for some new functionality your code should have. For some reason writing test cases has a slightly lower 'get started' barrier for me - and the rest flows.
I sit there and I just can't concentrate... Have any other Slashdotters run into this and if so how did you get out of it?
Ritalin is the cure. Tell your doctor you can't concentrate and he'll give you a prescription. Amphetamines are a tightly controlled substance now so the pharmaceutical companies developed Ritalin to get around the prohibitions. Don't worry Ritalin is almost chemically identical to amphetamine, so you are getting the same type of brain boost that the historically recreational drug achieves.
This is more likely to be what they call 'fear'. Fear of the unknown, etc etc. It usually means you haven't done enough research yet. That means either learning about what you're supposed to be coding, or the tools, or the libraries... Or taking the time to stop and plan everything out better.
If you don't know where you're going, it's awful hard to get there.
"If you make people think they're thinking, they'll love you; But if you really make them think, they'll hate you." - DM
I run into that sometimes. It's called "burnout". It's common, and it doesn't mean you're a bad developer. I deal with it by going and working on something fun and interesting, but still working. Secretly write a game or something, ideally in another language.
Richard Feynmann went and did creative things from time to time, and got some of his best ideas during his goof-off time. It's actually why people in academia have sabbaticals. Give yourself a sabbatical, some time to do whatever you want. Once I wrote a bootable CD-ROM that would play a Star Wars movie on a text display. I had to learn some assembly in the process, and learned all about boot sectors and boot loaders and memory models and things in the process.
You might feel like you can't take that time, your employer won't let you. That may be true, but it may not be. Lots of employees pretend to accomplish things and don't really. Most developers are really only truly productive a handful of hours per week anyway. If you think about it, you can still hold down your job without doing that much great work. may as well do the bare minimum, then really do what you want with the rest of your time. Hopefully that'll recharge your batteries and soon you'll be able to come back full force and hit your to do items with passion.
Picasso said, inspiration will find us, but it has to find us working.
Granted, I haven't coded since Uni days, but the best way, on my many projects, to progress was to get some of my colleagues to comment on my progress so far. It works wonders. They always pick on something or find a bug that I've passed over many times without noticing. Once the minor niggly bits get discovered, the project usually progressed very well.
I am a strong believer that shared projects are much better than "single handed" projects.
Ballmer Peak
Sometimes I can't get coding because there are just too many ways to write the code, or there are too many conflicting requirements or whatever. The solution is not clear in my head. So I write the solution in paragraph form, or bulleted list form. I write in English. This dovetails with a lot of other excellent suggestions that you break down the work into little bits. Break it down in English (or your natural writing language, mine just happens to be English).
Most of the time, as you stare at the resulting list, you think about a few of the items "I can do that in 5 minutes, it's simple". Almost reflexively, you start coding.
Then, as suggested above, tick off the bullets as you get them done.
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.
But if it is for a project for money, you might find this brings tears to your eyes:
"Code Monkey"
http://www.youtube.com/watch?v=v4Wy7gRGgeA
If so, rethink your working situation if you can. If not, well, things could be worse. You could have no job and bills to pay.
Lots of great suggestions here, BTW.
A 21st century issue: the irony of technologies of abundance in the hands of those still thinking in terms of scarcity.
I suspect we've all been there... even right now, I have a project I'm very passionate about, yet I find myself watching movies I've TiVo'd or just playing Rock Band or whatever.
The key for more is late nights... it seems like I can't really do much coding any more until the clock strikes midnight (my own projects I mean... I'm just fine during the day on the job). For me, some nice, cool summer air coming through the window, some Pepsi Max at my side and some tunes cranked as loud as possible that time of night and I can usually get started.
The good news, for me at least, is that once I get started I find I have to force myself to stop! I'm very much a "groove" code monkey, momentum is a big part of it, which is another reason the late-night sessions are great: no distractions to stop me until I WANT to stop (or until my eyes are bleeding from being way too tired).
The best advice I have is just site down and start typing. Don't over-plan, don't over-reach, just pick a relatively small part of your project that offers at least some challenge, even if you have no idea how you're going to pull it off, and start... if you're anything like me, after about five minutes, even if the results aren't quite right, you'll be chugging along and will have broken through your lethargy.
If a pion (n-) collides with a proton in the woods & noone is there to hear it, does lamdba decay into the source pa
I, too, am sole developer on two huge projects. What you describe happens to me sometimes, too. I'm assuming that you're referring to those "stalls" that can last for days, and not simply battle fatigue.
I have found that the following things help me:
1. Pick out something very small and very simple to accomplish, and do it. Don't worry if it's not on the mainstream of the effort. What's important is to move forward. That relieves some of that horrible inner pressure that builds up when stuck for too long.
2. If that fails, try creating on or more small experiments for yourself, regarding things that you're curious about or things that have been particular troublespots. These can bring great joy and release the flow for you.
3. If these things fail, be productive doing something else altogether. Don't worry about wasting time, because you weren't moving forward anyway. This, too, can start a flow.
Remember, friend, that in a time of famine, a small harvest is better than none. Do not despise small accomplishments.
Peace---
I get this at times too. Over the years I've come to realize that what it really indicates is that I don't actually know what to code. Oh, I think I do, as in, I have a good idea of what I want the result to be. What I don't know is the path to get there. Put quite simply, the feature I want to implement is too big to just "wing" on the fly, because it feels intimidating.
If I sit down and take the time to actually design it and break it up into smaller components it becomes more manageable, and as a result it's no longer intimidating. With that out of the way, I regain the "spark" to want to sit down and get it done. Don't know if this will help you, but it certainly works for me.
Often when I reach the state you've described, it can mean I am over-complicating the solution I am working on. For instance, maybe you are trying to implement something complex, but already provided in your software stack or a free library. For instance, maybe you are trying to parse text files by hand when a regex might be more appropriate.
If you have a lot of projects going on, task switching to something else often will give me an epiphany about something completely unrelated.
Sometimes, the solution to a complex problem can come in a dream too. Once in a while I'll start seeing data structures in a way that makes a lot more sense and the code to match will follow naturally the next day.
This behavior modification technique assumes that you do want to work, you just need some situational motivation. Put a rubber band on your wrist. Start working. as soon as you stop working pull the rubber band and release, giving yourself a good sting. If this doesn't get you back to work, pull harder or get a bigger rubber band - or both. Repeat as often as necessary. What if you can't start working? Zap yourself every 10 seconds until you do.
So, most of the "thinking" and "unblocking" can be done on the toilet seat or at a coffee shop. If you are in front of your computer and are required to work, or you just need to get stuff done, it's good to get methodical, and shut your blocked brain off for a bit. Like:
i) Comment. Review and explain yourself where you haven't before.
ii) Organize. Look over the names, rearrange your files, clean up some messy lines.
iii) Debug. There is never enough time to test and debug.
iv) List Tasks. Prioritize and serialize your tasks, and plan a coding route. Just follow it.
To focus:
i) Get a big timer. Set it for 15 minutes and just work. Rest for 15 minutes. Then work, adjusting the minutes. You probably will only need one or two cycles to get your head straight, if you really aren't that tired. Else,
ii) Walk around. Be it in circles or around the block. It helps your blood flow. Caffeine before the walk can help too.
iii) Sleep. In a comfortable position. You don't want to wake up still tired.
iv) If the computer screen is what is bothering you, then resort to your pen and paper.
Hope this helps some.
When this happens to me I just imagine my wife and children living under a bridge. It's amazing how motivated I get to grind out the code. Hmm. If you don't like your wife and kids you might check the next post.
-CZ
I notice that pot is already tagged, but I'm not sure we need a mashup between your project and the Amazon bestsellers that come up for a search of "woah."
Quit. You're not doing yourself or anyone else any good and eventually you will be fired.
A few things that have helped me-
1. Read something short but interesting, for example the book "What is your dangerous idea?" has ideas in a few short pages that will make you start thinking.
2. Watch something from HOPE, TED, a short Google Talk etc
3. Search Sourceforge for a project that does something similar to the code you are working on, look at the code and think how it is similar and different from what you are working on.
Any sufficiently advanced man is indistinguishable from God
it's not clear to me (sorry if i've missed some info somewhere) whether this is paid work or not.
if it's a personal project, then one option is to take a break. i've been writing software for way too long (20 years?) and in that time have nearly always programmed in my free time, but there was a period of about a year when i felt burn out and spent my free time building electronics and learning bass guitar.
another option - one that is possible if it's a personal project and may also be possible (perhaps with some negotiation) if it's paid - is so switch focus. sometimes, for example, writing documentation can give you a new view on a project that gets you back working. i am currently working on a parser (called lepl) and whenever i work on documentation i end up with a whole pile of new ideas.
related to that - dog fooding. can you use the software you are developing in some way? that can motivate you to add a feature that would really help you out. similarly, getting a release out. particularly if it's open source (or a free beta?) - feedback from other people is motivating and helps highlight the most important features (which might not be what you were expecting).
at the same time - trust yourself. my guess is that you've not been programming that long. these things always come in cycles. once you've been through a few it's much easier to just take it easy, knowing that the drive will come back. i'm lucky in that i work from home - there are days when i do almost nothing but eat, sleep and surf the web (and there are many more days when i work my ass off - the idea is that there's give and take, it's a two sided deal....)
finally, look after yourself. look at what you're eating, how well you're sleeping, whether you're getting enough exercise. perhaps take a personal day and do something interesting.
http://www.acooke.org
you'll get around the programmer's block eventually. You'll have to figure out why you got stuck and unstuck yourself.
Meditation helps, you might want to read a book or take a class on meditation. Even if you aren't religious, meditation and even biofeedback can help you get back control of your mind and body. Visualize that you are in a safe place like on vacation to a place you'd like to go, or just think of a blank sheet of paper if you cannot think of anything creative, this will help to free your mind.
If you are stuck on one part of the program, move on to another part, sometimes even working on a different software project or even documentation of code can help get your mind back on the stuck project. For example work on the database part or user documentation and when you feel better you can get back to writing code. Look over your code for errors and do error trapping if you are stuck, not only will it unstuck you but it will help improve the quality of your code.
Don't be afraid to ask coworkers and managers for help, if they are good people they will be helping you out, if they are not helping maybe you aren't in the right place as a programmer needs support and tools to get the job done. I've been able to help others out when they got stuck, but not everyone shared the favor with me when I got stuck, so I had to develop ways to get unstuck myself.
Having a mental illness can cause panic attacks and depression and negative thoughts that lead to problems coding and programmer's block. Try thinking positive things and every time you have a negative thought, counter it with a positive one. Sometimes you have to take a mental health break and go for a walk, or get something to eat or drink, but be careful not to eat and drink too much.
Like Mozart, I too developed a method that helps me think and code. I don't want to share it as I am going to make it part of a book I am writing. But you need to find your own way to develop a method to help you think and code, as my way or anyone else's way may not work for you.
Sometimes work is filled with distractions, coworkers singing or making noise, printers sounding like World War III and constantly printing out reports, etc, invest in a set of ear plugs to drown out background noise so you can concentrate if the noise gets to you. I used to use earphones but then people think I am listening to music, but I think ear plugs are a better choice.
Good luck, and I hope something in my post helps you.
Remember, Slashdot does not have a -1 disagree moderation, and no, troll, flamebait, and overrated are not substitutes.
What worked for me (and I'm assuming the original question refers to a personal project) is to start working with someone else wanting to achieve a similar goal.
Meet once a week. Analyze what you've accomplished over the last week. Outline what you're going to do over the next week.
Don't spend the meeting doing too much project design/planning--delegate that to be done over the week, then discuss it via email or during the meeting.
The accountability helps, but what really helps is having someone else who actually cares about the project enough to provide feedback, interest, and support.
You just have to unwind every once in a while. I am a licensed sailplane pilot, and on a good weekend, I take my problems five or six thousand feet into the sky. I tell myself I'll think about them, but I'm always too busy trying to find thermals. Somehow it always helps though.
Find something you like to do and do it. Programming doesn't count.
<sig> </sig>
I have no problem doing work at work, or even if I am allowed to work at home. When I am "on the clock" I work, reply to emails quickly and make incremental progress on projects. I find it helpful to make lists of things to do, and easy to avoid the "coder's block" of which you speak. At home, however, it is a different story!
At work, I tend to work on similar type stuff all the time, and I am paid to do that, so I do not complain. However, in order to keep a fresh skillset, I try to do projects outside of work. Even if they are toy projects, I think they are valuable if I am getting familiar with a new language, etc. I think this type of work is *very* challenging, and I get hit with "coder's/developers/learners block" whatever you want to call it all the time. Learn Android or work on a Ruby on Rails website? Improve C programming skills, or learn a cool PHP framework? Finding focus in a vacuum I find is quite difficult. My recent strategy has been to work on something personal, but sort of tangentially related to work. We'll see how that works out.
Software is part creativity (e.g. design, architecture, misc problem solving) and part busy work (e.g. filling out methods and entering domain table data). Some people are better at one part or the other.
Personally, I find that the busy work part is straight forward and easy, requiring no brain thought, but is also boring and unmotivating. To do it, I just have to buckle down and start filling things out line by line, data point by data point, method by method, taking frequent 5 minute breaks of doing something fun to keep from getting burnt.
The creativity part can be tougher. When there are problems to be solved and the creativity stops, what do you do?
The first thing I do on *any* project is break it into a bunch of modules, and then break those modules into their components, and so on. I can then outline the behavior of each piece, and usually that is enough. Like I learned form "What About Bob?", baby steps often helps.
Sometimes, however, (or often, if you are me) a problem will need real thought. The problem is complex and the solution isn't a straight forward application of the design patterns you already know. It can take a lot of creativity to work through these. In cases where I feel stuck, there are a few things that often do the trick for me:
1. I find *someone* to talk it over with. The more they know how to code, the better. That being said, often just having to explain the problem to anyone that will listen will be enough to clarify what the problem really is, and the solution will dawn on you.
2. In the complete absence of a willing participant (and if you feel stupid describing it to a teddy bear), write out an outline of the *complete* problem, and a first stab of how you might be able to solve it. Then write what is wrong with it. Repeat.
3. Sometimes the issue is that you are in a stale environment. I've had times where I sit at my desk all day and can't get anywhere on a problem and cut out early from frustration, just to find that the solution comes to me while driving home listening to news radio. In other words, sometimes going for a drive or a walk--some place where you can change environment and relax and think about nothing--is enough to make you think. :)
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.
There are many reasons for programmer's block, but here are some things that help me:
1) Get up and walk around.
2) Do something else for a while. My mind is always wandering, providing unexpected answers at unexpected times. Focusing on a completely unrelated task frequently refreshes my ability to think about the original problem, and also frequently causes at least part of the solution to spontaneously present itself.
3) Focus on one small, trivial aspect of one problem. This could be writing just one function that you know will be needed at some point. This will move your project forward, and will eventually get you past your mental block. I find this happening when I have to deal with features that aren't fun to write or think about, but that are crucial to the project. The culprit is usually impatience.
Any good writer (and probably some bad ones too) would tell you that the fastest way to get through writer's block is to sit down and write. Write anything. It doesn't matter what. I'm not sure how well this translates to coding, but I'm sure it beats asking Slashdot, which strikes me as somewhat lazy.
I'm currently having a similar problem writing my thesis. Luckily, the bit I'm onto at the moment is the "big thing" that I've been working on, but it's still hard to get cracking on writing. Here's a little snippet:
A multi-marker approach for quantifying genetic variation has been
demonstrated, using an ideal model population for this task. The
benefit of using multiple markers has been previously shown by
\citet{marchini05}, who found that a multi-marker approach will
generate more informative results, even after considering the
multiple-testing cost. The approach here has used a bootstrapping
method, which may help in the removal of false positive signal that is
common in GWAS \citep[][see]{wellcome07,healy06}.
I've had a go at trying to think through reasons for my writing block, and have narrowed it down to the following:
I suppose I could keep going for another hour or so, but I have a thesis to write.
Ask me about repetitive DNA
That may be true of his first paintings as a kid, his father didn't want him to paint, but after a friend of the family purchased one of his paintings (a dragon on a shield he had given his dad). His father enrolled him as an apprentice under a Master painter, and there I'm pretty sure he was told to paint.
Never underestimate the structure of a class, a workplace, the pressure of your peers, and/or the structure of a pair programming partner. I know I may be a flawed programmer in that respect, but I do my best work when I have *some* structure at least.
I've resorted to using the Pomodoro Technique to get into the flow of coding if I get stuck. http://www.pomodorotechnique.com/ To summarize, work for 25 minutes followed by a 5 minute break. That way you can get something done then post on /. During the 25 minutes though, there can be no distractions, so set yourself to busy on IM, close the browser, silence your cell, etc. If there is an external or internal interruption, make note of it and put it off till the 5 minute break comes up. This has really worked for me, in tracking interruptions, I've found that I'm interrupted every 5 minutes throughout the day on average. Putting off replying to IMs hasn't caused any work issues but it has let me concentrate on what I'm doing. The alternative is to use the distraction as an excuse to not work on something, which is how I used to fill my day.
When I was a few years out of college I started to have issues concentrating, completing tasks, doing my work properly, and (At times) socializing at all. This was a complete 180 from how I had been in the past. I went to a doctor and he started asking me all sorts of questions ranging from my sleep schedule to my diet, to my sex drive. He told me of other cases he had that were similar and in different patients had found things like diabetes, Sleep Apnea, really low testosterone levels, even a young man with a brain tumor.
Turns out I must have been depressed or something. The doctor ran tests on me and couldn't find anything definitive. He was a little vexed but did believe I was being truthful about my symptoms. I know the drug has somewhat of a stigma about it but I ended up being prescribed Provigil. It got my back on track doing good work, being able to hang out with friends, and enjoying life once again.
For whatever reason, I find that an overload of diet pop, specifically diet mountain dew can cause cognitive/concentration problems. Diet pop seems to rob me of my mental clarity. Also, try cleaning off your desk (down to the bare desk), turning off the radio/mp3 player, turning off the phone, closing the door, and turning off the computer. Get yourself a pencil and some paper and start designing e.g. (ERD, database layouts, flow chart,).
You didn't specify if this was a work project, but if it isn't, the message is clear: Take a fucking break! The human mind developed to work in cycles, not in constant-output mode. Change up the scenery a bit, forget all about your project. You'll be refreshed, have energy, a clear state of mind, and be able to jump back up on the horse when the time is right.
Computers are useless. They can only give you answers.
-- Pablo Picasso
Yes -- this is good advice to overcome conventional writer's block, too. The solution is usually explained to writers as follows:
If you suffer from writer's block when asked to write a story about your home town, write about a block of your home town. If that doesn't work, write about a building. Still nothing? A brick. At some point in this process, you'll find a start, the dam will burst (metaphorically), and you'll be on your way.
Like the donkey that starved between two bales of hay, most cases of writer's block are actually caused by having too much, rather than too little, to write about, and the brain stalls in trying to find the best way to start. By moving to the smallest possible component, this problem is overcome.
If you ask me. Slashdot is the anonymous coward. How dare it log me out without telling me! ;)
1) Try and create a list of the names of the classes you think your project will ultimately contain. 2) Then -- put them into categories that make sense (packages later on). Usually the effort to get these 2 steps done is minimal -- but provides just enough satisfaction to spark real productivity. If your creativity is still not sparked; 3) revisit the list of classes you made and try to list method signatures for each class
Rob Enderle's excellent new book: Everything I needed to know about Computer Science I learned in Marketing School
I need to write something and I technically know how to do it, just don't feel like it since it's going to be boring and tedious. What I have found out works well: learn a new language and while you're doing that make the program in that new language and tell yourself you are practicing the new language through the program.
I'm learning ObjC and after about a week it's going pretty well, I read the book while in the company gym and then I go back do some other stuff and then do the books' exercise. I would be comfortable enough to start off with a small number of classes for the core functionality already.
Custom electronics and digital signage for your business: www.evcircuits.com
It isn't clear to me whether this is a personal project or a work project. (I'm hoping with nothing done after 6 months, it's a personal project, but it might just be a minor item on a gargantuan corporate to-do list.)
I agree with those who've advised "changing things up" a bit. Exercise and/or play a musical instrument. If you already do, pick something new to try, where you have to learn a new motor skill. You'll get to use your brain in a different way. I recommend fire staff twirling (without the fire of course, at least to start) or juggling. Both of these require intense focus, like that required for coding, but it's a different context. Learning a musical instrument works for a lot of people, but didn't work for me; staff twirling on the other hand is just magic, for what it does for my concentration and, through the process of learning new tricks, determination and sense of forward motion.
I also agree with, find a buddy you can discuss this with on a regular basis. Maybe more than one buddy (a UI guy, and an algorithms, or database, or framework guy depending on what your project involves). This is probably easier to do for a personal project than for a work project unless you are on great terms with a coworker; most workplaces I've seen lately are very busy. It provides accountability plus, as another poster pointed out, that all-too-important voice of reason when you're stuck on a winding road and someone can point out the straight line you've missed. If this is a personal project and you think you have The Next Big Internet Idea and you don't want to cut someone else in, well, you either get it done or you don't. Your choice. If you don't do it, someone else will, and they might already be working on it indepedent of you. If it's a personal project, maybe you can farm part of it out to someone else to get it started? Even if it's The Next Big Idea and you don't want to talk about, maybe you can talk about PART of it without giving away the whole thing? If you have a sorta-technical-but-not-really friend, they can be good to bounce ideas off of -- if you can explain things in a way that they understand, then that is feedback to you that YOU understand.
If this is a personal project, for gods sake, LEAVE THE HOUSE! Take your notebook to the nearest coffee shop, shared-workspace office, pub, or wherever. I find that having life going on around me shuts off random thoughts that get in the way of getting things done sometimes. It sounds like you've already tried the reverse (alone, quiet), but if you haven't, try that, too. The "leave the house" strategy is particularly good, for me, for more rote-type activities, like keying in database schema that can be a bit repetitive and don't require much creative thought. For creative thought, I like to go hide, and often take breaks every couple of hours to keep myself fresh.
If this is a work project, change up your environment somehow. While working as a contractor a few years ago, I was doing a project involving several layers of components in multiple languages (ajax, server-side stuff, glue scripts, random on-the-fly generated script, build and verification tools). Debubgging it was not straightforward, complete with conferences with devs responsible for other components when there was an issue whose cause was not readily apparent. Although we were supposed to be butts-in-seats visible every hour we were on the clock, my management trusted me and I just sent them a note saying, "I'm going to go hide and get this done. I will be on premises, so technically still within the rules, but won't be on email, won't be easy to find and will have working code before Monday. If you absolutely need to know where I am, call my cell phone." As I recall, they had working code the Thursday before that Monday. Once I went into "war" mode, made things NOT like business as usual by finding another place to work for a cou
This quote is from a writer, but applies to programmers as well:
"Plumbers don't get plumber's block. Don't be self-indulgent. A page a day is a book a year." -- Howard Fast
I find the best way to avoid programmer's block is to work with someone else and depend on each other's work.
Writer's block and other kinds of creative blocks are very frequently rooted in the desire to make something perfect.
Give it up. No one has ever made something perfect, and you're not going to be the first.
Your god may be dead, but mine aren't!
Then use the 'pomodoro' technique. Work for 25 minutes (no interruptions, like email or /.), then take a five minute break. This type of time boxing helps you focus and get rolling.
Tell someone else what you'll get done today. :) Harness that ego all developers have built in.
Agile Artisans
Actually, the word developer implies change over time (and hacking/gluing lots of 3rd party stuff together--like a VB programmer). I'd prefer to get it right the first time and not have to massage it so much. Maybe the word you are looking for is 'engineer'. This captures better the idea of doing complete designs.
you are suffering from depression. when you stare at the computer screen aimlessly clicking through the interweb unable to focus on programming problems which should interest you, you're attempting to stimulate parts of your brain that have been permawired to get a little high every time you're dinking with the computer. it's not unlike beig a porn drug or alcohol addict or a rage-a-holic. Now if you'll excuse me, I am going to go drink some rageahol.
If you're reading Slashdot, you're not working.
If you're blogging you're not working.
If you're checking you're friend's posting on facebook, you're not working.
If you're surfing the internet, you're (probably) not working.
Got the idea yet? Good, now get back to work!
fsck -py /dev/ramdisk
"Don't let fools fool you. They are the clever ones."
Here's what I did:
1. Quit your job. You're obviously burnt out. You need 2-3 months of downtime if you're in it for the long haul.
2. Limit your unproductive internet browsing and email to 20-30 minutes a day. I.e. if you need to read documentation for something, that doesn't count toward the limit. This will be the hardest thing on the list. You will find that you now have immense amounts of free time and need to fill them with something.
3. Re-establish your sleep pattern. You should sleep no less than 8 hours a day, every day. Afternoon naps are great, too.
4. Exercise every day. Riding a bicycle is fine, as is running. If you can do free weights, that's even better.
5. All those hobby projects you've been putting off - do them. You have the time. Make sure you FINISH each project before starting on a new one.
6. After a while, try to start a software project just for yourself, whether it's a business idea, an iPhone app, a game, whatever. It must be interesting to you and challenging enough to keep your mind sharp. Don't force the pace. If you don't feel like doing it, fail fast and do something else.
After about a month or so, you'll be a different person, and your coding block will simply go away.
- Turn off theTV, laid down the YouTube, try avoiding the Internet if possible 8)
- If you feel like wandering, wander within the project: add a less useful feature but fun to implement
- Release often, or at least submit changes more often
- Write about the project. Getting even just a couple of people interested can make a big difference for your motivation..
"La presi e te la pagai (480.000 Lire)"
I need one activity: oral sex, lots of oral sex. That works the "block" out of me. No. I'm serious.
Among the best things i've ever done for my mental health were to learn to meditate and buy some backcountry camping stuff.
Get out of cellphone range, away from anything that might disturb you, take a book and a camera and leave it all behind.
Sadly i'm feeling very like the OP right now and just haven't found a suitable weekend to escape :(
I came across this article a few days ago and it's worth a read in this context.
http://www.joelonsoftware.com/articles/fog0000000339.html
Basically, this person's observation was: once he gets started, it's easy going, he's able to keep working; the key is to start as early in the day as possible on the real work.
Apart from this, from personal experience -
All the best for your project.
Can't see Hindi?
I love how 85% of comments on Slashdot are totally unhelpful and a waste of time. This developer is trying to do the right thing and get themselves motivated on their job, Slashdot and web sites in general are a distraction and they can also be an aid to a solution but 7 pages of 'get to work' and 'drink coffee' are using serious energy typing that in, for those that provided these types of comment, shuddup and go exercise! I don't think coding block is like writers block, writing a story usually comes from imagination and new ideas where coding comes from a logical progression to a solution. Break your tasks down into that logical progression; First find the solutions, what the tasks your trying to accomplish actually are, go back to the beginning, go back to the requirements list and re-work it, re-write it and go over these requirements again with somebody in the know, somebody who is open to discussion and can work together with you to re-understand what it is your trying to do. Break it down into parts, the functions, the challenges come first and the design, look and feel come later. We use Agile project methodology where we write those tasks on cards and the developers take them as items they can accomplish as simple steps, prioritise and go through to complete. It may seem silly but write up these tasks as line items on a list or separate pieces of paper. Have your testers contribute those cards to you also and then you will begin to get some workflow happening... Hey were moving... I hope this helps gives you some ideas and gets you moving beyond the blockage.
I am a solo developer on several projects and run into this often. I find that switching to another project for a bit or exploring new technologies and how they can be used helps, then after a short time you will get the urge to go back. You can also see what new feature you can add that requires doing something completely new (embed a scripting engine, add an exotic data structure, write a new parser, whatever fits) and see if that re-ignites it.
Lots of non-programmers think that the only thing programmers do all day is type code. And often, if they're your boss, they will not understand if you are sitting at your desk, eyes glazed, thinking. But "prior proper planning prevents piss-poor performance."
Thinking counts as part of your job. But don't think abstractly, put thoughts down on paper, maybe write some pseudocode to get the structure of the program down. Then begin (as a previous poster suggested) with a small task from the pseudocode, and code it up.
Seriously, if you can show that you're working on the problem (with pseudocode or other notes), often your boss will leave you alone and leave you get the coding done.
Nitewing '98
Everything works...in theory.
Right on. Wish I'd said that.
Nitewing '98
Everything works...in theory.
http://ask.slashdot.org/article.pl?sid=00/07/25/0329226
Slashdot = Sarcasm
..whether because you think your project will make the world a better place or just cause you think your coding style is gonna get you laid.[...]
So, I take it you're new to software development...
If I mod you up, it doesn't necessarily mean I agree with what you've said, sorry.
Very simple technique where you use a kitchen timer to focus hard for 25 minutes in a row. Works great!
http://blog.staffannoteberg.com/2008/02/22/pomodoro-technique-in-5-minutes/
http://www.pomodorotechnique.com/
Seriously,
Take a holiday.
That is a fascinating perspective. Does that mean I should look at employers looking for self-motivating employees the same way I might look at employees who want to get paid for doing nothing?
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
But in the end it doesn't matter who's fault it is. Project is not going forward and everybody gets unhappy and demotivated. So instead of blaming somebody I would try see how to fix the situation. If I could raise somebody's motivation to get the project done with reasonable amount of resources (I'm not talking about salary, it is proved that it is not a good motivator) or whatever then why wouldn't I? It would be a win-win situation for everyone.
This is what I detest in work. The juxtaposition between employee and employer or boss. It doesn't bring any good and could be fixed easily. But the change should come from management. As a employee, I don't feel like I'm in the position to start change things at the work all the sudden.
Btw. I've heard that manager should run the team "from the front". If that is true then it most certainly is manager's job to motivate his/her people! We, coders, aren't machines who can write lines and lines of code from day to day with the same speed and fervor, you know :)
And another just came to mind. The best boss I've ever had never really tried to be a boss. He just gave me tasks like "here is A, B and C that needs to be done, I'm counting on you." Then he got out of my way but he always was there to answer any technical questions I came up with. I felt really good to work for him because he trusted me allthought I didn't really like the company. I implemented A, B and C as good as I could just because this boss said he counted on me. Motivation can come from little things from time to time :)
You don't know what you don't know.
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"
Break the task down in to smaller and smaller pieces. Tiny pieces that can be completed fully in an hour or so.
Work on these pieces and give yourself a cookie(or read slashdot) when you complete them.
Human's tend toward least effort for most reward and short term rewards over long term rewards. You just need to apply a hack to this process. By making progress toward long term goals have short term rewards.
It's so a good idea not to tell people about what you are doing, the reward of having people already know how smart you are will decrease the need for you to actually complete the project to prove it.
Setup people that you will disappoint, make promises to other people that you have to keep, make sure that you actually believe they will be pissed off if you fail to deliver.
Human beings are motivated by the need to impress others. If something you're doing isn't going to impress your general laziness will decide it's not actually worth doing.
...and that is all I have to say about that.
http://jessta.id.au
Tidy your desk, or go code something else.
Confucius say, "Find worm in apple - bad. Find half a worm - worse."
Thanks for opening that subject. It might help me by reading the suggestions too.
Although the way I solved my problem was to stop coding when I wasn't in the mood. Which is hard because you usually want to push yourself to finish that project while it's always a fact that gaming or web surfing looks more appealing than doing mental work. What we are trying to do is find a way to work even if it's not exactly what pleases us right at the moment. When it's hobbyist computing you may be able to dismiss it but when it's some other more important thing with a deadline you just end up doing it all in a holy mess at the very end.
Yes, after 10 years that I wanted to be productive in the demoscene just for my personal need for honor and to cure my lack of self-esteem I end up being frustrated but said to myself I have made several mediocre demos, maybe not a really good one, but it's time to move on and do something else. Like playing oldschool rpgs :PPP
Actually does the project you are working on motivates you? Or you may wish to try something new but because the project is half finished and still appealing to be released because some of the public likes it you can't just abandon it?
Ahh,. coders block. Ask about motivations. Maybe the cure is to start something entirely new..
The "H-Word" has died for me.
This is a common and understandable problem, easily solved.
As we know software development is driven by requirements and features, and is a process of building something to meet the requirements while taking into account the issues, and this process is always motivated by some reason for achieving a feature.
You need to get yourself thinking about the issues and reasons for the decisions you've made in your design so far.
Having a simple document which walks you through the desires, the options, the issues and the decisions you've made on them so far will be all you need to boot your brain with the details necessary to start executing the development process, not least of which is your personal motivation for achieving a certain feature.
This is similar to the option someone gave above of talking to a friend, your documentation is your friend which includes sticking to the decisions you've made so far (important for progress).
Some recommendations have been to start with the small aspects, this is also taken into account here. The walk-through of your design should obvious start with simple premises and build up to more complicated rationale. There should always be a fairly simple motivation (rationale) for implementing a given feature, but often getting to that feature means booting yourself with the decisions that build up to that one...it's really just a matter of knowing the motivation for any unit of work, and that is an important aspect of system design that has not been well supported by the tools our industry has created for themselves.
Seriously, mod parent insightful, not funny. I actually did this at work (with 127.0.0.1) with all of my favourite sites. It really increased my productivity.
I'd find a bug and get in to the compile-debug-deit cycle. On each compile I'd read slashdot. Of course that increased the cycle from a minute to 10 or 15 minutes (or worse). That really wrecks productivity and then the motivation.
The nice thing about this technique is ou only need a little motivation to edit /etc/hosts file. Despite suffering the same block in the past, I have never edited it back. It's too many steps, and too much like admitting defeat. Sometimes (this is not 5 months later) I still flick to slashdot whenI start compiling. I get a nice little reminder to bump me back, and to be honest by that stage the compile's usually done.
SJW n. One who posts facts.
Just sit down with it, but instead of writing new code, clean it up, or add some tests around it. There are two benefits:
I have a similar problem: I have a project that I would really like to work on, but can find time only occasionally. I have found that coming back to it after a long time is very hard. I have my lists, but starting something is just formidable. So, I start by reading around, doing little stuff here and there and just cleaning it up, until I feel confident enough to do something.
And in general, it's very good to have your code thoroughly tested. Read about it here: http://manent-notes.blogspot.com/2008/08/developing-under-severe-time.html
There's, indeed, a LOT more to it than that. There are any number of things that may be blocking your creativity, but from the description I suspect burnout and/or depression. If you've been working a lot or are under a lot of stress (kids, too many hours, responsible position, people complaining to you a lot) your mind may simply be locked up. This is a panic reaction, a last defense mechanism for a mind running with hormonal imbalances. It will mean your cortisol is too high early on, then drops off at the time you need it most. Your body's stress response is worn out and depleted and needs time to regenerate. That's why burn-out victims are usually told to go home and do nothing for a year. It takes a LOT of time.
Ask yourself the following questions:
- Do I drink more than two cups of coffee every day? Too much caffeine will elevate cortisol and make you more sensitive to stress. Cut down on coffee and take Ginseng supplements - this will help your body restore its decreased cortisol capacity. I personally like green tea with ginseng. It takes a bit of time to switch, just do it gradually and you won't run into problems. Try to cut smoking and alcohol as well as much as you can.
- Can I work for a few hours only, and then feel like my mind "locks up"? This is definitely a stress sign. If that's the case, take a 10 minute break for a walk OUTSIDE, EVERY HOUR. (I mean it! I had the same problem, and an external management bureau with lots of hands-on experience gave us these tips, and they worked.) This will help you de-stress and over longer time will help reset your body's hormone system. Also: cut away any other stress factors. Are you busy two days a week helping your kids' soccer teams do their paperwork? Let it go. This will be difficult if you are indeed tottering near burnout - it makes you more emotional since your "logical" brain is less active - but it is vital. Also, do you jump out of your skin every time your mobile phone rings? Also a very strong indicator of stress. Be wary and get to know your own fear signs. If it is all too much, consider if you can let it all go and rest for at least half a year. The project will still be there then, or if you are overtaken by competition, there will be other projects. Rule one of life: we all want to feel good. Only then can we help others and be productive. If you're living only for others and don't feel good doing it, something is wrong. Some people - especially those with a large sense of responsibility - are extremely sensitive to stress, and you don't know for certain until you have crashed through and are well beyond your limits. That's what it took for me to realise something was wrong: I could barely do the dishes without being told how to do it. Don't let it get to that.
- Do I feel miserable? If so, that might indicate not only burnout, but also dysthemia/depression. GET PROFESSIONAL HELP. And I mean a real shrink, not just a psychologist. He can temporarily set you up on medication which will help you recuperate; after some time you can then build down and get rid of the meds once you're standing on your own feet again. But for the time being, medication is probably essential as a crutch. Note: it is of VITAL importance that you find one you're comfortable with; if you don't feel OK with the shrink after a few sessions, thank him/her and just tell them that you don't feel allright and try another one. It can take a few tries to find the right person.
- Do I sleep enough? If you're not getting at least 6 hours of clean sleep, you're probably stressed or burned out. I remember a "burning" feeling from that period and only sleepint 2-3 hours a night.
- Do I have a real work place, and are there distractions? I ran my own company for seven years, and in the beginning I worked from home. In doing so I could never really "get away" from it. Once I had an office outside the door it made a real difference: I went to the office to work, and psychologically that also did a trick - it set me into "work mode". I left the browse
A positive attitude may not solve all your problems, but it will annoy enough people to make it well worth the effort.
There is actually a rather good book available for $10.17 with free shipping on Amazon called "Last Child in the Woods" Perhaps everyone should read it simultaneously? I Saved: $4.78 or (32%)
I usually do the washing up - it's mindless, boring, and I can think about a lot of things while watching the wall in front of me and keeping my hands occupied ;)
I always find that when I start working on something, it's fun, it's a challenge. When I'm almost done with a project things slow down, get boring and getting things done is quite painful. The only solution is to force yourself into continuing, sometimes I tell myself that I'll just get this or this done, then I'll take a break or do something else. Other ways to speed up the process is trying to make it into a challenge again, but that is quite hard.
In some aspects I think you can compare it to riding on a ride in a park. The first times it's fun, but after 100 times on the same ride the fun wears off.
Find a partner. Programming in a team is a whole lot more motivating and productive than solo. You're forced to work to produce code if the other guy needs to integrate with it. You'll also get someone to bounce ideas off this can inspire and motivate. Set milestones and reward yourselves when you reach them.
Get out of the business... it's called boredom. I have - suddenly I don't just sit blankly in front of a computer all day. Life is good!
simple solution really ... stop smoking weed
Because, if you did, you wouldn't be blocked. You'd have a broken-out list of problems to solve, and you'd be solving them. If you're stuck on the enormity of a problem, decompose it until it's manageable. Even if you think you're hopelessly stuck, decomposing the problem into function-level bites gets your organized enough to start solving the problems.
Think about it this way: if you were taking a math test, would you really have arithmetic block, or would you attempt to solve as many as you can in the time allotted?
--#
I've been in a similar boat for a while, and the solutions have varied a lot.
Many comments so far talk about getting exercise and sleep - which can help immensely depending on you and your situation. What they are really addressing is your energy level and where it is focused. If you love vacations, meaning if you enjoy them and you'd be able to forget (even briefly) about what you're doing while you're there, then a vacation might be a more effective energy reset. However I've had and seen the problem where people don't note down where they are and what they're doing before leaving so getting back to it is even harder.
Sometimes making the lists external instead of keeping everything in your head can help. I keep a log of what I'm doing where I end up listing things I need to do in the future or be careful of and am putting an app together to help with all that. It has saved my sanity... but also got me let go from one job when a manager saw that I was swearing in it! I don't do that on logs for client projects now...
I agree that the 'doing it alone' part can be somewhere between detrimental and impossible - without either someone to bounce ideas off of or get any kind of feedback, your project becomes sysiphean and continually drains energy instead of replenishing it. Sourceforge needs a "Coding Project Advice Line" for open sourcing project feedback 8)
But another solution has sort-of been mentioned by others: the book Power of an Hour was a great read for me - the idea to divide your effort into 1-hour periods and have a prep/plan at the start, an evaluation at the end, and 10 minutes of time for non-work (non-effort) things helped me. Making plans and estimates on such a short term and then listing successes afterwards might help you see that you are progressing and help keep you from getting lost in the thousands of hours of time spent. However it has also been difficult for me just like Agile programming - if you don't consciously follow it (have a 40-minute timer! And set it!) you will tend back to your old patterns of just spending a lot of time coding instead of meta-coding.
Good luck to you!
What I do (I'm a sole developer working from my home office) when in that situation is to make a DETAILED list of up to 10 'next steps' in the project. These steps should be of the granularity of about an hour each. As you do each one, give yourself a little reward -- a walk about is good.
Did I miss one?
Keep it going..... Don't Stop 'Til (I) Get Enough.
I understand. I've been there myself. I have several different projects I like to work on, but struggled to find the time and motivation to work on them. Especially while balancing other stuff: day-job, family time, social life, chores, etc. I had a hard time sitting in front of a computer for 8+ hours for my day-job, then coming home and working on the computer some more. Plus, in the evenings, there are plenty of other interruptions and distractions.
So, I rearranged my daily schedule. Now, I wake up at 4AM (Seriously... There is a 4AM! It does exist!) and work from 4AM to about 6:30AM. It takes will power. It takes discipline. I've been doing this for 3+ years. Yes, there are still mornings when I want to roll over and stay in bed. But, I have been so much more productive on my own projects when the rest of the world is still sleeping, and before I have to deal with other people's schtuff. Your body wil adjust after a week or two, and it becomes easier.
Also, since some people at that time of morning have trouble thinking, you might want to plan what portion of your project you want to work on, so you can establish focus. Otherwise, you might find yourself Slashdotting and Facebooking at 4:03AM.
Urban Legions
I know this is a foreign concept to most slashies(dotters?), but in my experience, the best way to get out of coders block is to get a little messed up. My theory is that in coding, we often address a series of problems and that in turn generate more problems, expanding like tree. But what happens when the tree stops growing? Were left to go back and mull over our code in search of a loose end. The other block that I often run into is when designing a new and complex system. I'm often torn between two solutions and can't quite decide which is the best option. In both cases, I've hit a dead end in my thought process and continuing to think about it only causes frustration and headaches. The solution is to get your mind off the subject. As soon as you've completely forgotten about it, inspiration will come. Video games I find too consuming and my mind isn't left to wander. Drinking is good but it often requires the rest of your night and if overdone, can severely impede your progress the next day. By far, the best solution I've found is a little bit of the green stuff. Roughly 2 hours and your back in the game. I know many will dismiss the post because of this, but I'm just relaying what works for me. There is one point I can not over emphasize. DO NOT CODE WHILE UNDER THE INFLUENCE! Don't even look at the computer. Just write down some notes and come back to it when your in a proper state of mind.
Developers block, like writers block means you are out of ideas. You clearly stated you have plenty of ideas.
Your problem is motivation. If you've really been working on that project for six months, maybe it's time for a vacation.
If the vacation doesn't fix your motivation problem, then you may want to truly evaluate if you are suited to sole programmer work,
or if you are even suited to programming professionally.
For me, I'm able to work (programming or drywalling) best to music I'm -not- able to keep time by. That is, just certain styles of music that merge together so marking your life in 3-5min increments isn't possible. When Einstruzende Neu. comes up in the playlist when I'm trying to work, I'll usually skip it.. but when WinAmp is in a mode to play just my EBM or newer 'industrial' then it's all good. Alot of 'world music' also works well since the only thing that sticks in your brain is the patternized drumming; Opera and Classical only sometimes can fall into this mode, but very often Metal does.
----- The internet has given everyone the ability to have their voice heard equally as loud.. even if they shouldn't be
I don't believe anyone ever reads all of the replies to a posting like this, but just in case....
I work from home & like to build little models as a hobby. When I get to the point that I just don't want to code any more, I go into the hobby room & spend a bit of time building or painting something. While I'm doing that, I try to think of something appealing that needs coding as part of the overall progress required, and how I need to unit test that new piece. After an overnight (or two) break, I can generally get the oomph to start coding again.
If the motivation doesn't come back in a day or two, it's time for a serious break - do something else for a month. A river cruise up the Nile is a good holiday.
If you are working in an office, look for another job, nothing is worth the burnout. I made the mistake of continuing in a project for 18 months after I knew it was time to leave, and 2 years later I am still recovering my motivation (and sanity).
Usually when I run into blocks (like when I was writing a very light weight yet powerful, spelling-tolerant javascript search engine) I would go on a walk for about 15-20 minutes. If that still didn't work (which most of the time it did), I consulted my boss and/or google. If he had no idea how to put my ideas to paper (or google for that matter), I would sit upside-down in my office chair for about 5-10 minutes (that never helped, but it sure did pass 5-10 minutes and made my methodology for programming appear very foreign/entertaining for my co-workers). Then the weekend would come, and I would spend 2 days away from a computer and relaxing. This always put my head back in the game.
Step 1: Open VPN window/session to work and login.
Step 2: Minimize VPN window to return to your PC, open a browser to a good porn site
Step 3: Return to VPN window to check work e-mail
Step 4: Reward yourself by returning to your PC and reward yourself with a few pictures/short movie clips
Step 5: Return to VPN window to perform a task (look into a foreign key constraint, etc.)
Step 6: Repeat Step 4
Step 7: Repeat Steps 5 and 6 until your girlfriend/wife returns home.
Step 8: Fun times
Step 9: Return to VPN window, do 2 hours of good work and logoff for the day and go fire up the grill and turn on the Cubs game with a couple of ice cold Budweisers in tow.
Cubs win! Cubs win!
It's a simple question - Would you eat the moon if it were made of ribs?
I get it - you sit down at your workstation and seem to be able to find any number of things to do rather than code - read Slashdot, check the news, etc - and before you know it, it's lunch time. And after lunch, you figure why start now, half the day is shot....
All the suggestions I've read here such as "take a relaxing walk", "you might just be burned out", etc - are wussy excuses that won't get you back in gear. If you *really* want to get back to work, talk to your boss (if you have one), and work out a firm schedule of milestones that must be met on the road to completing the project - real milestones that involve demonstration of completed code or GUI. And then insist that they check up on you daily to determine your progress. But most important, make your job contingent on meeting those milestones.
Nothing focuses the mind like having your way of life on the line. When goofing off at work means that you lose your house, your car, and that big screen TV, and have to move back home with the parents - that's when you will learn whether you intend to be a contributing member of society or some welfare junkie that the rest of us carry.
Think your grandmother had days when she just didn't want to drive any more rivets into B29 bombers? Think she got advice to "take a long walk and clear your mind"? Please.
To paraphrase Patton, years from now when you are bouncing your grandchildren on your knee and they look up at you and ask "What did you do during the dawn of the great Information Age"? - you won't have to sigh and say "Well, I played World of Warcraft and wolfed down Fritos".
This is a common phenomenon to *all* creative endeavors - it is hard to be creative on demand.
You need to figure out what rituals encourage creativity. For me, I need to sit down at my desk first thing in the morning, check all my mail, check slashdot, etc. while drinking a cup of coffee. Ten minutes, tops, and I have removed every distraction that otherwise keeps me off of what I need to do. I quit every app that makes my dock bounce, turn off my cell phone, etc. I need a clear path to the Zone.
For your immediate problem, if you don't already have something specific to work on, I would say:
1) Pick up a book on some language you do not know. Ruby, Erlang, Scala, Groovy, etc. There are great titles at PragmaticBookshelf.com for all of them.
2) install everything you need on your computer, and disconnect from the net.
3) Find a quiet environment.
4) Learn.
Once you think you are out of your block, take your learning to a coffee shop. This is a great place to be able to retain focus when you need to, but also a place of great distraction (people watching, art on walls, coffee smells), when you need to take your brain out of gear for a minute.
If you don't have anything specific to work on, pick up a copy of Best of Ruby Quiz and start working through the problems. Musicians practice scales, marshall artists practice kadas, painters practice perspective... you should practice solving small problems.
A good friend of mine had trouble concentrating on programming, turned out he had leukemia and had less than three months left to live.
Once you've verified you are not at death's door, see a head shrink. In my experience writers block is a form of performance anxiety. It rarely applies to programming because so few people are likely to ever read your work no matter how inspired it is. So your anxiety is probably caused by something else in your life, something a head shrink can help you with. With programming you can reduce the problem to small steps that can be completed without any real inspiration. That kind of programming will not be as good as when you feel inspired but it will get the job done. When you worry about it not being your best work, remember that you can always improve the work later. I'm sure you've noticed in your career that the right way to solve the problem won't occur to you until after you've done it a number of the wrong ways first; get the wrong ways done now and learn more about the problem that way, better solutions will come to you.
What you need is focus. I have a hard time focusing if I'm even a little sleepy. When I was ten years younger I never got sleepy and I never had trouble staying focused, but now that I'm older and have kids sapping my energy during what used to be my "down" time, I have to struggle to keep my focus at work. Here are some tips that might help:
1) Go to bed early the night before. I know you're not used to it, but try it at least for a week.
2) Elevate your pulse to keep plenty of oxygen flowing to the brain. Exercising in the morning helps, but won't keep your pulse up all day, so take a few short breaks during the day to walk around a bit.
3) Coffee if you can stand it, Mountain Dew if you can't.
4) Play background music. Try to find music that's fast enough to keep the pulse elevated a little, but play it quietly enough that it won't break your concentration. I often play music so quietly that I can barely hear it when programming. Avoid radio stations because the break in flow during commercials will break your focus.
5) When writing something new (a document, an article, a program), getting started is often downright painful. Once you get past the first paragraph/section/class, things flow smoothly for a while. Every now and then you get stuck again, and when you're stuck, you usually just have to force your way through it. Sometimes it's better to skip the part you're stuck on and work on something else for a while, but when you're just getting started, you usually have to force your way through it.
6) Create a set of really small tasks with short deadlines. If your boss isn't putting pressure on you to get something done by the end of the week, put a little pressure on yourself. Zero stress often equates to zero motivation to get things done quickly. It is far better to stress yourself out a little than to be fired later because you worked for months with nothing to show for it. ;-)
Most exciting project in the world and all I could do was play solitaire. Game, after game, after game of solitaire. Why was this happening to me?
That started a long journey of discovery. After talking to several doctors, and a shrink, I learned several things. I learned that on the Myers-Briggs scale I am an INTP, heavy, very heavy on the Introvert, light, very light on the Proceeding part. That means that being around people is stressful for me. I also learned that most programmers are INT types. Funny how that works out. I learned that I had some form of an attentional disorder. Adult men who have undiagnosed attentional disorders tend to develop depression and some form of obsessive compulsive disorder, and anxiety disorders. (Programmers can really benefit from having a bit of OCD.) The doctors recommended a whole raft of different medications.
OK, this is my story, not yours, I am just telling you what doctors told me were the cause of my developer's block (and writer's block too). They were right, but their suggested solution was wrong for me. There was one time when I was out of work for a long period of time recovering from having my ankle rebuilt that I did resort to anti-depressants. There are some very good ones that are now available cheaply as generics. They fit my unemployed budget quite nicely. But, I weened myself off of them.
The whole process that I went through has taken more than 10 years and is on going, when you start to analyze your life you never stop.
Eventually I started exercising. One day I gave my self a gift. I wrote it down. "I grant my self the gift of one hour per day to exercise." That was the best thing I ever did for myself. I started exercising regularly and took up a martial art. The martial art included meditation and Chi Kung training. That lead to my giving myself the added gift of 1/2 hour of meditation per day. After only a couple of months all the external symptoms went away, Internally, they are still there, but I can deal with them. I also lost 50 pounds and dropped my blood pressure. And, oh yeah, my back that had hurt for 20 years stopped hurting.
Then, I had an accident and had to have my ankle rebuilt. I stopped exercising (hard to do when you are in deep pain and can only walk with crutches) and I stopped meditating. All the symptoms came back. I fell back into the pit. I'm back doing my martial art and meditating and the symptoms are gone again.
So, what worked for me? A long journey of self discovery that included my starting a martial art at age 51 and learning to meditate and do Chi Kung.
At the very least, if you do not already do it, exercise for at least one hour per day, at least 5 days per week. It can be as simple as walking. But, I do believe it must be done all at once, not spread through the day. I set a kitchen timer to tell me when I am done and I use the same timer to tell me when meditation is over so I don't disturb myself by constantly checking the clock.
Just an aside, once I forgot to set the timer and I wound up meditating for 3 hours. The need to pee got me out of my chair. BTW, you can meditate sitting normally in a chair. No need to twist up your legs into pretzels.
That is how I solved my developer's block.
Stonewolf
Anything with synthetic food additives is Bad News for your brain. Most are petroleum derivatives (toxic). Yellow #5 in Mountain Dew is a big one. Add aspartame, which is nasty stuff, and extreme acidity that wipes out your bicarbonate stores, and you've got a really nasty chemical cocktail. Regular Dew just substitutes liver-stressing and obesity-causing HFCS for brain-damaging aspartame.
Getting all synthetics out of my diet was one of the best things I've done. Drink water, cut out processed foods, ease up on refined sugar. Some people have even cured their ADHD this way. THEN work on exercise.
I had Convergence Insufficiency and poor eye tracking, which made concentrating on reading extremely difficult. Maddeningly few optometrists bother to check for it. The website directs you to docs who do. Eye fatigue can present in really non-obvious ways.
Sitting further away from your monitor helps. Close to 3 feet if your eyes allow. Look away now and then. Take breaks. Keeping your eyes fixed at a 2 foot distance for hours is bad.
I don't see it anywhere here yet so I'll throw it in...
I forget where I read this a few years ago -- maybe on Slashdot. It's been enormously helpful to me whenever I get "programmer's block"
Idea is to deliberately leave something "broken" at the end of the day: a line of CSS that isn't quite right, a SQL query that doesn't work, etc. Then when you start up the following day, you have something to work on and you're not struggling to find something to do, at least not at the start.
This works for me in two ways:
1) I'm starting off my day feeling productive and engaged, and I find the process of troubleshooting something causes a cascade effect in my mind when I'm coming up with other things to fix, modify, etc. Voila, I'm unstuck!
2) I find myself thinking overnight sometimes about that "broken" thing I have waiting for me in the morning. I'm consciously and unconsciously turning things over in my head, planning ahead to how I'll solve my problem. I'll oftentimes get to work charged up and ready to go because I've got this cool approach or something I want to try out. Sometimes I'll even have more plans queued up in my head, ready for me to tackle. Voila, sometimes I'm unstuck before I even get to work!
Eagles may soar, but weasels don't get sucked into jet engines.
Cool! It's always nice to know the feedback is appreciated. Some other things you might keep in mind:
- have a BIG work desk. A big desk (everything in easy reach) is like computer memory to a person, and your brain is the processor and the filing cabinet is the hard drive (spacous, but slow).
- There are many different people with different reactions to stress. A friend of mine used to faint regularly, and feel dizzy all the time. After she stopped her second job, a few weeks later she felt a LOT better. Listen to what your body is telling you; if you aren't sure, try changing things to see if it helps. Keeping a diary also helps. Note down what you did generally throughout every day - eat, drink, smoke, work, etc - and try to discover patterns. You may, for example, work out that the acne you get twice a month is actually connected to those few times you carpool with someone. Bad fibers in his car?
- be wary of other peoples' expectations. Are you a YES-sayer? Teach yourself to say NO or, at least, "I'll get back to you on that". I remember having immense problems resisting people who wanted me to do something for them because they projected their problems on me: "my computer HAS to work this weekend! My kids want to play games! I need to check e-mail!" It took me the burnout session to realise that that is THEIR problem. If that's an issue they'd best get a second computer. One of the best ways to get burned out is by assuming too much responsibility. If you're taking projects yourself, jot down how much time you think something will take, and double it. Use that number to plan your time. If you're in a corporate environment, tell your boss you're full and that you either need an assistant, or an intern, or more colleagues who can help you with the work; if he's got a dinosaur brain (like many managers do), write down your predictions and don't be afraid to give him the I-told-you-so after the $#!7 hits the fan because he didn't listen. However, do it constructively: tell him you'd like to discuss things with him to ensure it works better in the future. Destructive commenting is too easy and doesn't achieve anything at all aside from a few seconds of self-vindication. It may get you fired, but usually you're just doing your job and your managers' superiors will realise this; you can't help it you have a better view of things than your manager.
- If something seems "too big" or "too complicated", once again you're in the danger zone of a burnout; check my earlier post to see if you can recognise more warning signs. If you feel good and fit and are productive, on the other hand, it may not be burn-out but it may only mean you need to chop the project up into smaller parts to give you a good overview. If you can oversee all the steps in each of the parts, and can oversee how they all connect, you can see the whole project. This makes running it MUCH easier since you can keep an eye on both micro and macro goals.
- Set limits to your project beforehand. Make estimates of how long you plan to invest in a certain segment of the project, what you want to achieve, and STICK TO IT. If you have time left you can add extra stuff later. If you get extra ideas en-route, write them down but don't integrate them unless it's absolutely vital. You can review the achievements and extra ideas later. Also, plan in time for EVERYTHING: time for planning, time for arguing with colleagues, time spent in traffic, time on the phone, time reviewing the code or project. Try to hook a number on everything. You might not get it correct right away, but you will develop a much better feel for what you are doing and how much time each part takes, because you are consciously trying to manage them. A famous saying is: "who fails to plan, plans to fail." This is exponentially true of corporate environments with many people in it. On your own, or with two people - three max - you can do everything ad-hoc and take things as they come; above that and you need structure, work procedures, flowcharts, and people chasing each
A positive attitude may not solve all your problems, but it will annoy enough people to make it well worth the effort.
A couple things I found that help. 1) start a blog with your project and update how you are working on it and what you are working on frequently. It helps, even if you didn't get any code written. I know after I started mine, my motivation increased dramatically. 2) really learn the language you are programming in well. The problem is, you may be able to think in logic, but if you can't translate that into code that compiles and runs, you are just hitting a brick wall. Learning programming is one of those things that can be easier said than done. Once you know the syntax the logic of what you are working on follows naturally into the syntax. Things that don't help 1) giving up - you may think you are depressed now, but wait till you try to taken away your sole motivation for existence - yikes! 2)Drugs - like you can really afford that now anyway what with the bad economy anyway. Plus, meds won't give you motivation, it will just make it more possible to do something you hate. So all you end up doing is more and more things you don't really like.
I believe every coder runs into this, whether it's burn out from overload, or even a touch of spring fever. The main thing that is essential for me personally, is what I consider to be the most powerful and influential element known, music. Picking the correct complementing genre can put me right into the zone, focused, and ready to go. Of course the opposite is true as well, which I find the wrong type of music will distract me. I've refined my personal tastes and reorganized my music collection into specific genres, as well as playlists, so I have a nice healthy supply ready for any mood or need. While music will almost always put me into the mindset that I need to be in to code, this is not to say that there are days when it doesn't matter what you do, it just isn't going to happen. These are rare, but I'm a firm believer that if you hit a day like that, simply leave and go do something you actually want to do. If you try to force it, you'll end up doing little to no work, hate every minute your there, and producing poor quality code that you'll most likely rewrite later. Granted you can do this everyday, or even often, but once in a while is to be human. I think you'll find that taking that time for you will reset you to be completely ready the next day. If not, then maybe coding isn't the best career option. 8-)
Maybe your "developer's block" is a sign that you no longer wish to be an implementer but a delegator. Maybe it is time to become a manager or boss.
You need to have variety in your life both at work and outside work so you don't get burned out on the sameness of it.
Do something productive and quantifiable other than work. I like to build stereo speakers, with other projects being pinball repair, progress towards a private pilots license, etc. Fit an hour or two every day or two into your schedule to make progress - while working 80 hours a week at a startup I finished one pair of speakers and learned enough to fly airplanes without an instructor in the right seat. At 100 hours a week I've spent a small part of the last couple weeks tracking down a malfunction in one of my pinball machines, rebuilding the digital power supplies, and putting in new connectors.
Take a useful development detour and implement something interesting that needs to be done which is different, perhaps which serves as an excuse to learn a new language/tool or revisit one you've gotten crusty in. When one startup was lacking a self-contained product test environment for automation I wrote a Bourne shell script which terminates when any of several descendant processes exit or a timeout fires. In another company I built a model which let us determine how different OEMs hardware would work in our cluster with only a single example and to see how meta-data changes would affect performance; and we shipped the model to OEMs for them to fix hardware bugs without having to deal with our cluster setup.
A lot of developers suffer from ADD. Like right now I'm reading /. instead of working on updating some technical specifications.
ADD impacts you when the task seems overwhelming or requires too much thought. Instead of working on it, you'll find something else to do to keep busy.
Now you can get diagnoses by a doctor and start taking the pills and that's supposed to help.
The other thing to do is to try to break it down into smaller tasks that you can focus on without getting bored. Obviously this works better if you have someone who can help with this.
I have the same problem, I have something I want to do, know what I want to do, am really excited by it, but can't focus on it.
When you are not properly focusing on the screen or having eyestrain to maintain focus it manifests as inattention rather than eye problems.
Eye problems sneak up on you. Even if your vision has been perfect, as you approach middle age your ability to adjust focus deteriorates and you'll have trouble reading. At that point you may need reading glasses or bifocal lenses to handle both near and distant vision - and it's usually near vision that goes.
Of course if you already have glasses your eyes could have drifted from the prescription. And people with glasses still have the presbyopia-with-age problem of people without them.
So when you can't stay focussed and interested in work, get your eyes checked before worrying about other issues.
Bantam Dominique roosters crow a four-note song. Once you've heard it as "Happy BIRTHday" you can't NOT hear it that way
I constantly have new and fresh ideas and can always sit down and grind them out. My ideas, like my code, completely and totally suck; but I'm never stuck. Sorry.
Having to work for a living is the root of all evil.
I felt this way too. I work from home where I am a 1/4 owner of a company and I am the sole tech/developer. Sometimes I feel overwhelmed at the sheer volume of work that has to be done. But I have found the following helps:
1. Stick to a schedule. Wake up at the same time, eat breakfast, have workout sessions and breaks planned. Have a list of things to do on your break (walk to the park down the road, play some basketball, etc). Trust me, structure helps, and will stop you from wasting time surfing the web or lounging around.
2. Have weights in your house. I use kettlebells and dumbbells and I have a small bunch. Walmart had a dumbbell weight set for like $30! You can pick up used kettlebells at Play it Again Sports. In addition to using them to workout, use them when you take a break. Get up off your arse, go, and pick a light weight. Do 3 or 5 sets of 20 (light weight). Feel the blood rush to your muscles. Feel your brain releasing positive chemicals into your body. You will get a natural high. Its important to release from work. Work will come up while you are working out. Use the energy in the lifting to push the negativity away. By the time you are done, and go back to the PC, you will see you problems in a different light and get several "ah ha!" moments. Trust me this works INCREDIBLY. You need an active body to carry an active mind. If one is out of sync, the other is. This is sooo important!!
3. Never work more than 90 minutes without taking a break. I am serious. Unless you want to crash on your couch at the end of your day in fetal position, unable to move, you need to do this.
4. Replenish your energy stores. This goes back to taking breaks, but is much more greater than that. Humans have infinite amounts of energy, we will really do, but we need to replenish it. When you work, you burn all that energy. You must walk away from the computer and do something fulfilling that give you energy. Do you have a non-work related hobby... Yoga, Meditation, Gardening? These things will replenish your energy.
5. Don't over utilize or under utilize yourself. Everyone knows the dangers of overworking, but not under working. Under working can lead exactly to a feeling of dis-attachment. You need to have a middle ground, so you always stay actively engaged.
6. Organize your tasks. You do not have to get fancy! Just write them down in notepad, and put them in blocks of time. Say, Tuesday, these tasks will get done. Wednesday, these tasks, etc.
7. Create a nice happy environment. You must be happy and engaged to work. So have your favorite TV show reruns playing in the background, or put on some music. Open the windows. Relax. Look at each task on your notepad doc and as you complete each one, cross it out, take a break, then come back and look at your notepad doc again. Realize you just completed something, took a renewing break, and now your happy and ready to tackle the next one.
6. You need to stay fully engaged in your work. To do so, take the suggestions above. I just picked up the book The Power of Full Engagement after a friend recommended it to me because I was having similar problems. http://www.amazon.com/Power-Full-Engagement-Managing-Performance/dp/0743226747. This book is worth it, trust me. The key to success in business or life is not time management, but energy management.
You are actively engaged if you are high energy positive
HIGH ENERGY POSITIVE Invigorated Confident Challenged Joyful Connected.
LOW ENERGY POSITIVE Relaxed Mellow Peaceful Tranquil Serene
HIGH ENERGY NEGATIVE Angry Fearful Anxious Defensive Resentful
LOW ENERGY NEGATIVE Depressed Exhausted Burned Out Hopeless Defeated
Sometimes, especially on a one man project, the problem is a logjam. Too many parts need designing and coding all at once.
In those cases, sometimes if I just put all but one piece out of my head and write it without regard for what it will have to interface with or how, it breaks up the jam. The design of that one part suggests how the other parts work to interface with it and it all starts flowing again.
Other times, the project itself isn't the logjam, it's the subconscious knowledge that the email is piling up (2000 LKML unread and climbing...) etc. In that case, putting the project aside and catching up on email, articles I've been meaning top read, etc will help.
Finally, sometimes it takes something completely different. Since I telecommute, sometimes I stop and go mow the lawn etc. When I get done and cool off a bit, the code starts to flow. If your in an office, perhaps cleaning up the wiring closet etc.
I'd argue that you don't want to work for such a boss, then.
Uh, exactly. If you have an employer that uses terms like "self-motivated", "works smarter and not harder", "ability to work without direction"... et cetera.... RUN (don't walk) for the hills.
These are companies who have incompetent managers who delegate their own management responsibility to their workers.
Managers are supposed to actually serve a purpose.
This is so well said.
You are exactly right. It does NOT matter at all who's fault it is.
The reality is, the manager has to address any kind of motivational issues. Regardless of the source of de-motivation. De-motivation kills individual productivity, team productivity, and can even sour an entire organization.
I'm reading quite a few posts that advise "stepping away" from the computer in some way. Others that read something like "work on that 'other' project". Well, both are good, good advice, but - I've found that what works best for me is to play around with some completely arbitrary code. That is, I don't work on another "project", I just write some code to see what the code can do - I'm often amazed at how quickly this technique seems to galvanize my mind and put me in the mood to work on what I actually need to work on. Best of luck comrade.
Go see a doctor. Have you ever had concentration issues before? Did you often procrastinate on projects in school? Or did it get worse over time? If you have medical benefits, go see a doctor first before you try anything that could give you more problems.
...once again, I'm late to the /. party, but here I go.
There was one time I randomly jumped to the middle of my application and changed a '+' to a '&' (or maybe an || to an &, or maybe a - to a && ... I don't really recall anymore), hit [ctrl]+[home], compiled, grumbled that the compiler was happy with the change and then had to figure out what I broke.
Most recently, I started changing my variables to Hungarian notation. This didn't get me far, so I've switched gears and while I'm on the train to and from work, I'm back to pen and paper sorting out how I want to design my SQLight database which has proven to be fun and re-motivating ... but not quite as motivating as my level 80 boomkin druid.