Non smoking programmer tips

SkyHog

Touchdown! Greaser!
Joined
Feb 23, 2005
Messages
18,431
Location
Castle Rock, CO
Display Name

Display name:
Everything Offends Me
I'm looking for advice from the nonsmoking computer programmers:

Traditionally, when I get stumped for a while, I step outside and smoke a cigarette to clear my mind. That's no longer an option. What do y'all do to clear your mind and work out a niggling missing comma or semicolon?
 
Go for a walk. Easy bugs are fixed in front of the computer, hard ones are fixed anywhere else.
-harry
 
I'm looking for advice from the nonsmoking computer programmers:

Traditionally, when I get stumped for a while, I step outside and smoke a cigarette to clear my mind. That's no longer an option. What do y'all do to clear your mind and work out a niggling missing comma or semicolon?
Set up online forums for aviators.
 
ttx_1-01_512x341.jpg
 
Easy ones: look at POA, go to the restroom, make/drink a cup of tea, gaze out the window.
Hard ones: Usually find an answer during my shower.

(I'm working on an easy one right now.)

BTW, glad to hear you are sticking to it. I was afraid you had gone back to nicotine. Congratulations. Atta boy. etc.
 
Go for a walk. Easy bugs are fixed in front of the computer, hard ones are fixed anywhere else.
-harry

That's always been my approach, except that sometimes I log into PoA instead. Also, it almost always helps to explain the problem to someone else. Not so they can provide a solution, but because somehow the process of explaining it often knocks loose the solution.
 
That's always been my approach, except that sometimes I log into PoA instead. Also, it almost always helps to explain the problem to someone else. Not so they can provide a solution, but because somehow the process of explaining it often knocks loose the solution.
Right!
 
That's always been my approach, except that sometimes I log into PoA instead. Also, it almost always helps to explain the problem to someone else. Not so they can provide a solution, but because somehow the process of explaining it often knocks loose the solution.

That part I use frequently. My non-programming coworkers understand that when I walk up to them and start talking about programming, they are supposed to just listen and nod in agreement, since I usually end the conversation with "Oh, ok, that's what I'll try" without being given any advice :D
 
Take a break. I prefer to get out of the building and walk around a bit but that's a much less appealing option in winter or when it's raining. In that case I either load up a couple of non-programming websites and read those or go over to the kitchen/break room and have a snack or a soda away from the computer. Most of the time the break itself doesn't help give a solution but you basically get 'refreshed' and come back to look at things with a fresher set of eyes. There've been plenty of times I've spent a significant amount of time hunting down a stupid issue, taken a break, and figured it basically as soon as I got back.
 
Whatever happened to cold pizza and Mountain Dew? :dunno: That's what programmers are supposed to consume.

Taking a break is a good idea. You can take a "smoke break" without actually smoking, believe it or not. ;)

And the "explain it to someone else" thing works wonders. I used to find a LOT of bugs just by typing up an e-mail to a list of programmers I participated on, and 90% of the time I would figure out the solution before I finished the e-mail. Not wanting to be called an idiot is a powerful force. ;)
 
Hard ones: Usually find an answer during my shower.
That often works for me, too, although during my showers, not yours. :D I think it has something to do with being relaxed.

Whatever happened to cold pizza and Mountain Dew? :dunno: That's what programmers are supposed to consume.
:rofl:

And the "explain it to someone else" thing works wonders. I used to find a LOT of bugs just by typing up an e-mail to a list of programmers I participated on, and 90% of the time I would figure out the solution before I finished the e-mail. Not wanting to be called an idiot is a powerful force. ;)
Totally. You're working out the problem by trying to describe it to someone who hasn't seen it yet.

I read a book called the Breakout Principle. In it, the author described the "in a rut" feeling as your brain actually firing the same neurons over and over. He suggests breaking that by going off and doing something completely mind-numbing and repetitive. Chip's cycling is a good idea. So was needlepoint in the book. This release frees your mind and relaxes it to the point where you can make some breakthroughs. (Intermediate steps on brain chemistry omitted...)
 
What's wrong with just taking a moment to come up with a practical joke to play on a cow-orker?
 
it almost always helps to explain the problem to someone else. Not so they can provide a solution, but because somehow the process of explaining it often knocks loose the solution.

Bingo. He's nailed it. You'll usually figure out what you're doing wrong, or a better way of doing it, before the programmer you're explaining the code to has a chance... something about talking out loud about it.

Now, if you do this talk-about-it-to-another-programmer exercise after a walk around the building (getting away from it for a moment), you'll solve it even faster.

P.S.--this is the same principle on which good therapists depend--they do very little talking--they just get YOU to talk, and you'll usually come up with the solution on your own.

P.P.S--I've also been known to "program in my sleep"--and wake up suddenly with the solution to a problem I've been grappling with. DAMN strange dreams, when I'm in that mode... and you MUST write down the answer or go work on it as soon as you bolt awake--or you'll forget. And that's very frustrating.
 
Last edited:
Go for a walk. Easy bugs are fixed in front of the computer, hard ones are fixed anywhere else.
-harry

