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.
Re: Most Costly Method [C#]
Quote:
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.
Re: Most Costly Method [C#]
Quote:
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?
Re: Most Costly Method [C#]
Quote:
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.
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 ? :D
Darwen.
Re: Most Costly Method [C#]
Quote:
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 ? :D
Darwen.
If a mistake costs $3 million dollars (yes, actual amount), then SOMEONE is going to lose their job.
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? :eek:
Re: Most Costly Method [C#]
Quote:
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 ?
Re: Most Costly Method [C#]
Quote:
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."
Re: Most Costly Method [C#]
That's one mistake they'll NEVER make again!
Re: Most Costly Method [C#]
Quote:
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".
Re: Most Costly Method [C#]
What process changes do you plan to make to prevent this sort of thing from happening in the future?
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.
Re: Most Costly Method [C#]
Quote:
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.
Re: Most Costly Method [C#]
I dont care about he money :) I just enjoy doing it and having fun
Re: Most Costly Method [C#]
Interesting topic even though I know nothing about C#. :)
Quote:
Originally Posted by RaleTheBlade
I dont care about he money I just enjoy doing it and having fun
Good attitude! I wish I could find a programming job but I'm only in my first year of uni. :(
Re: Most Costly Method [C#]
Quote:
I dont care about he money I just enjoy doing it and having fun
You're obviously not married and have no children then... :D
Darwen.
Re: Most Costly Method [C#]
Quote:
Originally Posted by darwen
You're obviously not married and have no children then... :D
Darwen.
Nope, lol. I was thinking about something today though. If that method had to be implemented, why not just make the prototype in an interface and then implement the interface to force the class to conform?
Re: Most Costly Method [C#]
Quote:
Originally Posted by Mybowlcut
Interesting topic even though I know nothing about C#. :)
Good attitude! I wish I could find a programming job but I'm only in my first year of uni. :(
Wishing doesn't make dreams come true my friend, you have to get out there in the mix and show the man that you want it!
Re: Most Costly Method [C#]
Quote:
Originally Posted by TheCPUWizard
If a mistake costs $3 million dollars (yes, actual amount), then SOMEONE is going to lose their job.
The person who failed to do the code review? ;)
Re: Most Costly Method [C#]
Quote:
Originally Posted by darwen
You're obviously not married and have no children then... :D
There are plenty of people who have wife/kids and earn a lot less than a software developer.
Re: Most Costly Method [C#]
Quote:
Originally Posted by TheCPUWizard
Consider the following:
Code:
public class SomeClass()
{
protected virtual void SpecialWorkerMethod()
{
throw new Exception("Derived Class must Implement this Method");
}
}
Another problem with that approach:
Isn't it generally good practice to call the base class implementation in the derived implementation?
I'm think of Form.OnLoad, for example.
So if you did that, the base base class implementation would throw that exception!