- 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've seen this done to integrate CLi only applications with a front end, but never for logging. Of all the ways to do it, what the hell could the developer have been thinking?
Admin
Excpection occurred writing FRIST entry.
CAPTCHA: causa (and effecta?)
Admin
It's also not platform independent...
Admin
And what happens when the application tries to log "; rm -rf / # ?
Admin
Admin
Admin
http://xkcd.com/1172/
Akismet is great. Akismet is great. Akismet is great. Akismet is great. Akismet is great. Akismet is great.
Admin
Admin
I recommending using the chainsaw to remove the offending programmer's eleventh finger. You know, the large one attached to the top of his torso, between his shoulders. It's commonly called a "head" for some reason.
Admin
I have cause on occasion nowadays to read java (rarely needing to write it any more) and have at time bewailed the fact that log4j isn't routinely used. The answer I get is that the logging package and the techniques therein were written well before log4j was invented, and there is no need to break a perfectly well-written and documented existing package, despite its having been written in-house.
This may have been the reason behind the initial coding of this particular instance, but the follow-up thought (that this is perfectly well-written) is admittedly less accurate.
Admin
That's not a finger. That's a dick.
Admin
In other words, use the Chainsaw logging tool to truncate the programmer.
Admin
Admin
I had a similar thing once, where I could write the error to the log about the error writing to the log - there were unicode characters in the original error message that couldn't be translated to the ASCII-encoded output.
Admin
I would like to see you try logging with only a hammer and nail...
Admin
No, no - that's the zeroth finger.
Admin
The first thing I see in this code is the remote code execution bug. Performance problems are secundary to this
Admin
Admin
Admin
Admin
Well, it is a slow afternoon here...
Admin
Wowza. That's a lot of hassle to avoid using the built-in logger.
Admin
Yep, with the added bonus as being fireproof (actually a fire may in some instances improve durability, refer Knossos)
Yours Yazeran
Plan: To go to Mars one day with a hammer.
Admin
A Perl programmer wrote this. They cannot help themselves. They will do it every time.
Admin
Right, so the real WTF is incorrect comments getting featured. Although I must admit it is more fun that way. He should have executed "/bin/sh -c logger blahblahblah". That immediately saves you from having to type the exact path to logger, so it's better right?
Admin
Not sure how we're going to fit the President's sick daughter into this story, but at least we do have an 'auditor' of sorts, and perhaps there will be a grilling session later for Santosh.
Admin
Santosh, having been driven insane by the immense pressure, had recently taken the president's daughter hostage. Seeing his laptop nearby, still logged into the SVN server, she knew this was her only chance for rescue. She waited until he was distracted, and then began typing her message. Knowing Santosh would quickly discover this attempt, she had to encode it in a code segment that appeared to match his usual poor quality. So she typed away some seemingly useless code into the logger routine and committed the changes. Unfortunately, the first person to stumble across that particular code segment was Adam C., who failed to perceive its importance.
Since the message was deleted, she was never rescued and was killed by Santosh, who then committed suicide.
Good job Adam. Way to go. All your fault.
Admin
Admin
I'll never understand why most error logging that you see is exceptionally horrible.
Admin
Admin
What a forking joke
Admin
Runcible spoon or GTFO.
Admin
I was going to troll you about using log4j, considering it's pretty old and being replaced by Logback (and even SLF4J). But, if those are the type of people you deal with, you don't deserve that type of trolling :-(
Admin
Admin
Admin
Can a logger call itself to log exceptions?
Admin
You never look at error logging on systems that work, because, well...they work.
Admin
In the same vein, I’ve seen this way to determine if a process is still running :
Not only this code create three processes each time it runs, but the probability of false positives is relatively high… The kicker? Since the process in question was started by the Python’s subprocess module, the previous code can be rewritten to:
Admin
Admin
Maybe this is a naive question, but why did the try block fail, anyway?
Admin
Naw, Sys::Syslog is part of the perl core, and easy enough to use.
Bad code (or, rather, code that doesn't use built-in language features) is easy to write in any language, you know.
Admin
I mean, did you ever sit down in a project kickoff meeting and hear "first of all, we want any problems that come up to be recorded in a way that will support statistical analysis to help us find and learn from our mistakes"?
No. We don't make mistakes, so why would we want to know about them?
That's also how most security vulnerabilities arise.
Admin
Also don't forget all those programs that use exceptions to process ordinary, expected events. Logs of those events are even more exceptionally horrible. Success can be worse than failure.
Admin
Exactly. So when he junked this code, he broke the application. (http://xkcd.com/1172/) But he can fix it quick by adding a flag to say whether it works the old way or the new way.
Admin
Admin
It was funny to read when it came out. It's even funny when clicking on the Random button on the site and seeing it. It's NOT funny when someone links to it from a one-sentence post and thinks they're so fucking clever to have discovered xkcd.
You probably still use lmgtfy and think you're so damn clever.
It means in real life, you're an unoriginal hipster doofus.
Got anything to do with sanitizing inputs to a SQL database, etc.? Link to Bobby Tables. Got a nerd-project slow-ass turing machine? Like a minecraft logic circuit from redstone? Link to the one where it's some guy alone in the world making a computer out of rocks. Got a story about password security or encryption? Link to the one where they beat the password out of the guy with a wrench.
Fuck off. You're not clever.
Admin
What the actual fuck are you talking about? Do you understand the irony in calling someone an unoriginal hipster then proceeding to demonstrate your apparent knowledge of the same fads you (conveniently) now hate in your tirade of abuse? You are a fop.
Admin
Ah, there's the bottleneck:
He should have used StringBuilder instead. No need for a thread-safe object that is instantiated within a method. Geez, don't people read the JavaDocs?Admin
Admin