Overcomming Programmer's Block?
goingware asks: "What do you do if your productivity drops to two lines of code a day, and you just sit and stare at the code and feel like you don't know how to do it anymore? On the outside, it would seem my problem is that I've got some difficult architectural issues that I'm wrangling with. I'm not sure what the right way is to approach a certain feature I'm building into my program in C++. But what my real problem is that I just sit and stare at the computer all day long feeling scared and anxious. I'm afraid to try anything out at all for fear of making a mistake. I know I could just back up the code and write any old thing and throw it away if it's wrong, but for some reason knowing that doesn't help." What do you do when you are stuck in code and your focus leaves you? This isn't something as easy as getting up from the problem for a while (although that helps), this is sounds like something closer to burn-out. What can programmers do to combat this?
"I've encountered this before, but it's not normally like me. I've been programming as a career for something like 13 years now and shipped dozens of products. I've had many obstacles before and overcome them through many and various means... means which all escape now.
Right now I feel like a clueless newbie assigned the task of re-architecting a nuclear powerplant control system.
This has really got me down. I have a product to ship. I called my client and asked to take a few days off from coding, and told her I'd be hitting the C++ books and taking a rest and trying to rejuvenate my programming creativity. She was OK with this. So part of that process is posting my question here."
Head for the nearest BIIIG city, find some kinda of techno/trance club(here u could stay years with out having to think once). And paaarty.. *Grin*
A good way to break the deadlock is to do small experiments to improve your knowledge. Extreme Programming afficionados call these "Spike Solutions".
There are many tools you can use to help you quickly do experiments. In particular, high-level languages and very dynamic languages are excellent for this. Python, Tcl/Tk, Perl, Smalltalk, LISP, Haskell, Prolog and shell scripts are all good for doing quick experiments. Also, having all your code in a revision control system means that you can create multiple branches to experiment with different approaches, and then merge back the approach that works best.
Go to the toilet. Some of the best inspirations have come while sat on the crapper, trousers around my ankles. And if nothing comes to you, well, that dump you took was at least *one* productive thing in your day !
The boss of a friend of mine died skydiving. His second parachute didn't open. Of course, his first one did, but he detached from it because he decided he wanted to freefall a little longer. Darwin award?
What works for me is to just zone out for a while and watch some TV, then get back to the computer, fire up your mp3 player, and play some music that makes you want to get up and dance. Sounds silly, but it works.
Listen to some good trance or techno and for some reason after 15 minutes you'll start to feel pretty energetic. Then just start coding and before you know it you'll be done.
There is no sig...
Almost everything that I've ever done that was clever was because of a collision between disparate skill sets. The broader your knowledge base is, I believe the less likely you'll run into blocks like this. I also include non-programming knowledge - especially other skills such as art, music, drafting, philosophy, etc.
Often the best way to get over a block is to learn a new language. My C++ programming style has been greatly influenced by my knowledge of Java and Python.
Also, I highly recommend learning UML (Unified Modeling Language).
"politeness doesn't scale." -- Talin
The common understanding of Software Engineering principles will hurt you here instead of helping you. Or at least this is what I have found, i.e. IMHO.
Consider taking just one chunk and prototyping it. I find that I often get overwhelmed by all that I have to design and code. Work through your design, try to map all the functionality--but then choose one piece you are concerned about or interested in and just code some prototypes. Don't worry about whether this code will make the final cut--code it with the idea that it is just research and completely expendable.
This is the equivalent of the best way to break writer's block (I use to be a English Lit major, so I know that of which I speak :-). The trick is just writing/coding. The more you write and the more you code, the more good stuff you get out of your head and into source files. You might throw it all away and keep just one concept. But you will find the pressure has eased and suddenly the direction you need to take is clear.
Sometimes we need to focus on the specifics to better understand the generalizations. It doesn't seem to make sense, but it works.
That, or go home to the wife/SO and let them make you forget all about that nasty little architecture. That works well too :-)
"Doubt your doubts and believe your beliefs." -- Switchfoot, Ode to Chin
Well, for one, stop reading slashdot and reloading it every 5 minutes.. ;-P I know, it's addictive, but keep away from it.. ;-P
-- I'm the root of all that's evil, but you can call me cookie..
I wish I hadn't already posted, so I could moderate you for all it's worth.
;-P
This personally hit a note with me, becouse I found myself just this morning fearing failure. Thank you for posting this, you actually helped me quite a bit putting it this way. The 3 things you posted where *exactly* what I'd started worrying as my project is about to go into production after being in a *WAY* to long test cycle..
Anyway, thanks for the post..
-- I'm the root of all that's evil, but you can call me cookie..
"I used to be so stressed that I used to fall asleep on the stationary bikes"
:)
I wouldn't have worked until 5am days in a row. I didn't used to cycle to work everyday. I didn't fall asleep at the "handlebars" on the way home one night. I didn't destroy the bike and break my arm. Nothing so foolish could possibly have happened to me! Never
The solution is to find something that can kill a quick hour to distract you. Preferably done w/ another coder to knock ideas against.
One guy I know was in an honors program in AU, at 4 every day was a mandatory 'tea' where they kicked back, drank some beer, and kicked ideas.
Since my move to the Netherlands, I have lost most of my old methods of solvency. My preferred plan was to grab another person and some firearms, jump in my '78 Ford pickup, barrel through the woods at high speed, and stop along the way to shoot. Great way to deal with stress.
Go to work at a dry cleaners. That's what I did, and I'm $7 an hour worth of happy.
This happens in anything one does with intensity. I can't tell you how many times I've layed my keyboard down for weeks. It happens when I paint, or when I'm playing music too. SOmetimes it really is just time you need. Take time off and focus on anything and your head will start to sort out everything.
"God is REAL
But what if he's blocked up that way too? Imagine the frustration!
--
Fuck the system? Nah, you might catch something.
That's hilarious!
My puppy has figured out how to get lots of attention and make me very animated - just bumping his nose on the glowing button on the front of my computer causes me to make sounds and motions and usually results in some petting during the reboot and fsck.
Congrats!!
Imagination is more important than knowledge. --Albert Einstein
I like caffeine. For one thing, it does help with the occasional hundred-hour coding session (no, really: I officially logged four back-to-back all-nighters on at least three occasions back in school), which I guess is the kind of hacker bravado that you are against, and in which the rest of use are revelling. Mainly, I think (speaking just for myself, of course), it's just fun to talk like that -- we're not really quite as unhealthy as we claim to be.
In reality, though, I don't see that caffeine really does that much at all. I remember that for a while back in school I was in the habit of grabbing a can of iced coffee on my way to class in the morning, but it was mainly that I liked the taste, and maybe for the placebo effect of "I've had caffeine, so I must be awake now" -- I didn't really feel noticeably different. I did notice a couple of times, though, that when I forgot to do it, I fell asleep in the middle of the lecture, but then, I also wasn't sleeping enough at the time. I'll grant that my general-well-being level dipped during the period about a year and a half ago when I was up to four Mountain Dews a day, but that was an extreme. Besides, the sugar was probably worse than the caffeine -- you can't just add nearly half a pound of sugar to your daily diet without consequences. I also wouldn't say it's much of an addiction -- I've gone on and off of it without really paying much attention (it just some months is, and some months is not, part of my daily routine), and I haven't missed it much, or generally noticed any difference.
I agree with you, though, about the need for various mind-clearing activities, and your list looks pretty good. I would add, under "Go fetch a smoothie", "Go get a Mountain Dew" (like this guy, except he said "Diet Coke". Ugh! Who can stand that stuff?).
Back to the original question about "Programmer's Block", I have one other suggestion along the same lines as most of the others I've seen: a change of scenery is good, but it doesn't have to be a break from work. Try taking a laptop to a cafe or some such public place and working there for a bit. In the past couple months, I've found myself getting some of my best work done sitting in a coffee shop sipping lattes (Oops, there's that caffeine again) and coding in periods of two to four hours. Or, to remove yourself a bit more from the intricacies of the problem, you could just take a notepad and scribble down some thoughts and pseudo-code instead of staring at the actual code. You might think that the noise and people would be too distracting, but I've found that it's just a very pleasant environment to be in. Plus, you're away from the other distractions (including the Internet, and especially Slashdot) that you have in your office, house, or whatever.
Depending on the state you're in, changing scenery like this while continuing to work at least partly on the problem, could be better than a complete break. For one thing, the work stays fresh in your mind -- you don't have to flush it and subsequently page it all back in. Also, you're working while in the relaxed state, rather than just getting away for a while and then coming back to the same thing -- Sometimes I've come back to work after a vacation (including my honeymoon, no less), taken one look around, checked my e-mail and bug list, and said, "God, I need a vacation!"
David Gould
David Gould
main(i){putchar(340056100>>(i-1)*5&31|!!(i<6)<< 6)&&main(++i);}
I hate to say it, but your response [well, that part of it, anyway] is essentially a well-written (I must say) [thanks] version of, "I don't have a problem with it, it must be okay for everyone!" But the truth is, caffeine, and pretty much ANY drug, doesn't have the same effect on everyone else that it will on you.
Point taken. If nothing else, it would be related to body size and dosage; I'm fairly big (6', 175 lb.), and I guess four Mountain Dews a day, which I thought of as pretty extreme, is not that much compared to a three-pot-a-day coffee drinker. And of course you're right that different people would be affected differently, so the mere fact that it's not so bad for me doesn't mean that it isn't bad at all. On the other hand, the same argument works conversely: the original comment (magnushuckvale's, not Rimbo's) claimed that caffeine is "evil", but that's only true for some people and not, e.g., me. To be fair, the original comment seemed to be a bit of a "rant mode"-style exaggeration wrapped around a good point about the importance of healthy activities and a balanced lifestyle, so I won't get too hung up on the "evil" thing.
Also, I just want to say that I had intended for the second half of my comment to be the main point, namely, the suggestion about taking a laptop to a coffee shop to get some work done. I just did so myself -- I left right after posting my previous comment, finished a problem that I've been working on for a few days, and came home to see your reply and write this. That's often a problem with the way I write my comments: I start out by rambling about some side point, and by the time I get around to my real point, people have stopped reading. Just to be nice and recursive, here I am doing it again.
David Gould
David Gould
main(i){putchar(340056100>>(i-1)*5&31|!!(i<6)<< 6)&&main(++i);}
I was in just such a situation about 12 years ago - I'd graduated from writing dBASE code to writing 4th Dimension code on Macs, and I was working on a customer program. I ran into the wall, trying to code things I could have done blindfolded in dBASE.
I studied the system for quite some time trying to get around it, and finally concluded that I'd hit my limitation as a programmer. I just couldn't make the leap to the different programming style that was needed. I resigned the contract, gave a good deal of the money back, and wound up going into networking instead. Since then, I've written only a handful of code - a couple of HyperCard apps when that first came out for fun, and a few shell scripts and Perl hacks to automate stuff. And one more "for pay" coding job - a script app written in the old Mac White Knight comm language to automate file transters for a doctor I knew. That's it.
Needless to say, I hope that most people do not follow my example! I lucked out and was able to pick up another skill (that I turned out to be better at), when I ran into my programming limits.
Because even then I wasn't a very good coder...
- -Josh Turiel
-- Josh Turiel
"2. Do not eat iPod Shuffle."
I totally agree! I took up skydiving last summer. Excessive negative cash flow kept me from finishing all but 2 of the 8 required jumps, but I'm saving up. Sometimes just looking up at clouds and saying "Damn, I fell thru those" gives me enough of a mini-break and gets me thinking - Hey, I've gotta get this done and get some cash in the bank.
.. and they get our bodies moving, and our brains thinking in a different way than we're used to. From point-here-click-there to holy-shit-the-doors-open-on-the-plane-and-i'm-supp osed-to-jump?
Skydiving and Flying are great sports. They're relativly not that expensive ( 6k for the flying thing, and around 2 for the skydiving )
:)
_14k4
webmaster@860.org
http://www.860.org
I work at a place where the web-design / programming aspect is partially new. We're mostly a Novell/PC/Etc.. service company. When I've hit a block in something, I usually step away for an hour or so and fix something on the bench. Just focus my mind somewhere elss.
_14k4
www.860.org
webmaster@860.org
One thing I've noticed is that simply working longer hours doesn't normally make me more productive. There seems to be a two or three hour surge of activity, after which I have to take a break - read some newsgroups, go for a walk, whatever. In these situations the "leave it and come back to it" approach really works.
If the problem still looks bad when I get back to it, then the next thing I do is ask a colleague for advice. In situations where there isn't another programmer around, I simply describe the problem to any willing listener. Often the simple act of talking about a problem elucidates the solution. Now this is going to sound silly, but I've even talked to my cat when working at home and sometimes had that "eureka" moment.
If the task is simply beyond your ability, then it's time to admit it - approach your manager and say so. Grit your teeth and accept that no proprammer can do everything. Just hope that your boss understands that. If you lied about your abilities to get the job, then I've no sympathy for you (having fixed cock-ups by such people). Otherwise, if your boss is able to do his job properly, then he should be able to see this is a resource issue - not a general failing in yourself.
I've actually quit a job because I felt the task I got given was beyond my abilities - finding some comfort in the fact that programmers are a scarce resource. While it is a drastic course of action, I felt almost europhic knowing the stress was over. So if it's not just burn-out consider getting out of the job.
Chris
Get more coffe....if that doesn't work
it is time to became part of the management staft.
OverLord
> Then again maybe this is just a strange neurosis of mine.
Nope, me too. Currently avoiding writing the rotational elements of a rigid body system as I can't bring myself to actually choose between quaternions and rotation matrices, as I'm not sure which will be more efficient...
The first thing you'll have to do to increase your daily productivity, is to stop reading Slashdot! ;-)
That is probably along the lines of what you are looking for. I also have the clause that any work I do for myself or even a third party is non of the company's business when it's not competitive (that's the normal clause), but it's also okay (this is what I added) when there is no damage to the Company or reasonable damage to be expected.
This basically means I can do work in the same sector. Our company doesn't take small clients anymore, so I am free to do such projects, as well as commercial items and technological development on my own website.
Try and go for a "fair use" policy and when possible get that fair use on paper as well, like I did. The best thing about my situation is that when I there is an improvement on (for example) the generic PHP database class I've written and imported, I can take that improvement home. :-)
This is not exactly how I do things at my work, but there have been ocassion where I have introduced code of my own into the knowledge base of work. (don't worry, I have a clause in my contract which states the company and I will share intellectual property so I won't lose a damn thing)
It is no secret that the vast majority of the /. audience is athiest, non-religious or religiously hostile. I, as someone that dosen't fit that profile, realize I am certainly in the minority. That dosen't bother me, but the flippant attitude that your remarks embraced does spark my desire to respond. You have made many assumptions in your response, the largest of which is the view that no desination of a spiritual nature can be arrived at by logical thought and a search for truth. You continue by not just implying, but boldly stating your opinion that prayer is only for those with a limited imagination. In response, I will give no argument of my own, but a quote from someone you may have heard about.
Isaac Newton: Newton often said his interest in theology surpassed his interest in science. Newton did end his Principles with:This is from Christianity and the Birth of Science. There is much more on that page if you care to take the time to read it. I do hope that you haven't closed your mind and heart to truth, it is not easy to get it opened again.
Kindness is the language which the deaf can hear and the blind can see. - Mark Twain
I'm exactly the same. I have about... I dunno.. 5 or so programs actually being coded, and several more in the pre-development/thinking-about-it stage. I just switch between them when I feel like it. Yes, there is a certain amount of work to be done on catching up with where I was before, but as you say, it a great way to find bugs. Works for me very well. Glad to know I'm not the only one who works like this. The only problem I have is trying to get to sleep when my brain is working on 5 different problems simultaneously ;)
totally. I once had a full hour commute on a rural freeway each way, which was great - I could completely forget about work on the drive home, and start transitioning into code-think while driving in the next day. When I got stuck, I would go home - it made for a 6 to 7 hour day, but I was out-coding the folks who put in 10 hour days.
I only met one guy who was PERFECTLY productive. He worked exactly 8 hours a day, and stopped to smoke two Marlboro light 100's every two hours. At any given moment, he was working as fast as my peak speed.
-- Jeff Paulsen
for me, this is heavily connected to staring at computers for a long period more than actual brain fade. what works for me: ;)
* print out the problem and read it through, preferably away from your workplace and definitely away from your desk.
* change your position. i keep a sunny work desk to stand at by the window (natural light for reading) and a computer desk on the other side of the room
* do something physical - a walk, or just a day's work in your garden (or indoor growing setup if you're in town
fatigue comes from overuse of the same {muscles, inodes, joints, neurons}. exercise some others and i immediately feel refreshed for the task that's giving problems.
Go skydiving.
:)
There's nothing like seeing the world from a 14,000 foot freefall to really put everything back in perspective. And you'll feel alive and energized for days afterwards. The first time I jumped, my palms sweated for four days.
(And no crap about being afraid of heights. The more it scares you, the more good it will do you.)
well, when it stops being scary, then it's time to quit. The adrenaline rush that comes with scaring yourself half out of your mind is the whole point.
:)
Anyway, I've got 10 jumps behind me, and it still scares the crap out of me when I walk up to that open door at 14,000 feet, so I guess I'll keep going for awhile.
No seriously. Update whatever documentation you have, so you at least get something done. As a side effect, it will probably make you see the whole picture again.
--
Error: password can't contain reverse spelling of ancient Chinese emperor
As far as burn-out goes, I enjoy programming and often do it in my spare time as well as at work. But when work becomes heavy I back off programming at home and do other things (apart from getting married, building electronics or doing DIY are fun... :-).
If I'm not stressed, but still feel bored with programming that's normally a sign that I need to learn a new language or technique....
Glad to hear things picked up,
Andrew
http://www.acooke.org
This sounds crazy but sometimes you need to just start writing code down does not matter what is.
Sometimes you just need to start doing something. Once you get the fingers going you start thinking on what you need to do.
This what helps me to do my working when I am stuck on just starting.
Given the way scientists were treated in those days when they tried to suggest that they knew things that officials of the church didn't
Consider Velikovski. He was right on many quite staggering points, made all kinds of correct predictions which would be (were) considered absolute lunacy until later demonstrated, but was still treated like a criminal, essentially banned from publishing (even replies), and his opponents frequently lied, used political pressure etc - and most of them didn't even read his book.
Now, I ask you, is God's case any worse? Have you read his book?
When atheism is oppressed (as it has been through most of history, and still is in much of the world)
After the French Revolution, Atheism didn't need repressing. People could see how well it worked. If you find yourself being repressed, you know that the repressors either aren't Christians or can't complain about being repressed right back (do unto others etc) - but just be sure that you're only repressing the repressors, because a lot of people call themselves Christian and few actually are.
As to the science-vs-faith arguments, trash them. A quote from God's book again: "prove all things, hold fast that which is good" (1 Thessalonians 5:21). Instead, go for a swim in the Gulf of Aquaba, off the big beach about halfway down the western shore (easily visible in satellite photos), and ask yourself how all of these thousands and thousands of chariot, horses and men came to be here.
Next, ask a few other questions like "how come there are vertebrate fossils clear down to the lower cambrian?" and "if the moon's receding so quickly, why isn't there a big, fat groove around the equator?" There are many thousands of such questions, so you might be able to pick a handful and bluff your way around them, but in the end you have to face the observable physical evidence that says we haven't been here for billions of years. The only rational explanation is what an Atheist must necessarily call "supernatural" and carefully ignore.
Savvy?
Got time? Spend some of it coding or testing
I find that backing away from the "big" problem but keeping the coding wheels turning anyway is a reliable roadblock-eater.
Got time? Spend some of it coding or testing
There are a lot of people who think MBTI and similar things are on the same level as astrology. What does the personality test portend for the future?
Doesn't anyone make flowcharts or other software and data diagrams before they launch their text editor? Assuming you're writing new code and not debugging, why are you staring at the screen? Coding anything vaguely complex off the top of your head is Not Good.
Stop thinking in C++. Start with the big picture. Map out the problem. Then drill down to the architecture. Then drill down to the core functions of each module. Then firm up your data/object models. Next, drill down to the detailed design. Most of this should be boxes, arrows and lines, not code.
Then, and only then, start doing serious real coding. If you wing it, you're liable to get stuck or produce something pretty unwieldy.
I know this feeling, and the best thing for me is to go for a long walk at lunchtime, go visit a museum, book shop, concert, anything that is intellectually stimulating but bears NO resemblance to computing. This usually gets at least some energy back.
After that, I like to get stuck into a couple of books that are about programming, but NOT about the current problem - stuff like Bentley's "Programming Pearls", "Out of their minds", "The soul of a new machine", that kind a thing. Seeing how people solved problems before really helps to start seeing new approaches to whatever is bugging me.
If that hasn't done the job, I usually start tinkering with a fun piece of code, a game or a 3d screensaver - anything to get me back into the flow.
This has always worked so far - usually I lose a couple of days, and come back to another few months of productive life. When it stops working, I guess I'll move into marketing.
It's all very well in practice, but it will never work in theory.
MBTI is a tool for gaining insight into how people work, and I think it serves its purpose well. Even though most people aren't pure, prototypical specimens of any single type, I find the accuracy of MBTI representations to be remarkably on-target. Like many of my fellow Slashdot readers, I am an INTP. This typological framework has helped me to better understand and deal with personal differences.
The best book I know of on this topic is _Personality Type: An Owner's Manual_ by Lenore Thompson. I heartily recommend it to anyone who is curious about personality type theory. Whether this knowledge can help one get past programmer's block, I don't know. But it's a surprisingly interesting subject that is worth checking out, IMHO.
And your productivity will increase
Don't know if you're bullshitting or not, but I observe the same effect after riding my motorcylce for an hour or more.
In my case, I find that a lesser banishing ritual of the pentagram helps.
Mutatis mutandis for your own faith.
The Tyrrany Begins....
Finding God in a Dog
Sure.
And then just hold your breath to get over that "oxygen addiction" that you have.
Better suggestions please.
:)
ELITISM: It's always lonely at the top. Uninvited company is rarely welcome.
So, when I built my box for home, I had them install a nice ethernet card for my little LAN, but I kept the modem out. And the difference is pretty amazing. Just dis-engaging my mind from the computer, going outside and thinking about problems without the computer staring back at me is quite refreshing and helps my creativity immensely. The computer is just a tool, after all, and sometimes one needs to put aside the tools to get a better look at the problem.
Ita erat quando hic adveni.
State of mind is your god
If you can jump in that mental zone of pure abstract creativity, then your battle is won.
The c0der cocktail: (use at your own risk)
-------------------------------------------
Once Daily:
*5-HTP - 100mg
*Vitamin/Mineral supplement
With a meal: (3 times daily)
*DHEA - 25mg
*Ginko Biloba - 80mg - 24%GF
*One of:
- Ephedrine - 20mg
- Adderall/Ritalin - 1 dose
- Ginseng - 2 doses
General Tips:
-------------
- Drink plenty of fluids.
- Drink caffinated soda, DIET so your teeth dont rot
- Eat often, smaller meals, snacks. Coding drains the brain
- Get some tunes!
your mileage may vary...
Fortunately for me I work at home, so I can avoid most distractions, but it usually takes me at least a day to recover from a day in the real office.
I work from home also and I too have experienced this.
I haven't worked in an office for 4 years now and when I do go to the head office I simply can't believe the amount of wandering in the hallways, telephone calls, "door hovering" and other timewasting that goes on.
I can get more done in a couple of hours of silent time in the mornings than they get achieved in a couple of days.
If any managers are listening : Set your programmers free. Sure, they might take 2 hours a day off to go walk the dog, shop, relax etc but they will be so productive in the hours they do work that you'll actually get a big productivity boost!*
* My experience. Your milage may vary.
Glad to see that the time off helped. I found myself in a similar situation a few years back, and wound up being diagnosed with a mild case of Obsessive-Compulsive Disorder.
:-) At the end of my course of medication, when I started tailing off the dose, I could spot when I was beginning to exhibit OCD-like symptoms, and I found it much easier to defuse the symptoms by chilling out, going for a bike ride, and eating a banana or two (all things which will temporarily increase the amount of serotonin in one's brain, and thus reduce one's anxiety level, but without any of the nasty side-effects that antidepressants have.)
:-)
At the time, I was put on a tricyclic antidepressant called Anafranil (generic name: clomipramine hydrochloride), and apart from the usual unpleasant side-effects of tricyclic antidepressants it was a big help for me. Specifically it helped me get out of my "spinlock" that I was in at work, and helped me get some distance from some behaviours which in retrospect were clearly symptoms of OCD, and which I had had to some degree since childhood.
The best thing about the medication was that it gave me a reference point as to what "normal" might feel like.
Now that I have moved onto a farm and acquired a very energetic dog, I have found that taking the dog for a walk up the small mountain behind the house is a good way to get the same effect, and the dog seems to like it too.
-Snorbert, somewhere in the antipodes
Well, I made a much bigger change than that. Junior year of college, I basically burnt out on programming. I had been doing it in one form or another since I was 11, so roughly I'd been doing it half my life.
My solution was to switch focus, and become a tech writer. Not as good cash, not as highly esteemed, but I found I could concentrate on writing english a lot easier than coding.
I may go back to doing programming someday. In fact, my job now requires some small amounts of programming. Enough to keep my feet wet. Someday I might just decide to become a developer. Or, I may just burn out on computers and become a sushi chef.
Remember, there *are* other things out there. There's no better feeling than walking away from something you really hate doing.
There is a methodology called Extreme Programming which introduces a concept called Pair Programming. A technique like Pair Programming would I think be useful for this kind of problem. Certainly, when I get a block like this I try to talk to other people about the problem - often the simple act of explaining it can crystalize my thought.
Asmodeus
Actually, this sort of thing has done a lot for my understanding of the world. Like the original poster, I'm an INTP, and I have an ENFP boss. Understanding the underlying characteristics of both lets me work better with him because I understand many things about him most people don't.
Incidentally, Bill Clinton is an ENFP too. Check out what the test says about an ENFP and it gives you some interesting insights as to why Bill is what he is.
D
----
Maybe the same thing applies that Piers Anthony said about writer's block: "If you have it, you're not being professional enough".
And the quality of his work reflects this philosophy. Stories written with what amounts to stream of consciousness (but lacking even that artistic quality), places where he writes himeself into a corner, and rather than go back and make the appropriate changes to the storyline, add some foreshadowing, etc., he plows ahead, writing a sentance of the form "fortunately, W had prepared for this weeks earlier by doing X, so now he did Y and escaped!"
The worst writing, bar none, I have ever seen in any genre (and in any universe).
The Future of Human Evolution: Autonomy
That is what you do to overcome a programmer's block. get a life.
Baker's Law: Misery no longer loves company. Nowadays it insists on it
http://www.sigsegv.cx/
I have to agree with Megasphaera - I often find coding in C++ tiresome. I've worked with Java for a few years now, and I find it fits my needs rather well. Recently, I've taken to coding in GJ, which is an extension of Java to allow parametric types (something like templates in C++). However, unlike C++ templates which copy the entire class guts into each ground instantiation (e.g., Vector<String> is a ground instantiation of Vector<T>, where T is a type variable) of a parameterized type, GJ creates a base class and performs type-checking at compile time to ensure proper usage of a ground instantiation. It eliminates a lot of the nasty manual casts one might have to do in a Java program and all ground instantiations are related to each other semantically.
..uhm.. quicker? simpler?
Although java may be
I'm going to go with "designed better". Yes, I'm one of those ivory tower wackos who believes in type safety over speed/efficiency. I will concede that debugging under Java sucks, make that blows. Java, on the other hand, makes it easier to get it right the first time so you don't have to waste as much time debugging your "new" and "delete" statements. Also, contrary to popular belief, garbage collection is a Good Thing (TM). A copy collector is by its nature more efficient than hand allocation because it only touches memory currently in use. Hand deallocation has to touch all allocated memory, not just the memory in use (unless you are a fan of memory leaks).
For low level programming where time is important, I wouldn't recommend Java - I'd say use C. For high level programming, I would recommend Java.
> Mike
"There is no culture in computer science, only cults." - M. Felleisen
As for the "stressed" feeling... do what I and most of my IT department do. Research... search the web for hours at a time looking for bits of code... on sites like Slashdot or Freshmeat.
when they ban enctryption only criminals wi$21*J *#JF$%!@#$':
I simply take a break from it.
A couple of weeks ago I was working on some perl and hit that block. I was really stuck/burnt out. So I simply went and did something else; built a couple of servers and configured them. Gave me a chance to do something else, and think (Building servers is not a real brain intense thing to me). After a couple of days, I felt alot better, and got back to programming.
Linux O Muerte!
...don't try to relax by playing a MUD. You'll never get back to the code!
---
As copyright owner of this comment, I authorize everyone to defeat any technological measure which limits access to it.
You mean it actually helped if you at least attempted to do a design? That I shouldn't just sit down and blindly code away at a problem? Fuck that's what I've been doing wrong, thanks guy...
...become project managers!
--
The gift of death metal does not smile on the good looking.
Hi. I found a technique that works well with C++. It's based on the "put something on the page" technique that English teachers tell you overcome writer's block. I write down a few sentence description of what the project is supposed to do, pick an object (noun) from my description, and write a header file. Much of the header is mechanical and I always do them the same way (comment header, other #include's, #ifdef double-include protection, class w/ constructor & destructor). By then I'm already writing, so I throw in some class method prototypes for what that object ought to do, then take the header file and turn it into a CPP file, carving it up to be the implementations with default return values. By then it's easy; it's half done and you just fill it in, which is usually not hard because you're in the groove by then. Good luck!
-davidr
-davidr
Anansi Innovations - whole enterprise engineering for seamless growth
"In other words, programming is only "part of you" it's not all of you. It's not your reason for living, and it's not even your best part, most likely"
HERETIC!
Someone bring out the...
COMFY CHAIR!
Steve's Computer Service, Hobbs, NM
I put it down to the fact that VBA is ***
Bah, I need a better job.
Wow, I should not post when knackered.
Give yourself some credit: you are probably not some lazy lowlife.
There are easier ways to make a living than this. So what's the
problem? I have no idea, but you do.
There's obviously SOMETHING that's actively preventing you from
focusing properly on the job at hand, and you probably know what it
is. Not admitting that you have to deal with it just prevents you
from going anywhere, so you're stuck. Lots of people have to do all
their laundry before they get around to homework.
You say you just got married? Congratulations! But I sincerely doubt
that mention was a simple "by the way". The guy who said, "Get a
Life" got it mostly right. Exercise gives you a chance to clear your
mind of clutter and decide to do what you need to do. Whatever works.
This may sound fuzzy or simplistic, but I won't presume to dictate HOW
to solve your issue. All I can say is that you probably have one, and
that is what's keeping you from coding. Only you can say what it is,
and why you need to deal with it.
Normally, it helpy me very much, if I dive into the background of the programming language, how it is constructed, what does the processor do, how does the compiler work/behave etc.
By this way I normally find a way much better. Sure, it takes some time, but you will be prepared for new oncomming problems.
Falko
i think you'll find that the wife is going to screw things up more than anything :-) no more twenty hour coding sessions "honey where are you? when are you going to be home"... no more sitting up all hours at home "when are you coming to bed? what's so interesting about that?"
In order to be applicable to much more of the /. crowd, it should be pointed out that other forms of meditation will likely have a similar effect. That is assuming, of course, that it's the asking for inspiration that helps rather than the reply. :)
To help in situations like this (and I've had many) is to go home at 5:00 (after not having anything done, of course), take a long bath, a nap, stop drinking caffeine for the day, get a tall glass of water, and go back in to work around 9:00. There's no one there, I can play music loud, and I get to work.
/. crowd, guys take care of yourselves, you just _know_ that the world rests on _our_ shoulders.
I guess this amounts to the same thing everyone else said: get a little bit of rest, take care of your self.
Its interesting that this article was posted today, considering I'm severely burned out now, actually I'm spending the morning at home. That's what happens when you marry over the weekend, I suppose. Oh, to the author of the question, CONGRATULATIONS! I know exactly how you feel.
To the rest of the
Godspeed now.
~mina
I'm out of my mind, leave a message.
I'm shocked at how many geeks are complete couch potatoes. Take care of the body and you're taking care of the mind.
Meditation/Prayer/spiritual something is also good. I know it's a taboo topic in some geek circles but human are complex creatures with emotional, spiritual, mental, and physical attributes and you need to tend to all of them. Complete void of anything spiritual seems to be another popular geek trait.
This is my signature. There are many signatures like it but this one is mine..
"Coffee gives me the serenity to think and the vitality to act" - attributed by my own admittedly faulty memory to Kurt Vonnegut in a coffee commercial.
I am currently working on design for a multiplatform B2B 3D collaboration system and feel the block setting in frequently. Once a friend showed me God's desire to have a relationship with me on a day to day minute to minute basis. I was more likely to ask Him for help and peace, and boy does it come. God has since shown me over and over again He does care and is listening. BTW you can pray when you are getting exercise or drinking a beer too :-) It's free like freedom as well.
I use to get mental blocks all the time. I'd sit and think and try and remember something, or try to think about how to solve a problem. Then I'd finally get frustrated at spending too much time working it out, and go and talk to somebody about it. Most of time a few seconds after I'd started talking about it, a solution to the problem or the thing I'd forgotten about popped in to my head, with out much prompting from the person I was talking to. I think that the effort you spend trying to explain something to other people clears up the perception you have of the problem and pinpoints the areas that you don't understand or haven't thought about enough.
Sounds like you're working on this project alone? You need to talk to someone. Not about your fears and aspirations, but about engineering. It's easy to get into a rut when you're in a vacuum. Run your architectural issues by some other technical folks, share projects, or whatever. Large projects are hard to complete when you're not part of a team. Externalize!
Also you might be burnt out -- C++ is a hideous bitch goddess. Try programming in a language that's less soul-draining for a while.
"What do you do if your productivity drops to two lines of code a day...?"
I stop measuring my productivity in 70s-era LOC metrics.
Drink more water, eat less junk. Have some fruit, it clears out the system.
Have a good, long, slow fuck.
Go for a walk in the rain until you catch cold. Get over the cold.
Scream loudly and obtrusively in a public place.
Sleep for as many hours straight as you can.
-Andy Martin
-Andy Martin
If y'all don't like me, blow me.
I get this feeling quite often, but it generally doesn't last longer than a day. That's because I recognize the issue and have learned to deal with it.
I generally get this feeling when faced with a bug report (that's not the only time, but it serves as an example). The other day I had one where all my command-line commands were pausing for up to 3 seconds before doing anything. Well, those commands had to pass through a couple different daemons, do some file access, yada yada yada. Where's the problem? Just thinking about it made me feel dejected.
So I put off trying to find a solution by spending some time playing with it. Will THIS command pause? Yes. How about THIS one? Yes. What if I do a bunch in rapid succession? Sometimes. Etc.
Eventually I latched onto one definitive case as easy to perform and reliable in behavior. Then I thought to myself "I wonder if it's just taking extra long to start the program". Load it into GDB--same problem, but it isn't in main(). Great, that means it's in one of the daemons. Load the first one into GDB and break in the socket accept routine. Nope, not in there.
By this time I was on a roll and past the block. How? Because I stopped thinking about the "big picture" and Just Did The Next Thing. The longest journey begins with etc. It's just like they tell you in writing or art classes: The mechanics of pretending to work will lead you inexorably to real work.
In your particular case, I would do this:
1) Make a backup
2) Find some little corner of what you want to create and just start it. Don't worry about error codes or UI issues or anything. Just start typing something. Even a comment.
3) Do everything else.
--
Linux MAPI Server!
http://www.openone.com/software/MailOne/
(Exchange Migration HOWTO coming soon)
I feel refreshed when I get back to my desk!
Ugh. I'm a pretty heavy smoker, and I hate having to go out for a cigarette every hour. I love having a cigarette after dinner or sex, but I hate the manditory mid-afternoon cigarette breaks. That and my stamina now sucks so I can't really excersise a whole lot, which I think would make me feel a whole lot better. Or maybe I'm just talking out of my ass - it's 10:30 AM and I've been up all night smoking pot and programming.
--
If that's all they want, make them take out the part of the contract that syas they own all works that you produce. You might want to have an employment lawyer look over the contract, and if you care enough you could have them draft a copy that included the NDA parts but properly removed references to IP ownership.
At my company, I questioned a document like that (only worse in many respects - the document claimed to own IP you produced for a year after you left!). I sent a number of questions through my manager to the legal department, saying I'd sign when the questions were answered to my satisfaction - I've not had to sign anything yet, and am beginning to think they'll never answer my questions. At least I haven't had to sign anything I don't agree with.
"There is more worth loving than we have strength to love." - Brian Jay Stanley
I've had a similar problem earlier this year, in Febuary to be exact, I pulled through thanks to a few lifestyle changes I've made - not that my previous ways were wrong but taking a new perspective on life is always "A Good Thing"(tm).
:)
First of all I started going to the gym - sure I'm no Hanz and Franz (primitive SNL culture for the contemporary nerds) but it helps me unwind beyond anything that I've ever imagined - pumping iron helps pump some blood around and helped me to cool off from programmer's block - I used to be so stressed that I used to fall asleep on the stationary bikes!
Second, I've gone back to playing some FPS games - sure I've got a massive machine with a Voodoo 3 video board (it helps to have a good machine at these times). I know it's not exactly the most professional thing to do - I FPS at work - but whenever I come to some code that doesn't want to be typed, I load up Unreal Tournament or Quake 3, go into a little deathmatch with the bots until I forget my worries (usually some 10 minutes, I REALLY suck at Quake 3 so it takes a little more there). When I'm done and the Fragrush goes down I feel like I've just arrived at work - I suddenly have a clear head and some more patience with myself.
Oh - another thing - I read A LOT of Slashdot, I browse at -1 just to laugh at the posts that manage to get moderated down, some of those guys are REALLY creative.
All browsers' default homepage should read: Don't Panic...
Ooops, typos on the subject are worse than da onez inzaide da comment!
All browsers' default homepage should read: Don't Panic...
"The GoF Book" (Gang of Four) is considered by many to be the "bible" of design patterns.
Design Patterns: Elements of Reusable Object-Oriented Software; Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides; Addison-Wesley Publishing.
The most important thing in any project is you! If you can't think, it's probably because your brain is tired of coding.
I recently completed my senior project for my BS degree. During the whole middle of this project, I was the same way you are. But rather than worry about it, I went out and had some fun, talked to some people about life and generally just got re-energized. Sometimes that is what it takes.
So get out there and make the best of your hiatus! Chances are that everything will fall into place and make sense again once you're done!
Doing something totally unrelated helps. Sorta lets your mind work in the background and relax in the foreground. Take a 30 minute break and enjoy outside; get yourself a cup of coffee 15 blocks away. Its like tip-of-the-tongue effect.. the answer is always in sight.. sometimes you have to let it come to you.
Its amazing how much thinking you can get done while you aren't thinking.
---
-
ping -f 255.255.255.255 # if only
This is a good point. I remember reading about the physicists working on the Manhattan Project or something - some of their best thoughts came to them while they were having a quiet walk away from their desks and other people.
Don't be such a downer.
I find it helps to stop and scream a steady stream of profanity (with a little obscenity and some blasphemy thrown in for good measure) for a solid five or ten minutes. I stand up from my chair, put my fist through a wall, and curse the computer, the bastards who made the dev tools and the environment I have to code for, and the people who want the program written. It's helped me out of blocks many times.
Of course, I'll also resort to prayer when nothing else helps. I keep a herd of goats in the back yard for just that purpose, and a sacrificial knife sitting between my keyboard and my monitor.
---
Despite rumors to the contrary, I am not a turnip.
1) Any thinking scientist, who is religious, must spend some effort to understand and synthesize their religious beliefs with their scientific beliefs.
Hmm... all people think (including scientists), some scientists certainly seem to refuse to examine their religious beliefs, therefor, this is nonsense. Either that or a tautology redefining the word "thinking" to no useful end.
2) Atheism is the dominant belief in the scientific (geek) community.
I'll go along for the point of argument, but I think there are more agnostics and people with wierd personal religions than true atheists, unless you consider all people to be atheists who don't follow an organized religion.
3) So by your logic there are more religious people on slashdot then are listed here.
I wasn't aware that religious people on slashdot were "listed", and I'm not following anyway.
If you're saying that Christians are oppressed on slashdot and in the scientific community in general, therefor there are many of them in hiding, you're full of it. Note that the top-level post "Pray" got modded up to 5. Anyone who has strong views on anything and posts them gets flamed, that doesn't deter any group from posting.
---
Despite rumors to the contrary, I am not a turnip.
Now, I ask you, is God's case any worse? Have you read his book?
God's case? For his own existence? I'll be laughing at that one for weeks. If just came to me and told be to believe in him, I would. It would be an awfully easy thing for him to prove.
I've read the Bible, it's a fairly random collection of history, practical advice, and silly myths. There's plenty of good stuff (like any mythological collection, it provides powerful metaphors), but even more crap. Amazingly, for every point there seems to be a contradictory point. I guess this was done intentionally, so the literate priests who study the whole Bible could find a passage and point it out to a barely literate person to support or justify any action.
If there was a God who loved us and wanted us to worship him, he wouldn't hide from us so carefully.
There are many thousands of such questions, so you might be able to pick a handful and bluff your way around them,
This is classic sophistry: have a thousand claims ready, don't make any effort to prove them or support them in any way, just make sure you have enough that your opponent can't disprove them all beyond a reasonable doubt. If he makes a good argument about one, just move on to the next. The technical term for it is a "shit barrage".
Any idiot can keep spouting nonsensical claims until the wisest man in the world just leaves in frustration. Any reasonably bright huckster can make up a continual stream of fairly plausible claims on spot, so ignorant observers go away believing him when his opponents leave in disgust.
Look at you! You threw out some completely random, unexplained, unsupported claims as if you expect me to feel a need to disprove them. Then, without even waiting for an answer, you reveal your intent to avoid arguing the points you brought up, but to abandon them when they are challenged and bring up new unsupported claims from your bottomless pile of bullshit. Here's a hint, pal: in science and rational debate, disbelief is the default, and any claim is considered false without supporting evidence. Your "thousands of such questions" wouldn't look so good if you realized that you are the one responsible for bringing proof to the table, since you introduced them. Scientific claims are few and cautious for a reason: it's a lot of work to prove things (they're also vast and sweeping for efficiency's sake).
Example:
Religious Nut: If you slam your head against the wall a million times, you'll become immortal.
Rational Man: That's nonsense.
Religious Nut: Do you have any evidence?
Rational Man: Well, I know that smashing your head against the wall isn't good for you.
Religious Nut: Ah hah! So you admit you've never actually tried smashing your head against the wall
Rational Man: Actually, there's a well document case of a man in an insane asylum who smashed his head against the wall over a million times. He died around one million one hundred-thousand.
Religious Nut: Well, that one's not important. I'm right, but you're obviously too blind to see. Anyway, stuffing both fists up your own ass lets you talk to God.
Rational Man: That's the most stupid thing I've ever heard.
Religious Nut: Let's be scientific, have you tried it?
Rational Man: Of course I've never tried it. I've never heard of anyone doing something so incredibly stupid and painful.
Religious Nut: See, you have no proof! It must be true.
Rational Man: I guess you haven't tried it either, there's no room for either hand to fit with your head up there.
The creationists have always been arguing like the Religious Nut. They are shown to be wrong over and over again, only to bring out wilder and more ridiculous claims, until everyone who argues with them recognizes the obvious: it's much, much easier to make wild and ridiculous claims than to disprove them.
Ever hear the saying "Don't try to teach a pig to sing. It wastes your time and annoys the pig."? Well, I've certainly wasted my time, are you annoyed?
---
Despite rumors to the contrary, I am not a turnip.
Given the way scientists were treated in those days when they tried to suggest that they knew things that officials of the church didn't, don't you think that terminating your essays with "Of course, I believe in God, and this is all God's work. Actually, this proves that God exists. Isn't God great?" could be motivated by self-preservation rather than severe belief?
When atheism is oppressed (as it has been through most of history, and still is in much of the world), practical atheists give lip-service to religion. When speaking other words, or even remaining silent, would likely be punished, one's words are no evidence of anything at all.
BTW, Newton was a remarkably ruthless and pragmatic person who is known, as a matter of historical record, to have told lies often, and about many things, for his own benefit.
---
Despite rumors to the contrary, I am not a turnip.
Here's what I do:
Codeine, methamphetamines, oxygen deprivation, etc can be substituted in step 2 if you have hangups about things that are illegal but shouldn't be. I've found alcohol numbs you a little too much, but it can also be effective in small amounts. The point is that in order to solve a problem you can't rationally solve while perfectly sober, you have to numb that part of your brain that does all the "logical" thinking. A problem that escapes your every attempt to solve it logically requires turning off the "left brain" analyzer so the "right brain" (instinctive) heuristic tools can be heard above the din the left brain creates by being so loud and sure of itself. Perhaps that's why we have two brain halves... one to solve problems, and another to solve the problems the first half can't solve because it's not trying to create a solution to it, it's just letting solutions come to it and filtering out the best one. I know it makes little sense, but how better to find a solution to a problem that doesn't make sense than to try solutions that don't make sense?
"The best weapon of a dictatorship is secrecy, but the best weapon of a democracy should be the weapon of openness."
=:-) Seriously though, that happens to me too, and the best thing is to get a rest. What would be really nice is if i could get a job working on videogames rather than business software, i think that would make a bigger difference though. I learned to program so i could write games. I tinkered with that all through school (elementary-high school), then i had to go and get a job, and so now i write business software, and i'm to burned out at the end of a week to even consider firing up an editor and coding something for myself =:-(
---
Play Six Pack Man. I
This summer I am working as a web coder. I was given several large projects that involved creating complex functionality in certain web tools. The solutions I came up with, both for the functionality of the tools, and the parser I wrote to hide the nasty parts of the code (cross-browser javascript is the boon of my existance), are ones that I could forsee using on personal project. This is sort of the opposite of what you suggest (my work assignments give me motivation to code things but generally enough so they will be useful to me later).
In relation to another project they asked me to sign an NDA. I read the details of it and it states that they would own any code I develope here. I discussed this and was told that really the just wanted me to sign the agreement so that I couldn't disclose the details of the product for which we were creating the website (like I know any anyway) but they didn't indend for it to cover the code (which had nothing to do with the product itself). However it was just the standard NDA form used in the company. I have gotten by not signing it and no one has noticed, and I think I won't end up having to, but I was wondering what kind of language is it that you have in your contract that protects your ownership of your code so that if I am ever presented with a simmilar situation I can suggest a modification.
I often clear up programmer blocks by forcing myself to rethink the code differently. For example,
:)
1. change code indentation from 8 to 2 or vice versa, so nothing looks familar anymore. Turn off syntax highlighting and turn it back on sometime later.
2. mentally pretend not to know anything about the code being stared at, and scan the code as if describing it to myself.
3. erase whiteboard thoroughly, and draw a colorful block diagram of the code structure and dynamics (especially useful for event-driven code).
4. write up the whole thing in pseudocode, starting from scratch. Once I took this all the way - I took an afternoon off and wrote a working FreeBSD VM subsystem simulator, and immediately identified the elusive bug in the module I was writing.
Other than that, of course, slashdot and userfriendly breaks help the most
Yeah, yeah, mod down. It's a spelling flame. Do your worst. I'm so scared. You think you're so special because you have points today -- "Oh, I must use them carefully! I can't waste them! I must raise up the insightful low-scoring posts! I must prevent the trolls from creating havoc! It is my sacred duty!"
Blah blah blah. Close that browser window and get back to work, doofus.
Save the whales. Feed the hungry. Free the mallocs.
And instead of staring at the screen trying to write one line of code, I'm staring at the clouds all day trying NOT to write one line of code.
But I feel much better now.
I'm not a big fan of weight training, but a couple hours of good hard mountain biking do wonders to clear your mind. For me this works in two ways; being tired from the physical exertion relaxes me and takes my mind off everything computer related. Also, while going through the trails quickly, you really *can't* let your mind wander off to the code, or you'll end up becoming very intimate with a tree or other immovable object!
It's only software!
I find this method helps a lot: you can produce a small elegant system which works. It's like "wow - this is really elegant and I coded it." It seems to switch your programming circuits on but leaves the blockers off. The result is you realise you *can* program after all and you'll have probably learned something in the process - maybe a deeper understanding of the algorithm or a faster way to do things. The brain is pretty good at self-organising which means any knowledge you gain doing this could well help you with a stumbling block elsewhere i.e. you're not wasting time on a trivial exercise...
--- Hot Shot City is particularly good.
That's great if you're given a project with thorough specs up-front that don't change through the development process. For many good and bad reasons, requirements often change mid-project, or are handed to you with missing parts that you're told will be filled in later. I doubt I'm the only programmer that's been faced with this set of working circumstances.
Of course it's not how you're supposed to write code, but an employer simply wants you to provide a workable solution in an amount of time that the business needs dictate.
I've found the niceties such as reusability and maintenance go out the window in favor of speed of implementation. Of course, one could successfully argue the merits of following proper design principles. However, the business can also present a solid case on why a flawless application delivered long after it was needed (possibly late enough that the requirements are obsolete) is worthless, while an imperfect system that mostly meets deadlines and requirements is at least worth their money.
I know this kind of programmer block personally. It happens once in a while - when trying to delve into a new problem.
Sometimes its the need to understand lots of existing code. Sometimes its the feeling I need to find good enough architecture. I find myself staring at the screen for a long time. It may take days, even a week - I try to do anything else to distract myself from what I'm supposed to do.
The problem is when there is an illusion of something "big" I need to handle, without a clue of how to cope with it.
The best solution is to start with something small, even not directly related, and then do delve into the task ahead.
Suppose I need new architecture. I start writing few small objects, start to play with them using code that does lots of printing to see how they work.
Once you have some code that does something, even remotely related to what you need, the rest is easy. The most difficult question is "where do I begin", and the answer is "begin with something stupid and useless - run it, and then continue".
It works for me.
I sleep for a day, then go on a coding binge so my brain enters that happy little wavelength where you can't feel anything and all you can do is code. You don't really know what's going on, you just write some damn good code. Caffiene is for chumps.
______
______
everyone was born right-handed, only the greatest overcome it.
http://leftorium.net
Everybody is different so I don't know if this
will help but here are some of the things I've
done in the past that have worked for me:
* Start an exercise program during lunchtime or in
the mornings. I prefer cycling since it allows
me time to think while I'm working out.
* Build a "creativity dump". This is a side
project that is just for entertainment. When
you get totally burnt on your current project,
you set that aside for a while and play with
your entertainment project. Currently, I have
a little black book that I write stories in and
log humerous observations hoping that someday I
can put together a five minute comedy routine.
* Learn meditation - I don't mean meditate on the
problem, I mean totally clear your mind. Works
best for me at night. If I can get the
conscious mind to "shut up for a while", it
often jump starts my creative process. I've
ofter dreamt the answer to problems after doing
this.
* Just get the hell away from the whole thing for
a while.
I hope this is of some help. Good luck
"Rascal am I? TAKE THAT!" -- Errol Flynn
It's one of two things.
;]
1. you bit off more than you can chew.
2. your brain is temporarily fried.
In the case of 1, ask a geek greater than you.
There are pleanty on slashnet. Not only is there a good possibility somone can help you, but talking about a problem out loud often helps people find the solution on their own. Second, follow instructions for 2.
In the case of 2, walk away and stimulate your brain in a different way. Play some tony hawk, or some quake, or better yet do something physical. Pushups, stretching and meditation get the brain back in order. also, make sure you've think about what you've eaten that day. Low blood sugar will bring you down. If this doesn't work, pick up a trendy drug habbit, smoke lots of cigarettes and drink coffee until your piss is black.
I've heard that "a writer writes, always" (OK, I heard it on "Throw Momma from the Train") but it's a good cure for me when I'm blocked. If I'm getting analysis paralysis then I find that just diving in is a good way to get unblocked, find out some of the non-obvious issues, and THEN go back and design the solution properly.
To be honest, once I've dived in and actually got some code written that's usually enough to shift my block. The last six months (since I figured this out) have been my most productive for years.
An anti-religious take is still merely a take.
More to the point: if you believe in a caring personal deity, prayer tends to have a calming, meditative thing going for it.
This would tend to allow room for some perspective/distance to creep in.
Eff-all use to an atheist? Maybe; unless the Divine chooses a bit of co-incidental revelation... {8{)}
-~ ~- -~ ~-
__
Arse
First,
Congrats to you and your bride.
You were going through a classic case of burnout, along with other things on your mind. It happens to just about all long time coders (and you are one).
This problem is why the AVERAGE length of a coding career is 5 years. You did the best thing you can do for it. Take a week or 2 off. Read some books (maybe not even on programming). Talk it out with some other programmers. Go out into the big blue room. Take a nap in the afternoon. Play with your cat/dog/other animal. All the while, your subconscious will be working on the problem.
The big warning here however is this. You WILL experience this again, and it WILL come more often, unless you take enough breaks to keep it away. Make sure you walk away from it on weekends etc. There is (trust me) some residual stuff still there, as it takes more than a week to get fully over this. Do you have a hobby (beside computers?). Spend some time doing it (or GET one, if you don't have one).
Me? I just go down the basement to my shop and make something, even if it's just sawdust and/or metal chips.
Charlie
-- 73 de KG2V For the Children - RKBA! "You are what you do when it counts" - the Masso
First and foremost SLEEP! If you can log 12h sleep a day, that's great. You're probably severly overdrawn on your 'sleep bank account' due to OT, stress etc...
One you're 'back in the black', try to avoid late night parties during your off time, do some daytime stuff instead , and bask (safely, w/sunblock) in the Sun. The sunlight should fixup your vitamin A, serotonin(sp?) level and resync your biological clock.
---
Interesting...
Basically you've said that if you separate design from implementation, the entire process goes smoother. I agree heartily.
Determining whether a problem or necessary addition is located in the implementation or the design aspect is crucial to proceeding correctly.
So in light of this, coder's block is your brain telling you that the design is incomplete or even incorrect! Proceeding with implementation will garner you bugs and problems down the line.
Oxryly
I think there is something significant about it
being on paper myself. If I am having a problem
with a problem, I inevitable go to paper.
Sometimes it's notes, sometimes it's printouts.
But it's almost always paper.
There have been a lot of comments about getting away, changing your line of thought... this can often help, but at times I have found this is a subtle subliminal hint that something's wrong with the coding. It could be that the thing is improperly designed, or the approach is wrong, or whatever.
Sometimes, if you scrap it (or put it on another burner) and start from scratch -- even test code helps -- you can reignite the brain. Do the thing completely differently in the second instance. It may be that all it does is restore your interest in the project, that counts, I think.
It has worked for me.
SYS 64738 NO CARRIER
Finding myself unable to code, I started writing the code in english on paper. I would sit down in a corner of the room and start writing in english. "check the user permissions. if the guy is an admin, show this and that screen. for each line in the screen, make sure it's bla bla." and so on. Once I was done and saw that I had something that could work, I took the text, pasted it into the existing source code and started translating it to code (Java in this case). Maybe it won't work for everyone, but it did wonders for me and I was able to overcome my block several times this way.
That's what I did and it's helped me to no end...
Seriously, I burned my self out a long time ago. Precisely by not doing any of the suggestions people have sent in. Now, 10 years later, I'm trying to teach myself to code. I haven't forgotten syntax or style, just confidence. I'm terrified to write another line of code. And I doubt my syntax even though it still compiles (when I write enough to actually compile it).
The best thing you can do to maintain your ability to code is TAKE VACATIONS. Don't spend 80 hours per week, or more, coding and expect to be able to do it for long.
And don't use computer conferences as your "vacations". Actually take them. Go to beaches, forests or anywhere else where computers are at least rare. Leave your laptop, cell phone, palm pilot, or other toys at home when you go.
Above all, get out into the Big Blue Room(tm) and you'd be amazed how good it is. I watched all my friends remember this as I ignored it.
Now I'm in marketing at a major bank.
Please kill me.
heh. i'll prolly get modded down for this but i have to say it - switch to Java or C. that C++ stuff fries your brain...im much happier with java/c/modula-2 than C++. of course if you *have* to do C++ - a walk usually helps. :)
bleh. it gets boring after a while. the first time was fun then the 2 minute ride down with chute open becomes boring. it didnt even scare me the first time...although it should have. i pulled too soon and nearly broke my leg. :)
I'll second that... there's nothing like a nice bike ride (10-20 miles or so) or a good weightlifting session to get your mind off of other things so you can be more focused when you get back to them later.
If I haven't lifted or biked in a few days, my attention/focus span heads to about 5 seconds...
--
"It's tough to be bilingual when you get hit in the head."
Cuddle him, caress him, mark all over him!
Execute? [Y/N] _
lol... too many people misspell this word--i'm voting for "other" things being on their mind ;)
I found that the best way for me to keep out strees is to exercise. Specially really early in the morning. I do some cardio, then I swim and finally I go to the sauna. By the end I don't feel my muscles anymore but my mind is crisp and ready for action.
If you can go camping at least once a year that will help you alot. Remember NOT to bring your cell.
BTW, congrats on your attaching of the ole ball and chain!
I never use flowcharts.
At the implementation level, object-oriented code and flowcharts don't mix well. Most of us find little value in hundreds of flowcharts consisting of (start)->(call super)->(one line of additional code)->(return). Something like Z notation (to describe the object and the various operations on it), on the other hand....
At the detailed design level, almost all problems break down into one of 500-1000 lower-level patterns. E.g., "this is how you recursively descend a directory tree." While you could use flowcharts, I (and many others) find it better to use canonical "null" examples. The work breaks down to verifying the common stuff is the same and our extensions do what we want. (See also earlier OO comment.)
At the design level, "patterns" work best. At that level the focus isn't on *how* the code is put together, it's on *what* each block of code is supposed to do.
So what's left? Flowcharts at the architectural level? I don't think so. (This level should have DTDs, though!)
For every complex problem there is an answer that is clear, simple, and wrong. -- H L Mencken
Seriously, there are some nice, somewhat legal ways of dealing with stress in the netherlands... from the redlight district to the cofee bars...
damnit, i'm jealous...
tagline
... hi bingo
I quite agree, and I also agree with the comments about taking breaks to get ya mind off the project for a while(and other comments along those lines) but when a browser and fast net connection are only a click away it is all too easy to say 'Oh, I'll just check /.' and then your train of thought is gone and you've just lost an hour of work.
Couldn't agree more.
Brian Macy
Been there tons of times. What usually works for me is getting lots of sleep, drink lots of caffiene and do a little "research". the first to will get your mind into a state where you can focus better and the research can help you see the possibilities. Newsgroups are good for this. Lots of examples to peruse while you are thinking. Getting started is the toughest part when you are stuck, so just start trying things and a solution will usually come to you.
Coder's block seems the biggest problem for me when I don't have confidence with what I'm doing. Recently a large Intranet project I am working on did a 180 degree turn when I was asked to reimplement my work in VBA/ASP instead of PHP. I hit a wall. I felt like I was being asked to "dumb down" my application and implement it in a buggy language. What finally got me going was what I mentioned above. It's really a lot like running. Sometimes you have to push through the low points to keep going.
Take a long vacation! Its a great way to get things together. Two weeks very far away from work gives you lots of insight.
I recomend Queensland
Initially, we thought that the other person would need to make helpful comments and ask questions - but it turns out that it doesn't matter if they just sit there. The very act of explaining it to someone is all that it takes.
This prompted us to wonder if you really needed a fully qualified programmer to explain things to. Would a secretary be enough? What about a trained dog? What about a cardboard cutout dog?
We never did try that (you feel kinda silly explaining your code to a cardboard cutout dog) - but people would often say "Would you mind coming over to my cube and being a Cardboard cutout dog for me?"
Some time ago I told this story to a friend and he told me that they'd come to the exact same conclusion at their organization - but they ended up using an inflatable sex doll as the 'entity' to explain their code to! :-)
Anyway - I think that explaining your code somehow allows you to see all the little uglinesses that just staring at the screen didn't show up. It works for me - but YMMV.
Good luck!
www.sjbaker.org
Speaking for myself I can't get any programming done and my wedding is till 10 months away. It's not as though I am burned out though.
When I come home from work (I do minimal coding at work), I'm tired. I spend half an hour changing/relaxing and then I eat supper. By then my fiance is over, and she doesn't want to sit there while I program. So my problem is that there is not enough time in a day.
Oh well, what can you do? I mean other than disrupt the space-time continum with a giant "laser."
Devil Ducky
Devil Ducky
MY peers would get out of jury duty.
Hobbies away from a computer? Blasphemy!
/., laugh at some AOLers. All of these things are done on a computer but should not remind you of programming (unless you start editing the slashcode for some reason).
Seriously you dont have to get away from computers just away from programming in all of it's forms. You can surf the 'net, read
As for your second suggestion, why not boast? Coders just get made fun of in the "real" world. Why not let someone know exactaly how important what you are doing is.
And if you find some girl who will actually listen to you while you are boasting: Marry her. I'm not kidding about that.
Devil Ducky
Devil Ducky
MY peers would get out of jury duty.
Check out Beck's Extreme Programming. In it, he describes a highly interative approach to design and coding. I, too, have experienced coding blocks and my approach is to go ahead with whatever design I have and code what I can. After it's coded, I can easily see what I should change. I usually cannot see that until I've written something. You will throw away code, maybe even a lot of it, but you're first "released" version will be about your third internal version which makes for a much more solid release.
Also, I'm NOT suggesting you ignore design. Design what you can - leave those fuzzy areas out for now. They will be much less fuzzy when you start writing the code around them.
YMMV,
-tim
I sometimes get terrible programmer's block. I think I'm susceptible because I'm an over-picky perfectionist, and if something is not done correctly in my mind, I will wrestle constantly with it. If any big projects come my way I usually spend a good amount of time hypothesizing and drawing diagrams and coming up with the optimal architecture and design, avoiding implementation. It usually takes me a while to be confident with the design in my head and get up enough nerve to just dive in, and that can only happen after about two cups of coffee. Six hours later I will be out of breath and probably have something done, but I won't want to touch it for a while. I usually end up writing anything major several times over until it is either "just right" or I am so sick and tired of it I archive it somewhere and hope nobody wants it done.
Like the author says, I *do* find reading about good, correct, elegant design and implementation inspiring. I can tear through manuals/tutorials...but to get my hands on the keys to do real work on a big project I first have to overcome the fear of "not doing it right" the first time or "messing something up".
Then again maybe this is just a strange neurosis of mine.
It's 10 PM. Do you know if you're un-American?
The solution for this problem that you have quick reflexes and good driving skills.
Driving very fast does the trick. But you have to do it for a long time. A trip from San Francisco to LA, or equivalentt, will do the job.
You need a decent car, but not a great one, like say a Honda Civic Si.
You need to drive faster than 120 MPH for extended stretches. Therefore, you should probably do this at night on an uncrowded freeway.
When you are done, whatever happens to your brain will have probably cured your block. Perhaps other activities which require INTENSE CONCENTRATION ON IMMEDIATE PHYSICAL REALITES (not abstract concepts and whatnot) will have similar effect, I don't know.
This also works for writer's block and boredom.
I've never had a real programming job, so I don't know if this idea would work in such a situation...
Didn't Thompson say, "When in doubt, use brute force"? Whenever I have had programmer's block, it's always been because I was far too worried about making the code fast, or extensible, or portable, or perfect. By copmparison, writing a bubble sort algorithm is almost like meditation... it can be very therapeutic.
Once, I was so sick of a C++ project that I just rewrote the whole thing from scratch in Tcl. It was fun, and the it cleared my mind enough to allow me to get back to the real code.
Of course, another advantage of this method is that you actually end up with working code. You may even find that your brute force algorithm is good enough to keep after all.
MSK
... but my own experience and observation of others leads me to believe that part of the reason of the fatigue is in fact using C++. Seriously. It is simply such a tiresome language.
...
I know, I know, you often don't get to choose your language, but working in especially Lisp, or Delphi, Modula-3, Simula, Java, Forth, even plain C seems so much more rewarding
And I don't mean just go out walking for 1/2 hour at lunch. I mean take the afternoon off and go hiking with a friend, or take a few hours to prepare a wonderful evening out/in with your partner. Buy a roll of film and go out in the city and take pictures. Creativity is not a nine to five thing, and sometimes you need to do something completely different. You will usually find that things are clearer when you come back to it.
Been there, done that, often.
Often an algroithm needs to buzz around my brain for a while before coding it. If I sit around and DO NOT CODE for a couple of weeks, drawing flowcharts, data diagrams, doodles, reading books of algorithms and suchlike, then usually I reach a point where the whole program just suddenly spews out complete and right.
On the other hand, if I force myself to code, I get stressed, take much longer, and end up with something that needs rewriting.
I guess its a variety of Eureka phenomena.
Of course, some pointy hairded bosses may object.
Maybe it's just me/my situation, but the spouse is usually the wrong person for this sort of thing. Maybe because they try to be helpful even if there's no real chance of that. (Having a techie for a spouse might help, I suppose...)
Picture this...
No Laughing Allowed!
Now, this is kinda funny to me, and I'll prolly get flamed for it, but just get up and take a walk. Go outside, sit on a bench or something, take a deep breath, and relax. Some of you guys act like your strapped to your chair! "Switch projects, work on documentation. blah blah"
I say, get some fresh air and relax for 15 min. You'll feel better and take on the problem with a fresh attitude and a new outlook (oops, did I say outlook? Sorry.)
CApt_Troy
So I think you did the right thing by riding it out, reviewing fundamentals, letting the solution present itself to you of its own accord.
If you think of writer's block as a boulder in your path, you can extend the metaphor to how you go about destroying it: You can either flail away at it with a sledgehammer, expending enormous energy to make slow, painful progress; or you can study the rock, learn it, find the cracks, insert the chisel and destroy it with two or three taps. It is rather Zen. When you are not actively typing away at a problem, you are gaining awareness of its true nature.
So use your time of stuckness to do good things, and if you work where your manager says things like "I didn't hire you to think, I hired you to work", buy him a copy of Demarco and Lister's Peopleware and tell him to go away and come back when he's read it.
Note: The above links to Amazon.com do not imply endorsement of them. Support your community's independent bookstores: read Amazon's reviews of these books, then purchase them locally.
--
This is not my sandwich.
In my experience, coming off the caffeine for a few days restores my creative thinking when I'm stumped.
It lets my mind think laterally, around the problem, usually when I'm doing nothing at all.
Once the idea's start flowing, its back to work and back on the caffeine!
All spelling mistakes are in my mind and are faithfully reproduced by my fingers
I would [] start writing in english. Once I was done [] I took the text, pasted it into the existing source code and started translating it to code.
I've met programmers who do this as a general technique for coding. It works for code generation but can be hard to debug.
The solution is to add a simple step. After you write it in English, paste it in TWICE. Then turn the first pasteup into comments and convert the second.
Shazam! DOCUMENTED code!
And if you ever have to make a mod to that part, and you start suffering from coder's block, start switching your attention between the comments and the code.
Most of the solutions to blocking that I know of fall into two variations of one category: Stop concentrating on the subject, for a short or a long time. (Get rest. Do something unrelated. Do something related but different. Radically change your schedule.) This thread leads to more variants of the theme:
- Write in English and convert. (Change an element of your coding style.)
- Swtich focus between comments and code. (Do something related but different.) Leads to:
- Compare the code to the comments, analyze aspects of the differences and/or check for bugs. (Again, do something related but different.)
Bantam Dominique roosters crow a four-note song. Once you've heard it as "Happy BIRTHday" you can't NOT hear it that way
if the obvious cures (hikes, bikes, movies, sleep) don't do it, pick some other programming task - the one-day kind. Focus on it. Start it. Complete it. Hey - even document it.
There's nothing like a completed project to motivate you on the next one.....
If riding in an airplane is called flying, then riding in a boat is called swimming...
If you really want to fly, get out of the plane... I highly recommend taking along a parachute. Incredible view, incredible mental focus, nice rush.
For another great hobby, I recommend solo autocross racing. It's pretty cheap, assuming you already have a fairly sporty car. It's a great way to meet cool people who may or may not be into computers.
Speaking of that, I saw a woman at an autocross Saturday who had the words " Well behaved women never make history " on the back of her roll bar. In four weekends of autocross, I've met several cool people and have become a much better driver. I think having a secondary focus makes me a better programmer / software designer.
--- "So THAT's what an invisible barrier looks like!" - Time Bandits
The reserve chute is spring loaded, and MORE reliable than the main chute.
The real statistics are 1 in 187,000. It's statistically safer than most freeways.
If you can't accept THOSE odds, then don't skydive. But it's a lot of fun.
--- "So THAT's what an invisible barrier looks like!" - Time Bandits
You also write _MUCH_ more readable code when you do this ;) it's a requirement of swapping between 5 projects that you are able to _figure_out_ ( not remember ) what you were doing. -Largos
The Slashdot crew isn't the mostly likely group to go hit the weights, but for me physical exercise really helps keep my mental side running smoothly.
Endorphines and what not, I guess... Plus it helps get your body tired so you can get longer, more restful periods of sleep. They've done lots of research showing heavy exercise can overcome some mental problems like ADD, and that is the same mindset I end up in when I feel blocked...
Best of luck.
I've had this problem several times over the past year and I've found that the best way to get out of it is to write something fun and interesting. Usually it just amounts to a new cool and useful but strictly unneeded feature in another project or in our application framework or library. Make it generic and reusable so that your mind isn't stuck thinking about just one use or project. (Make it nimble to get your mind nimble.) It needs to be small and be done in a day or two.
Then you tell the rest of your team about it and when you see it get used you feel like a programmer again.
Part of the solution can be changing habits -- this is for long-term fatigue, not just temporary 'block.' If you aren't enjoying yourself, AT ALL, maybe you should try coming in at different hours (a lot of workplaces allow flextime now because they want to keep their laborers and keep them happy); morning-afternoon or afternoon-evening or morning-evening! Eat small meals, spaced out in the day -- or eat a few big meals, for 45-minute breaks. Instead of putting off the work you hate, try doing it for 15 minutes, then rewarding yourself with a trip to sluggy.com or something. (Or posting on Slashdot...)
But when it comes down to it, if you find yourself dreading work EVERY DAY, don't do what I did -- just try to get through your prison sentence until fall comes and you can go back to school. This is a hot economy. You can quit (most contracts I see say 'you can quit at any time with or without a reason and/or notice) and temp for a while. Find something you LIKE, at least, and if possible, LOVE. You only live once.
Gotta go -- boss here...
Ceterum censeo Microsoftam esse delendam.
I've seen and experienced both block and burnout. Block is relatively easy to overcome and most of the suggestions I've read so far pretty much cover it.
But burnout is something different. About a year ago, I was fed up. I hated my job, my boss, my coworkers, computers, the web, everything. I was just sick and tired of the long hours and total lack of recognition. I couldn't code at all. I didn't even get two lines a day. I was lucky if I did anything at all for most of a week.
I was totally fried.
So I went away. I didn't just stop coding for a while to delve into C++ books or work on something else. I went totally away. Didn't look at or touch a computer for almost two weeks. Didn't check my email. Didn't browse the web. Didn't play games.
I read some good books (all non-technical), got some good exercise (Martial arts are the best for mental recovery), spent some time in the mountains, and just took a break from it all. When I went back, I was more productive than I had ever been before, and I'm still more productive than I used to be.
If you're suffering from block, just take a short break from the code, or try approaching the problem from a different angle.
If you're suffering from burnout, get the hell away from your computer and cell phone for a while.
I'm sure most people do this, but I'll say it anyway.
:/
My projects always have 500 line todo lists which mix awful architectural problems with 'polishing' (eg. nasty flash when new image dialog pops up/class browser should link lazily). If I get stuck on one, fixing a few easy todos often frees the mind (and brings back confidence), making the solution to the tougher problem 'obvious' when I come back to it.
So: anytime you notice something wrong/broken, however trivial, always add it to the todo. It'll make great work-avoidance material when you're blocked.
I guess this doesn't work so well at the drawing board phase, which is maybe what the poster was saying
I too have been programming professionally for over a decade (in C++), and here's what I've learned:
Don't be afraid to fail.
Sometimes, the problem definition is too vague, or there are too many unknowns in the mix. You have to follow the scientific method, and the first step of the scientific method is gather data.
You have a module that you cannot figure out how to do? cvs commit, then say to yourself, "Self, we're going to write something to see what is what. When we are done, we will delete what we have written, and using what we've learned, write it properly". You'll be amazed at how much clearer the hidden requirements become when you start bashing code against them.
Now, as to the C++ issue: I don't know if part of the problem is your level of skill in C++, or if that is just a red herring. If you really aren't comfortable using OOD, then for Torvalds' sake DON'T! Just write the code proceedurally. Again, I've often found that once I've written a code block, I can then better see where the objects are within the code. Then, I re-write the code to be OO.
In my experience, no object is reusable from the beginning, no matter how much work you put into it, no matter how long you worked on the design. Only after the third time a class has been used have you come close enough to defining what functions need to be virtual, what members non-private, what args need to be passed to the constructor, etc., to make the class really reusable. Accept it and move on.
Like I said, don't be afraid to fail. It's the only way you will succeed.
www.eFax.com are spammers
> What if you're an atheist? That is a known bug. Just fix it.
--- Sueños del Sur - a webcomic about four young siblings
That was another bug.
I fixed it. Sorry.
Nothing to say. Moderate as down as possible.
I'm going to sleep. I'm feeling blocked too.
--- Sueños del Sur - a webcomic about four young siblings
I mean, to achieve the effects you want, you must be drinking coffee all the time.
:)).
And when you stop drinking for a while, you end even more blocked than when you began.
Forget the coffee. If I may chose from all the advices here, I will chose praying and sleeping. Sports can help (due to the endorphine thing), but if you're blocked because you've worked for a long while, you will simply be too tired (and eventually, you will fall asleep, like I did some time ago (well, I'll fall asleep anyway
[...]
--- Sueños del Sur - a webcomic about four young siblings
I can totally relate in this respect. Almost 3 years ago I just stopped programming, and it was the second most frightening and depressing experience of my life. The one that takes the cake was almost 2 months ago 2 weeks after I had started working for a new employer it struck once again. First I thought "ok Im screwed last time this happened it lasted 2 years", however it only lasted about 2 weeks. After about a week I was starting to feel alittle depressed, very moody and not a very nice person to be around, but really for a programmer to not be able to code is like not being able to have children, or not being able to feed and clothe yourself. Lucky for me once I had gotten over the embarrassment and shame of it I approached my boss and he was very understanding. Apparently he once had a 1.5 year block and told me to go home and come back whenever I felt ready. I am curious if any psychiatrists have dealt with code challenged programmers.
+ ginko
Possibly 5HTP if you are a bit depressed.
Lew
"The Constitution, the WHOLE Constitution, and nothing but the CONSTITUTION."
I suspect it has something to do with a combination of physical relaxation, quietness and lack of distractions (no radios/web/irc/etc)
This is great. I was just on my way down into a rut when I read this. Every coder needs to be told every now and then that the code that we write is good (lie if necessary :) and that we are all on the same team and all that...
:)
sounds silly, but it realy makes a difference
This is a symptom of caffeine addiction. Inability to concentrate, anxiety, etc.. Also, cut down of sugar. Sugar affects your brain, making it harder to concentrate on mathematical types of problems (like programming). Stop drinking soda and start drinking water.
What do you do when you are stuck in code and your focus leaves you?
:)
Bail out - become a manager - it's worked for so many others - how can it be wrong?
But seriously:
In one place I worked at, we had a standing rule - if you were bogged down, it was better to just pack up and go home for the day. Get out, get some R&R and get back tomorrow to resolve the issue.
This came about mostly 'cos I had a couple of occasions where, after pounding at a problem until late at night, I'd give up and go home. I'd be half way home when I'd realise what I'd done wrong and, turning around, would race back to plow through the issue.
So, it was not uncommon to hear a defiant "SCREW THIS AND THE HORSE THAT CRAPPED IT!" from the development area followed shortly after by a resolute programmer storming out of the office. Usually within an hour the person would be back with a solution.
Worked almost every time...
I left my body to science, but I'm afraid they've turned it down...
Maybe I'm the only one, but I find when I'm stuck like that, I like to go back to making my way through TAOCP. Then again, I'm probably the only one here who hasn't read them all the way through, yet.
-=Best Viewed Using [INLINE]=-
This has happened to me from time to time, not just with computer programming but with mathematics, physics, mech-eng, etc. The problem is always that I have gotten so locked up into the inner details of something technical that I lost the bigger picture and end up feeling confused. The best thing to do is as others have already suggested: step away for a brief period, and then when you come back to it, think in terms of general conceptual approach before going back into details. Make sure you know what you are trying to accomplish and why, and then flesh out a more concrete, detailed plan. By the time you actually get around to writing up the code, you should already have it block-diagrammed or pseudo-coded to the point that you're just implementing a clear picture.
- "It's just a matter of opinion!" - PRIMUS
Yup that's right, I floss when I hit a block coding. I keep a thing of waxed dental floss next to my monitor and clean them pearly whites. I'm not sure how it started, but it gets my mind off of what I'm doing, stimulates some senses you don't use coding, and helps to fight gum disease!
I used to stop what I was doing and write a linked list class (or struct and group of functions) and sometimes start reading Knuths books again for the 100th time the other thing I do is write code in scheme. Lately I decided to write a parser. Basically what I try to do is write something I know I know how to do. I don't work hard just little bits here and there.
May your soul reach heaven before the devil realizes you are dead
Get away and do something else. I think we spend far too much time with our heads stuck inside our cases and we don't see the real world and get some perspective.
Think about something else, not computer related. Look at some painting books, read some fiction, realize that there is more to the world than bits. Maybe hang out with some old friends who are _not_ programmers!
Recently I had a tech writing class where my teacher did _not_ want us to write about computers. At first I was outraged, but then it was kind of liberating. I began to remember all the interests I used to have before I became so completely absorbed by the computer world.
So, if you can't write code because you're anxious about it, try to get out and see the rest of the world and get some perspective.
___________________________
Michael Cardenas
http://www.fiu.edu/~mcarde02
http://www.deneba.com/linux
hyperpoem.net
This have happend to me a couple of times.
My solution is do do something else that has nothing to do with computers that I'm good at. Usually I know the answer to the problem, but I'm blocked. After a while get really low self confidence. Thats why i do something else. When I realise that I can do something successfully I find the answer to the original problem.
This is just about what I'm going through right now, but atleast I know what the prblem is...
I HATE MY JOB!!!
I hate the ppl I'm working with/the job everything. Just have to get out of this place that's all.
And that's my suggestion to anyone else out there with a similiar problem. Leave. Go out and get yourself another job.
Thank god, it's easy to get another one.
-------------------------------------------------
When this happens to me, it's usually because I don't really understand the problem. To combat this, I typically take a break for a couple of days, wander around a bit, and think about what doesn't make sense to me.
It usually comes down to one of two things, I read the specification incorrectly, or the customer was too ambiguous in their description. The first problem can be corrected by really thinking about the problem and not coding for a few days. Eventually things may straighten out in your head. The second problem is solved the same way as the first, but you may realize that what is being requested is ridiculous.
At any rate, that's what I've found w/ my limited experience. Hell, 2 lines of code a day is fine...a professor once told me that it's typical to spit out only 5 lines of usable code per day over the span of an entire project.
My experience is that when I'm blocked, my mind is struggling with some big "problem" ahead. I'm sometimes hesitant to start typing until the whole problem has been solved upfront.
Sometimes I'm too blocked to even fire up my editor, just the thought of it drains me.
The simplest way for me is usually to just to start playing with the current version of the project. Then I usually go to the parts of the code that I know really well, review it and try to improve on it.
Playing with stuff you know really well is seldom very threatening, and it's gotten me started again a number of times.
Another simple way to get past the coding block, is to walk over to your boss and tell him that you'll have a working version on his desk by close of business today.
He'll be impressed, and you'll be coding 'til your fingers fall off.
I don' t know about everybody else, but every time I hear "the gang of four" I keep thinking about the Gang of Four -- the Cultural Revolution Small Group that inflicted so much terror and damage on China.
I wonder if the "gof" book is supposed to be a play off of that _real_ Gang of Four. If so, it kindof bothers me -- I mean that's sortof like naming french fries after Stalin (Russians like potatos!) or a music album Pol Pot, right?
Maybe I'm just looking for trouble, but do you think it's deliberate?
willis
there is no thing
what else could you want?
I don't think she would have understood if I told her I'd been featured on Slashdot and had to take breaks from her to go post...
I did read through some of the comments here earlier this evening and I must say that this has been an excellent discussion. The sheer number of comments posted shows I must have struck a chord with the community - and my experience with other programmers shows that this is a common problem with others.
I'll post tomorrow what the folks on comp.lang.c++ and comp.sys.mac.programmer.misc had to say but they were in general along the same lines as what was posted here:
- Take a break
- Get a life
- Do something fun that doesn't involve computers
- Engage in vigorous physical exercise
- associate with the attractive sex
- Step back from low-level coding and do other software-oriented things like design, discussions with a coworker or documentation
There's some more, some of which I'll discuss in a moment.I did in particular step back to think about software from a different level than coding, but I didn't actually do design work. Instead, I just cracked open some good programming texts. If you haven't read much lately there's probably a lot of good stuff that will stimulate you and improve the effectiveness of your work - check the book reviews online at The Association of C and C++ Users (and consider joining it - I did, a couple months ago).
One thing I consider important in the reading I did was that I wasn't looking for solutions to the problem at hand. Rather, I was trying to get back to something I'd been missing for a long time and wanted to indulge in - the sheer joy of learning for its own sake.
It was the case that the books I was reading were pertinent to my work but I wasn't searching them for solutions. I was just reading and flipping through them as my curiousity led me. And when solutions to my problem would occur to me, I'd put them out of my mind until the time I'd decided ahead of time would be my time to resume work.
What actually got me going again was that I had such a flood of ideas and they had crystallized so clearly I was able to sit down and implement my solution in a day and it worked just fine - still does.
Something else that helped stimulate me was the website on Extreme Programming.
A lot of the approaches there really appeal to me. Particularly I like the ideas they have that could be generally expressed as "design by coding" and are mentioned I think by Stroustrup in the intro to More C++ Gems as "expressing designs in the code".
That is, rather than doing a bunch of up-front modeling using diagrams like OMT or UML or what have you, you just write code - but you are designing in the code, so they emphasize in extreme programming that you constantly rewrite the code as designs gel.
One thing that saddnes me though is that Extreme Programming also suggests programming in pairs. This is something I used to do with Dave Johnson when we were at Working Software together. We'd help each other through hard spots and just rap about politics and stuff and go have coffee or a beer and get a lot of work done.
Now I live at the End of the Internet and I'm working for myself as a one-man consultant shop. It has its advantages (I can work at home and set my own hours) but one big disadvantage is that I work very much alone and there's no one around to bounce ideas off of.
I have other programmer friends and I do call them up but they all have their own gigs - it's not the same.
On another important note, several people both here, privately via email and in the newsgroups raised the possibility of this being clinical depression.
Well that is something I was well aware of and had been considering. Depression is something I have been dealing with all my life, as you will see in another slashdot article I posted:
Manic Depressive Geeks
I didn't used to be (woefully so) but now I'm very introspective about my mental and emotional state. I have to be. I didn't used to be but now I just won't tolerate the depths of misery that I just thought were part of the normal human condition.
But I don't think that what was happening to me was the sort of depression that I usually consider. There are "endogenous" and "reactive" depressions. Endogenous depression just happens to you and is usually caused by chemical imbalances in the brain (shortages of serotonin or norepinephrine) and is what's usually experienced with Manic Depression, while reactive depression is (naturally) a reaction to external events, like a personal tragedy.
Life has been really hectic for me for a long time, with the turbulence of my consulting business, falling in love with a woman from another country, planning a wedding, moving to Canada, and just trying to keep it all together. Maybe if all that hadn't been going on, I wouldn't have gotten stuck. But basically, I just got stuck.
Robert Pirsig talks about stuckness and ways to overcome it extensively in Zen and the Art of Motorcycle Maintenance, which I recommend highly (and probably ought to reread). And I really was suffering the kind of stuckness he described, the stuckness that occurs when you just want to get your bike fixed and you break the head off a crucial screw...
(Robert Pirsig went nuts while a grad student in philosophy at the University of Chicago. He had shock treatment back when it wasn't very carefully administered and lost nearly all his memories. The book is about his motorcycle trip across to some of the places he used to live to visit old friends he hardly remembered, along with an amazingly enlightening discussion of what he'd been so obsessed about that it drove him crazy - what is Quality?)
Someone mentioned meditation in the discussion. I had found reading about Zen and doing meditation on my own was of profound help in overcoming my mental illness back in the really dark days. But as things got better and my career got in shape and I stopped seeking so much and concentrated on learning to program and making a place in the world for myself I drifted away from that, something that I think is really wrong.
During my time off my then-fiance lent me her copy of Chogram Trungpa's The Path is the Goal, A basic handbook of buddhist meditation. It is published by Shambhala Publications
I'm afraid I read a little bit of it then when my time off came to an end I set it aside and started thinking again.
One of the little traps our mind has for us is thinking. I like to think, and I'm particularly well-developed at it. But my wife tell me that we are not our thoughts, and actually our thoughts can lead us astray. And when I was getting so stuck on my programming problem I was thinking really hard and trying to solve my problem by thinking harder.
One thing you do in meditation is to stop thinking. Hardened programmers might find that a frightening concept. And you can't really try to stop thinking - you just sit, and look, but not too hard, and experience
You cannot experience your world as it really is and be thinking.
One thing that Pirsig discusses in his book is how to bring the wisdom attained at the rarified mountain peaks of meditation down to practical value in everyday experience. He uses fixing a motorcycle as an illustrative example but when I read the book I found that I was able to program better because I could "become one with the machine".
My wife doesn't really believe this is possible but I think it is, that one can meditate while carrying out an intellectual activity like computer programming. That's something that I seem to have lost long ago, that I had years ago when I was not nearly so knowledgeable but I did have the ability to really lose myself in the machine all day long without distraction - and without getting tired or worn out.
Don't forget:
-- Could you use my software consulting serv
I couldn't afford to not work for such long times so we bought an inverter at Canadian Tire and I plugged my laptop into the car cigarrette lighter.
And damned if I didn't get more work done on the road with my wife driving that at any other time.
I'm writing a cross-platform product right now and have a choice to program on a Mac desktop or my windows laptop (it also runs Slackware Linux and BeOS). Sometimes my wife borrows the laptop to browse the web and - zing! - I get a lot of work done.
The problem was that I'd leave elm open in a terminal window and a web page open on slashdot and hit reload whenever I was running a long compile or something.
So recently I made the choice to turn off my laptop when I've set into my work, or give it to my wife. It's greatly improved my productivity.
(I only paid for one computer on my cable modem, and haven't figured out IP Masquerading yet, so my mac can't hook to the internet. Modems are interchangeable but the DHCP for the cable modem is keyed off of your physical ethernet address so unless you cough up for the second connection or use masquerading you can't use a second machine).
-- Could you use my software consulting serv
I don't smoke. Never have.
I'd just stand where the wind blew the smoke away and we'd have a little chat. It was very helpful. Sometims we'd talk about programming issues or sometimes we'd talk about nothing at all.
Mike
-- Could you use my software consulting serv
I emailed the author, Mary Jo Foley and asked her why she didn't attribute me, pointing out how easy it was to find out who I was from the link in the ask slashdot article and my first post.
It particularly irritated me that I didn't get credit when she interviewed Linus about it, who didn't participate in the discussion, and some other guy who compared a programmer being stuck to your plumber saying he couldn't fix your pipes because he had "plumber's block".
She replied that she didn't give attribution to my post (and I guess to any of the posts that came directly from the Slashdot discusion) because she had been flamed in the past for quoting people from Slashdot!
I consider that pretty cowardly. Say what you want to me in the press - but spell my name right. Imagine she'd quoted some government official saying something, but didn't attribute them because other government officials had complained in the past!
She should be very well aware that any snippets she quotes from Slashdot are perfectly legal because of fair use (I could not imagine a fairer use) and it is not just ethical, it is a very basic rule of journalistic practice to provide such attributions.
It is important for historical reasons - what if the ZDNet article survives to be quotes later but the slashdot discussion is no longer available to be linked to? What if someone reads my quote but does not follow the link?
She felt that simply providing a link to the original article was sufficient attribution, but that's not true - my words appeared on her page, and I want my name next to them.
-- Could you use my software consulting serv
Whenever I feel stuck when I'm programming, I just take a big 'ol toke off the bubbler, and then I.....wait, what were we talking about....Oh yea, weed, so I told him, if he doesn't want me to kick his ass, he had better.......I'm going to take a little nap now.
Do you have any suggestions for books (or websites) that would be good tutorials on patterns and doing these pattern-analysis diagrams (or whatever they are)?
Programming is an intensely mind-consuming activity that can leave you mentally exhausted. You need to give your mind a chance to clear off the cobwebs and stay fresh.
Suggestions:
1) Develop some hobbies or other interests that have nothing to do with computers or books or other mental activity. Preferably, some physical sport that causes you to sweat a little, or something like carpentry . Spend at least 30 minutes a day on such activity. A healthy mind requires a sound body to stay healthy.
2) Hang out with some non-programmers of the opposite sex once in a while. Tell them about what you are doing (in a non-boasting way). Never underestimate the effect of the power of "wanting to show off" on your creativity.
Hari.
You need time off. There's only so much creative juice in your brain, this wears out. Sounds goofy, but it's true. I've had programmer's block, and if I know that I should be able to do something, but I can't figure it out, it's always due to stress or lack of sleep. If you need to be at work every day, start taking a couple of half days here and there. Believe me, it's more important to overcome your block than to sit staring at your screen for too long. That only stresses you out more, and increases your block.
The solution is definately sleep, and time away from the computer all together, not even video games.
Slay a dragon... over lunch!
hmm... so if we assume the second chute has the same reliability as the first, then you only have a .09% chance of making a big loud SPLAT.
- isaac =)
Yeah this happens to all of us from time to time. Running into major arcitecture decisions that are going to take a while to imlement but will be well worth it. The indecision over what we should "nuke and pave" and what we need to code to implement the rest of it. When I get in this predicament here is a list of the stuff I usualy do.
:)
1. Clean your existing code: Yes this won't get any more done on your architecture problem, but is something that needs to be done anyway, and something I find usefull to clear my head before I take on other things.
2. Draw it out on paper: Too many times we start coding things without a true plan of where we are going. Doddle a little bit, and figure out a couple algorithms that you are going to need.
3. Surf the web for a while: Something everyone should take a break now and then to do. All code and no play makes Jack a dull boy.
4. Talk it over with someone: We as computer scientists tend to be a little high in the testosterone dept (and yes I know more that a couple of ladys out there who are guilty of this too). We all get a little egotistical, and don't think of talking our coding roadblocks over with our collegues. Even though your friends might not be able to provide you with any good advise, they can ususaly probe your mind in the right direction to where you can see the problem you need to fix.
5. Penguin Mints: Need I say more
bash-2.04$
bash-2.04$yes "Don't you hate dialup connections?"| write USERNAME
But you probably already know that. And I already know the cruelty of simply telling someone not to fear. I'm no programmer, but your problem is universal.
You are finding it difficult to work. This is because, as you perceive it, the risks of continuing outweigh the benefits. You may explicitly tell yourself that this is not so ("I know I could just back up the code and write any old thing and throw it away if it's wrong"), but the horde of automatic thoughts that rise up when you contemplate doing it say different. You know that in a long-term sense, bearing down and getting through the work is the best thing by far. But when an individual's fears of failure become strong enough, it can force hir out of the long-term perspective and into a low-level, immediate world, the same way that you can be stopped from contemplating Rodin's Age of Bronze by a splinter. This is the point where you might just be told to shut up and work through it, but another way is to figure out what your fears are, whether they're reasonable, and whether they can be disproved or transformed.
If you were trapped in a situation where the alternatives were painful, awful failure and procrastination, your solution would be to procrastinate. You must acknowledge that this is reasonable. The first step is not to blame or criticize yourself, which only increases your paralysis, but to compassionately accept that you're in a bad situation and start working to get a handle on it. It sounds like you're already on that road.
Now, we have to find out why you're fearful and emotional about this project and whether it makes sense to be that way. The simplest of all tools in my field of study is the double-column technique. Just think about the automatic thoughts that go through your mind when you contemplate working, and get them written down on the left-hand side of a sheet of paper.
I don't know what your thoughts are, but for many people they may look like this:These are frightening. Are they true? In fact, they contain cognitive distortions that all people make to some extent. The second and third show the especially insidious error of dichotomous thinking, the tendency to see things in an all-or-nothing sense. A single failure could be due to a specific hole in your education, emotional factors outside your work, a lingering virus, or all sorts of things. But even if you completely and utterly screwed up, would that erase thirteen years of success? Surely that makes no sense!
On the right-hand side of the sheet, write the best refutations you can think of to these statements. They should be compassionate, insightful, and constructive -- everything you'd tell a friend in your situation. In this example, they might be:Keep your refutations with you at all times, and write them down as you think of new ones, or notice new automatic thoughts. What you have to do is take the most powerful and frightening thoughts you can uncover and argue them down. I mean seriously argue, bringing up the best refutations you can and trying to believe them wholeheartedly. Even if you don't buy them now, think how much more productive they can make you. This isn't really dishonest; if this rational optimism leads to repeated failure, you can always re-evaluate it and change to thinking you're a washout.
Fear and self-criticism are terrible motivators. Relaxed understanding allows you to work with an absorbed sense of flow. To put it tersely:
chill.
- Michael Cohn
Important note: I am a student, not a licensed or degree-holding psychologist. I am giving you a digest of other researchers and writers. This may be valid self-help advice but should not be relied upon for severe or life-threatening problems
Recommended reading on the subject of Cognitive-Behavioral Therapy:
Beck, Judith: Cognitive Therapy, Basics and Beyond -- a textbook. Dry but comprehensible.
Burns, David: Feeling Good -- a self-help classic. Burns is a moron about a lot of things, but it's overflowing with useful techniques and arguments.
Ellis, Albert: A New Guide to Rational Living -- If you're sick of therapists who act like Deanna Troi, you'll be pleased when Ellis comes and kicks you in the ass.
-----
Go ahead, blame me... I voted for Nader!
Always does it for me!
ZDNet has a cover story article all about this thread.
One means of stirring up the creative juices is to walk far away from the computer and pick up a good magazine (like Scientific American) with articles from a wide variety of backgrounds. It can be useful if you're an engineer, for example, to read articles from biologists or astronomers to give your brain a kick in a different direction...
Stop by my site where I write about ERP systems & more
Being burned out sucks. Makes you loose your self confidence, doubt your abilities. On really bad blocks I take a mental health day or two, sleep in really late, (gotta rest that overworked mind), and do non-computing things as much as possible (bike, see a movie, go to the art musuem). Something to see the world, but yet not have to critically think. Recreational hallucinogenics sometimes help too. Just don't think about the problem. Coming back with a fresh mind works wonders for most people I know...
That which does not kill you, makes you stronger.
I've always assumed the same thing, and I assume that the reference was deliberate (pretentious allusions to historical events that most people "beneath" them would not recognize make some very educated people quite amused--and chances are that the people who first read the GoF book and labelled it as such were CS profs who have lunch in the same cafeteria as history profs. Besides, the GoF have such very long names, and we CS types abbrev. everything :-)
Duh.
I have to agree with this one. Mostly because I am in that spot right now. Living with my ex-girlfriend still (thats an uncomfortable situation), looking at moving out, my motorcycle is in the shop for an expensive carb overhaul.
Soon as all this started happening my productivity just plain dropped. Just now am I starting ot get it back, now that some of these situations are working themselves out.
Ive also found, as others have said, having de-stresors outside of work is a MUST. My motorcycle was just that until it was giving me problems.
--Steve
"I opened my eyes, and everything went dark again"
One of the most important practices used in Extreme Programming is Pair Programming. Pair programming allows continuous code review, enhanced "talking to my dog" brain block busting, enforcement of team standards (esp. unit tests), fatigue relief, and distribution of knowledge. Check out http://c2.com/cgi/wiki?ExtremeProgrammingRoadmap or http://www.extremeprogramming.org
I went through a dose of this a while ago. I had a really interesting project, but I was just sat at home staring at the screen and doing anything from housework to accountancy to avoid getting down to the code.
I was just sick of working on my own for too many years.
What did I do ? Went back out on the contract circuit, but this time I was lucky enough to have a slot at an interesting site, not just another contractor sausage-factory. Right now I'm working for HP Labs; an enormous shed filled with the smartest bunch of people I've ever met in one place. Pick a cube, any cube, and there will be someone in there doing interesting stuff, with interesting ideas to share. Sitting on your own all day gets to you in the end, even with net.access.
After this, I'm fired with enthusiam to go and do anything -- except I don't want to leave 8-)
How do you fix you immediate problem ? Read some other poster's ideas, but basically you need to get it fixed and get that project out of the way (painful though it is). For the next project though, I'd look seriously at finding some work with a new bunch of interesting people. Why not work in Europe, on a 6 month fixed-term deal, just for a change of scenery ?
The Geek Lifestyle is fun while it lasts, but there comes a day when you want more out of life than an excuse for unlimited O'Reillys and Pizza.
I believe that great programming, is an art. The creative processes needed and the energy used are no different from the painter, the poet, the musician, the sculptor. When I'm on, I can program for hours, block out the world and create things that my employer marvels at. When I'm off, I am unfocused, frustrated and wonder on the way home what I accomplished for the day. This down period may last a week. When I'm on, I feel a euphoric high that becomes more intense the longer I code. I put the phone on do not disturb and close the door. Nothing distracts me. I beleive my brain functions differently during these periods. I wonder, what research has been done on this? Does the programmer use his brain the way a poet would. I would love to walk around with an EEG on me to see what changes occur as I get into "the zone". Maybe this would help me into program mode, and reduce the frustraion of not always being able to get there. I double as a sys admin, so usually, I can go work on some hardware, a network problem or read slashdot till I get over it.
If I get stuck Experts Exchange works fine, tell them Cable4096 sent you.
Some hard stuff includes Recurring Dates and Outlook Integration. Just learning the Outlook object can take weeks or months.
If you are lacking inspiration its probably largely due to a lack of good nutrients - like the vitamin B complexes for example. The brain needs good quality food and a consistent diet, you are getting run down on all that caffeine and coke.
Eat fresh green vegetables, fruits, get plenty of fibre and try some power foods such as fresh calves liver, bean sprouts and crab meat (if you are a veggie or a vegan you probably already paid good attention to it). Add in the exercise and fresh air and you'll soon be back in full swing.
Antidisestablishmentarianism would lose its point if it were hyphenated
When faced with a similar problem, here's what I did: 1) Let it fester until I was useless at work; 2) Got downsized; 3) Got contracts to write technical books and half-finished them; 4) Started drinking irresponsibly; 5) Took jobs as warehouseman, construction laborer, and truck driver; 6) Wrote novel about burned out software engineer who (almost?) saves the world (Acts of the Apostles, check it out); 7) Stopped drinking irresponsibly; 8) 7 years later went back to origial profession. Hope this helps, N.A.
Ultimate Geek NanoNovel: Acts of the Apostles at www.wetmachine.com Fear the Future! Defrock the Infodruids!
Your probably suffering from an advanced case of "i really hate my job and I'm still in denial" ... writing code all day? whats your passion? I plow about half my paycheck every month into recording gear cuz thats my passion :)
Free Techno/Jazz/DNB/MI Music by guys obsessed with monkeys!
If you are in the design stage, you should be as far away from the computer as you can possible be. The design stage is the index card, yellow sticky, blackboard part. It is critical to have another person with you. Having other people around has several effects. A list of what a group brings to a design.
Staying focus
Someone to say "you are getting hung up on the details"
additional ideas
finding flaws
documentations
re-assurance
Staying in the big picture view
faster personal growth
Once a solid design is hammered out that you feel confidence about, the coding is like taking a walk in the park.
Though, a lot of us are solo contractors. I believe that you are slowing your growth as a developer if you are doing it all on your own. Its nice to have full control over everything. I would suggest biting the bullet and either finding a partner, or joining a software firm.
For me its all about momentum.
Same here. I can flit from issue to issue to issue, or I can sit down and map out a solid block of code for some major feature, but not both at the same time. Whenever I encounter a major problem, I make sure I have a single, not-likely-to-be-interrupted block of time, and wait until then to seriously start on it. If half my time for a given day will be taken up by meetings, especially if they're spaced an hour apart to give participants time to recover and do minor tasks, I accept that I won't be getting any non-trivial coding done that day, and plan around that.
This can be generalized to: for every major intellectual action, I prepare to do it then I do it, and that has to happen without any significant interruptions or breaks. (If some huge task would take 8+ hours, then I break it into smaller tasks, with the first one being to map out the general details of those tasks.) This does not apply just to programming, BTW: writing, building some physical object, and lots of other work where you are creating something respond well to this method, at least in my experience.
Okay, I've faced this a number of times. here are soem shrot-term and long-term solutions that have worked for me:
Short Term:
(1) Music, preferrably headphones. I have a set of "programming CDs" that I find help me a lot when I'm lackign focus. They give me a kind of "artifical energy" that keeps me going.
(2) Side Projects. one thing that can elad to thsi is boredom. A side off-hours programmign proejct helps me keep it all fresh.
Long term Solutions:
(1) Balance and enegry-management. How hard are you working? I've worked jobs where the company counted on me doing way over a reasonable 40 horus of work all the time. Most of us can put out 150% or even close to 200% for a short period of time, but it can;'t be a way of life. If you are doing those kidsn of exertions you MUST have periods where you (and management) allows you to drop to 30% output to recover. If they can't do that then they can't ask you to do the sprints. You can code as a sprinter, or a marathion runner, but anyoen who tries to sprint a marathon will hurt if not kill themselves.
(BTW, I eventually quit that job and found a more reasonable one. Something you might have to do.)
(2) Medication. This may NOt be your case, but some people have natural and severe swings of mood. This is particularly common in the toips of the intellectual and creative fields, and ours is both. A feeling of intense massive anti-inertia is a common symptom of Affective Disorder (what is sometimes called "Clinical Depression.") If you have these periods without a clear reason for being so exhausted, you might want to talk to a competant psychiatrist and have some tests run. If this IS your problem, its quite treatable today and there is no reason to suffer with it.
Good luck.
- Pair Programming - two people at one machine. This means that you can pull each other out of ruts can create new ways of seeing problems. It also makes it easier to talk a problem through. It also makes programing more social!
- No Overtime - XP recognizes that too many hours results in burn out, reduced productivity and poor quality.
- Refactor - sometimes the reason you are stuck is because you are trying to build on top of a rotting design!
- Writing unit test first (before coding) - this makes you think out the problem ahead of time and allow you to code fearlessly. You don't have to worry about your changes causing damage else where in the system because every piece of code has automated unit tests that should all pass.
This is just the tip of the iceberg. For more info on XP it's worth picking up a copy of Kent's book.I My self used to get tired really fast and hence not able to stay awake and code. I do carpentry 3 days a weeks. (it's not the usual stuff, not the get up and be at work at 6:30am crap I used to do full time but more of a get up and show up around 10ish type :). I would do that those days and take it easy once I got home. The next day I would not work carpentry but not be able to code and work on my company I'd still sleep 16 hours of the day and couldn't think when I was awake.
:).
:)
:)
So I ask my buddy what kinda drugs should I take to stay awake (he's a heath buff as well as a kick butt graphic artist that lives eats breaths GIMP). He said to run 2 miles a day. Wake up and run (jog, walk). Get oxygen flowing. I been doing just that. I have to say here I'm not over weight or not outa shape. I look like I weight train and run 10 miles a day but that's just from working carpentry full time (I recently changed to part time bit 8 months ago). I'm not in any shape to run a marathon and I start to struggle after 2 miles (give me a month and 10 miles will be easy
And, well what does this all mean? it means I can get away with 6 hours of sleep and be fully awake the rest of the day. Once or twice a week You gota get that 8 to 12 hour sleep to remain healthy but you eat right and exercise you can stay awake and think clearly. Sure this isn't the best answer to coders block but it's just common since. Most people that sit at a computer are not the heathest. Take my brother for example. He went to nationals for high school cross country. Was in the top 100. Got a computer tech support job 2 years after HighSchool and he put on 60 pounds in a year. he's losing a lot of it but still. It's in my blood so I kinda gota start watching my self since I'm 2 years outa school now
And those of you guys n' gals with indoor dog's. Take them for a walk. They'll love you a bit more
-- Jason...
THIS is what I do when I stare at the screen when I'm supposed to work, and can't.
I try and up my Karam. (you listening, moderator?)
;)
It would do me a world of good if I nuked my Slashdot acocunt.
-giggle nervously at the thought-
>... First, the N, which stands for Intuitive...
I can't put my finger on it, but there's something about this naming scheme that makes me not want to take a personality test from these people #:-)
P
1. Talk the problem out with somebody. Doesn't have to be a programmer, just somebody who can ask questions a little
2. Play the Piano
3. Play with my children
No, seriously. The main problem of Programmer's Block is you can't get started because you're afraid of messing up. Try getting a little tipsy, or just flat out drunk, and those ideas will just fly. On the down side, the typing goes a little slower, 'cause you mistype a lot, but it's better than staring at the screen.
:) I found that I finished my assignments a lot faster when I was drinking because I had fun with it, and didn't try to figure out every tiny detail before starting.
:) Once you get back to the fun side of programming, you'll be able to get past the Programmer's Block.
Back in college, I was in that situation a lot. I was also in the situation where I wanted to get drunk a lot. (I'm still in that one
Of course, I don't do that at my job now. At least not very often. We're a relaxed company, but not that relaxed. And since a lot of people wouldn't understand this, you might want to try doing it at home on some little side project. Try hooking your doorbell to the internet, or something. Or better yet, your mother-in-law's doorbell!
I've always said, "Programming drunk is fine; it's debugging with a hangover that sucks."
My last episode was between Feb and May this year. I took some time off in April and did nothing but sit at home thinking about whatever. This did not improve the situation at all. As soon as I was back at work, I couldn't make the links between ideas to come up with any solutions, once more I was drifting.
I survived this, how, I don't know. I took to playing a little more sport and generally trying to care less, though not shirking any responsibilties.
IMHO this loss of mental agility has a lot to do with stress, not just work, but life in general. Nowadays we are mentally very active from dawn til dusk. Mentally very taxing.
My friends (some of them my colleagues) and I often sit together and discuss ideas. These ideas are not work related, and often completely off the wall, but we generate ideas about things which really have no bearing on anything outside the conversation, in fact its mainly comedy. I find these conversations very therapeutic and mentally stimulating, being comedy they are funny and therefore relaxing. I my experience, a relaxed mind throws forward some excellent ideas when least expected.
"Common sense is nothing more than a deposit of prejudices laid down in the mind before you reach 18" Einstein
When you have have programmer's block, don't try to distract yourself by reading slashdot.
It may seem like a good idea at the time, but you will soon realize that your two lines of code productivity will drop in half.
As a smoker, I have to go out for a smoke every one and half to two hours. While many will say this is counter-productive, on the contrary I feel refreshed when I get back to my desk!. The combination of the walk, the fresh air and the nicotine (which of course you don't have to take) does wonders!
Too many inhibitions? THe same problem haunted Raymond Chandler (created of the Phillip Marlowe character) - in fact he found he could not write quickly unless he was drunk.
You may not want to go to such extremes, but many coders will say the getting a few beers in them loosens them up if they need it.
Time and again I've been able to "break the block" by doing an end-run around the corpus collosum. All I need is a plausible excuse to hook my logic centers into my verbal output and then feed that output (left brain) into the right brain's audio input circuit. The resulting abstract communication is usually enough to get the two halves of my brain synchronized to the same thought frame and I stop losing contemplation packets.
To put it another way: as soon as I start to explain the problem to somebody (even my dog!) the solution comes to me.
-Eldurbarn
This suggests two ways to approach the problem: Improve your understanding: Read a lot, design, plan, talk it over with a colleague (or a friend, or a cat), etc.; Or leave more processing power for the background task: take a walk, play games, write documentation, tidy your desk. Sooner or later the Eureka experience will hit you, and the coding itself will turn out to be surprisingly easy.
It takes lot of confidence (also/especially from your boss) to spend a day "doing nothing" when there are only so many days until the deadline. And it doesn't work every time. But for me it seems to be one of the more effective ways around a block.
In Murphy We Turst
Maybe the same thing applies that Piers Anthony said about writer's block: "If you have it, you're not being professional enough". I think that's partially true - if you take coding seriously, self discipline should take you through any block. On the other hand, if there isn't any fun in it anymore that's really bad for your motivation on the long run.
The illegal we do immediately. The unconstitutional takes a little longer.
--Henry Kissinger
These are some really useful ideas.
Personally I think the idea of having a hobbie outside of computers really does help keep your mind a little more fresh. Mine is karate, it's great stress reliever. Imagining being attacked by helpless users and having to defend myself by pounding on them. Ahhhhhhh! What better therapy. Really though, it's nice to have soemthing physical to counter the mental.
And having a wife whose a social worker...I can get completely away from programming when I need to.
Sean D.
"Hmm. I am to metaphor cheese as metaphor cheese is to transitive verb crackers!"
Do NOT follow the temptation to go into project management or somesuch, if your programming job isn't enjoyable anymore! I tried that, and am now pining away for the sort of job I used to whine about.
But, I have done more than pine, I have used the tight job market to my advantage and have cried enough to get a promise that I can go back to coding and move into design/architecture when I get up on some new tools.
Now I just have to "finish my homework" and doc up this part of the project, and my reward will be doing some coding on the next part. Talk about a mental block -- knowing I have to keep slogging away before I can do what I'd like...Aaarghh!
So, about the only advice I can give is to know what you really want to do, then make a fscking pest of yourself until your employer lets you do it.
And if you're still coding for a living, count your blessings.
"You can't get something for nothing." - my grandfather, on the stock market and Reaganomics.
Back at my first programming job in college, I would try to explain the problem I was having to the receptionist or data-entry clerk, and although I would really try to explain it in English, they would always stare blankly at me with no idea what was going on.
Didn't matter, though, because by talking it out I always talked myself into an answer. I'd say "That'll work. Thanks!" and go back to my desk with them staring at my back, puzzled (and probably frightened).
"You can't get something for nothing." - my grandfather, on the stock market and Reaganomics.
you might try to lay off the caffeine while on break, for one. the programmers' drug tends to hype you up when you don't necessarily need it. that's idea number one.
number two is to spend a few days off writing simple code, programs for fun, just to get your confidence back. don't spend all of your time off on it - make sure you do some other, more relaxing things as well. but try it.
and number three is to spend at least one day off where you are completely removed from coding, tweaking, and computers in general. give your brain (and your typing fingers) a break for 24 hours. enjoy it as you might (i hope), programming takes its toll after a while. you'd be surprised how much a day-long break can help.
good luck
-ProudestMonkey
You should really just go for it. I thought I was going to be stuck in Microsoft applications programming for the rest of my career, but then I just jumped, and haven't looked back.
I'm sure something like having code in the Linux kernel tree should look good on the CV.
Find funky gifts
When I was at university, I found that the more complicated stuff always used to make more sense when my mind was really off the subject (like when I had drunk too much, and was considering making a move on the goth girl next to me).
Find funky gifts
I know the author has spoken, and a holiday has provided the answer for him, but perhaps someone else who is really in a rut could try what I did.
I changed everything about working with computers.
For years I used to specialise in programming VB and Delphi apps in Windows (don't laugh, it paid the bills), and I was really in a rut. I had tried just about everything using those languages, and there was no very much left to interest me.
So I made a big jump. I switched to Perl. I got a new job programming in Perl as a trainee consultant, and after 6 months solid learning, I still realise that I am only scratching the surface.
Life couldn't be better. I'm having challenges again (I also switched from Windows/IIS to Linux/Apache), there is lots to learn, and the fun that I used to have when I was playing around with my old ZX81 has returned. Coding is great again.
Find funky gifts
'yields false when preceded by its quotation' yields false when preceded by its quotation.
What I've found is most helpful is to have a physical hobby. I chose blacksmithing, but I'm sure racketball or hiking would work just fine. Basically just something that's as different from coding as possible.
If you are totally focused on one thing you will burn out. I learned that the hard way when I was paying for school by tutoring math. As an engineering major that meant I was doing math up to 15 hours a day. I loved it and I was good at it, but come summer I was happy to find a contruction job, something where I didn't have to think if I didn't want to.
Remeber that your brain is part of your body, and the whole system requires balance if it is to function properly.
Under capitalism man exploits man. Under communism it's the other way around.
Lack of motivation. If you are having problems focusing it is because you no longer deeply care about it. So you lose your house - so what? People at work think you are lame - so what? The client hates you and you cause a multi-billion dollar project to go tits up - so what? If you are in this position re-evaluate what you are doing with your life. Cutting code all day can be a little soul destroying, if it has got to you then give it a rest. When your unconsious speakes, LISTEN.
--------------------------------------------- "In the end, we're all just water and old stars."
"I highly recommend taking along a parachute." From what I've heard, skydivers are equiped with two parachutes. There is a 3% chance that the primary chute wont open, hence the second chute. And so far, no one has complained of the second chute not opening :)
Revolution = Evolution
I've read this somewhere, and thought it was appropriate. When faced with a block, the quoted person would perform some mindless task, like installing Windows...
Revolution = Evolution
I have no trouble at work but in my sparetime, I'm working on a project together with a friend. The project has been running for about three years and the focus is a bit hard to keep. When I'm home and have time to work on the project I never get anything done. Same thing happens as with the guy submitting the problem. The only solution I have found so far is to meet with my friend, sit at his place with my laptop and code it there. Then there's a pressure from him (and vice versa - he needs to work too!) and we get incredible amounts of work done in just a couple of hours.
I have now just accepted that I probably can't work on this project in any other way. Three years ago I would rush home and work on it all night but now we "just" need to wrap it up.
So my friend and I meet as often as possible to get it done.
-- jaf
A book I'd recommend to any coder in any language is "Thinking Forth", by Leo Brodie (a Forth classic). It's a truly good book, essentially teaching you how to write good, fast, efficient code. Very insightful. Anyway there was a quote in it, and I forget who said it.. someone post it if you know. Anyway the quote was something like this: "The best way to do something is to do it twice." And I think that's *very* true. Sure, you can solve the problem the first time. But if you do it once, and then go back to the beginning and do it all over, you'll be amazed at the silly things you did the first time..
The streets shall flow with the blood of the Guberminky.
jolt
/*
*Not a Sermon, Just a Thought
*/
*Not a Sermon, Just a Thought
*/
I'm not a coder but I do know that in writing novels and screenplays the trick is not to write yourself out. If one of my characters is engaged in an activity, I don't let him/her finish it in one session without starting another. The next day it gives me a place to start from that is already in motion, so to speak. This way you avoid the 'where do I go from here' syndrome and can easily get your head back in the place it was the day before. I know other writers that do the same. Several carvers and a sculptor I've talked to do this also. Don't 'finish' every day. Leave your project just a little unfinished and you'll be raging to get at it tomorrow and know exactly where to start and what to do. Good luck! You are definitely not alone.
yeah, you're quite right. Buffy does seem to help a lot :) (perhaps that's the reason I have this huge poster of her behind my computer :) ).
I find that when I do not know how to code in the evening, I just have a beer listen to some music. The next day when I do some cylcing I find a long flow of thoughts come to me to eleivate the monotony of the same route everyday. This is where i solve *alot* of my coding blocks, it only took 12 miles to solve my last major problem.
The trick is to cycle and not try and solve problems, but let them be automatically solved for you....
boris.
chris at darkrock dot co dot uk
http colon slash slash www dot darkrock dot co dot uk
I've being working at Davinci for over three years now and about a year ago I started playing chess with the colleagues in my office. One of my fella programmers brought in a huge chess board. Later two more bords appeared in the office (one of them is mine) today we have real chess matches going on, people are excited and are playing all the time (even our product managers.) This helps us to get reduce stress, we actually have fun and think about interesting chess problems and in the long run, I am pretty sure chess helps with thinking processes. (However a couple of card decks are also present so it's not necessarily just chess.) Any time I feel like playing I grab one of the developers and we take off
You can't handle the truth.
I've been there, and I understand what you're on about. I work in an development department, and sometimes whilst I know what I've got to do, and the basics of how to do something, I can't actually seem to *do* it. The brain just shuts down, and it can be self perpetuating. You can't think about the job in hand, but when you get home that night, you spend all your remaining hours thinking about it and lose sleep over it. You come back tired and your performance is worse. In such a circumstance, the best thing to do is just to get some time out and do as little as possible. I find that sleep deprivation is what seems to screw up my mind. Go and get some fresh air - do something totally different - have a bit of fun. Don't even think of code. Put that book down - revision will get you nowhere, because your brain isn't in the correct state to accept or correctly process the information. It needs a break. When you get back to work after your break, think logically - hell, even resort to writing a specification if you have to (wow!). Think about how far you've got with the task and what remains to be done. Break the entire job into subtasks. Think about the processing behind the subtasks, and write it (using that archaic invention - the paper and pen) in such a manner that no matter what language you coded in, you could follow it. Break your subtasks down further if you need to, but don't ever get to writing code on paper. Once you have your list of subtastks, start to actually *program* by converting your subtasks into code. Use discernible milestones to record achievements and take breaks when you hit the milestones. You don't want to burn out again. Don't O.D. on caffeine - your brain will explode. I hope this has helped to some degree, I'm sure many of us on /. have been there and sympathise with you. Good luck. M.
This feeling is no good.
When it happens to me, I work on personal projects that I really enjoy the idea of, and find that loving feeling for programming again when I kick some goals in areas I'm actually interested in. This then reminds me of the fun part of programming - mapping a mental problem to a real live coded solution!
If your typing speed is holding you back, practise on a typing tutor. It is far more satisfying being able to code as fast as you think, so you don't lose that great thought before you can get it down. (You may be able to justify doing your own projects on business time to your bosses when they see your *actual* job productivity increase as a side-effect.)
One other thing you can try: program in English (or whatever your first language is). Use comments and write down your thoughts without even thinking about C. Shuffle them around, see what comes out of it.
And finally: surf the web. Check out memepool.com, miketheheadlesschicken.org, stileproject.com, or whatever gives you a chuckle.
All the best!
http://pcblues.com - Digits and Wood
I go through spurts of having this problem.
I'll go to work and look at the code for 5 minutes and then start hitting my websites... Userfriendly, slashdot, tomshardware, arstechnica, anandtech, theregister.co.uk.
Then I'll go look at the code for a while longer and go log into all my online banking and credit card accounts just to make sure things are good.
Then I go and look for code a while longer and then go log into my Ford Mustang sites to see what's going on.
Eventually I get back to the code and force myself to just start typing, even if it has almost nothing to do with the program, then I can straighten it out later.
I think if I had linux installed at my desk it wouldn't be so bad.
The man who trades freedom for security does not deserve nor will he ever receive either. - Benjamin Franklin
Although the above message probably makes me sound like the world's laziest employee, this is not true, I also have code spurts where I'm unstopable.
Taking a lot of breaks seems to clear my mind of the huge project at hand and let's me break it down into sections I can deal with.
The man who trades freedom for security does not deserve nor will he ever receive either. - Benjamin Franklin
Caffeine is EVIL
No, really.
It might seem like the problem is a particularly tricky algorithm to implement, or a bug that you can't track down, but this is never, ever, really the case.
The problem is Stress, and if you (I'm more addressing this to the clueless replies than the original poster) don't admit that and deal with it, it will just get worse.
A charge of Caffeine won't prep you to handle tougher problems, it will just make things feel even more hopeless and impossible. If there is any wonder-drink that will sort you out, it's a Smoothie, made from fresh fruit, that contains lots of de-stressing anti-oxidants and natural sugars.
Another wierd viewpoint I've seen in this discussion is that when you get burn-out, you should take a couple of days off and then dive right back in. DUH! Why not adopt a lifestyle you can maintain indefinitely??
Through my degree I tried all sorts of things that I thought would directly increase my productivity - Coke, ProPlus, Guarana - and they all just served to make me more stressed, depressed and non-productive.
What really increases productivity is having a rest and doing something different. I always try to:
Do something small at least every hour
- Go to the toilet
- Go fetch a smoothie
- Go and have a chat to someone
- Pray (I ain't religious, but I see that this would help) or meditate
Do something longer two or three times a day- Lunch OUT of the office
- A walk in the sunshine
- Watch a movie
- Have sex (on your own is just fine)
- Play an instrument
- Have Exercise (trust me, there IS a worthwhile sport for you, even if it's just a walk in the park)
Take the weekend off- Veg
- Tidy the house
- Dig the garden
- Go visiting people
Duh, people tell geeks to get a life. Sometimes we don't even look after the one we've got.Set deadlines for yourself, even if they are only fictitious. As the deadline approaches, you will feel pressure to do SOMETHING. That is the first step. The closer the deadline gets, the more work you will get done. It has always worked for me.
Eh...
Your problem is that you are left on your own.. you can take your time and it's easy to become lazy without pressure.
If possible you should work in a team where each person relies on other people an awaits for some piece of code to be ready. If you don't work in a team, involve other people. Involve friends in your work if possible.. ask for suggestions.. later on they may gain interest and ask you for progresses.
That works for me.. yesterday night I was in the office till 2AM (without even touching Quake3 8) just because my colleagues in Japan asked me for a piece of code for an important demo.
I achieved more yesterday than the whole previous week.
Sad but true !!
You may want to get a complete physical and talk to your doctor about your problems at work.
Clinical depresion is a very dangerous thing that can sneak up on a person. If it is depression, then your doctor can help you out a lot.
-- Never make a general statement.
This happens to me every now and then. However I think that it's a lack of motivation.
All I need to do is really give myself a kick and put my head down and work. After I do that I normally solve the problem in a day or two.
Another thing I do is just start coding. Even if I don't know how to fix a problem I find that if I just start writing code it gets my brain working. On the down side I normally have to scrap what I have just written...
"Do you think we could wipe out world hunger forever if scientists figured out how to make AOL's Free CD's edible?"-
Try to go to a different abstraction level. Work with diagrams rather than code until you are really confident about the architecture. If you are completely insecure about your app, even go back to analyze use-cases. Take a look at Martin Fowlers book "UML distilled" to get an impression of a development process. Maybe it's enough to reverse engineer your code with a tool like Together/C++ and to analyze the class diagrams.
There was an article in Barron's Financial Weekly a few years ago detailing exactly this phenomenon.
..and I'm only recently getting over it, because I'm at a wonderful job, and I don't have a lot of pressure right now. It's there, but the project I have is definitely doable.
I totally related to the original poster's perspective because I've been there recently, and it's more than a week-long block. I've had this problem for FOUR YEARS...and there is nothing more humiliating than having once been a wizard who taught himself assembly in junior high suddenly having all manner of difficulty doing a simple huffman coding algorithm in graduate school.
What happened was that I had, at several points in my life, some bad coding experiences, and afterwards, a long break before I would have to write code again. It's just like relationships; the best medicine for getting dumped is to start dating again. Or pilots, having lost a wingman or copilot, who are sent right back into the air so that they don't forget how to fly, and so they don't have a chance to doubt their abilities. If you DO have time to think, if you DO stop, you not only lose the ability to code as you forget things, you lose your confidence.
I'm slowly regaining my confidence, and I'm catching up to the point where I'm capable of writing code again. I can't whip out an application at will like I once did, and I have to swallow my pride almost every day as I try to learn (and re-learn) a lot of very basic things. But the love of coding keeps me going in those rare moments (which are arriving more and more each day) as I get the ability to write again.
I don't think most coders are afraid of failure quite in the way I was. The way I became afraid was by taking too long of a break after having coder's block, or after not being able to finish a project (to the point where it was abandoned completely). You do this several times, and it really starts to wear at your self-confidence, and fear of failure sets in.
But if you recognize where the fear comes from, it's a start to getting rid of it.
Good luck to all!
I hate to say it, but your response is essentially a well-written (I must say) version of, "I don't have a problem with it, it must be okay for everyone!" But the truth is, caffeine, and pretty much ANY drug, doesn't have the same effect on everyone else that it will on you. I can drink quite a bit of alcohol before I feel anything, but some of my Asian friends take a small paper cup of beer and they're toasted. Other people, once they start drinking alcohol, can't stop for any reason until they're slobbering drunk. The same is true for caffeine. I can drink a six-pack of Coke in the morning and be jittery as hell, but I'll be fine to sleep; but if I have a quarter of a can anytime after 8PM, I'm awake 'til 3. Other people drink caffeine like crazy and it doesn't affect them. But in general, you're better off drinking V-8 juice, taking Vitamin C, and drinking health-nut "energy" drinks than caffeine if you need a pick-me-up. well-written post, though.
Congrats for your marriage! I wish you both my best.
Now, that's what you did to solve the problem, but can you tell us what you were doing wrong in the first place, in your opinion? From what I read it was a case of burnout. Did you engage in too tight a schedule before being blocked? Do you consume much caffeine? Were you too anxious about the marriage? There must be a lot of us in a borderline state (I certainly am) and I'd be glad if you could share your experience.
BTW, nice first post!
It takes far more imagination to pray than it does to regurgitate these vanilla pseudo-scientific opinions on religion.
And, scientifically speaking, your belief in the "subconscious mind" solving your problems is just as superstitious as anyone's belief in a deity.
--
It's a
-- Danny Vermin
In several interviews with Richard D. James, Creator of Aphex Twin, He points out that he 'only used to sleep just to get ideas for tracks'...I took that another way...sit in bed as long as possible and try not to sleep (or get loaded on a certain substance) and then just THINK...my bed is a shrine of relaxation to me and i sleep to get ideas for programming code. As mentioned many times, its better to write code and have it have to be revised manytimes then to have to revise a blank screen ;) ::
-Swift
-Swift
Actually, a lot of these gumption traps are addressed in this book by Robert M. Pirsig. I know I just finished reading it, and you can very easily interchange "Motorcycle Maintenance" with "Computer Coding". It details the traps, and possible solutions to just about every situation you could face.
But more and more I think about it, this may just be boredom. I know I'm working on a project that I just can't seem to get motivated on. Maybe it's because there's no longer a newness to the whole thing, and since there's no newness, there's no challenge. If we've done something similiar before, why should we be overburdening ourself wrt creativeness and self-endurance to end up with the same result as we receieved before (other than to keep the paycheques coming in)? I know my gumption levels increase dramatically when I've got something in front of me that I've never seen before, it's a challenge, and in order to stay productive, I need to be challenged constantly. But, that's only my take!
Personally, standing in the shower is where I think through most of the tough issues with a design.
If it's more involved, I get away from the computers and sit down with a good old pad of paper and sketch it out.
Explaining it to someone else also usually leads you into all sorts of things you didn't consider and helps you stop looking at the one hurdle immediately in front of you.
My problem usually stems not from hard architecture problems, but instead from bad specs. I design web applications using PHP. I will often go on binges where I work 15-20 hours straight take a nap and go back at it. Those are the time when I am told to go and "just do it". But if I am given a handful of poor specs, and then somebody is looking over my shoulder asking me to redo every other feature or function I have a tough time gaining momentum to get any productive programming done.
For me its all about momentum. The more I code the more I want to code. If I have to keep shifting gears, by attending meetings, writing reports, etc I can't shift my brain into gear. Then I am left in limbo, usually checking my email every couple of minutes and making sure slashdot hasn't posted a new story.
Fortunately for me I work at home, so I can avoid most distractions, but it usually takes me at least a day to recover from a day in the real office.
just my $.02
-MS2K
7 Months ago I became the head of a department of programmers and assorted geeks. This didn't mean that I had to give up my programming completely, just add some management responsibilities. I'm operating at a higher level of stress that I have in some years (like when I was a C newbie). At the height of my stress a couple of weeks ago I splurged and bought a new Mountain Bike. I was stuck on a highly technical problem and could not find any solution other than coding. For two weeks I have ridden the bike every day. I was even lucky enough to have a little rain and get a chance to ride in the mud and muck. I've fallen down, ran into trees, and rubbed Icy Hot on my legs almost every night before bed. I'm 37 years old and I've been coding for 15 years. This has been the most productive thing I've done in my career. After I finish this post I'll be finishing my draft proposal for a new application to my boss (Open Source of Course). I've also coded my way through the the prototype of the application. This works for me. Find your own solution, but let me suggest exercise.
If you do Linux, install FreeBSD just to change your way of thinking for a while. If I run into a block again, I'll give Linux another try. Or maybe even Solaris 8.
You have the programming skills already. You just need to occupy your mind with a challenging task that will let you see other ways of doing things.
If you're really in a programming rut, rereading GoF's Design Patterns can often give a lot of inspiration.
Patricia can call me "honey" any time she wants. :P
-- In the future, everyone will code Perl for 15 minutes. --
Rob.
The suggestion to work on other hobbies, etc, is good, IMHO, but I actually _really_ need something more specific to solve this problem. See, I actually can't get my mind off programming problems, even when I'm doing other things sometimes. The thing that always helps me, is to do some hobby that involves repetetive, simple, mental tasks, that force my mind away from problem solving, clean it out, and get it thinking simply and clearly again... The following are the things that work the best for me:
1) Typing practice
2) Practicing the abacus
3) Studying Chinese/Japanese characters
4) Studying other difficult languages
The other thing that helps me avoid just sitting and staring at the computer (or surfing all day) is to go to a cafe and chill. Read magazines, browse stuff, etc. Then, I can sip a coffee and begin to think about the problem while being really relaxed, with noone looking over my shoulder, and knowing that noone will bother me. I also work at home a lot at these times, just sitting on the couch with my laptop, or scribbling stuff on paper... I actually really like to use paper at these times, cause it removes that feeling of urgency -- I don't feel then that I have to get something done, just think about the problem and see what happens...
hope this helps :)
--torokun
Sex! Lots and lots of wild, free, and fun ground-pounding, mind-numbing, rafter rattling sex!
And I'm NOT talking about a long shower. (You're married now, right?)
After working your body over, with all those endorphins and everything flying all over the place, you'll realize that all that stuff you were so anxious about just doesn't really matter now...
And then coding is... easy!
-Ben
I have no problem with your religion until you decide it's reason to deprive others of the truth.
Grab a giant Arizona iced tea, and a bag of Pepperidge Farm cookies, gorge, then go lay down on the couch for 1/2 hour.
I want to delete my account but Slashdot doesn't allow it.
I have the same thing. With coding, I can normally get up, maybe have a nap, or at worst, a day or two's break, and I'm good to go again. With writing, though, I've been known to stop writing halfway through an important piece of dialogue, get up, then not go back to it for months.
Much as I love it, the internet is the ultimate counter-productivity tool. In my preonline days when I was in the lower years of high school I used to do a lot of coding. When i wasn't out drinking i'd code shit all day (and the odd good thing)
:)
Now i do soo little
Writing code is a creative work - and so you will some day suffer the same fate as an author of a novel: the creative block. First thing: don't panic. This will happen to everyone. It has happened to me, and you too can overcome it. This block is a sign of stress that your brain sends: it signals that you have to take a break. Rest a while. Take a day off. And do something unrelated to your work. Relax. Having a method to invoke relaxation will help a lot. After this: write your problem down or tell someone. Try to explain why you think you can't solve the problem. The person you talk to can be someone in the know or someone who doesn't care about programming - it doesn't make much difference. Try to view your problem from different angles. What if your problem is a person? What if your problem is a car? A dog? A cat? A highway?. I know, this sounds silly, but it is amazing. Most of the time we get stuck because we can't change our view of it, so its time to get silly and change our vision to anything. If the obvious does not work, try something silly. Make a fun out of a problem. A joke. Something we laugh about can't be a threat. Read books about the subject (this shouldn't be the first step, though others may suggest otherwise). And then try to remember how you felt when you once solved a difficult problem. What were your thoughts? What were your feelings? describe them to yourself and try to feel them again.If this still does not work, no need to worry. Try to imagine that you have solved your problem: what was the last step you were taking before you solved this problem? What was the step before that step and so on. Try working backwards. Sometimes this is much easier. Try to solve some of the problems you encounter: minor ones that can be solved easily. You have to regain you trust in yourself, and this is easier if you make something successfully. Next read a few books about creativity. There are some amazing ideas.Most people, if stuck, try it harder than before the same way they did it before. If everything fails, try something different. Otherwise, your thoughts will go in circles until you can't think of something else. And if nothing works: Maybe your problem is impossible to solve.
You found a sword: +4 damage, +5 moderator points
When i get stuck, I rewrite the damn thing from scratch. In practice I usually give up on the rewriting effort because I see an easier way to fix it as I get into the flow of things again, but it helps me a lot to be able to start with a blank screen again.
Another thing you might look into is Refactoring -- get mechanical about fixing design problems until your software becomes easy to think about again.
You know, this topic is the subject of many academic papers, books, and more than a few long, incomprehenisible rants. Here's mine:
I assume that you are using some formal or semi-formal methods for your software design. If not, I would suggest doing a bit of reading on software development processes and methodologies. Despite what some will lead you to believe, you don't have to formalize your own development strategy into a white paper, but having some idea of the manner in which others analyze problems, design a software solution, and implement that solution, will generally give you great insight into best practices that you can use in your own work. I'll avoid book references here, but suffice it to say that there is a huge selection of many fine books on the subject. If you're interested in open discussion about the matter, check out the WorldWide Institute of Software Architects.
I feel that your problem lies primarily in the area of motivation. I have been a developer for ten years or so, myself. I recently went through a period much like what you describe: struggling, unmotivated, and feeling overwhelmed by the sheer volume and complexity of my work. My own cure was multifaceted:
I hope this helps. I think that burnout, the traditional ailment of our field, is completely avoidable. At least, I hope it is. Feel free to drop me a line, and I can direct you to more specific references and methods that I have found useful.
Michael Maddox
Senior Software Engineer
HCS
Tallahassee, FL
What'dya mean there's no BLINK tag!?
Money is everything in this world. So ask for more of it. Either charge clients more, or ask for a raise. I had quite a dip in productivity for a while, then I got a raise (go figure). But that pretty much solved it.
Sometimes it's that you are being asked to do something beyond your abilities. This is good when you get to learn new stuff on company time, but if you're expected to, for example, write a command-processor when you don't have a CS degree and haven't been exposed to lex or yacc or bison before, then you have a boss who's either doesn't know what he's doing, or does but should be ashamed of himself.
Most programmers, especially those early in their careers, get to do lots of maintenance/enhancement programming. This requires the ability to read large amounts of other people's code and understand it, but it also requires time that your boss should be allocating to you, separate and apart from the time expected to actually do the maintenance/enhancement tasks. Also, does all this archaic code have comments? Functional specs? Did the previous programmers leave anything to help you out, or does this code look like too many people have been over it, each for a short time. Maybe the code itself is a clue that you're working someplace where the management culture with regards to the development process is dysfunctional.
One of the things that can make a huge difference is that you feel you can ask for help when you need it, both from your managers and your peers. If you are in a work culture where it's deadly to admit you don't know something, but at the same time the information you need to get from Point A to Point B isn't readily available, then something is very wrong.
If you are on a Death March project, you hate your job, and you just can't work up the motivation to get out of your rut, then you have to start looking at ways to make the best of a bad situation. You can walk away, or you can go to your boss and say someting like "This situation is screwed and I'm ready to quit. But if we can put all the bullshit and bad feelings in the past and find a way to move forward, then I'll do the best I can to stay and make this situation work". If your boss doesn't fire you on the spot, that's the sign that you have a chance. You should feel like you can re-negotiate deadlines with out getting that The-Other-Shoe-Is-About-To-Drop feeling. However, you should never threaten to quit unless you're prepared to do it for real. As with any relationship, you usually have to be willing to risk the whole enchilada if you're to have any chance at causing a genuine change in the power dynamic.
As you move through your career, one of the things you will learn is that people who are good at managing programmers are rare. You will encounter more bad managers than good ones. Once you realize you are working under a bad manager, try to make a good-faith effort to straighten things out. A lot of the time bad managers are just good people who lack political or interpersonal skill, or lack the judgement to assess what it takes to move a development project to completion, and then get the needed support from upper management. But once you've done your due diligence and things haven't changed, move on and don't look back. Over time you'll get better and telling the difference between good places to work and bad ones.
Sorry if I rambled too much. Bottom line - software development is inherently difficult. Don't dump on yourself if things are going badly. It may just be you, but it's far more likely that your experience of the situtation is a clue to deeper problems in your work environment. As they say on TV, the truth is out there.
I agree! This helped me as well. I was having programming block for a while so I got away from the computers and started exercising. It was the best thing I ever did! Now, I'm back to my old self again not to mention picked up a few side effects from lifting (ie. self-confidence, more energy and definitive clarity) Sometimes sitting in front of a computer all day just doesn't cut it for the brain. In order for the brain to operate at its best, the body must be running efficiently as well. Think of it this way. The brain runs off of blood. Simalar to a car running off of gas. If you're in shape via cardiovascular, then the heart pumps more blood to the brain. Hence, no more programmers block.
Whenever I can't bring myself to code anymore, I do the unthinkable, I call the marketing people and ask for a meeting to discuss some highly controversial facet of the project like the color of a certain line of important text or something. BINGO, 2 hour break from reality as I nap in the meeting while they argue with each other over which color of blue better captures what we're trying to get across to the user. After I feel I've recharged enough, I tell them we can't color the line in blue so I'll just pick another color and then go back to work. Works every time.
Karma: Non-existant. Due mostly to the fact that you smell funny and nobody likes you.
Just try not to focus on it too much. Try and do something else for a while. Do you really want to program at the moment, or are you really not that interrested anymore? You should answer these questions first. But anyway, taking your mind of it worked for me!
How to make a sig
without having an idea
There is a big difference between just backing up code and actually using source control! With source control; I am never afraid to make a change! Use it for every project! Many people think it is too much trouble, but they are shooting themselves in the foot!
Try cleaning off your desk, and getting a big piece of paper and sketching out your ideas. If you don't like it, throw it away and start again.
The face of a child can say it all, especially the mouth part of the face.
If you don't have a requirements document I suggest you make one. Independent programmers usually have to do all of the project management tasks themselves and often skip this step to save time. If you know what the customer wants, get it all on paper and have them verify it. If you don't know exactly what they want your programming task is going to be impossible anyway. In fact, this may be what's causing your block: The task is daunting because you don't know what your program is supposed to do!
So assuming you have a set of requirements already, just copy them into your code within comments. This will have the extra benefit of helping you stay on track once you've broken through your writer's block. Don't worry about form just yet - that'll just sidetrack you.
Then, after each comment, just start picking out verbs and nouns. If you're doing OOD, make each noun an object and each verb a method. Identify which nouns are doing the verbs to associate methods to your objects. You'll probably see some predicates to your verbs, so they will naturally fit as parameters to your methods. Lastly, pick out some appropriate attributes. Again, don't worry about filling in the code for the methods, just declare them.
Defining the interfaces is more than half the battle. One of the most helpful lessons I learned in English class was that it doesn't matter what order you actually write the main points of your paper in, just get 'em down and prove them later as the inspiration strikes you. Writing code is exactly the same process.
Well, that's how I usually get started. I hope it helps.
The story is of an old Chinese artist, famous because of the quality of his work. One afternoon, the emperor invites him to the palace and once there asks the artist to make a painting of his beautiful pet bird. The artist agrees to do the work nad leaves.
Some years pass, and the emperor has not heard from the artist. Being impatient he pays the artist a visit at his home. Upon entering the artist's home he finds the artist staring idly out the window at a flock of birds.
The emperor is enraged, and demands an explanation for the delay.
The artist, merely smiles, nods his head and begins to go about his home removing scraps of paper from cabinets and drawers. He hands the scraps to the emperor. The scraps are all drawings. Some of bird's wings, some of bird's feet, some heads, some simply of feathers. None are of a bird.
Having shown this to the emperor, the artist sat at his easel and in a few minutes had produced the most beautiful, lifelike drawing of a bird that the emperor had ever seen.
Then the emperor sat and waited until the artist had finished the painting.
I find it helps to stop and pray, even if just for a minute. I lean back in my chair, put my feet up on my desk and ask God for inspiration. It's helped me out of blocks many times. Of course, I liked the comment about becoming a sys admin too. :) I actually do both so when I get tired of one I do the other. It's 4:30 AM here in CA and I've been coding an inventory proggy since 10 AM. At 1 PM I get a break to install a frame relay!
T. Bradley Dean
tbdean
Recently I've been experiencing the same! I've been calling it "programmer's fatigue". There are probably a few programmers out there that believe "programmer's fatigue" can't be experienced by a REAL programmer... well screw off and blow it out your far heap. I've been programming for 17+ years and its not exactly 'programming' that I'm fed up with. It's the application I'm working on! It's gross, and the spec is completely out of control.
In my experience, I need to be utterly interested in what I'm writing in order to be good at it and turn out a great piece of software. Perhaps you aren't interested in continuing your project... there are obsticles in the world that software can't solve. Screwed up software design specs are one of 'em.
If you're bored with the current app your working on, find something of better interest, and you're productivity will surely pick up again.
--cr@ckwhore
Skiers and Riders -- http://www.snowjournal.com
Hey me too!
The best way that I've found to deal with creative block is to hit a baseball. Go to batting cages or buy a little nerf pitching machine (20$). And then focus completly on your swing. Do that for 10-15 minutes and I can usually continue programming unimpeeded.
My guess is that it's not the baseball but the concentration. Find something mindless to concentrate on that you can really focus on ....
I understand the feeling. (Sometimes it gets worse if I force myself to do something "official", such as study some aspect of the language / environment / problem domain, because I keep getting reminded of the blockage on the problem I haven't solved.)
In addition to the suggestions posted by the original author, I've found a couple of other approaches helpful:
Good luck!
I also switch to another project when I encounter a block but it is not to forget anything about the first project. I often do it because the first has become plain booring and I just get sick of watching the same old code for yet another hour.
When I work on another project I work with something new and innocent and get really interrested and can after a few days go back to the first and look at it as a new project and still remember every row, every bug and every thing the boss want to change back to what he changed from last month...
But just having a extra project at home isn't enough, I have to get away for a few days.. This means that I work hardest on mondays which isn't usual for other people.
This is just my life and my solution and I don't expect it will work for everyone, but I do wish my boss would understand me.
I am really, really glad to hear that I'm not the only one who experiences this problem. I was really starting to worry.
I think motivation and passion for what your doing is a big key.
I'm a consultant and I've been brought in by another company to help salvage an ASP project they have. The project just needs to be scrapped; the other programmers have the same opinion, which doesn't help things.
I look at how much money they pay for me to be here, and I feel so bad, but I just can't bring myself to be very productive. I read Slashdot, I instant message, anything to get away from programming -- and when I do sit down to program, it's like I zone out.
You know what the sad thing is? I'm only 20 and I already have this problem; I'm terrified by that.
The Solution - What I've Discovered Anyway.
Money isn't enough. Wealth doesn't drive people like us -- it's the challenge, the thrill we get from programming. I remember when I finally "clicked" with Java; my hands just sort of "took off" on the keyboard, and I pulled an all-nighter, something I hadn't done in a long time.
You need a vested, genuine interest in what your doing. It's time for a change of scenery. Personally, if my next project (only 3 weeks to go!) is in the same boat -- I'm out of here. I'm way too young to be this drained. I'll either devote my time to my business or go back to school and become and "academic".
This is part of the reason Linux and debatably Mozilla has taken off so well. You have all of these guys devoting their free time to something they normally get paid for. Why? For the love of the game.
Sleep.
====
Crudely Drawn Games
way to spell.. bad spellers
What if you're an atheist?
Ever get the impression that your life would make a good sitcom?
Ever follow this to its logical conclusion: that your life is a sitcom?
"I don't care about the Constitution!" --Bill O'Reilly, November 17, 2009
That's generally what I do, too. Herb Sutter's new book is also good for getting new ideas. I will also stand back and refactor my program design to make it cleaner and sharper.
As silly as this sounds (a calculus teacher used to suggest this approach), it gets me through many trying days at work. When I feel overwhelmed by the complexity of huge amounts of code (especially when it's written by someone else), I just try to break it down to its most basic pieces.
I ask myself: "what is this library/app trying to do?"
If I can't answer that, then I break it down again: "what is this class/function trying to do?"
And if that gets me nowhere: "what is this line of code trying to do?"
Then I'll make some notes and draw some pictures of my ideas (that way I feel like I'm doing something!), and before I know it, I'll see a method to the madness. Patterns form in the chaos.
Put another way, the whole system is often too much for a programmer to take in at once, and trying to figure out everything at once leads to frustration and "hacker's block". So don't try to figure it all out -- take a piece and figure that out, then another, and so on. Confidence and comprehension will grow as more and more pieces are tackled.
As obvious as this sounds, I see many developers trying to handle everything at once and get frustrated. It really works!
Yup, it's falling allright.
...
Flying is the art of falling
And miss the ground !!
{squawk} Polly wants a cookie !
---
Free ?! Does that mean I can't get a Discount ?!
Free ?! Does that mean I can't get a Discount ?!
This message was
Well, as an agnost (don't know the correkt spellink) I can say thet losing my thoughts in a game of Doom I in invincible-mode and pretending the insignificant others (a.k.a. enemies) are the problems, and just breezing through the levels can be quite satisfying as well ...
...
I respect every one and all to his/her/it's own belief and/or/including religion. Just don't come to my frontdoor and "save" me.
IMO 'meditation' is something -whatever it's external format- you do to relax the cranium, loosen up the muscles in your back and neck. If prayer works for one: Fine by me. If Tibetan Levitation does it for another: That's just swell as well.
"What's good for the goose is good for the gander" ? I don't know. I've tried several things, including baby-oil {wrestling} with my wife and sometimes one thing works, and sometimes sheer senseless virtual bloodshed does the trick. It depends on the moment.
There is no single definite one-for-all cure for writers block or whatever your current mentally challenged status.
The important thing is to try to leviate the immediate problem or hangup and maybe in the process you learn something valuable about yourself, your ignificant other, your pet, your
I've learned a lot after a severe burnout 2 years ago and not that I'm back in perfect shape again like I thought I was before I crshed'n'burned but I have learned that to pace yourself and to spend time away from the money-making averyday business and to go off on a wild tangent does the trick for me.
I've read it all over this thread: Shut down, get out, do something completely different and the background process (lookup man nice sometime) will continue to solve the immediate problem.
{squawk} Polly wants a cookie!
---
Free ?! Does that mean I can't get a Discount ?!
Free ?! Does that mean I can't get a Discount ?!
This message was
Ovbiously, teh ammount fo mipseltings i s a caus four consern. Eye thinck teh bestt wey too ficx thise wood bee too fourse peepl too uss teh "Prefew" buton.
(Spudley Strikes Again!)
I know this sort of thing well. I get it myself often.
My solution is simply to switch to a different project for a while. It always works for me - I work well on the other project, and then when I go back to the original work, I'm more motivated.
I haven't really analysed why this works before, but I think it's maybe because when I come back to the original project, I've forgotten some of the details of how it works, so I have to study the code again; that's a great motivator (for me, at least) because I spot bugs and stuff that I would have missed otherwise, so I start fixing them, and that breaks the "programmer's block" syndrome.
By the way, I'm also a writer, and the same thing works for me with that too (although I usually have to leave it alone for a bit longer than with programming projects).
(Spudley Strikes Again!)
Beer! :)
Of course, if you're OpenBSD user, you may want to go with Guinness
(no, it's not a flamebait, everyone knows Guinness is Theo's favourite drink)
-----
Personally, to solve the coders block problem, I go to the cinema for the day (there a a few cinemas around here that are open 11am to midnight or 1 am) and watch a load of films that keep my attention but require no real brain work (action movies are best). If that don't work I watch Buffy videos and/or read Buffy fanfic.
The next day I'm ready for work and usually have the solution nicely mapped out in my brain.
This is the same method the SF author Issac Asimov used (although he didn't have access to Buffy) to combat writers block.
Stephen
"Don't write down to your readers, the only people less intelligent than you can't read" - Sign on Newspaper Office Wall
Well, I'm somwhat in your situation... however, due to the license restrictions on Sun's JDK, I'm no allowed to code control systems for nuclear powerplants, so that's one bit of stress I don't have to worry about.
When they told me that Java would make my life easier, I never quite realized how true they were.
my sig's at the bottom of the page.
I tend to find that the best way of dealing with this problem is to identify individual elements of the problem, and start knocking up solutions to them, without worrying about the bigger picture. This might be things like creating a new class that will help me solve a problem further down the line, trying to use a couple of new techniques as I go, and creating a bucket-load of useful methods along the way...
This usually rejuvenates me completely. I suddenly find that I know how to tackle the problem, or at least some fo the elements of it. And I can plough back into the task at hand.
All the work I'm doing can be incorporated into the final solution, but I find it to be the most effective way to address individual issues, rather than staring at the problem as a whole going "Ohmigodohmigodohmigod...".
This works better for preventing block than removing it, but I find listening to music that you like, preferrably without words, works. When I was taking a course in C++, I'd just put on my headphones, put on some techno music, and let my mind wander if the problem looked too tricky to solve. I'd just sit there for several minutes, not worrying about time, and when I got back to programming, it was almost like a divine inspiration had hit me. I'd usually just crank out the code in one long string, iron out the bugs, and be done with it.
I also find that music with a good constant beat helps to keep my mind on track when I'm programming something large.
Hope this helps.
Oh - but most of what all these other folks have said helps, too. Pick an outdoor activity and play with it (I've gotten into whitewater kayaking - what a rush!), or get involved with a Significant Other (and get ready to have your life completely modified), or just get out from in front of the tube and walk around the park for a while. Coding may be Life, for some of us... but Life is not Coded.
I love vegetarians - some of my favorite foods are vegetarians.
What do you do when you are stuck in code and your focus leaves you?
spend half the day reading 'ask slashdot' articles about what to do when you are stuck in code and your focus leaves you. if this doesn't work, try it for another couple of hours. i'll let you know how it goes.
if my boss is reading this, it's my evil twin posting this and yes the database code is finished.
Sorry, but I know for a fact that I was more productive as a grad student with no family than I am now with a wife and kids.
The thing is, I'm happier now.
Bingo Foo
---
taken! (by Davidleeroth) Thanks Bingo Foo!
Richard Feynman, a famous physicist - who happens to be my hero - had a solution to this problem. He was having difficulty coming up with important new ideas about physics, and had a mental block.
His answer was to start playing again, thinking about things that he found interesting or enjoyable personally, but not at all 'important'.
I suggest you do the same. Go play with something you enjoy in programming. Write a silly little game, do something you enjoy, and get your mind off the 'important' problems.
Learn how to relax. By this I mean that getting sleep doesn't equate to relaxation. You need some time just for doing nothing. If you are too busy there is no time for creativity.
I know that this runs against most other people's comments, but I've found that taking a few days off doesn't do me any good. I end up more stressed because I know I have a deadline to meet. I was struggling with coders block for a long time when I got into a poetry writing class. I was amazed at how much of the professors sudgestions applied to both poetry and coding. Here are some that work for me. 1. Just write anything!: If I don't know what to write I'll just start writing stuff that I know is wrong. I know I can go back and change it and the natural need for it to be right somehow kicks in and gets me going again. Soon I erase all the "babble" and I'm writing real code again. It's sometimes easier to fix something than it is to create it. 2. If you can, just work up to the problem. In writing poetry you would try by writing a related hi-ku(sp?). In coding, I usually start by writing a little program that might work along side the one I am working on. That gets me thinking about the functions of the code at hand, without pressuring me to work on it. 3. If you havn't started anything yet, just write the stubs. If you hash out the functions and get them to compile with no code in them, you've got something to work with. Also, it's like moving pieces around on a chess board, it gets you to consider your options. Anyway, these are the things that get me through a long day. I hope they work for you. Good luck!!
As a lead programmer it is my job to not only get past my own blocks, but to help my colleagues get past their blocks too. There are a number of simple strategies that can be used:
1. Talk to other programmers about the problem. They will help you think in different ways about what is happening. This is good for everyone - especially since it helps unify understanding of the code base.
2. Pair up and work with another programmer on the problem. Two programmers to one workstation. This can be highly productive and has numerous side benefits, such as shared architectural vision, greater speed in solving the problem and (I've always found) more stable and pleasing code.
3. Work on something else if there isn't a high importance to the blocked task.
4. Write out your problem in English.
As always, it helps to exercise for at least an hour at least 3 times a week.
Never feel embarrassed to ask another programmer for help. They are a resource you should be using like papers, on-line texts and reference books.
StrutterX
I feel that the block is not coming from any one source. Everyday life can cloud your mind enough to entrench you in a few hundred or thousand lines of code. I found that the only way to really break a block is to step out of the code that i'm working on and look at the bigger picture. Sometimes the solution is easier than you thought but you just need to rethink your methods. Recently working on a project trying to create some form of inhouse plugin to make our network stations still running win95 and win98 use policy more like an NT workstation, I became stuck trying to make current profile methods and software work for me. Then I realized a program with less than 100 lines of code and disabling Microsofts solution to profiles was a 1-2 hour fix.
I was crazy back when being crazy really meant something. (Charles Manson)
Similar things happen to me on occasion. I know I'm not burned out or anything-- that happens, too, and in those cases, I need time off. But sometimes I let myself get overwhelmed by the task, and I feel totally deer-in-headlights.
I find that what I need to do is help myself concentrate. Remove distractions, clear my schedule. I try to close up other tasks as much as possible, or at least make myself comfortable with the certainty that I'll be able to address them effectively later.
Once that's done, I start to feel a little more relaxed, and that by itself is sometimes enough to help get past the hump. I usually work to music, but sometimes I'll turn that off, if that is also becoming a distraction. I'll grab myself a coffee. A small amount of coffee will actually calm me down; too much will make my mind fly in all directions at once, compounding the problem.
Then, it's a matter of "mind over mind:" I force myself to concentrate on the task. I usually prefer to take a bottom-up approach, which I find requires a little less brainwork. Bottom-up also helps in simplifying the overall problem (at least, that's what it should do; if it doesn't, then you're doing bottom-up incorrectly).
I also try to get something written. Anything, so that I have something concrete to work with. Sometimes, I find it useful to use a scripting language like Perl that will allow me to do some very quick prototyping.
That's all pretty much off-the-cuff, but those are probably my best suggestions.
Best of luck.
Accountability on the heads of the powerful.
Power in the hands of the accountable.
"I am an 'INTP'. The middle two letters (NT) are very common type of personality for programmers."
Jeez. The last person a Shashdot reader wants to hear is that they're NT at heart. Is using Linux instead just a form of denial?
(sorry -- couldn't resist)
--
"Better dead than smeg."
--
The real Captain Derivative has a Slashdot ID.
I think a lot of it comes down to personality. Different people (obviously, I guess) have different ways of coping and getting problems worked out.
Most people who I know tend to go for the attack coding binge type of approach. That is to come in stacked up with 16 hours worth of the high energy drink of their choice, and just sit there and code.
I've never found this to be very productive for myself because my mind doesn't work instantaneously on demand like that. What I tend to do is look at the problem so I know what I'm dealing with, then just ignore it for a few days. During this time an idea of how to do it just forms in my head, and if I can I'll probably scribble bits of it down on paper as soon as I have the opportunity.
Even then, I usually can't code it immediately. I wake up in the morning knowing what I want to have accomplished, and during that day it's virtually impossible for me to get very far past that point. If I manage to get the whole lot done in half an hour, I still can't get much further than that point. I'll just end up sitting around playing freeciv or something.
To make more progress means waking up again with a new goal in mind, knowing what I want to get done. Sometimes these goals take all day but they're usually not too big to take much longer. If they are, I just stop when I get tired and finishing it becomes the next day's goal.
So I guess my way of attacking the coding block that I get is to break it down into small day-by-day problems. If I can't think how to do something, I'll work on a different part of the project instead. Usually in the beginning I don't have any detailed idea how I'm going to do something, but as the bits build up and it takes some shape, it gets easier to see how to finish it off and what parts (if any) need to be recoded.
It probably wouldn't be much help if your mind works differently, though.
===
a couple of stiffeners tends to loosen up the inhibitions that are causing the problem
that reminds me, drinking and coding is the best combination.. especially drinking beer at the computer.
--
when the rain comes, they run and hide their heads. they might as well be dead.
Since the beginning of my techie career, I have always kept my guitar by my computer at home, and a great many CDs and a Discman at my work. I can honestly say I have never had a mental block that a Miles Davis album could not cure. Either that, or some Slayer! Playing the guitar also seems to give my mind a rest and replinishes the *spark*.
He who joyfully marches in rank and file has already earned my contempt. - "Big Al" Einstein
I recommend developing a meditative practice. I like to make an analogy to meditation as being like defraging the hard drive, flushing memory cache, and throwing out temporary files. Personally I practice kundalini yoga to address some of the exact issues you raised.
We'll be seeing more and more of this, information overload and burnout.
Lecture on the subject.
Listen to Reality!
Back when I was younger (I'm 37 now,I was 26 then) I worked at a programming shop in Yarmouth, MA. We wrote computer games. Wrint computer games is a really fun job, you get to write code that does some really cool tasks.. such as mixing unlimited sounds on the fly. back then there was no 3DFX engine.. we took photos of actual models from all diferrent angles.. We started with space games, made unique models, took pictures. Ahh the gaming engine.. yes that's work. And sometimes there woul be programmer's block. We would have a game... throw a ball around, go out for beer and pizza, and brainstorm. Now I guess I take things a bit too serious, that's from writing database applications. Who would of thought they pay big bucks to write Oracle databases.. Ahh the good old days.
I'm kinda going through the same process, i have been working on the project for 2 months now and have had several blocks along the way. So when i have a block, i'll reprogram some of the stuff i have written so far. Making it more compact and more logical. And when i have made that, i get over the block and smoothly move on to the stuff i couldn't write before... Ofcourse this always don't help so i go out, play quake, sleep for a long time and then try again... But even if that doesn't help, i put on some good music, take a big piece of paper and design the thing on the paper and then if all is sorted out on the paper, just write the thing in C++.....
15 yrs of programming in C++ will get anyone bored.. step down from the messy realms of object orientdness and try some fun , no rules language like perl..or explore scheme and lisp
KiKi's Delivery Service, by Miyazaki (a creative genius) is about this kind of bloc. You might want to rent it, and listen to it. Many people here have given the advice it gives, but I think that you will find that the animated answer is portrayed much more eloquently.
You have an opportunity for a lot of growth as a programmer right now, so don't stop programming as a career and as an artistic effort.
First, rent KiKi's Delivery Service. You will see that you need some time to reflect and relax. Everything will be fine, it just needs a little time right now.
After a period of reflection, get ready to go back to work. Read The Mythical Man-Month. In particular, read what it has to say about Iterative Development. The real strength of iterative development is that it is very action-oriented, and it sounds like you are suffering from a severe lack of activity. Programming iteratively will assist you in getting back up to speed.
After you have learned to code iteratively, you will have another tool in your toolchest, and will be a better programmer for it. Design and Iterative processes both have their time and place. The books that you have been reading are stressing Design. We need to get some Iteration in you.
Then code again.
May the Code be with you.
I refreshing walk in the real world usually helps.
If you're dealing with scary code and you havn't read "Refactoring - Improving the Design of Existing Code" by Martin Fowler then do yourself a favour and get this book, it' great!
here's the amazon link
The Refactoring book is a catalog of techniques for reworking code. All of the examples are in Java but apply equally to C++ (I'm a C++ programmer myself.) In addition the the catalog of refactorings this book presents an attitude towards dealing with an existing body of code which is really inspiring.
I used to think of my existing code base as frozen, difficult to maintain and change - but it can be much more dynamic than that. Martin Fowler promotes the idea of refactoring as you go - if you're implementing a feature and it dosn't really fit with the existing design, change the design, then implement the feature. Working incrementally like this you can rapidly move towards making things much less scary. Once you realise that there is light at the end of the tunnel you will make freinds with your code again.
"Why was he so stupid? When told that his mind could change his response was: How? Why?" - John Cage.
When I get the symptoms of burn out, I take a small time out, and start listing the tasks I have to complete. I often find that the problem is not the difficulty or complexity of the problem, but the sheer number of tasks. I read or heard somewhere that the human mind can only juggle 5 or 6 ideas at a time, and that more than that becomes overwhelming. I don't know about the rest of you, but it's very true for myself.
Often, I'll find that it's not even programming tasks, it's just I have too many other things. If my list looks like this:
1: Implement a file transfer mechanism to the machine older than me
2: Solve a defect in someone else's code
3: Bath the dogs
4: Get some milk
5: Renew my car tags
6: Get a haircut
7: Get my mom a birthday card
then the simple number of "everyday" tasks will overwhelm the programming tasks, and I'll get nothing done! The only thing to do is take a few hours, clear tasks off the list, and come back with a "managable" number of tasks. Or just make the list, so your brain isn't always swapping memory to disk.
That's why, while on site, I can write hundreds of lines of code a day, clear tons of errors, and write pages of documentation, but when I get back in the office, I find it hard to even make 1 line changes. It's a different world, when you have to do your own laundry, cook meals, be social, etc.
It's a shame life gets in the way of code sometimes, but you got to take a holistic approach.
The only solution I ever found worked was to change the working environment. Your skills and talent are still there, but you've become bored or intimidated by the surroundings. I find that taking a scratch-pad and a pencil and going to work in a coffee-shop works. For serious cases, I go work in a bar - they're usually quiet during the day and a couple of stiffeners tends to loosen up the inhibitions that are causing the problem.
-- AndrewD
A Maze of Twisty Little Laws, All Different.
You sound like you have happy things to sing about anyways.
C'est une monde triste qui ne prend pas le temps de savoir tout ce qu'on peut faire.
As a programmer, we think about the problem domain a lot, but we rarely turn our piercing gaze back upon ourselves. I find that when you have a mental block, it's time to stop programming for a while, and get your thoughts and feelings cleared up.
Here are two ideas:
1. Go take a personality test, and think about your personality, and the personalities of the people you work with (your clients, your boss, your co-workers).
In personality types, according to the Meyers Briggs Type Indicator (MBTI), I am an "INTP". The middle two letters (NT) are very common type of personality for programmers. First, the N, which stands for Intuitive, means you search for pattern and order in the universe, and you build an mental model of it. Think of it as Synaptic Object Oriented Programming. You want to figure things out, understand how they work. I call it the "mad scientist gene". The other parts for me, are Introversion (versus Extroversion), Thinking (versus Feeling), and Perceiving (versus Judging). I find that when I am in crisis (code block, or not doing well in a project) it helps to think about why I am upset and anxious, and what personal, emotional, irrational, yet real things are bothering me. One way to let that stuff surface is to recognize that your Extreme Code-Writing persona is one way of subjugating lots of other parts of you that you don't want to deal with. So try leaving that coping strategy behind for a while, try to find that emotional you, and wallow in it for a while, or leave the analytical you behind for a while, and operate in the other parts of your head and heart that normally lie around not doing much when you're programming.
In other words, programming is only "part of you" it's not all of you. It's not your reason for living, and it's not even your best part, most likely. Read a book about personality types, about people, about something emotional or personal, or read a devotional book, if you are religious. Understand your personality, and choose to live in a different head-space than you normally would, choose to live in.
2. Sometimes a good way to let everything bubble up to the surface is to write a good rant. I don't believe a rant needs to be sent to anyone else, but if it does need to be, then send it to one buddy. Even better, just write it and save it on your hard drive for 24 hours. Don't send it. After 24 hours, go back and read it forensically. Treat it like a core dump of a diseased program. That's what it is. Debug your mental state the next day. If there are good points to be made in your rant, isolate them, and save them. Hopefully those good points can be made to your boss or client in some way they can hear and process constructively.
Third bonus suggestion: Read slashdot for a while.
Warren Postma
If you really want to fly, get out of the plane... I highly recommend taking along a parachute.
Actually, I think that's called falling.
I have had those over a 25 year career...
1) Got myself subspended for a weekend for wearing jeans to the office. They were not jeans based on Webster and I still came in worked that weekend.
2) Walked into my bosses office on Friday afternoon and told him that I was going on vacation for next 4 weeks. I had 12 weeks on books.
3) Normally though, I pick up the bug lists. There is always a bugs lists when there is more than 1000 programs making up a system. Goto to "Junk Bugs Section". These are mindless bugs to fix... Fix the spelling of Friday on a report, move title two spaces to right. And do a few of those to get the mind moving again. Think of it as priming a old water pump.
When all else fails - get out and be person! Call special other and go to the beach or a night on town.
On the otherside... NUKES are fun, and the stress of doing it wrong is very high. Take some mental health days and get a new look on life.
Occasionally when I'm having this problem, I find it really helpful to work on it away from the computer. My first coding teacher always liked to say that the best tool was a pencil and paper. (Of course he couldn't really type but that was his problem.)
As such, I usually have a stack of coversheets from the printer that I scribble on. (That way when I write something like "Damn, I haven't got a clue!!!" and throw the paper in the trash, I don't feel too bad for the waste.) I'll often take a bunch of this and go sit outside the building I'm in and write "pseudo code" for awhile. That way I can get away from my desk and still be productive - which is key.
Another thing that often helps me is finding something like a white- or chalk- board and then diagraming things out- there's plenty of room to work and it's easy to erase mistakes and bad starts. I find this to be another good way to get away from my desk, and to newer, fresher surroundings.
Although lately I've dealt with coder's block primarily by reading every /. story and posting stupid replies, which only I only imagine to be insightful - like this one, for example.
credo quia absurdum
The most meaningful posts in this thread that I have seen have been from hatless and magnushuckvale. The two things they stress: plan out your app (before writing your first piece of commitable code) and live a sustainable lifestyle.
How many slashdot readers are dinosaurs? A lot of posts sound like they came from drones that take the spec, sit in a dark room getting a monitor-tan and turning a greenish hue from the Mountain Dew, and spitting out a chunk of code weeks later.
Come on. We're better than this. We have the tools to completely build our project, without code, in a way that even non-techies can understand. That's how you get anybody sitting around to be able to help you with those nasty architecture problems.
Finally, it is important to live a life outside of the green-hued (not so much anymore) light from the monitor.
Human->Productive member of society->Engineer->Programmer
Because you can't, you won't, and you don't stop...
Just talk to a real person, this will make you feel so bad you instantly remember everything ...
I'm personally familar with this state of hacker. I started programming some five years ago and in that time there's been a total of eight months of nothing. No new ideas, no late nights, zippo. Yes, a lot of this has to do with architechual issues -- as well as my own fears. When I'm stuck, the first this I do is pull out a small, leather covered writing journal and a Shaffer fountain pen. Drawing from my long standing talent of talking to myself, I do the same -- only I write it down. It's a nice ritual for me. Same book (the leather part is just a cover, the inside is a small 5x7 unlined sketchbook), same pen. Isn't it Phycologists (excuse the bad spelling) that say constance is an excellent metal relaxor? After writing some ten pages I usually finish in a better state than I began. Of course, this doesn't actually get me to _write_ any code. For that I have to resort other measures. Techno music is often the first, although latly that hasn't helped me much at all since I listen to it all the time. Telling myself that "I should get this done" never works for me, it often makes things worse. Latly, I've taken to playing videogames for an hour to warm up. I'm between "Legacy of Kain: Soul Rever" and "Final Fantasy VI" right now. In the end, this is what best works for me: 1. Don't prepare. Hacking is supposed to be impromptu. 2. Don't think about it when it's not right in front of you. Call it a little bit of Zen, "Oneness of Thought". 3. Whatever you do, don't worry about it! I find that when I begin to worry about code, I spend all my energy worrying and none of coding. End Rant. "Hacking is your Everyday Thought."
"Hacking is your Everyday Thought."
-Aeris the wired
"Software is a feeling, refined and expanded by each who touch it."
-Solstice
Solstice@deninet.com
The grits are better in the South. But I'd prefer hot sex over grits.
I find juggling to be a great help... it takes your mind off the problem, and gets both halves of the brain working again. Some of our developers at work have setup a fish tank and a large punching bag to help with their stress/blocks. Still, there is no substitute for fresh air and sunshine.. going for a walk, swim bike ride etc doesn't just improve your physical fitness. As someone else stated, flicking through a couple programming books (even on just the basics that you are sure you already know) can also help.
i don't recommend coding while high, but when i am stuck ..... light up and it all makes sense again. you forget why you were stuck in the first place and you get a whole new perspective on the problem. for those that don't smoke, well .... i guess everyone has their vises. however, i know everyone that does knows exactly what i mean!
...but I think I'm going to say it anyways.
Yes, getting up from your work for awhile may help you. No, it's probably not a cure-all. But you know, there really isn't much else to do.
Here is a list of things to try: (i've personally tested these myself)
1. Turn off the computer and go watch a movie
2. Play some q3a and get smacked down by those people who have much faster connections than you.
3. Get up, go for a run or even a walk. You've been working in this field longer than me, but when I have a really serious problem, the healthiest thing for me and my equipment/girlfriend/monitor/etc. is to get away from the problem for just a little bit.
4. If you've ever run alot you know what it's like when you're running up a nasty hill and you think you can't go anymore, but then you realize how close you are to the top... then, you make yourself feel guilty by telling yourself that there's no good reason to stop now... whatever you tell yourself, you need to persevere. Alot of times that's the only lesson you can get out of these things.
5. Lastly, this probably isn't an issue for you, but I've seen it way too often to leave out mention of it. When you don't know where to go with your project, Can't quite think about it the way you'd like, whatever; walk away from the machine and go somewhere, making sure to bring a pencil and some paper with you. Then, talk to yourself while writing stuff down about your problem. Way too often (my father included) I see people trying to simply hack through something, waiting for the electron gun to show them the path to enlightenment... it's not going to happen unless you already understand the problem.
Alright, I think I've gone far enough now.
There's my two cents.
Richard
During my BASIC and C++ programming classes in high school, I would constantly have a little mental block keeping me from doing anything. Just last school year I had a major program assignment(it was some complicated thing that dealt with pixels and movement) and I'd spend HOURS sitting in front of my computer, not going out and neglecting my life so I could think of how to understand pixel mapping.
:)
Honey the best way to deal with mental block is to approach it as you would a social problem. Just go out, have fun, live your life, and don't even think about the program at hand. I gave up on that programming assignment for a while after my mental block, but finally something popped in my head while I was talking with one of my friends on the weekend. I kept it in my head, hurried home, and finished that monster C program assignment, getting a B+ in the process!
Even if it is an actual job for you, the best way is to just stop thinking about it and let your intutions take over. Itll pop in your head eventually, you got all the time you need. If that doesnt work, steal someone elses code
Did you know that speed actually increases the uptake of short-term to long-term memory? So if you're not seriously caning it, it can help your memory and recall...
I'm sorry, but after your last comment i'm going to have to speak up again.
--Giving to trolls for the benefit of us all
This has no scientific merit whatsoever, but it's monitors that do it to me. It takes a long long long time for me to get to a nasty block, but when I do, it usually takes a nap and a switch to a laptop to fix it. Somehow, it's the groundedness of being in front of a desktop monitor (+ the radiation, but how to explain that?) that keeps me from thinking outside the frame.
I usually just need to break the frame of my solution to whatever programming problem I'm trying to solve, and do something unorthodox, and the first step is always to feel mobile and unrestricted. Switch to the laptop after a nap, hell! take the laptop to starbucks or a bar or the beach... Then I feel hardcore.
Take this as 2c worth, like it is.
"We live as we dream, alone." -- J. Conrad
I just came out of one of the toughest I've ever had. For me, they are agonizing. During the block, I worry constantly about not delivering something on time, which makes the block even stronger. After suffering many of these, I've reached one conclusion. As soon as it hits, instead of feeling guilty and worrying, staring at the screen, leave. Take a guilt-free mini-vacation (even if just to the other room). There is a direct relationship between the *lack* of guilt you can muster during the vaction and the overall duration of the block, I'm convinced of that. My problem, though, is that every time one hits, I'm convinced that I can just suck it up and deal with it, but that *never* works and I just waste more time.
When I hit a snag in programming its usually something that requires a complex function. I try to isolate the problem and make a program just for the function until it works right then degrade that program back to function in the "bigger context". Isolate, solve, integrate.
If this doesn't work I usually get frustrated and I fire up Q3 or something like it to frag away at what might well be other frustrated programmers. I did notice that my frag count is a lot higher when I first get killed a lot. Then I get angry, involved and adrenaline starts to flow. Then when I'm pumped I am having a great time, and actually what seems to be a lot of luck as every rocket hits and and after a few rounds am clear of frustration, anger, and am quietly grinning :)
I also use music from my '70's soul & disco collection, or van halen, or metallica, or some a tribe called quest, but also mozart and bach - whatever is going to change the mood to what I need. I usually don't work with music on but when I do it seems to give my mind enough whatever it is music gives the mind to be ready for a novel start/approach, or to code along with the beat, "come on, Vogue, make your fingers tyyyype to the muuusiic".
The puzzling thing is "I just sit and stare at the computer all day long feeling scared and anxious." Err when you meet a ravenously hungry lion and he has access to you yeah then I understand fear and anxiety - but as a programmer you are equipped with plenty of ways to rationalize these kinds of fears - programmers make problems vanish :) You've accepted to write the program so you know you can do it, you've got a track record of previous achievements, and if every time there is fear or anxiety these facts are stacked against it they will start to fade away. I feel anxious when I finally released something and people start to test it, but I am mostly anxious that I might have made some very stupid assumptions about how people work :)
Of those to whom much is given, much is required.
These often help me get coding done
Yes, put "play" back into the game. It hit me good one day, for example, when I went to a Jazz concert at my town common. Kids were playing care free- just enjoying to be alive and having fun! The adults? Sitting in lawn chairs, generally speaking, watching the kids have most of the fun!
I like to take things not so seriously. By that, I mean, have fun! Play! Be a curious little kid.
With this kind of mindset, reading that dry reference is not typical kids play, but it can feel like it.
I think many of us adults, including myself, can find ourselves being VERY boring sometimes. We don't take life to its fullest potential, or even close. Take back the simple, yet most valuable things in life: fun, happiness!
I look back to the days when the typical professional computer programmer- oh, I dont know, the big COBOL days or whatever -was QUITE a dry person. See the stupid briefcase, the suit, for a creative job that could be fun!
Live!
if this also fails, get in touch with people like OO-designers (not hardcore coders, no think-C-gurus).
Although this may not be useful to most of you, I'll post my reply for the sake of procrastinating working on my _own_ code.
I found myself, ever since I was 12, unable to code without headphones on/speakers blaring techno/junge/gabber (loud, fast, "electronic" music) with the lights dim. Maybe its some sort of techie fantasy - losing yourself in a world of 1s, 0s, fuzzy logic, and pixles. To get myself "in the mood," I just remind myself exactly how incredibly cool a computer, and all technology involved, is! (Yes, I'm a geek, a passionate one at that). Coding is a powerful thing; you can be very productive, or very wasteful. Reminding yourself about why you even took up the IT business in the first place should help.
To me, theres nothing better than losing yourself in your code. I ignore everything: phone, icq messages, AIM, IRC queries, email notifications, EVERYTHING. I turn the music on, turn the lights down low, set my resolution to 1012414k x 1241515k (heh) and get to work.
*shrug!*
I'm not weird, you're just all boring.
whenever i have serious programming block, i step out for a few minutes and rip some tubes or smoke a bowl. nothing changes your perspective like a dance with mary jane. more often than not, when i return to my code the solution is apparent....not because i'm thinking clearer, but rather because my mind is freed from whatever assumptions i had previously made that were wrong.