- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Classic!
Admin
If you don't like the requirements, just add functionality that applies only to you.
Admin
Yeah, I hope Sequel Server is as good as the first one.
Admin
How can you logically justify MANUALLY throwing an ArgumentOutOfRangeException from a login method? That blows my mind.
Admin
He's one of those guys who leave his cellphone on 24/7 to make a good impression for the boss.:o
Admin
so let me get this straight? The Mad Ukranian deleted all his own source code when he left the company?
Admin
Umm, they can't be "fairly unique design habits". They are either unique or they are not. No qualifier is allowed.
Admin
Normally, one assumes that if a method returns a boolean indicator of its success then it also internally traps any exceptions. Perhaps if more detail is needed, the method could return some kind of status code instead of just a boolean.
Admin
Hmmm. Anyone else think this is really management's fault? So many times I have seen the 'architect' role given to relatively inept people. They basically let a bad and unscrupulous programmer walk all over them. I guess they either didn't have source control or Yuri was also the admin for that too.
Admin
Is this the ukranian equivalent of hungarian notation?
Admin
It seems to me that "string parser" similar to connectionString.Substring(connectionString.IndexOf("foo"),... would do the trick in case "foo" is not present in connectionString.
I know it's silly, but what else might throw that kind of exception ? Do you really think it's thrown manually ?
Well, maybe you're right: I've seen that kind of logic too, just a little bit more sophisticated
<font size="2">try
{
Login();
}
catch(InvalidPasswordException ipex)
{
...
}
</font>
Admin
Grammar nazi. I suppose you also jump all over people who use the word "decimate" in any other sense besides "to reduce by one tenth".
Admin
Given some of the stuff we see on here then they could be described unfairly as unique. :)
Admin
shouldn't this be:
MessageBox.Show("We are using a new cover sheet for our TPS Manager program. Did you get the memo?");
Admin
Do I have to point the obvious WTF here again?
Yes, You guessed it!!! No isTure() function... it should've been:
if(!IsTrue(service.ConnectToSQL(LoginInfo.GetConnectingStringArrayToSQL())))
{
Close();
return;
}
}
Alternatively Mad Ukrainian could've used isNotTrue function to avoid costly "!" evaluation.
Additionally:
if(Environment.UserName == "yuri")
that should've been done with isYuri function
if(isYuri(Environment.UserName) )
{...}
private bool isYuri(string uri)
{
if (uri=="yuri")
{
return isTrue(true);
}else
{
return isNotTrue(true);
}
}
Admin
Are you going to define the isTure method or not? Come on Anonymous - I can barely contain my excitement.
Admin
Would anybody please point to the line of code where this checking occurs ?
Admin
Sure I'd be happy to.
<FONT color=#0000ff size=2>private</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>bool</FONT><FONT size=2> isTrue(</FONT><FONT color=#0000ff size=2>bool</FONT><FONT size=2> theTruth)
{
</FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (isUri(System.Environment.UserName()))
{
</FONT><FONT color=#0000ff size=2>return</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>true</FONT><FONT size=2>;
}
</FONT><FONT color=#0000ff size=2>else
</FONT><FONT size=2>{
<FONT color=#0000ff>return</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>false</FONT><FONT size=2>;</FONT>
</FONT><FONT size=2>}
}
CAPTCHA this time was BOZO, how Ironic.
</FONT>Admin
Miscellaneous mini wtf:
I can't tell if this is C++, C#, or Java, but regardless of that, isn't it generally a bad idea to compare a String reference/pointer to a constant? Should be < Environment.Username.equals("yuri") >.
Admin
Or am I just stuck thinking in Java's rigid syntax? :^) Never really used C#, and I avoid C++.
Admin
It's C#, and there's no issue with the comparison being done, other than the fact that it's a nasty hack/security hole.
Admin
isTrue(true) == isTrue(false) ?
Admin
You fail today. I said I wanted a "isTure" method - which is the typo from the post I was responding to. A programmer with poor attention to detail...could you post some of your code here? I'm sure it would be entertaining.
Admin
I hate to rant, but I can't stand people who say/type 'sequel server' instead of "Es Kyoo El"/SQL when talking about it. Pronouncing vowel-deprived acronyms is one of the most obnoxious habits ever.
Admin
If he follows conventions, then this definitely isn't Java (unless nearly everything is static)
Admin
I have never posted here before, and I hate to be an arse, but this is not really even a WTF in my opinion, if this guy did anything wrong, its because he hard coded his user name into the application, but I think we have all been guilty of worse before.
The point here is they were verifying that the client connecting to the database was the current version and if it wasnt they didnt allow the user to continue. What he did is if he connected with version that was newer or older, he put in code to set the version in the database.
Admin
I don't think it'll pass unit test.
Besides, you forgot to provide second argument, bool confirm
Admin
Yeah, I'm sure there is a correlation between a coder's posting habits and his coding ability.
Are you saying also that you've never made a simple typo? Never left a semi-colon out? Never mistyped a variable name? Yeah right.
Admin
Speak for yourself.
Admin
He made 2 mistakes.
1. The original typo.
2. Not reading my request closely enough.
The 2nd mistake he made was the one I was talking about when I said he had poor attention to detail. The typo has nothing to do with it, tough guy.
Admin
Worse yet, some people pronounce C# as C-Sharp instead of C-Pound as it obviously should be.
Admin
You still seem to be making a connection between a person's posting habit and their coding ability. Do you seriously think that someone is going to devote the same amount of attention to reading/responding to a post on a message board that they are going to devote to their job?
Admin
Oddly enough, I do. From the best, I expect attention to detail in everything they do.
Admin
It seems to me that a lot of the programmers who post here spend way too much time bickering and chiding eachother over the smallest non-issues. It feels like a highschool locker room full of the stereotypical "jock" arguing over who's stronger. Take a step back and look what types of things you are posting and take a moment to reflect on your bickering and you will realize how childish and pointless it is.
Admin
Get used to disappointment then.
Admin
Why? Did you think they were referring to something other than SQL Server?
Is there a Big Book of Techie Pronunciations that all programmers are required to follow?
Admin
Isn't it obvious ?
Admin
Notice that I said "from the best." Seeing a lack of attention to detail allows me to quickly ignore those people.
Admin
Say "C Pound" in the U.K. and you'll be referring to low-grade currency.
Saying "C Hash" there would be clearer.
Admin
I suppose you ALWAYS say the letters (color coded for readability) R-A-M, C-D-R-O-M, L-A-N, A-N-S-I, A-S-C-I-I, M-I-M-E, etc? Relax dude. Thankfully we're not all as uptight as you.
Admin
Just in order to beat Cthulhon to the punch, he did say "Pronouncing vowel-deprived acronyms is one of the most obnoxious habits ever." and all of your examples contain vowels.
Admin
I agree completely. I hate the nitpicking.
Oh, by the way. Shouldn't it be "high school" not "highschool", as well as "stereo-typical" not "stereotypical.
One more thing. You didn't put a space between "each" and "other".
And what about ...
Admin
I call shinanagans... SHINANAGANS!
Admin
OMG!!11!oneidontreadbooks!!1 "eachother?!" What the heck is that?!! I've never heard of that word! You are so stupid! Tell me your name so I can remember not to hire you! You, with your obvious lack of attention to detail, have the nerve to call youself a programmer?! I would say that you need to go back to flipping burgers, but based on this post of yours, you'd probably get those stuck together too. Man, I feel sorry for your employer.
Sorry, what were you saying?
;)
Admin
<sarcasm>
Ah, I see. So the vowels are the key. Well that changes everything. All of the sudden 'sequel server' sounds like nails on a chalkboard to me.
</sarcasm>
Admin
Calm down. Alex will commonly use references to that movie when anonymizing code.
Admin
Even the ones with vowels in them sound stupid when pronounced as a word and not an acronym. I submit to you "GUI" and "URL".
Admin
Now I see the WTF!
if(Environment.UserName == "yuri")
Isn't sufficient. It should be:
if (!name.length < 4 && ! name.length > 4 and ! name < 44017 && ! name > 44017
&& name = "yuri")
Admin
Ahh... Well... In that case... Carry on with the grammar flame war.
Admin
Yeah, like those other crazy ones like LASER and RADAR.