close

Privacy guaranteed - Your email is not shared with anyone.

Welcome to Glock Talk

Why should YOU join our Glock forum?

  • Converse with other Glock Enthusiasts
  • Learn about the latest hunting products
  • Becoming a member is FREE and EASY

If you consider yourself a beginner or an avid shooter, the Glock Talk community is your place to discuss self defense, concealed carry, reloading, target shooting, and all things Glock.

Chasing a code bug

Discussion in 'Tech Talk' started by devildog2067, Jul 12, 2007.

  1. devildog2067

    devildog2067

    16,137
    871
    Apr 20, 2005
    Chicago
    I just spent three hours chasing a code bug which turned out to be me being stupid.

    Oddly enough,
    gain[eta-1][phi-1][depth-1] += (w[layer-1] * e0 * ws_fc[eta-1][phi-1][layer-1][depth-1]);

    doesn't give the right answers if you're supposed to DIVIDE by ws_fc.

    I'm an idiot.

    That is all.
     
  2. Blinky

    Blinky Rocket Surgeon

    1,916
    0
    Jul 14, 2005
    Beaver, OR
    I'll say! Any monkey with a computer could have found that!




    :tongueout:
     


  3. HerrGlock

    HerrGlock Scouts Out CLM

    23,791
    182
    Dec 28, 2000
    Sounds like the ol' semi-colon in the wrong place in a perl script :animlol:
     
  4. 686Owner

    686Owner NRA Life Member

    12,065
    1,277
    Mar 10, 2007
    KY
    I've done similar things. I got real good at debugging by printing out all the variables to the console and/or letting the compiler step thru it line by line.
     
  5. Its always something small like that and it always takes hours to find it.
     
  6. freepatriot

    freepatriot Retired GT Mod Moderator Moderator

    3,845
    9
    Aug 8, 2002
    South FL
    You are referring to my brain, right? :supergrin:
     
  7. freepatriot

    freepatriot Retired GT Mod Moderator Moderator

    3,845
    9
    Aug 8, 2002
    South FL

































    Geek.
     
  8. vote Republican

    vote Republican White and nerdy Moderator

    10,595
    1,299
    Aug 23, 2002
    OAF Mecca, MD

    :hugs:

    ;f ;f ;f ;f
     
  9. freepatriot

    freepatriot Retired GT Mod Moderator Moderator

    3,845
    9
    Aug 8, 2002
    South FL

    :rofl: :rofl: :rofl: :rofl:

    <--- almost had forgotten about ;f;f;f