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."
Leave the brain at home.... (Score:1)
Re:The Author Speaks (Score:3)
Stop reading slashdot.. (Score:2)
Re:"I must not fear." (Score:2)
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..
Re:The Author Speaks (Score:2)
--
The solution(s) (Score:2)
Caffeine is okay (Score:2)
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 [slashdot.org], 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
Re: Caffeine is okay -- for [me]. (Score:2)
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 [slashdot.org]'s, not Rimbo [slashdot.org]'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
Here's what I did (an extreme case) (Score:3)
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
Some thoughts for when the crisis hits (Score:5)
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
Tricky but effective (Score:4)
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)
Re:Superstitian as an answer to science (Score:2)
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 [ldolphin.org]. 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.
Re:I get this all the time. (Score:2)
Programmer's Block (Score:2)
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.
Write documentation/Do something else/New language (Score:2)
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
stop staring at the screen (Score:5)
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.
MBTI is legit, IMHO (Score:2)
MBTI [geocities.com] 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.
Re:Pray (Score:4)
In my case, I find that a lesser banishing ritual of the pentagram helps.
Mutatis mutandis for your own faith.
The Tyrrany Begins.... [fearbush.com]
so true (Score:4)
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.
CODER JUICE (Score:2)
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...
Re:Take a personality test, or Write a Nice Rant! (Score:2)
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
----
Re:From a totally different angle (Score:2)
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).
Re:The Author Speaks (Score:3)
That is what you do to overcome a programmer's block. get a life.
Here is what I do. (Score:2)
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.
What can programmers do to combat this? (Score:2)
--
Re:Take a personality test, or Write a Nice Rant! (Score:2)
HERETIC!
Someone bring out the...
COMFY CHAIR!
Re:Actually, exercise really helps... (Score:2)
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.
Works for me too (Score:2)
Re:Take up smoking! (Score:2)
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.
--
Re:Owning work related code (Score:2)
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.
Doing anything else.. (Score:2)
Its amazing how much thinking you can get done while you aren't thinking.
---
Swear (Score:2)
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.
Re:Can you blame him? (Score:2)
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.
ROTFLMAO! (Score:2)
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.
Can you blame him? (Score:4)
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.
Anarchistic Heuristics (or, What Works For Me) (Score:2)
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."
Huh, Huh, he said "far heap"... (Score:2)
Try some basics - works for me... (Score:3)
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...
Re:Some thoughts for when the crisis hits (Score:2)
I find this is absolutely true for me except with one exception. When the code is flowing freely, I can work productively 18-24 hours at a stretch (not bad for a guy who by hacker standards is pretty old; when I was a kid hacking on PDP-8s it used to be even longer).
Other times I look at the screen and all I can think of is something else. Then I limit my work time to reasonable hours, get plenty of sleep, force myself not to obsess on the problem, read a good book, or get some exercise, spend time with friends.
The brain is a biological organ which has its own rules and can't really be hacked to operate in a linear fashion. You can't churn out code like a butcher makes sasuages -- i.e. given twice the time twice the result. I think one of the rules the brain obeys is balance; the brain refuses to put more than a certain amount of resources into any one activity, and will withhold resources, perhaps even the critical resources needed to solve the problem. In my personal experience, many thorny programming problems can't be solved by thinking harder so much as thinking smarter. When the brain refuses to give up the critical problem solving resource, you can trick it by trying as hard as you can to think about anything else but the problem at hand for a while.
Hackers are distinguished by their ability to devote more mental resources to a problem, but even they are human after all.
And really, when you have those days when code just pours out of you, you are accomplishing things that only a rather small minority of the human race can. It justifies a few days or even weeks of time that appear outwardly slack.
Zzzzz.... (Score:2)
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.
---
coder's block (Score:5)
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.
patterns, not flowcharts (Score:3)
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!)
dude... if you moved to the netherlands... (Score:2)
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
Sleep, lotsa caffiene and a little research. (Score:2)
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.
Re:The Author Speaks (Score:2)
I recomend Queensland [queensland...ays.com.au]
Not the Author Speaking (Score:2)
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
Re:The Author Speaks (Score:3)
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
Re:coder's block (Score:2)
-tim
extreme/interative programming (Score:2)
Check out Beck's Extreme Programming [fatbrain.com]. 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
Terrible programmer's block (Score:2)
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.
Here's a thought (Score:2)
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.
My advice... (Score:2)
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.
ZATAOMM's take on "stuckness" (Score:4)
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 [amazon.com] 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.
--
Digression and back to topic: Coding in English. (Score:2)
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.)
Write something else (Score:2)
There's nothing like a completed project to motivate you on the next one.....
Re:The Author Speaks (Score:2)
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.
Re:The Author Speaks (Score:2)
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.
Actually, exercise really helps... (Score:5)
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.
Absolutely. Soulless jobs kill your soul. (Score:2)
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...
Programmer's block (Score:5)
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.
Go for a long walk .... (Score:2)
I suspect it has something to do with a combination of physical relaxation, quietness and lack of distractions (no radios/web/irc/etc)
GET OFF THE CAFFIENE (Score:2)
Become a Manager? (Score:4)
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...
Re:extreme/interative programming (Score:2)
The Author Replies (Score:2)
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++ [comp.lang.c] and comp.sys.mac.programmer.misc [programmer.misc] had to say but they were in general along the same lines as what was posted here:
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 [accu.org] (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 [c2.com].
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 [mailto] when we were at Working Software [working.com] 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 [infinitevisions.net] and I'm working for myself as a one-man consultant shop [goingware.com]. 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 [slashdot.org]
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 [shambhala.com]
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:
I work best with the net shut off - in a car! (Score:2)
I couldn't afford to not work for such long times so we bought an inverter at Canadian Tire and I plugged my laptop [goingware.com] 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 [be.com]). 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).
I used to hang out with the smokers (Score:2)
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
Why the ZDNet writer didn't credit my quote (Score:2)
I emailed the author, Mary Jo Foley [mailto] 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.
Re:The Author Speaks (Score:3)
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.
Re:The Author Speaks (Score:2)
- isaac =)
"I must not fear." (Score:5)
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.
Caffeine: the wrong tool for the job (Score:4)
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...
It's obvious (Score:2)
Duh.
Re:The Author Speaks (Score:2)
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.
things to avoid (Score:2)
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.
Don't do what I did... (Score:2)
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.
Tell someone who doesn't care (Score:3)
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).
Quite Right (Score:2)
You could always try a bigger change (Score:4)
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.
burn out (Score:2)
Tired? Play chess (Score:2)
CAFFEINE is EVIL (Score:5)
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
Put your mind to it (Score:2)
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...
Re:Superstitian as an answer to science (Score:3)
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.
Programmer Block (Score:4)
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
Re:coder's block (Score:4)
Umm, I think that's called pseudocode, dude. You're supposed to write that before you start coding. At least, that's why I keep being told ;)
Re:I work best with the net shut off - in a car! (Score:2)
Ahh the wonders of technology
Get Offline :) (Score:3)
Now i do soo little
Re:Some thoughts for when the crisis hits (Score:3)
Me: I'm not sure how to design this DDL...
Dog: [pant] head tilt [pant]
Me: Should I store messages in there own table or can I put them with the message details?
Dog: [lick nether-regions]
Me: If I store the messages in their own table I'll have decreased overhead for normal users, but more overhead for adminstrators and translators.
Dog: [sniff own fart]
Me: 4 of 5 hits will be normal users and they pay us...
Dog: [pant] head tilt [pant]
Me: Two tables it is then!
Dog: [lay down and snore instantly]
So as you can see in this very simple example how helpful my dog is... sometimes these conversations can go on for hours....
Pray (Score:5)
T. Bradley Dean
I'm there too... (Score:4)
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
Passion Drives Productivity (Score:2)
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.
I get this all the time. (Score:4)
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).
Go blue-sky... (Score:2)
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...".
obvious remedy (Score:2)
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.
Re:Take a personality test, or Write a Nice Rant! (Score:2)
"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."
personality (Score:2)
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 [freeciv.org] 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.
===
My problem is sheer numbers, not complexity... (Score:3)
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.
Creative block? (Score:4)
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.
Take a personality test, or Write a Nice Rant! (Score:3)
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