Whoa! Didn't see this one coming
-
/// /// Creates a deep copy of the object /// public virtual object DeepCopy(object value) { return value; }
-
Looks like the coder should have thrown a NotImplementedException[^] here instead. Cheers!
"With sufficient thrust, pigs fly just fine."
Ross Callon, The Twelve Networking Truths, RFC1925
Manfred R. Bihy wrote:
Looks like the coder should have thrown a NotImplementedException[^] here instead.
One of the most underused exceptions when developing software. I use it all the time when I am scoping out classes, but not ready to implement the inner code yet.
I wasn't, now I am, then I won't be anymore.
-
/// /// Creates a deep copy of the object /// public virtual object DeepCopy(object value) { return value; }
In other cultures that's referred to as a Zen copy. You have become one with the object. :)
Chris Meech I am Canadian. [heard in a local bar] In theory there is no difference between theory and practice. In practice there is. [Yogi Berra] posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]
-
Looks like the coder should have thrown a NotImplementedException[^] here instead. Cheers!
"With sufficient thrust, pigs fly just fine."
Ross Callon, The Twelve Networking Truths, RFC1925
-
Looks like the coder should have thrown a NotImplementedException[^] here instead. Cheers!
"With sufficient thrust, pigs fly just fine."
Ross Callon, The Twelve Networking Truths, RFC1925
-
/// /// Creates a deep copy of the object /// public virtual object DeepCopy(object value) { return value; }
-
Perhaps he means "Deep" in some Buddist-type sense, with a more profound meaning, like a copy of something is the same thing as the original or something. Actually, if this is the case the methdod should have been called
ProfoundCopy
:)Sort of a cross between Lawrence of Arabia and Dilbert.[^]
-Or-
A Dead ringer for Kate Winslett[^] -
In other cultures that's referred to as a Zen copy. You have become one with the object. :)
Chris Meech I am Canadian. [heard in a local bar] In theory there is no difference between theory and practice. In practice there is. [Yogi Berra] posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]
If this was C++, see my sig.
Software Zen:
delete this;
-
/// /// Creates a deep copy of the object /// public virtual object DeepCopy(object value) { return value; }
This looks like a laid off employee who would like damage the company without the risk of being sued.
"To alcohol! The cause of, and solution to, all of life's problems" - Homer Simpson
-
This looks like a laid off employee who would like damage the company without the risk of being sued.
"To alcohol! The cause of, and solution to, all of life's problems" - Homer Simpson
Fabio Franco wrote:
This looks like a laid off employee who would like damage the company without the risk of being sued.
Actually, the code was likely written by someone I have worked with previously at another company... At least I know what to expect :)
-
Yes, but if he used a NotImplementedException then it wouldn't be a coding horror. Unless, of course, it was still there when released to customers. ;) :)
Just because the code works, it doesn't mean that it is good code.
Coincidentally, we just found exactly this yesterday in our latest release. Release was pretty much a complete rewrite of the software, so this is a "TODO that didn't get to did", not something malicious. Oops. Now off to the old code to figure it out and design a solution in the new architecture.
-
Code like this is probably one reason why
///...
is not a standard xml comment. No one would want to own up to that.
-
Manfred R. Bihy wrote:
Looks like the coder should have thrown a NotImplementedException[^] here instead.
One of the most underused exceptions when developing software. I use it all the time when I am scoping out classes, but not ready to implement the inner code yet.
I wasn't, now I am, then I won't be anymore.
It's a great way to detect that something isn't quite done yet. Cheers!
"With sufficient thrust, pigs fly just fine."
Ross Callon, The Twelve Networking Truths, RFC1925