- 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
This isn't the SomethingAwful forums...
Admin
Wow.. . So many comments, I didn't see the last line and realize that he was redirecting. It looked like he just logged the error.
Admin
Google.
Admin
Do you have stairs in your house?
Admin
the one on experts-exchange still references questions.aspx.cs. Is that a mixed VB-C# Application? Yuck.
Admin
But those secondary backups are always offline anyway.
Admin
Admin
Not at all. The scrotal tissue used by the fine folks at expertsex-change is guaranteed to meet the most stringent elasticity requirements.
Admin
Maybe that WAS his solution to the IE spacing problem.
Admin
Admin
At least there is a comment! I've seen stuff that only has:
// ...
And this was in a definitive book on the language at hand. Kinda like "and exercise left to the student".
Admin
That seemed unnecessary. Feel like a big man do you?
Admin
Man, that's funny.
Admin
It helps because this thread is fourth in the search results now. (Well, if you quote the phrase.) And that thread tells you to Google it!
Admin
When all is said and done... more is said than done.
Admin
Actually TRWTF is that he wrote a freaking short story in comments. Freakin english students coding! I always said that was a bad idea. Oh yeah, and the other WTF is that you managed to nitpick that out of this whole situation. It's like you walked up to a 50 car pileup on the freeway and said, "Well, it looks like this car has an old set of wiper blades." Really? Really. Really?
Admin
he's actually avoiding the "exceion"
Admin
No. Warranted.
Admin
On the other hand, if you let the browser remember the answers (using hidden fields, URL parameters, cookies...) they won't be lost unless the browser goes down, which, generally, isn't considered within the scope of the server programmer's responsibility.
And if it really matters there's no law saying you can't store the info redundantly at both ends.
So just shrugging your shoulders and saying "bah I lost the session, too bad" is a loser's excuse.
Admin
/*
Admin
When I Googled "it you fucking moron" I just ended up back here. Are you sure that's what you searched on?
Admin
Admin
Well a web session is the reality we live with and we design around the fact we have a fundamentally stateless application architecture to deal with.
Storing masses of information on each page is a solution, but if you're anything like me you would shudder when you first saw a massive 'viewstate' in ASP.NET web pages. ASP.NET MVC at least has moved away from that state of affairs. And yes, I'm well aware you can store state server-side on seperate servers, hell cluster them if needs be. But you'd still be able to write a comment along the lines of catch(AsteriodHitAllMyDataCentersSimultaneouslyException){...}. There's a point at which we should stop making things resilient as the investment in high-availability could out-weigh benefit. Sometimes even programmers have to consider whether the time and their employers money is worth spending on a feature.
And I consider the fact the browser crashing and requiring a bunch of HTML/URL/Cookies in order to maintain a session in the first place a system that is Defective By Design. That's the web, it's been defective from its inception to the present day.
Admin
There is no Try Catch, only Do Catch.
Admin
At least it's, well... commented.
FTFY
Admin
I've been in positions where I've done comments something like this. Never quite as elegantly, but it was always in response to someone who complained because my code "wasn't sufficiently well-commented".
Sometimes it took the form of pasting the entire design document into the program to satisfy someone's need for looking things up in the code base.
Admin
Admin
I just Googled "Fucking Moron" but only found a picture of an angry commenter.
Admin
QFT.
If it's not a mission-critical application, then spending time trying to preserve state over a server reset would be a RWTF. He's logged it, he's redirected to the home. I suppose he could try for an error message for the user, but there's not really a good stateless way to ensure that happens, now, is there?
Apart from a bit of rambling and self-justification, what, really, is the WTF here?
Admin
We need to catch exception of exception! Maybe even exception of exception of exception... God I hate exceptions...
Admin
The real WTF is that he used experts-exchange - is he doing college assignment?
captcha: genitus - pus ridden erection
Admin
Hmm... I wonder whether the programmer is named Wally... http://www.dilbert.com/strips/comic/2009-12-03/
Admin
Admin
TRWTF is certainly experts-exchange and the way they try to get you to sign up to see the answers that are right there at the bottom of the page anyway. And that it's been like that for years. At least they had the sense to change their domain to put that hyphen in there.
Admin
Admin
I like the fact that he can't even spell "exception" right!
Admin
Response.Redirect("profit.aspx");
// Typically I like to minimize the amount of // redirects in my code. However honestly, I'm // feeling that there are a couple of potential // problems that could arise in my implementation // of the code and I want there to be some // thought about what should happen here if the // application happened to shit 'corns. // To make a long story short, I'm going to take // the easy way out and just redirect myself to // the profit.aspx page if there is any trouble. // Yes, makes me feel a little dirty, but due to // budget constraints I must move on...
Admin
Tutorial programs not dealing with edge cases counts as a WTF now? I think that makes every tutorial program ever written a pile of WTFs.
Admin
Am I the only programmer who works at a company using a database backed session? Data shouldn't be stored in your web servers, and a web server crash should be as close to invisible as possible.
Admin
Im trying to think of a case where the server resets and loses your session and saving the session data elsewhere would enable the transaction to continue, and failing.
Surely if the server bombs out, then all bets are off?
Admin
Admin
Admin
Aaah, nothing worse than comments in code that don't mean anything, and/or try to make excuses for bad coding practices.
Admin
Almost-as-simple explanation: he is being paid per line of code written. Somehow, he was under the impression, that includes comments.
Admin
Is it just me or does that writing sound like it came out of one of the books in the library in Myst?
Admin
// I have discovered a bugfix, but this comment is too small to contain it.
Admin
Better a prolific exception handling like this than the "pragmatic" approach of a "pragmatic" colleague I had at Bank of America Merrill Lynch:
Wonderful!
Admin
There is no WTF here, and Tim should be condemned for rebuking a developer who left a decent comment. I do my best to write self-documenting code (I follow SOLID and a number of other design practices, I name my methods and variables meaningfully, etc, etc), consequently, I don't write many comments. When I do write comments, they tend to be verbose and they explain a design decision (like the one in question here). I go one step further though - I provide my name and phone number with the comment. It's been said that developers should leave their forwarding address, and I agree with this - if you're ashamed of your code or unwilling to justify/support it, get out of the business.