- 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
I hadn't noticed it had gone down, but it's certainly been very slow from time to time recently...
Admin
Funny [:)]. That could lead to a similar function:
And of course to:
and finally of course custom defined for sizes other than 1..1024:
Happy Holiday greetings from Germany [;)]
Uwe (www.magerquark.de)
Admin
Well this function would be useful if you were using some form of std::copy_if()-like function which requires a predicate to function. Obviously the code is the work of a programmer that understands these things on a higher level than mundane coders.
Admin
This could be a layer of abstraction that the programmer intends to use later for more discriminatory handling. For example, he might later wish to treat 0 and 10 as false, but 1-9 as true. Confining all Boolean tests to this single point of inflection would allow him this flexibility.
Given, he ought to have commented it accordingly if that were his intention.
Admin
http://mindprod.com/unmain.html
That's where they get their ideas. No question. Also very funny, I recommend all coders read it (but they have a LOT of misunderstandings of how the C preprocessor works)
Admin
Alex Papadimoulis: "Now lets see how it looks when we employ best practices and the the IsTrue function:
If IsTrue( objInstanceOfDocument.blnDocumentPropertyIsActive ) Then fn_DoStuff()
Crystal. Clarity."
No, no, no!
You've only followed your best practices one stage. Now step back and apply them a second time:
If IsTrue( IsTrue( objInstanceOfDocument.blnDocumentPropertyIsActive ) ) Then fn_DoStuff()
And continuing on that track a little further:
If IsTrue( IsTrue( IsTrue( IsTrue( IsTrue( IsTrue( IsTrue( IsTrue( objInstanceOfDocument.blnDocumentPropertyIsActive ) ) ) ) ) ) ) ) Then fn_DoStuff()
(BTW - I'm sure a LiveJournal community would do this site pretty well. At least the preview actually previews.)
Admin
<FONT size=2>If IsTrue( IsTrue( IsTrue( IsTrue( IsTrue( IsTrue( IsTrue( IsTrue( objInstanceOfDocument.blnDocumentPropertyIsActive ) ) ) ) ) ) ) ) Then fn_DoStuff() </FONT>
Cant get any crystal clearn than this
Admin
As far as the web hosting goes, how about www.1and1.com, they seem to have reasonable prices and offer dedicated servers and other packages offering Server 2003 with MSSQL. I have personally never used them, but their rates and infrastructure seems to be good from what I have read. [:)]
Admin
I haven't used 1and1 for hosting, but I got a domain name through them once, and it was rubbish. They wouldn't even let me manage my own DNS, and there was some crappy web-based admin tool which only let you setup redirects, or a crappy frames page which LOOKS like it's pointing to www.yourdomain.com, but really just has one frame in it pointing to the IP of your choice!
Needless to say, I switched registrars as soon as the 60 day limit expired.
Admin
Also avoid finesthost.com. Recently my site was down for 2 days; no mention anywhere on their homepage that they were having problems and no response to email; their phone goes straight to an answering machine. They also have an occasional irritating habit of turning PERL off, so you get the script downloaded rather than have the server execute it. This usually persists for a few days and then goes away again and starts working.
Their webmail also looks dreadful, like it was written by a marketing intern or something.
If anybody could recommend a hosting company that isn't a load of crap I'd be interested to hear as well.
Admin
I highly recommend DreamHost for hosting--they've done nothing but exceed my expectations by adding features and increasing the bandwidth/storage limits of my hosting plan as time has gone on. (Note that the above is an affiliate link, but I recommended them even before I knew about that program.)
BTW, thanks for the site--the WTFs really brighten my day sometimes!
--Joe Hughes
Admin
nonono, it should be like this:
to ensure that everything is as well-wrapped as possible on every system.
BTW, I second the proposal of moving to LJ. The current forum software is full of WTFs even before you post on it. (<font> tags, anyone?)
Admin
You know in late nights of programming I've made some poor choices by reimplementing core functionality because I couldn't remeber that it was there, but forgetting about how an if statement works is just too much.
When you get these in do you find out if the person creating the code is a programmer or an excel "expert" who got slapped into that role.
I think that part of the problem is how this is tought in college. Coming back from working for almost 10 years and "learning" languages in a Computer Engineering program I realize that they spend so much time trying to keep you from cheating and making exams that have so little to do with "development" in the first place.
Sorry ramble.....
Admin
Try this company out for hosting and you'll never regret it:
http://www.corbimite.com/
Contact the owner Frank Zander ( the owner ) directly and tell him Cornbread sent you ( no I'm not joking I do admin on some forums on one of the sites he hosts under that login name so he will know who you are talking about ). Hosting will be way cheaper than anything else you can find. He has something like two miles of servers and it never goes down. Power to the building is redundant and everything has backup systems. Halon fire supression too. I have never had anywhere give as consistant and awesome service as they do. I don't get anything for recommending this service to people I just believe it's the best you'll find so I recommend it whenever I get the chance. My e-mail if you want to contact me directly with any questions is andy underscore canfield at hotmail dot com.
Admin
I have 1and1 hosting; both dedicated server and normal hosting and I have no complaints whatsoever.
Admin
Private bNotTrue, bNotFalse as Boolean
<FONT face="Courier New">Public Function IsFalse(bFalse) as Boolean
If Not IsTrue(bNotTrue) <> False Then
Return (bNotTrue = bNotFalse)
End If
End Function</FONT>
Admin
From Code Complete 2d ed (p 287):<p>
Coding Horror
For example, the following code fragment is legal in PL/I, but you would be a certifiable idiot to use it:<font face="Courier New"> if if = then then
then = else;
else else = if;</font>
Admin
Quite seriously, I worked with a Java programmer who used to check his bool variables against true and false:
if (foo == true)
....
I tried suggesting that he change it to
if ((foo == true) == true)
....
But he didn't get it.
Admin
Why not
<FONT face="Courier New">If Not IsTrue(objInstanceOfDocument.blnDocumentPropertyIsActive) = IsTrue(False) Then fn_DoStuff()</FONT>
Admin
@Goudinov - that is hilarious
Admin
Your best hosting bet is almost certainly ServerMatrix. Good prices, ridiculous redundancy. They're the entry level division of "The Planet" (in case you've heard of them).
http://www.servermatrix.com/
Admin
Umm yeah, you can change DNS without problem in 1&1... they have a DNS section in the control panel. I had messed around with an FTP server running off my local machine for a while. Changed hosting on other domains as well.
Admin
Try http://www.siteturn.com because they cost around $150 per year, not per month. [;)] But okay, their quality might not be that high either...
Admin
You could also try Joe's Web Shack...your credit card may get charged, but don't expect anything in return.
Admin
Sorry I don't get this at all. The input is boolean the output is boolean. All the developer can is change IsTrue to evaluate to a not which would be pretty stupid. Or am I missing something?
Admin
Sorry, but I don't see something after scanning the replies...
If test happens to be Null, is it true or false? And if it's Form1?
Admin
But then there are things like http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html#toString() out there, and nobody seems to notice.
Admin
Surely we don't have to explain why the string class has a tostring method, Mr. Troll!
-blue
Admin
My favourite WTF is one that I see on nearly every large project I work on, at least once: "<boolean expression> ? true : false".
You can tell that someone has just discovered the magic elegance of the ternary operator.
Another common one:
if (<boolean expression>) {
return true;
} else {
return false;
}
Admin
I will be charitable and assume you are not a troll, but the reason that String implements toString() is because Object has a toString method, which is somewhat brain-dead and is expected to be overridden in every child class.