I tell people my brain finds great solutions using background processes when I'm not thinking about the problem - sometimes when walking or before I fall asleep but never when thinking about it. I had a co-worker who used to say, "I let you know after I take a shower." The shower works for me, too. I should visit the shower more often.

You tell people this and they think yer nuts. Ignore them. :D
 
...

P.P.S--I've also been known to "program in my sleep"--and wake up suddenly with the solution to a problem I've been grappling with. DAMN strange dreams, when I'm in that mode... and you MUST write down the answer or go work on it as soon as you bolt awake--or you'll forget. And that's very frustrating.

Beembo! Me, too! Same problem.

It's not just coding 'cause I don't do that much. It applies to other problem solving, too. For me it can often be figuring people out - friends and co-workers. I'll suddenly recall or suss out something that explains where they're coming from.
 
Whatever happened to cold pizza and Mountain Dew? :dunno: That's what programmers are supposed to consume.

Taking a break is a good idea. You can take a "smoke break" without actually smoking, believe it or not. ;)

And the "explain it to someone else" thing works wonders. I used to find a LOT of bugs just by typing up an e-mail to a list of programmers I participated on, and 90% of the time I would figure out the solution before I finished the e-mail. Not wanting to be called an idiot is a powerful force. ;)

I remember when Jolt cola had all the sugar and twice the caffeine. May as well drink pepsi now.

Sometime I'll put it aside and work on another part of the program- let the original problem run as a background task.
 
Peggy,

Let me know if you ever need any help with a hard one.

:ihih:

:)
Nah, she's a porn star, remember!:rofl:

Actually, there was a famous porn star who was a computer programmer!

Anyone? Bueller?


I'm amazed at how often explaining a problem to someone (or having them explain their problems to you) causes that "eureka moment" that allows you (or them) to see the answer. Partly, I think it's because you want to list out all of the really obvious things you've already tried, only to discover the obvious thing you haven't tried!
 
Generally one of the following:

  • Work on something else
  • Look at PoA
  • Walk around the block
 
P.P.S--I've also been known to "program in my sleep"--and wake up suddenly with the solution to a problem I've been grappling with. DAMN strange dreams, when I'm in that mode... and you MUST write down the answer or go work on it as soon as you bolt awake--or you'll forget. And that's very frustrating.
Yep! BTDT too many times to be a fluke.
 
Nah, she's a porn star, remember!:rofl:

Actually, there was a famous porn star who was a computer programmer!

Anyone? Bueller?


I'm amazed at how often explaining a problem to someone (or having them explain their problems to you) causes that "eureka moment" that allows you (or them) to see the answer. Partly, I think it's because you want to list out all of the really obvious things you've already tried, only to discover the obvious thing you haven't tried!

Teaching a technical subject often brings insight.
 
Don't do what I did for the first few weeks: Break things. Your phone, your iPod, a coffee mug, your mouse, your keyboard, or anything breakable nearby. Also, resist the temptation to scream at coworkers who dare bother you with "questions" and, like, other "work" communication.

Sigh... happy place happy place...

ANYway... all of the advice here has been good: Just standing up from your chair, or thinking about something else for a bit (PoA), doing some minor exercise like taking a walk, or just visiting (read: annoying) coworkers tends to work for me with the minor "This really should work... Why the $#@* isn't it?" kinds of problems. Usually it's only a minute or two after coming back to the problem it's time for "*facepalm* Way to go, dumb***, that was easy."

Also, as you already mentioned, I find talking the logic out to somebody is helpful, but usually only for the more major "Uh... How the hell am I gonna make that happen?" problems. (Edit: And if it's a really bad "Holy ****, WTF am I gonna do?" situation, bust out the dry erase board and diagram it out... I've drawn some things that probably make people think of this experiment, but it can really help.)

Whatever you do, though, it does get easier with time. My work habits are much different today than they were when I was a smoker: It used to be that I'd do 1-2 hours at a stretch of real intense, real focused work (with the occasional PoA or other dalliance), then a smoke break, then 1-2 hours of real intense, real focused work... lather, rinse, repeat. And there'd be the occasional, "Okay, this isn't going well... time out" kinds of smoke breaks. That usually resulted in a pretty predictable work day for me; 5-7 or so of the above cycles in the office, then another 1 or 2 at home at night. Now it's much more stretched out and lower-intensity... The cycles last much longer, but I don't really think I work as "hard" as before. I'm more susceptible to getting distracted by PoA or something else now, so it's more like two separate 4 to 5 hour low-intensity periods at work (punctuated by lunch), then the same hour or two of work at home at night. I also find I'm much more productive later in the day than I used to be, and that sometimes that evening hour or two gets spent in the office.

Anyway, YMMV.
 
Last edited:
I'm looking for advice from the nonsmoking computer programmers:

Traditionally, when I get stumped for a while, I step outside and smoke a cigarette to clear my mind. That's no longer an option. What do y'all do to clear your mind and work out a niggling missing comma or semicolon?

Start your own business...and set the smoking policy any way you'd like...

:smile:

(BTW: I quit smoking in 1986. 2.5 packs per day of Marlboro menthols, cold turkey. Never had another one since. Quitting is the best thing you'll ever do, although you'll never, ever stop missing it.)
 
Back
Top