Non smoking programmer tips

Discussion in 'Technical Corner' started by SkyHog, Feb 17, 2009.

  1. SkyHog

    SkyHog Touchdown! Greaser!

    Joined:
    Feb 23, 2005
    Messages:
    18,480
    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?
     
  2. TMetzinger

    TMetzinger Final Approach

    Joined:
    Mar 6, 2006
    Messages:
    9,885
    Location:
    Northern Virginia
    Display Name:

    Display name:
    Tim
    See the "Manual Override" technique referred to in "Cryptonomicon".
     
  3. mantakos

    mantakos Final Approach

    Joined:
    Jun 22, 2006
    Messages:
    9,948
    Location:
    Baltimore, MD
    Display Name:

    Display name:
    hm
    Go for a walk. Easy bugs are fixed in front of the computer, hard ones are fixed anywhere else.
    -harry
     
  4. Greebo

    Greebo N9017H - C172M (1976)

    Joined:
    Feb 11, 2005
    Messages:
    11,011
    Location:
    Baltimore, MD
    Display Name:

    Display name:
    Retired Evil Overlord
    Set up online forums for aviators.
     
  5. vontresc

    vontresc En-Route

    Joined:
    Aug 8, 2006
    Messages:
    3,488
    Location:
    Madison
    Display Name:

    Display name:
    vonSegelGoober
    spend a few minutes on POA :)
     
  6. gibbons

    gibbons En-Route

    Joined:
    Feb 12, 2005
    Messages:
    3,386
    Location:
    Rogers, Arkansas
    Display Name:

    Display name:
    iRide
  7. AuntPeggy

    AuntPeggy Final Approach

    Joined:
    May 23, 2006
    Messages:
    8,493
    Location:
    Oklahoma
    Display Name:

    Display name:
    Namaste
    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.
     
  8. RMCN172RG

    RMCN172RG Pattern Altitude

    Joined:
    Aug 28, 2007
    Messages:
    1,951
    Location:
    Port Huron, MI
    Display Name:

    Display name:
    Ray
    Take a nap
     
  9. gismo

    gismo Touchdown! Greaser!

    Joined:
    Feb 28, 2005
    Messages:
    12,672
    Location:
    Minneapolis
    Display Name:

    Display name:
    iGismo
    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.
     
  10. AuntPeggy

    AuntPeggy Final Approach

    Joined:
    May 23, 2006
    Messages:
    8,493
    Location:
    Oklahoma
    Display Name:

    Display name:
    Namaste
    Right!
     
  11. SkyHog

    SkyHog Touchdown! Greaser!

    Joined:
    Feb 23, 2005
    Messages:
    18,480
    Location:
    Castle Rock, CO
    Display Name:

    Display name:
    Everything Offends Me
    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
     
  12. pgengler

    pgengler Pre-Flight

    Joined:
    Apr 25, 2008
    Messages:
    45
    Location:
    Hoboken, NJ / KMMU
    Display Name:

    Display name:
    Phil G
    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.
     
  13. flyingcheesehead

    flyingcheesehead Touchdown! Greaser!

    Joined:
    Feb 23, 2005
    Messages:
    23,813
    Location:
    UQACY, WI
    Display Name:

    Display name:
    iMooniac
    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. ;)
     
  14. rpadula

    rpadula En-Route

    Joined:
    Mar 8, 2005
    Messages:
    4,685
    Location:
    Suwanee, GA
    Display Name:

    Display name:
    PancakeBunny
    That often works for me, too, although during my showers, not yours. :D I think it has something to do with being relaxed.

    :rofl:

    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...)
     
  15. Capt. Geoffrey Thorpe

    Capt. Geoffrey Thorpe Touchdown! Greaser! PoA Supporter

    Joined:
    Jun 7, 2008
    Messages:
    12,834
    Location:
    DXO124009
    Display Name:

    Display name:
    Light and Sporty Guy
    What's wrong with just taking a moment to come up with a practical joke to play on a cow-orker?
     
  16. TangoWhiskey

    TangoWhiskey Touchdown! Greaser!

    Joined:
    Feb 23, 2005
    Messages:
    14,241
    Location:
    Midlothian, TX
    Display Name:

    Display name:
    3Green
    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: Feb 17, 2009
  17. mikea

    mikea Touchdown! Greaser! Gone West

    Joined:
    Feb 12, 2005
    Messages:
    16,975
    Location:
    Lake County, IL
    Display Name:

    Display name:
    iWin
    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
     
  18. timwinters

    timwinters Ejection Handle Pulled PoA Supporter

    Joined:
    Feb 23, 2008
    Messages:
    13,737
    Location:
    Conway, MO
    Display Name:

    Display name:
    LTD
    Peggy,

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

    :ihih:

    :)
     
  19. mikea

    mikea Touchdown! Greaser! Gone West

    Joined:
    Feb 12, 2005
    Messages:
    16,975
    Location:
    Lake County, IL
    Display Name:

    Display name:
    iWin
    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.
     
  20. Cap'n Jack

    Cap'n Jack Final Approach PoA Supporter

    Joined:
    Jun 25, 2006
    Messages:
    7,619
    Location:
    Nebraska
    Display Name:

    Display name:
    Cap'n Jack
    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.
     
  21. mikea

    mikea Touchdown! Greaser! Gone West

    Joined:
    Feb 12, 2005
    Messages:
    16,975
    Location:
    Lake County, IL
    Display Name:

    Display name:
    iWin
    You should pleeze explain deee business reason for often visiting dis "pilotsofamerica.com" pleeze. :rolleyes:
     
  22. gprellwitz

    gprellwitz Touchdown! Greaser!

    Joined:
    Jun 19, 2005
    Messages:
    12,993
    Location:
    Romeoville, IL
    Display Name:

    Display name:
    Grant Prellwitz
    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!
     
  23. jesse

    jesse Touchdown! Greaser!

    Joined:
    Oct 2, 2005
    Messages:
    15,775
    Location:
    Lincoln, NE
    Display Name:

    Display name:
    Jesse
    Generally one of the following:

    • Work on something else
    • Look at PoA
    • Walk around the block
     
  24. gkainz

    gkainz Final Approach

    Joined:
    Feb 23, 2005
    Messages:
    8,304
    Location:
    Arvada, CO
    Display Name:

    Display name:
    Greg Kainz
    Yep! BTDT too many times to be a fluke.
     
  25. Matthew

    Matthew Touchdown! Greaser!

    Joined:
    Apr 18, 2005
    Messages:
    16,810
    Location:
    kojc, kixd, k34
    Display Name:

    Display name:
    Matthew
    Take a Mountain Dew break - or check the POA board.
     
  26. ScottM

    ScottM Taxi to Parking

    Joined:
    Jul 19, 2005
    Messages:
    42,567
    Location:
    Variable, but somewhere on earth
    Display Name:

    Display name:
    iBazinga!
    Google led me to this name ALYSSA JORDAN
     
  27. TMetzinger

    TMetzinger Final Approach

    Joined:
    Mar 6, 2006
    Messages:
    9,885
    Location:
    Northern Virginia
    Display Name:

    Display name:
    Tim
    Teaching a technical subject often brings insight.
     
  28. gprellwitz

    gprellwitz Touchdown! Greaser!

    Joined:
    Jun 19, 2005
    Messages:
    12,993
    Location:
    Romeoville, IL
    Display Name:

    Display name:
    Grant Prellwitz
    Not the one I was thinking of, who started in films in 1974. Her given name (not stage name) was Anna Maria Sanchez.
     
  29. ReverendSlappy

    ReverendSlappy Ejection Handle Pulled

    Joined:
    Jun 20, 2006
    Messages:
    11,475
    Location:
    Chicago
    Display Name:

    Display name:
    ReverendSlappy
    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: Feb 18, 2009
  30. Jay Honeck

    Jay Honeck Touchdown! Greaser!

    Joined:
    Jun 6, 2008
    Messages:
    11,540
    Location:
    Port Aransas, TX
    Display Name:

    Display name:
    Jay Honeck
    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.)