Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jun 3rd, 2006, 5:34 PM   #1
Eric the Red
Hobbyist Programmer
 
Eric the Red's Avatar
 
Join Date: Feb 2006
Posts: 214
Rep Power: 0 Eric the Red is an unknown quantity at this point
Oh yeahh.. debugging!!

What is the longest time you've spent staring at a program to find out why your getting an error?

I've just stared at my program for 2 hours, and finally found my problem. This time it was a memory leak in c++, ouch those hurt.
__________________
Death smiles at us all. All a man can do is smile back.
Eric the Red is offline   Reply With Quote
Old Jun 3rd, 2006, 5:49 PM   #2
RobEasy
Programmer
 
RobEasy's Avatar
 
Join Date: May 2006
Location: The US duhhhhh!
Posts: 42
Rep Power: 0 RobEasy is on a distinguished road
An hour. I was developing an array and figured out that I needed to use curly braces instead of the parentheses
RobEasy is offline   Reply With Quote
Old Jun 3rd, 2006, 5:54 PM   #3
jayme
Professional Programmer
 
jayme's Avatar
 
Join Date: Nov 2005
Location: Canada
Posts: 495
Rep Power: 0 jayme is an unknown quantity at this point
Send a message via MSN to jayme
Doesn't debugging involve finding bugs that cause the program to run incorrectly. Using braces instead of parenthesis is more like just a mistake. Correct me if I'm wrong, of course.
__________________

Quote:
Originally Posted by Mohamed Jihad
Durka durka!
Due to incorrect calculations during the middle ages, our calendar actually begins a few years after Jesus' birth. Thus the real 6/6/6 happened a few years back. The world already ended and you missed it.

Download Code::Blocks now!
jayme is offline   Reply With Quote
Old Jun 3rd, 2006, 5:58 PM   #4
zorin
Hobbyist Programmer
 
Join Date: Apr 2005
Posts: 218
Rep Power: 4 zorin is on a distinguished road
Just an error? Big programs I can spend hours looking for the problem but then thats to be expected because there are hundreds of lines of code. Sometimes it can be because you have implemented a function into the program and there was a much easier way. That can take a long time to fix.

Modern compilers make the work easier for you. If you know what your looking for then its quite easy to fix. I spent 30mins before trying to look for a problem and it turns out it was staring at me strait in the face...I was spelling cout as count :eek:
zorin is offline   Reply With Quote
Old Jun 3rd, 2006, 6:24 PM   #5
Eric the Red
Hobbyist Programmer
 
Eric the Red's Avatar
 
Join Date: Feb 2006
Posts: 214
Rep Power: 0 Eric the Red is an unknown quantity at this point
Quote:
Originally Posted by zorin
Just an error? Big programs I can spend hours looking for the problem but then thats to be expected because there are hundreds of lines of code. Sometimes it can be because you have implemented a function into the program and there was a much easier way. That can take a long time to fix.

Modern compilers make the work easier for you. If you know what your looking for then its quite easy to fix. I spent 30mins before trying to look for a problem and it turns out it was staring at me strait in the face...I was spelling cout as count :eek:
"1 error"
__________________
Death smiles at us all. All a man can do is smile back.
Eric the Red is offline   Reply With Quote
Old Jun 3rd, 2006, 7:18 PM   #6
nnxion
Programming Guru
 
nnxion's Avatar
 
Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5 nnxion is on a distinguished road
Quote:
Originally Posted by Eric the Red
What is the longest time you've spent staring at a program to find out why your getting an error?

I've just stared at my program for 2 hours, and finally found my problem. This time it was a memory leak in c++, ouch those hurt.
Half a week ago, 13 hours for one error, wasn't even in the code, just my logic was flawed. :eek:
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for."
-- Socrates
nnxion is offline   Reply With Quote
Old Jun 3rd, 2006, 7:33 PM   #7
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Wait'll you don't know if it's in the code or the hardware....
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Jun 3rd, 2006, 7:52 PM   #8
megamind5005
Programmer
 
megamind5005's Avatar
 
Join Date: Dec 2004
Location: UK
Posts: 53
Rep Power: 4 megamind5005 is on a distinguished road
LMAO!! Ah the things in life ... I was doing some revision for my Computing exam next week while casually surfing the threads, and not only do I come across a thread about debugging but one that contains good examples of each type of error that I have in my notes right here in front of me: Syntax Error, and Logic Error.

... even more ironic that I have an error in my hand-written notes. I've written "A logic error is a flaw in the way the program is designed such as executing 2+2 when you mean 2+2"[sic]... well, I know what I meant

If someone could just give us an exmaple of a good arithmetic error, we'll have a full set and I'll be happy. Any divisions by zero, anyone?
__________________
Tetris is so unrealistic
megamind5005 is offline   Reply With Quote
Old Jun 3rd, 2006, 8:04 PM   #9
Harakim
Hobbyist Programmer
 
Join Date: May 2006
Location: West Jordan, Utah, United States
Posts: 176
Rep Power: 3 Harakim is on a distinguished road
I was writing a program that used recv() and send(). Anyway, recv always returned -1 for some reason. I spent several days conducting all kinds of test and then just decided to disregard it. The program still works to this day and probably recv() still returns -1. I don't know why!!
Harakim is offline   Reply With Quote
Old Jun 3rd, 2006, 8:10 PM   #10
Booooze
Expert Programmer
 
Booooze's Avatar
 
Join Date: Mar 2006
Location: Igloo
Posts: 710
Rep Power: 3 Booooze is on a distinguished road
Send a message via MSN to Booooze
Can't remember what the actual error was, but I spent all night looking for it, and then found it. Turned out I didn't declare the variable :p Mind you, it was VB6 :p *death trap*

btw, don't drink while programming. It doesn't help. Although, I did get surpisingly far in programming duck hunt after drinking a whole lot.
Booooze is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:36 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC