34

FUCK! agshdklgdahgisdahl;k!

I just spent 45 FUCKING MINUTES debugging try to figure out WHY THE HELL a function that is supposed to return either a pointer to a valid object OR ZERO if a valid object is not found, was RETURNING FUCKING EIGHT!

Then I saw it... I typed:
nodeList[index];
instead of:
return nodeList[index];

It took me looking at a stack trace and a disassembly of the function to realize this.

Can't wait for this three-day weekend...

Comments
  • 9
    And this was the whole function! Not my best day...
  • 2
    45 minutes? That is not much
  • 1
    @Linux I'm often Debugging for hours to realize I just missed a semicolon there...
  • 1
    Better than what I did recently

    Was designing a lot of code which in the end was supposed to call another function at the end. But the thing was not working properly and I spent nearly an hour trying to debug because of some weird error code coming out. Even Google had no answer.

    Then after mindless frustaration I realised I never called the function *facepalm*
  • 3
    @TheKingsJester
    Yeah, I once tried finding why I could not monitor a certain system with op5, turned out that a ethernet cable was loose... 2 days lost.
  • 2
    @Linux A great Idea:
    Everytime you fix a really stupid Bug you have to do 10 Sit ups, 10 pushups, etc.
    We will all become brawny as f*ck :)
  • 1
    @TheKingsJester
    My wife would love that
  • 0
    @Linux Wanna make the "Developer Fitness App"? It Tracks your Bugs and then suggest exercisses you could make. Everytime you exercisse your Bug Count --, Everytime you created a Bug your Bug Count ++. When your Bug Count get's top high devRant will be Blockes until you exercisse. What do you think? :)
  • 1
    @TheKingsJester
    I cant code :'( I only know how to sysadmin
  • 0
    @Linux Oh😢. But you can learn it! It's the easiest Thing in the world! We can build the App together and you will learn it. ;) I became a programmer when I helped a friend building his Game...
  • 0
    @TheKingsJester

    I have tried, I am to stupid
  • 0
    @Linux Naaaah, Come On!! You can't be too stupid! Just try it.!You May need some time but its a great experience.
    And this App would be great and think about your wife, she would Love it and it's effect :)
    Don't you need to Code as a sysadmin?
  • 1
    @Linux

    2 days? That is nothing.

    I've been trying to debug my coworkers for a whole fucking year, only to realize that they're all just unfixable dimwits.
  • 0
    Shouldn't a linter inform you that not all code paths will return value?
    At least a decent compiler would do that but this is JS...
  • 0
    @Gallifrey The 8 was the value in the variable, as it was uninitialized.

    @Linux @TheKingsJester @POTUS Well it's nice to know I'm not the only one who makes silly mistakes 😅
  • 0
    @MrThompson This is most definitely NOT JS! 😬

    It's C++. Oddly enough, g++ didn't even warn me.
  • 0
    @Gogeta70 lol yes uint32_t and * after the return type. I have only read Node and immediately thought NodeJS ignoring the rest of the listing. :)
  • 0
    @MrThompson It probably doesn't help that it has the word node in the variable name :P
Add Comment