DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: A Bonehead Programming "Bug"  (Read 7,770 times)

Renegade

  • Tell me something you don't know...
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 13,291
    • Participated in NANY Challenge Three Times
    • Furry Fandom Badge - Furry Fandom
    • Linux User
A Bonehead Programming "Bug"
« on: September 20, 2012, 08:49 AM »
Ok, this is something that I have done twice (second time being just now), and it's really quite funny, though totally boneheaded...

So, I'm programming away and trying to get the code in this one method to work, and nothing seems to be working. I fart around doing this and that and still nothing works. 15 minutes or so go by and then it dawns on me...

Bug fix...
You've got to call the method first! :P

Anyways, thought that might be a bit entertaining for a few here. (Am I the only one to have done this?)
Slow Down Music - Where I commit thought crimes...

Freedom is the right to be wrong, not the right to do wrong. - John Diefenbaker

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,649
    • Participated in NANY Challenge Eleven Times
    • Coding Snacks
    • Linux User
    • Hardware Hacker
Re: A Bonehead Programming "Bug"
« Reply #1 on: September 20, 2012, 09:05 AM »
:P Need more coffee (or other stimulants) ?
/Ton
Ath's software collection, Quote: "A problem well stated is a problem half-solved." (Charles Kettering)

Renegade

  • Tell me something you don't know...
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 13,291
    • Participated in NANY Challenge Three Times
    • Furry Fandom Badge - Furry Fandom
    • Linux User
Re: A Bonehead Programming "Bug"
« Reply #2 on: September 20, 2012, 10:27 AM »
:P Need more coffee (or other stimulants) ?

Coffee is my stimulant of choice! Turkish fine double with milk and honey. :)
Slow Down Music - Where I commit thought crimes...

Freedom is the right to be wrong, not the right to do wrong. - John Diefenbaker

Stoic Joker

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 6,652
    • Cody Award
    • Participated in NANY Challenge Five Times
Re: A Bonehead Programming "Bug"
« Reply #3 on: September 20, 2012, 12:01 PM »
Anyways, thought that might be a bit entertaining for a few here. (Am I the only one to have done this?)

I can attest to there being at least two of us guilty of that. :)

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 9,827
    • Participated in NANY Challenge Eight Times
    • Cody Award
Re: A Bonehead Programming "Bug"
« Reply #4 on: September 20, 2012, 06:30 PM »
I've done it.

I just barely complete putting the finishing touches on a new function/method I've created and then I go to test it out and... nothing happens? :huh:

Oh yeah! Gotta put in a call to the function/method first! :-[

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 11,205
    • Participated in NANY Challenge Fourteen Times
    • Coding Snacks
    • Writer
    • Hardware Hacker
Re: A Bonehead Programming "Bug"
« Reply #5 on: September 20, 2012, 08:43 PM »
I had a similar problem recently that I spent half the day on  :-[

In one particular case, the data wasn't rendering.  I called over someone to look at it with me, and she pointed out that in the case where it wasn't rendering, I wasn't returning a value, just null.  D'oh!

And on that subject... I saw this piece of code:

Code: (csharp)
private void Execute()
{
    if (InvokeRequired)
    {
        lock (new object())
        {
            if (m_instance != null)
                Invoke(new threadDelegate(Execute), new object[] { });
        }
    }
    else
    {
        if(OnInstanceChanged != null)
            OnInstanceChanged();
    }
}

WTF?!?

kyrathaba

  • N.A.N.Y. Organizer
  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 3,200
    • Participated in NANY Challenge Eight Times
    • Programming School - Deluxe Bonus Medal
    • Programming School - Stage 1 Medal
    • Coding Snacks
    • Military Service Badge - US Army
    • Writer
Re: A Bonehead Programming "Bug"
« Reply #6 on: September 21, 2012, 12:27 AM »
@OP: Heh, you've only done that twice? I'm sure I've done it several times  :P
Win 10 Pro running on a 3.2 GHz CPU and 12 Gb RAM
__________________________________________

Proofreading Service: http://williammillerservices.com/proofreading

Renegade

  • Tell me something you don't know...
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 13,291
    • Participated in NANY Challenge Three Times
    • Furry Fandom Badge - Furry Fandom
    • Linux User
Re: A Bonehead Programming "Bug"
« Reply #7 on: September 21, 2012, 12:59 AM »
@OP: Heh, you've only done that twice? I'm sure I've done it several times  :P

Actually, I only *remember* doing it once before, and the other time I spent, well, lets just say more than 15 minutes.  :-[
Slow Down Music - Where I commit thought crimes...

Freedom is the right to be wrong, not the right to do wrong. - John Diefenbaker

jgpaiva

  • Artificial Idiocy
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • Cody Award
    • Participated in NANY Challenge Once
    • Coding Snacks
    • Portugal Inhabitant
    • Linux User
Re: A Bonehead Programming "Bug"
« Reply #8 on: September 21, 2012, 10:39 AM »
It's even funnier when you forget to start a thread in a multi-threaded program. Just happened to me. Twice :P

Original address: https://www.donationcoder.com/forum/index.php?topic=32299.0