Stupidest programing mistake?

EagleKeeper

Discussion Club Moderator<br>Elite Member
Staff member
Oct 30, 2000
42,589
5
0
Calculating the checksum with the checksum location.
 

Armitage

Banned
Feb 23, 2001
8,086
0
0
I spent more time then I'm willing to admit trying to track down why my C++ program was dying when the error condition wasn't met:

 

EagleKeeper

Discussion Club Moderator<br>Elite Member
Staff member
Oct 30, 2000
42,589
5
0
Originally posted by: Armitage
I spent more time then I'm willing to admit trying to track down why my C++ program was dying when the error condition wasn't met:

Darn hidden braces

 

Kilrsat

Golden Member
Jul 16, 2001
1,072
0
0
Originally posted by: Armitage
I spent more time then I'm willing to admit trying to track down why my C++ program was dying when the error condition wasn't met:

This is why I'm a bracket whore. It may work without them, but its only 2 extra characters and can save headaches later. Its worth it to me.
 

Armitage

Banned
Feb 23, 2001
8,086
0
0
Originally posted by: Kilrsat
Originally posted by: Armitage
I spent more time then I'm willing to admit trying to track down why my C++ program was dying when the error condition wasn't met:

This is why I'm a bracket whore. It may work without them, but its only 2 extra characters and can save headaches later. Its worth it to me.

I ussually am ... brackets whether you need em or not. But combine several months away from C++ and alot of python work, and the indented code looked just fine!

In case you're not a python guy ... python uses level of indention to determine scope.
 

Kilrsat

Golden Member
Jul 16, 2001
1,072
0
0
Originally posted by: Armitage
Originally posted by: Kilrsat
Originally posted by: Armitage
I spent more time then I'm willing to admit trying to track down why my C++ program was dying when the error condition wasn't met:

This is why I'm a bracket whore. It may work without them, but its only 2 extra characters and can save headaches later. Its worth it to me.

I ussually am ... brackets whether you need em or not. But combine several months away from C++ and alot of python work, and the indented code looked just fine!

In case you're not a python guy ... python uses level of indention to determine scope.
Yeah, I know, screwy python ;)

I've run into a few interesting situations when switching from doing work and my hobby code. After staring at VB.net code for a long enough time, the brain just turns off thinking about structure (all of the auto-complete stuff in Visual Studio doesn't help either). If I'm tired enough I start writing code like:

String something As New String
if (blah > blah2
blah.inde"ui"
...


Nothing like a mixture of multiple languages and incomplete statements to make you go "Doh!" when you try to compile without previewing.