close

Privacy guaranteed - Your email is not shared with anyone.

Chasing a code bug

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


  1. devildog2067

    devildog2067
    Expand Collapse

    Joined:
    Apr 20, 2005
    16,062
    738
    Location:
    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.
     

    Wanna kill these ads? We can help!
  2. Blinky

    Blinky
    Expand Collapse
    Rocket Surgeon

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




    :tongueout:
     

  3. HerrGlock

    HerrGlock
    Expand Collapse
    Scouts Out
    CLM

    Joined:
    Dec 28, 2000
    23,791
    178
    Sounds like the ol' semi-colon in the wrong place in a perl script :animlol:
     
  4. vote Republican

    vote Republican
    Expand Collapse
    White and nerdy
    Moderator

    Joined:
    Aug 23, 2002
    10,378
    933
    Location:
    OAF Mecca, MD
    unless ws_fc is 1 :supergrin:
     
  5. 686Owner

    686Owner
    Expand Collapse
    NRA Life Member

    Joined:
    Mar 10, 2007
    11,624
    979
    Location:
    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.
     
  6. captainstormy

    captainstormy
    Expand Collapse

    Joined:
    Jul 3, 2007
    4,628
    283
    Location:
    Columbus, Ohio
    Its always something small like that and it always takes hours to find it.
     
  7. freepatriot

    freepatriot
    Expand Collapse
    Retired GT Mod
    Moderator Moderator

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

    freepatriot
    Expand Collapse
    Retired GT Mod
    Moderator Moderator

    Joined:
    Aug 8, 2002
    3,845
    9
    Location:
    South FL

































    Geek.
     
  9. vote Republican

    vote Republican
    Expand Collapse
    White and nerdy
    Moderator

    Joined:
    Aug 23, 2002
    10,378
    933
    Location:
    OAF Mecca, MD

    :hugs:

    ;f ;f ;f ;f
     
  10. freepatriot

    freepatriot
    Expand Collapse
    Retired GT Mod
    Moderator Moderator

    Joined:
    Aug 8, 2002
    3,845
    9
    Location:
    South FL

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

    <--- almost had forgotten about ;f;f;f
     
Loading...
Similar Threads Forum Date
Just purchased a BUG for my BUG... General Glocking Apr 23, 2014
G19 as a BUG Cop Talk Feb 17, 2014
Bug into a scavanged area. Survival/Preparedness Forum Nov 12, 2012
to carry a bug or not to carry a bug? Carry Issues Dec 13, 2011
A second BUG? GATE Self-Defense Forum Mar 20, 2010
Duty Gear at CopsPlus