![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Hobbyist Programmer
Join Date: Feb 2006
Posts: 214
Rep Power: 0
![]() |
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. |
|
|
|
|
|
#2 |
|
Programmer
Join Date: May 2006
Location: The US duhhhhh!
Posts: 42
Rep Power: 0
![]() |
An hour. I was developing an array and figured out that I needed to use curly braces instead of the parentheses
|
|
|
|
|
|
#3 | |
|
Professional Programmer
|
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:
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! ▄▄▄▄ |
|
|
|
|
|
|
#4 |
|
Hobbyist Programmer
Join Date: Apr 2005
Posts: 218
Rep Power: 4
![]() |
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: |
|
|
|
|
|
#5 | |
|
Hobbyist Programmer
Join Date: Feb 2006
Posts: 214
Rep Power: 0
![]() |
Quote:
__________________
Death smiles at us all. All a man can do is smile back. |
|
|
|
|
|
|
#6 | |
|
Programming Guru
![]() Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5
![]() |
Quote:
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 |
|
|
|
|
|
|
#7 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
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 |
|
|
|
|
|
#8 |
|
Programmer
Join Date: Dec 2004
Location: UK
Posts: 53
Rep Power: 4
![]() |
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 |
|
|
|
|
|
#9 |
|
Hobbyist Programmer
Join Date: May 2006
Location: West Jordan, Utah, United States
Posts: 176
Rep Power: 3
![]() |
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!!
|
|
|
|
|
|
#10 |
|
Expert Programmer
|
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. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|