Programming
Mar. 24th, 2004 08:36 amSometimes I don't understand programming.
I added a new feature to a program I was using.
Neat feature. After a bit of testing (quite a bit actually) it was working great.
I found out this AM that a related bit of code was being wonky.
Ok.. I figure. I was working in that section of code, maybe my new code is messing things up.
I check (yep wonky). Make changes.I double check (still wonky). I comment out all my code changes. I check (still wonky).
WTF!?!
Ok..uncomment my code.
Go through the rest of the code (which had NEVER done the wonky thing it was doing now), comparing it with a backup copy of the orginal code (I ain't stupid).
Don't notice any changes.
Do a line by line comparison by eye. No differences. (didn't think so...I hadn't changed that code, only used it for reference)
Thought..hmm am I setting a variable in the new code that needs to be different in the old code? Nope...not using the same variables (again I ain't stupid)
Decide I'd look at the logic of the OLD code.
Wait a minute...shouldn''t it turn off that function before it does that?
Check the backup. Nope it doesn't do that there either.
WTF!?!?!
How the hell has it BEEN working?!?!
Add the commands appropriate to turn off that function in the appropriate spot.
Check code. Works. Not being wonky.
It shouldn't have been working right in the FIRST place.
Here is the weird part.
I use this code on several sites. Most of them don't need the mod that I made so they have the original code...with the same section that doesn't turn off the function AND THEY AREN'T WONKY!
sigh...at least I got it working again.
I added a new feature to a program I was using.
Neat feature. After a bit of testing (quite a bit actually) it was working great.
I found out this AM that a related bit of code was being wonky.
Ok.. I figure. I was working in that section of code, maybe my new code is messing things up.
I check (yep wonky). Make changes.I double check (still wonky). I comment out all my code changes. I check (still wonky).
WTF!?!
Ok..uncomment my code.
Go through the rest of the code (which had NEVER done the wonky thing it was doing now), comparing it with a backup copy of the orginal code (I ain't stupid).
Don't notice any changes.
Do a line by line comparison by eye. No differences. (didn't think so...I hadn't changed that code, only used it for reference)
Thought..hmm am I setting a variable in the new code that needs to be different in the old code? Nope...not using the same variables (again I ain't stupid)
Decide I'd look at the logic of the OLD code.
Wait a minute...shouldn''t it turn off that function before it does that?
Check the backup. Nope it doesn't do that there either.
WTF!?!?!
How the hell has it BEEN working?!?!
Add the commands appropriate to turn off that function in the appropriate spot.
Check code. Works. Not being wonky.
It shouldn't have been working right in the FIRST place.
Here is the weird part.
I use this code on several sites. Most of them don't need the mod that I made so they have the original code...with the same section that doesn't turn off the function AND THEY AREN'T WONKY!
sigh...at least I got it working again.