- 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
Admin
So what does "root" mean in German? In what way is it sexist?
Though this reminds me of a (satirical) article I read years ago on a proposed revision of Linux to eliminate sexist terms. It included replacements like:
man -> person mail -> humyn which -> wiccan host -> hostess history -> herstory abort -> choose
Etc.
Admin
The thing about the Singleton Pattern, though, is that you will find people who will honk on mightily about how great Singletons are who will then, in the same paragraph, talk about how bad global variables are, without realizing that a singleton IS a global variable, just one that's disguised enough to get through any set of coding standards that is asinine enough to ban globals for any use whatsoever.
Like, there are a set of times when it makes sense to use a global. I get it. So, if you're damn sure it's one of those times, then go use a global. Don't bullshit me about it by using a private static pointer that you retrieve with a public static function that allocates it on first use. More importantly, don't bullshit yourself.
Admin
Have the "do nothing" function call write a line to the console log. Something like "It's okay; Kendra killed the bad lamp."
Admin
It was considered sexist because it has a rude (pun intended) meaning in english slang and it would offend female readers having to constantly deal with such a dirty word (whose dirty meaning >99% never even heard about).
Admin
Admin
This is very language-dependent (and possibly compiler-dependent) behavior.
Admin
Please don't blame me. Code written below is not mine.It was written against me.
quite cute - yet another way to perform SQL injection !
Admin
Admin
Am I the only one failing to see any WTF in the JVM error?
Admin
Most compilers will issue a warning (or an error) if there's an unused variable, but function parameters are not the same as variables, and I've never encountered a compiler, at least in C/C++, that gives a warning on an unused function parameter.
In fact, most C ABIs will happily deal with a function that has fewer arguments, provided you cast it correctly.
Admin
I would find it quite funny if someone wrote a command "woman" that took man's output and made it easier to use, or at least cross-referenced, searchable, and more useful than the horror that is "info".
Admin
Admin
python -c 'import binascii; print(binascii.unhexlify("506C6561736520646F6E277420626C616D65206D652E20436F6465207772697474656E2062656C6F77206973206E6F74206D696E652E497420776173207772697474656E20616761696E7374206D652E"))'
Admin
No need of Unix tools or PHP programs, I prefer to have decoded secrets printed on paper.
Admin
Admin
@Adam K.: I don't know if you've changed some of the bytes before posting, but hope you've done so.
It's fairly common for programmers to write "intermediate result captured from production" down for debug and forgotten to remove them later. And if you're working in bank app it might contain condifential data of customers.
Admin
Admin
Admin
Admin
Admin
Admin
Sounds like a great idea! Of course, for fully accurate performance the "woman" command would sometimes present a large amount of output that wasn't really related to anything in the man page at all - or, it would decide to present various arguments why some part of the man page was inaccurate, incorrect, and unacceptable.
I'm sure you can think of other features.
Admin
Admin
Javascript:
unescape("%"+("506C6561736520646F6E277420626C616D65206D652E20436F64" +"65207772697474656E2062656C6F77206973206E6F74206D696E" +"652E497420776173207772697474656E20616761696E7374206D" +"652E").match(/[\s\S]{2}/g).join("%"));
Admin
Admin
Groovy:
groovy -e "println new String('506C6561736520646F6E277420626C616D65206D652E20436F6465207772697474656E2062656C6F77206973206E6F74206D696E652E497420776173207772697474656E20616761696E7374206D652E'.decodeHex())"
Admin
I believe there are industries like Avionics that require this for compliance reasons, actually. Something to do with explicit clarity when reading the code. Someone with experience in that industry may want to speak to it further.
Admin
I have to disagree slightly. Globals and Singletons aren't necessarily completely the same, depending on how the global is declared (and possibly the function).
Usually a singleton does exactly what you described: You request it, if it exists it's returned, if not it's created. Typically you can't reassign the singleton once it exists (there's nothing stopping you from creating a method that reinitializes it, but that's outside of the singleton pattern). A global, I can reassign.
I agree that banning globals outright is dumb, but it's certainly possible to have more protection over Singletons than globals.
Admin
More Javascript:
"506C6561736520646F6E277420626C616D65206D652E20436F6465207772697474656E2062656C6F77206973206E6F74206D696E652E497420776173207772697474656E20616761696E7374206D652E".replace(/[\s\S]{2}/g, function(h){return String.fromCharCode(parseInt(h, 16))});
Admin
Geez, a $75,000 mortgage? You can't buy a doghouse around here for that little money. You would have to go to some desolate area in some silly state (to mention one would be telling) to have even half a chance to buy a piece of property.
Then again, I hear that double-wide's are on sale these days. Good luck.
Admin
Exactly. Those who write PHP and C++ are real software developers. All other languages = IT professional.
Feel that burn! Oh yeah!
Admin
Sometimes we must admit defeat. Sometimes a variable really is global. Like when it's actually used by every function in the program in a well-defined way.
Admin
location=" 506C6561736520646F6E277420626C616D65206D652E20436F64".match(/../g).join("%")
Admin
Nonsense, that would require an infinite number of functions. Instead you should use recursion! And since it is tail-recursive, it will be optimized away anyway.
Admin
Admin
That seems like a lot of work, I just launched Visual Studio and wrote this in C#.
var msg = "506C6561736520646F6E277420626C616D65206D652E20436F6465207772697474656E2062656C6F77206973206E6F74206D696E652E497420776173207772697474656E20616761696E7374206D652E";
var output = "";
for (int i = 0; i < msg.Length; i += 2) { var part = msg.Substring(i, 2); var c = (char)int.Parse(part, System.Globalization.NumberStyles.HexNumber); output += c; }
Console.WriteLine(output);
// It says: "Please don't blame me. Code written below is not mine.It was written against me."
Admin
I see what you did there... but it doesn't really work... at least not in chrome... it just navigates me to: "http://thedailywtf.com/Comments/5%06%C6V%176R%06F%F6%E2wB%06%26%C6%16%D6R%06%D6R%E2%046%F6" -- which doesn't load.
Captcha: Delenit.
Admin
Admin
location=" 506C6561736520646F6E277420626C616D65206D652E20436F64".match(/../g).join("%")
If anybody would like to work on this bug, it has been open since 2001-12-19...
Admin
You're all mad. I just used TCL!
what a beautiful language.
Admin
Yawn
echo -e $(echo '506C6561736520646F6E277420626C616D65206D652E20436F6465207772697474656E2062656C6F77206973206E6F74206D696E652E497420776173207772697474656E20616761696E7374206D652E' | perl -pe 's/([0-9A-F][0-9A-F])/\x$1/g')