Best practices for transaction management,
-
Well - just got this code into review (this is the pseudocode version of a 2000 line routine - a coding WTF in its own right):
1. Begin Transaction 2. Update Table 1 with a single value 3. Update Table 1 with another value - to the same row as step 2. 4. Pop up message box to ask user to ring somebody to confirm that it is OK to continue. 5. Update Table 2 6. Commit Transaction
The best bit is that the person who coded this, (supposedly an experienced developer), couldn't see that step 4a. User goes out for lunch, means that the transaction could effectively run for an hour or so.
Please visit http://www.readytogiveup.com/ and do something special today. Deja View - the feeling that you've seen this post before.
-
Well - just got this code into review (this is the pseudocode version of a 2000 line routine - a coding WTF in its own right):
1. Begin Transaction 2. Update Table 1 with a single value 3. Update Table 1 with another value - to the same row as step 2. 4. Pop up message box to ask user to ring somebody to confirm that it is OK to continue. 5. Update Table 2 6. Commit Transaction
The best bit is that the person who coded this, (supposedly an experienced developer), couldn't see that step 4a. User goes out for lunch, means that the transaction could effectively run for an hour or so.
Please visit http://www.readytogiveup.com/ and do something special today. Deja View - the feeling that you've seen this post before.
Pete O`Hanlon wrote:
Pop up message box to ask user to ring somebody to confirm that it is OK to continue.
Ohhh:((.....Thats what called User confirmation:).....I thought something different....:laugh:
Regards, Sylvester G
-
Well - just got this code into review (this is the pseudocode version of a 2000 line routine - a coding WTF in its own right):
1. Begin Transaction 2. Update Table 1 with a single value 3. Update Table 1 with another value - to the same row as step 2. 4. Pop up message box to ask user to ring somebody to confirm that it is OK to continue. 5. Update Table 2 6. Commit Transaction
The best bit is that the person who coded this, (supposedly an experienced developer), couldn't see that step 4a. User goes out for lunch, means that the transaction could effectively run for an hour or so.
Please visit http://www.readytogiveup.com/ and do something special today. Deja View - the feeling that you've seen this post before.
If this transaction wasn't started by the user in some way, imagine if the user went on a holiday. Or quit. :omg:
Cheers, Vıkram.
After all is said and done, much is said and little is done.
-
Well - just got this code into review (this is the pseudocode version of a 2000 line routine - a coding WTF in its own right):
1. Begin Transaction 2. Update Table 1 with a single value 3. Update Table 1 with another value - to the same row as step 2. 4. Pop up message box to ask user to ring somebody to confirm that it is OK to continue. 5. Update Table 2 6. Commit Transaction
The best bit is that the person who coded this, (supposedly an experienced developer), couldn't see that step 4a. User goes out for lunch, means that the transaction could effectively run for an hour or so.
Please visit http://www.readytogiveup.com/ and do something special today. Deja View - the feeling that you've seen this post before.
Begin Transaction 1. Fire contractor 2. Throw out code 3. Rewrite System Commit
------------------------------------------- Damian - Insert snappy one-liner here.
-
Begin Transaction 1. Fire contractor 2. Throw out code 3. Rewrite System Commit
------------------------------------------- Damian - Insert snappy one-liner here.
More likely... Begin transaction Hire new outsourcing firm Add more tentacles to existing Codethulu Commit self to mental hospital
-- You have to explain to them [VB coders] what you mean by "typed". their first response is likely to be something like, "Of course my code is typed. Do you think i magically project it onto the screen with the power of my mind?" --- John Simmons / outlaw programmer
-
Begin Transaction 1. Fire contractor 2. Throw out code 3. Rewrite System Commit
------------------------------------------- Damian - Insert snappy one-liner here.
You assume that this person was a contractor. Hmmmm.:laugh:
Please visit http://www.readytogiveup.com/ and do something special today. Deja View - the feeling that you've seen this post before.
-
Well - just got this code into review (this is the pseudocode version of a 2000 line routine - a coding WTF in its own right):
1. Begin Transaction 2. Update Table 1 with a single value 3. Update Table 1 with another value - to the same row as step 2. 4. Pop up message box to ask user to ring somebody to confirm that it is OK to continue. 5. Update Table 2 6. Commit Transaction
The best bit is that the person who coded this, (supposedly an experienced developer), couldn't see that step 4a. User goes out for lunch, means that the transaction could effectively run for an hour or so.
Please visit http://www.readytogiveup.com/ and do something special today. Deja View - the feeling that you've seen this post before.
-
Well - just got this code into review (this is the pseudocode version of a 2000 line routine - a coding WTF in its own right):
1. Begin Transaction 2. Update Table 1 with a single value 3. Update Table 1 with another value - to the same row as step 2. 4. Pop up message box to ask user to ring somebody to confirm that it is OK to continue. 5. Update Table 2 6. Commit Transaction
The best bit is that the person who coded this, (supposedly an experienced developer), couldn't see that step 4a. User goes out for lunch, means that the transaction could effectively run for an hour or so.
Please visit http://www.readytogiveup.com/ and do something special today. Deja View - the feeling that you've seen this post before.
I'm sure I've seen this used as an example in more than 1 place of how NOT to write transaction code. Maybe your guy skip read the chapter and accidentally picked up the wrong flow chart of how to write this stuff. I'm suprised that anyone who has experience with transactions would dream of doing anything other than Begin, Get the job done quick, Get the hell out. Russell