The Glade 4.0

"Turn the lights down, the party just got wilder."
It is currently Mon Nov 25, 2024 6:49 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Tue Jun 26, 2012 3:20 pm 
Offline
Sensitive Ponytail Guy
User avatar

Joined: Fri Sep 04, 2009 10:18 pm
Posts: 2765
Backtracing through code with my boss today:

Me: See how this subroutine doesn't write to the database? It calls this function to do that - and here's the local variable whose value is copied to the field where the users are reporting erroneous data.
Boss: Ok, where's that variable getting its value?
Me: There's this line here that would use the value passed to the function.
Boss: Did the subroutine pass a value to the function?
Me: No, so this line here is where the variable gets its value - in another function call.
Boss: OK, so let's look at *THAT* function.
Me: Here it is - and the function will assign a value in one of two ways, depending on the result of this condition check.
Boss: Well, in this case the condition would be "x", so the function ... OMG, this function is getting the value from the very table to which the other function is writing! It's recursive!
Me: So the reason the users are seeing incorrect data in their table is ... they put it there in the first place?
Boss: Yup, that's what's happening.

_________________
Go back to zero, take a pill, and get well ~ Lemmy Kilmister


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 44 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group