|
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
|
|
|
|
|
Look at the subject line.
Keep Clam And Proofread
--
√(-1) 23 ∑ π...
And it was delicious.
|
|
|
|
|
You forgot to censor your name (unless that is a fake email name).
|
|
|
|
|
I just found this wonderful tidbit in a .NET app I'm supporting.
TextBox tbRoute = (TextBox)FindControl("ChkRoute" + cnt.ToString());
if ((tbRoute.Text != "") && (tbRoute.Text != "") && (tbRoute.Text != "")) {
...
}
|
|
|
|
|
Ignoring the dubiously-named variable cnt , you must be really sure that the control ChkRouteN exists, since you never test the value returned from FindControl for null .
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
The cnt is because this was inside a for loop. Perhaps whoever coded it thought the code could lie the first two times you ask if a value is empty, but not a third.
Looking at the HTML I think they meant to find two other controls and add them to the IF statement, but never got around to it. *sigh*
|
|
|
|
|
The sad thing is that he got paid to write that...
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.
|
|
|
|
|
So....what exactly is wrong with that?
|
|
|
|
|
Did you check that the Text property Getter didn't make changes to the underlying data and so make that a valid statement.
e.g.
private string _text;
public string Text
{
Get{
if (_text == null)
{
_text = "Empty";
return _text;
}
if (_text == "Empty")
_text = "";
return _text;
}
}
MVVM # - I did it My Way
___________________________________________
Man, you're a god. - walterhevedeich 26/05/2011
.\\axxx
(That's an 'M')
modified 9-Oct-13 2:33am.
|
|
|
|
|
_Maxxx_ wrote: if (_text = "Empty")
_text = "";
This will be always be true no matter what _text is except for F# but there the if else operation contains then
Microsoft ... the only place where VARIANT_TRUE != true
|
|
|
|
|
Thanks for the human compiler - I've fixed it.
MVVM # - I did it My Way
___________________________________________
Man, you're a god. - walterhevedeich 26/05/2011
.\\axxx
(That's an 'M')
|
|
|
|
|
No it won't. It wouldn't compile...
|
|
|
|
|
It depends on the compiler and the language you are writing in. In c++ it will compile and run and you will be looking for a bug
Microsoft ... the only place where VARIANT_TRUE != true
|
|
|
|
|
AnalogNerd wrote: if ((tbRoute.Text != "") && (tbRoute.Text != "") && (tbRoute.Text != "")) {
Third time is the charm
|
|
|
|
|
I've unintentionally had that happen after some refactoring. A couple text boxes contained values, and were later converted to a single box. Refactoring the name of the second to be the same as the first created the circumstance found here.
Of course, that situation only lasted for a little while, since I did check all the references to make sure nothing too stupid happened...
Software Zen: delete this;
|
|
|
|
|
At least give the guy credit for ensuring that no variable leaves empty-handed.
|
|
|
|
|
Somebody knows the "Tell me 3 times and it must be true" rule (see Heinlein's "Number of the Beast")
|
|
|
|
|
This post is about dates and certificates.
On the 7th of October, 2013 I needed to install the September update of SQL Server 2012 Data Tools (I'll be using the acronym SSDT further). Imagine how surprized I was when after attempting to download something the installer failed claiming that the reason for the failure is a wrong certificate which is already out of a valid date range. I tried to google some solution, but the only thing that I found is a post from some guy which had the same problem.
After some thinking I have come to the solution (just taste it): in order to install the stuff you have to correct a date on your PC to something close to the release date of that update! I used September, 20th. Wonderful, isn't it?
Was it way too hard for the Microsoft guys to just ensure their certificate doesn't expire before they release another update?
lifecycle of a lifecycle of a lifecycle
|
|
|
|
|
When I started working in my current position four years ago, I inherited a system full of bugs and was given the task to iron out all of the bugs.
The first step i though would be to turn on the logger and try to find out where and when the crashes happen.
I turned on the logger and after a few minutes...
BIG MISTAKE!
My system crashed.
It took me 2 days to re-install everything, and turn on the logger again.
and it happened again.
The next time i was smarter, and ghosted my disk.
I also finally found the correct source code version (which was hidden among multiple copies of various
versions and test made by the person), and run it through a debugger.
and then i found out this little beauty:
public void errorCatcher(string msg)
{
RegistryKey key = Registry.CurrentUser.OpenSubKey(KEY_NAME_START + @"\errors", true);
if (key != null)
{
key.SetValue(DateTime.Now.ToString(), msg);
key.Close();
}
}
and every method in the system had the same reference in it's catch clause:
catch (Exception exception)
{
errorCatcher(exception.ToString());
return "";
}
I took me two weeks to rewrite the whole thing, throw away 90% of the code, and roll out a bug free system.
(I still keep the original code as proof, as no one believes me when i tell people about it.)
|
|
|
|
|
Elephant me!
A registry logger? And people wonder why it's getting harder and harder to access it...
The only instant messaging I do involves my middle finger.
|
|
|
|
|
From that day on, whenever i need to get into this person code, i start pounding my head on the wall (literally) and swear.
My boss then calls from the next office: "is it ###### code again?"
|
|
|
|
|
I take it the person in question has departed the company?
The only instant messaging I do involves my middle finger.
|
|
|
|
|
Obviously.
Unfortunately he had enough time to wreck havoc in the company code base.
|
|
|
|
|
Guy Lavi wrote: Obviously.
Because you aren't on remand awaiting a murder trial?
The only instant messaging I do involves my middle finger.
|
|
|
|