Live data from Hacker News

What do you do when programming sucks?

blog.klimczyk.pl

1–6 of 6 posts

Re: What do you do when programming sucks?

#2
One of the rules of Extreme Programming: Quit when you're tired. Go home. Get at good night's sleep. Don't think about work, and don't feel guilty.

If you're in a place that forces you into insane hours for long stretches, start looking for an alternative. When you find a decent one, take it.

Re: What do you do when programming sucks?

#3
If I'm feeling miserable about the code, I generally shift gears and work on a more straightforward area of my project. Ideally some class which is self-contained and easier to reason about. More often than not, an hour of that gets me back into "flow" and I can go back to what I was originally doing.

Re: What do you do when programming sucks?

#4
As others have said go do something else if that can happen then switch domains and work on something you consider fun either because you like the domain or the challenge.

Trying to push through with coding doesn't work.

Another trick would be to step out of the editor and hit the white board while on your feet. Programming isn't typing and if you are trying to figure out a problem at the keyboard theres a good chance you already failed (unless your learning the language). Get it on paper/chalk/whiteboard and reason about it, talk about it with someone or a rubber duck.

Re: What do you do when programming sucks?

#5

One of the rules of Extreme Programming: Quit when you're tired. Go home. Get at good night's sleep. Don't think about work, and don't feel guilty. If you're in a place that forces you into insane hours for long stretches, start looking for an alternative. When you find a decent one, take it.

From either The Zen of Programming or The Tao of Programming (can't find my copies to narrow it down):

Eat when you are hungry.

Sleep when you are tired.

Program when the time is right.