|
Thanks. This is really useful information.
|
|
|
|
|
Richard Deeming wrote: Filename includes keywords like "install," "setup," "update," etc.
What the elephant ?
It checks for filename or keywords to determine if a file is an installer ? I call this epic fail !
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
Do not feed the troll ! - Common proverb
|
|
|
|
|
Yes, it does. Any icons with those words in the names do not show up in the Start menu, even if you pin it.
|
|
|
|
|
|
The alternative to a heuristic like that would have been 99% of installers trying to run as normal processes when Vista launched, failing because they couldn't access privileged areas, and bombing. That would have been an order of magnitude more elephanted up. And not just because setting runs-as-user in a manifest if your app name matches the heuristic is strait forward for a dev; but 99% of lusers don't know there is something called admin mode, never mind how to launch a program in it.
Edit: PS The VS2k3Sp1 installer doesn't get detected to auto elevate and fails/backs out in a way that gives no indication of what's wrong until on the nth try you realize you never got the elevate prompt.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
Yes, there really was no nice clean solution available to them at that point.
Just because the code works, it doesn't mean that it is good code.
|
|
|
|
|
|
That seems a very deep quote from Homer, I'm more used to "mmm doughnuts".
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.
|
|
|
|
|
Thanks for sharing this WTF!
|
|
|
|
|
I was assigned a QA bug today and I found this horror code written by my colleague ...
private static double ConvertToDouble(object obj, out bool good)
{
if (obj is double || obj is int)
{
good = true;
return (double)obj;
}
good = false;
return double.NaN;
}
This code exploded in to
Exception type: InvalidCastException
Message: Specified cast is not valid.
[System.InvalidCastException]
|
|
|
|
|
It failed converting int to double?
The signature is in building process.. Please wait...
|
|
|
|
|
Yes!!
Actually the question was raised by the same colleague when I told him its wrong....
|
|
|
|
|
And float and uint are also really bad...
|
|
|
|
|
Well in theory not... but our middleware doesn't support uint and float so for us (practically) they are bad.
|
|
|
|
|
That's what I call good quality, well tested code!
It's obvious it should have been:
return (double)(int)obj;
The only instant messaging I do involves my middle finger.
English doesn't borrow from other languages.
English follows other languages down dark alleys, knocks them over and goes through their pockets for loose grammar.
|
|
|
|
|
This would fail if obj is double...
|
|
|
|
|
In which case you make it
return (double)(int)(double)obj;
The only instant messaging I do involves my middle finger.
English doesn't borrow from other languages.
English follows other languages down dark alleys, knocks them over and goes through their pockets for loose grammar.
|
|
|
|
|
He likes reinventing the well or doesn't he know Convert.ToDouble()[^]?
I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)
"Given the chance I'd rather work smart than work hard." - PHS241
"'Sophisticated platform' typically means 'I have no idea how it works.'"
|
|
|
|
|
It should be called TryConvertToDouble with the signature and semantics following the TryXXX functions like TryGetValue(), that is:
It should return bool true on successful conversion, false otherwise and the converted value in the out parameter.
|
|
|
|
|
It shouldn't exist at all.
I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)
"Given the chance I'd rather work smart than work hard." - PHS241
"'Sophisticated platform' typically means 'I have no idea how it works.'"
|
|
|
|
|
Unboxing cannot do a representation-changing conversion.
|
|
|
|
|
|
Actually, that's designed to convert a string to double, the code in question is designed to convert objects to double - including explicitly ints.
You're not suggesting the way to convert an integer to a double is as follows are you?
1. Convert the int to a string.
2. Convert the string to a double.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.
|
|
|
|
|
Here[^].
That is a fail.
Keep Clam And Proofread
--
√(-1) 23 ∑ π...
And it was delicious.
|
|
|
|
|
Indeed, I fail to get it
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
Do not feed the troll ! - Common proverb
|
|
|
|