|
-
December 29th, 2007, 11:49 AM
#1
Most Costly Method [C#]
Consider the following:
Code:
public class SomeClass()
{
protected virtual void SpecialWorkerMethod()
{
throw new Exception("Derived Class must Implement this Method");
}
}
Can you see why the above just cause a client of mine SIGIFICANT money?
hint: The direct cause is directly related to C#, but the ROOT cause can happen in any language.
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions 
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
-
December 31st, 2007, 01:35 PM
#2
Re: Most Costly Method [C#]
I'm guessing that this issue didn't show up until run time.
Restructuring the code using interfaces (and maybe constraints) probably would have allowed catching the problem during compile time.
-
January 1st, 2008, 06:10 PM
#3
Re: Most Costly Method [C#]
 Originally Posted by Arjay
I'm guessing that this issue didn't show up until run time.
Restructuring the code using interfaces (and maybe constraints) probably would have allowed catching the problem during compile time.
1) Yup, right hile rinning for the client.
2) in C# abstract ould have been appropriate. In C++ making the method "pure" would have solved the problem at BUILD time.
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions 
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
-
January 2nd, 2008, 03:25 PM
#4
Re: Most Costly Method [C#]
 Originally Posted by TheCPUWizard
1) Yup, right hile rinning for the client.
2) in C# abstract ould have been appropriate. In C++ making the method "pure" would have solved the problem at BUILD time.
I'm afraid I don't know, but I'd like to find out. What was the problem?
-
January 2nd, 2008, 05:09 PM
#5
Re: Most Costly Method [C#]
 Originally Posted by goatslayer
I'm afraid I don't know, but I'd like to find out. What was the problem?
Simple. Somebody (no longer employeed by the client company because he also wrote the faulty base class) forgot to override a method in a derived class, that the base class was not setup to catch this at compile time.
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions 
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
-
January 2nd, 2008, 05:38 PM
#6
Re: Most Costly Method [C#]
It seems a bit rough to sack someone over this : after all testing should have shown this up.
We all make mistakes occasionally... don't we ?
Darwen.
-
January 2nd, 2008, 05:41 PM
#7
Re: Most Costly Method [C#]
 Originally Posted by darwen
It seems a bit rough to sack someone over this : after all testing should have shown this up.
We all make mistakes occasionally... don't we ?
Darwen.
If a mistake costs $3 million dollars (yes, actual amount), then SOMEONE is going to lose their job.
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions 
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
-
January 2nd, 2008, 07:01 PM
#8
Re: Most Costly Method [C#]
Well, it was probably justified, but with some 'background' which would qualify it. I'm glad it wasn't me... Isn't there still death for 'treason' for gov't workers?
-
January 3rd, 2008, 09:09 AM
#9
Re: Most Costly Method [C#]
 Originally Posted by TheCPUWizard
If a mistake costs $3 million dollars (yes, actual amount), then SOMEONE is going to lose their job.
No kidding ? How did it sum up to $3 million ?? I mean did they loose future sale or they lost agreement or something ?
Regards,
Ramkrishna Pawar
-
January 3rd, 2008, 11:23 AM
#10
Re: Most Costly Method [C#]
 Originally Posted by TheCPUWizard
If a mistake costs $3 million dollars...
A wise business man once took on a trainee that blew a huge deal costing $11M. The young many went to turn in his resignation and the older business man said, "Boy, I just spent $11M training you. I don't want you to go."
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
-
January 3rd, 2008, 12:46 PM
#11
Re: Most Costly Method [C#]
That's one mistake they'll NEVER make again!
-
January 3rd, 2008, 12:52 PM
#12
Re: Most Costly Method [C#]
 Originally Posted by Krishnaa
No kidding ? How did it sum up to $3 million ?? I mean did they loose future sale or they lost agreement or something ?
My client had a delivery commitment. A missed milestone invoked a thirty day penality (they met with their client one per month). When the program was being demonstrated, and blew up, it was deemed "not ready for user acceptance", and the commitment was declared "not met".
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions 
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
-
January 3rd, 2008, 03:01 PM
#13
Re: Most Costly Method [C#]
What process changes do you plan to make to prevent this sort of thing from happening in the future?
-
January 4th, 2008, 01:03 AM
#14
Re: Most Costly Method [C#]
Yikes, I wouldn't wanna have had that guys job... I use C# all the time and I thought it was a hefty method simply because of the exception being thrown and bubbling up the call stack. Also, if it had to be implemented, why didn't he use an interface?
I work for a small company doing all their software, I love my job, but when software development starts to become like boot camp thats when I pack my bags, lol.
R.I.P. 3.5" Floppy Drives
"I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones." - Albert Einstein
-
January 4th, 2008, 07:58 AM
#15
Re: Most Costly Method [C#]
I work for a small company doing all their software, I love my job, but when software development starts to become like boot camp thats when I pack my bags, lol.
You'll never earn very much then... the toughest jobs I've had have also the highest paid.
Darwen.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|