Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / That amazing feeling when you debug/fix something after hours of slaving away...

Author
Message
David R
21
Years of Service
User Offline
Joined: 9th Sep 2003
Location: 3.14
Posted: 10th Mar 2010 17:54 Edited at: 10th Mar 2010 18:23
...I just got it After messing for ages trying to keep a heap 'complete' whilst also building it from the bottom up (to facilitate a heap sort. Whether the heap stays complete or not has no effect on the result of the sort, but frustratingly it must stay complete, otherwise it's not a 'true' heap/heapsort. Which makes it tricky to debug, because it can be wrong without producing the wrong result)


(I've also started loving test-driven development)

But yeah, anyone else get this thing - the sort of 'high' after fixing something you've been debugging for hours etc? I love it. I think it's part of why I keep programming. It's like a drip-fed drug

09-f9-11-02-9d-74-e3-5b-d8-41-56-c5-63-56-88-c0
Code eater
17
Years of Service
User Offline
Joined: 17th Feb 2008
Location: Behind You!
Posted: 10th Mar 2010 18:14
yeah. I love that feeling. I always sleep well after solving a good programming problem. But its uber frustrating when its on 1 number or digit wrong. I once spent 3 months over a problem when I was meant to be using a variable called pl2 and i was using pl1

Thanks,,,

Codeeater
Zotoaster
20
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 10th Mar 2010 18:51
Oh man, I really dislike unit testing... It really boggs me down, but I guess I've only actually done it in uni with JUnit... and we all know that education doesn't really teach you anything

"everyone forgets a semi-colon sometimes." - Phaelax
David R
21
Years of Service
User Offline
Joined: 9th Sep 2003
Location: 3.14
Posted: 10th Mar 2010 18:56
Quote: "Oh man, I really dislike unit testing... It really boggs me down, but I guess I've only actually done it in uni with JUnit... and we all know that education doesn't really teach you anything"


I love unit testing now! Because this little project was extremely frustrating - everything is interlinked so fixing one thing broke another. The tests made it dead easy to instantly say "You broke it, idiot"

I appreciate that it would become annoying with bigger projects / harder to test projects though (needing mock objects and all that jazz)

BTW don't know if this is what you meant, but the screenshot actually is JUnit (in NetBeans however).

09-f9-11-02-9d-74-e3-5b-d8-41-56-c5-63-56-88-c0
Yodaman Jer
User Banned
Posted: 10th Mar 2010 20:44
I'm no expert at programming, but I am familiar with this feeling. Sometimes if I'm really frustrated I'll ask about it in the DBPro forums, only to realize a few minutes after I've posted that I was typing the variable wrong, or forgot to close a loop...

I've gotten better about attempting to find the problem myself without asking for help every single time something doesn't work. But anyway...

One problem I had a while back was when I was coding a test for a game idea I had. Basically, I was copying Super Mario Bros. 3 by creating a World Map. I managed to get the program to save which "levels" the player had played out to a file so that the next time the program was launched you could resume where you left off, and also "unlocked" the next level. I encountered a strange problem where the variables kept getting confused and every time you saved and re-launched the program, ALL of the levels were unlocked. I don't remember how I solved it (I don't have the source anymore), but it had something to do with creating another set of variables to keep the world variables in check. Sloppy, but it worked. And I was happy.

Sorry for the rambling post...


Check out my videos!
Jeku
Moderator
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 10th Mar 2010 22:08
Improperly named variables are one of the main reasons I'm not a gigantic fan of loosely-typed languages.


Senior Web Developer - Nokia
Zotoaster
20
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 11th Mar 2010 01:57
Anyone ever heard of "rubber-duck programming"? Basically, you put a little rubber duck on your desk. If you have a problem that you just can't figure out, explain it to the duck. It will listen. While you were explaining it, you will realise where you went wrong, and you will thank the duck for it's help, and it will look back in glee.

True story.

"everyone forgets a semi-colon sometimes." - Phaelax
Lonnehart
16
Years of Service
User Offline
Joined: 17th Apr 2009
Location:
Posted: 11th Mar 2010 06:01
Great... now you're inspiring me, Zotoaster...

All I gotta do now is slit my hand, cover it up real good, then slam said hand onto a Spalding volleyball and draw a face on it. Now I can have someone to talk to while locked in my room for hours programming...

In the beginning there was nothing. There'll be nothing in the end...
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 11th Mar 2010 09:51
Damn, I gotta get a rubber ducky.

I get that, but not really with bugs, I get it when something works. Like recently it's been Sudoku, and the first time I generated a valid, challenging, and completeable-with-no-guessing board I had to celebrate. Was just a biscuit, but in terms of my usual day, it was pretty epic.

It's the reason a lot of us code, if not all of us - that buzz when things go right, when your idea is right in front of you because of your own efforts. It's something that nobody can take away, and it's hard for other people to understand. We get real eureka moments, we are lucky! - other people have to make do with having a life .


Health, Ammo, and bacon and eggs!
PAGAN_old
19
Years of Service
User Offline
Joined: 28th Jan 2006
Location: Capital of the Evil Empire
Posted: 12th Mar 2010 12:07
Agree, when i finally fix a bug i feel like a god or something, but the worst part is after slaving away for hours maybe days trying to figure out the problem and you finally do, you realize that it was something really stupidly simple

dont hate people who rip you off,cheat and get away with it, learn from them
Fallout
22
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 12th Mar 2010 16:48
Alas, I have never experienced the high of fixing a difficult bug. It is a side effect of always getting things right the first time I do them.

Radical hamsters skipping furiously into the blue ether, questioning their very existence while breathing out the bitter fog of smoked haddock.
Uncle Sam
19
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 12th Mar 2010 21:11
Solving those kinds of bugs should be illegal, because I get really high when I fix them.

Dr Tank
16
Years of Service
User Offline
Joined: 1st Apr 2009
Location: Southampton, UK
Posted: 13th Mar 2010 04:56
I'm on that bit before you fix the thing that isn't working. It's really quite depressing. Sometimes the best thing to do is to do something else. So I'm going to bed.

Toasty Fresh
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: In my office, making poly-eating models.
Posted: 13th Mar 2010 12:34
Seeing as I'm not a programmer I dunno if this applies to me, but I get a similar feeling when finally finishing a model or texture. Just today I stayed in the office from about 11 AM to 9 PM to finish this texture on a rifle, and I just finished and feel great

Your signature has been erased by a mod - Please reduce it to 600x120 maximum size
David R
21
Years of Service
User Offline
Joined: 9th Sep 2003
Location: 3.14
Posted: 13th Mar 2010 12:57 Edited at: 13th Mar 2010 12:58
Quote: "Alas, I have never experienced the high of fixing a difficult bug. It is a side effect of always getting things right the first time I do them. "


Although that's a joke (I hope!) I have spoken to some people who genuinely do believe they write 100% bug-free code all the time

"That you know of" is the phrase that comes to mind

Quote: "I'm on that bit before you fix the thing that isn't working. It's really quite depressing. Sometimes the best thing to do is to do something else. So I'm going to bed."


The bug-fixing blues before the bug-fixing high. I always leave the room when that happens. Normally get a coffee and something to eat

Quote: "but I get a similar feeling when finally finishing a model or texture. Just today I stayed in the office from about 11 AM to 9 PM to finish this texture on a rifle, and I just finished and feel great"


I think that's a slightly more pleasant activity throughout (although time-consuming) because bugs have a tendency to toy with us and make use think we've fixed them. And then they pop up again.

I always feel a very deep feeling of dread when that happens. "Oh no. Not that awful problem again. If I 'fixed' it last time then what's going on now?"

09-f9-11-02-9d-74-e3-5b-d8-41-56-c5-63-56-88-c0
Dr Tank
16
Years of Service
User Offline
Joined: 1st Apr 2009
Location: Southampton, UK
Posted: 16th Mar 2010 05:17
I just had a Eureka moment. One of those things that turns out to be a lot simpler than I thought it was. A "how didn't i see that before?" moment. I feel stupid, but it's still nice.

Haven't actually coded it yet though.

Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 16th Mar 2010 21:59
Quote: "Haven't actually coded it yet though."


Or maybe that's not actually the problem then :p

Windows 7 32-Bit Home Premium Intel Pentium Dual-Core @ 1.46Ghz 2038mb RAM
Yodaman Jer
User Banned
Posted: 18th Mar 2010 15:36 Edited at: 18th Mar 2010 15:37
Quote: "...bugs have a tendency to toy with us and make use think we've fixed them. And then they pop up again.

I always feel a very deep feeling of dread when that happens. "Oh no. Not that awful problem again. If I 'fixed' it last time then what's going on now?""


Same here. Sometimes when I've just solved a bug (or just a non-working part of a program) and decided it would be okay to expand the development (like adding more objects or creating another level), the bug will pop up again. I'm always like "", or maybe "", but it's almost always "" that's the result. "Why, oh WHY are you back again, you nasty devil?!" is what I say. And then I drink more coffee.


Check out my videos!
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 18th Mar 2010 15:58
A fresh cup of coffee is the best weapon when dealing with bugs - for one thing walking away from the PC and making yourself a cup lets your mind concentrate on the issues, usually without you being aware of it. I've lost count of the number of times I've gone and made a coffee after getting frustrated with a bug, then when I come back it just seems to 'occur' to me what's wrong after a few minutes.

It's good to break away and do something moronic, like make a coffee, do the dishes, watch some TV - main thing is to turn away from the PC so your mind isn't stuck in the same 'loop' - hell I often sit there, then all of a sudden I'll just forget what I've been doing, I'll change code, build, run, and then have to stop and think what I'm supposed to be testing. It happens when you spend far too long in front of a computer, brain gets exhausted and needs to re-charge, like every hour take a 10 minute break, and it's just great for productivity in the long run. Actually going to bed at a reasonable hour is another one - I'm more productive if I get to sleep and get up earlier, put that morning energy to good use. Often, you get stuck in a slump when working late, and hours can pass with very little progress, sleep, eat, and have a run at it the next day. It can turn a show-stopping bug from the night before into a non-concern.

Unless you get a brain bug, when you are trying to sleep but come up with an idea, or a fix for a bug that's been annoying you, and you don't want to sleep and forget the solution - in that case I would consider getting back up and doing the work, maybe have a snack, then sleep much better after that.


Health, Ammo, and bacon and eggs!
TechLord
22
Years of Service
User Offline
Joined: 19th Dec 2002
Location: TheGameDevStore.com
Posted: 18th Mar 2010 22:00
That amazing feeling when you debug/fix something after hours of slaving away...



can become addictive.

Login to post a reply

Server time is: 2025-05-24 18:05:10
Your offset time is: 2025-05-24 18:05:10