- 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
Well, when you acknowledge that most of the Israeli railway passengers probably are Israelis (and not Palestinians), they are committing suicide by that Website design.
The Judean People's Front of Judea becomes a whole new meaning.
Admin
Um, Hebrew is written from right to left. So it kinda makes sense to have everything right-aligned.
Admin
Obvious Troll is obvious.
Admin
Uh, viewstate is not responsible for the behavior of links and buttons. It does not cause postbacks.
Admin
Uh, viewstate is not responsible for the behavior of links and buttons. It does not cause postbacks.
Admin
Something that I think the original poster could have made clearer - given that people here are straying away from the true horror of that code and talking about other things - is how it's almost certainly being used.
I'd bet that throughout their XSLT, you see code like this:
which could simply be written like this:
Admin
Admin
Come on, people, no self-respecting XSLT madness article can be complete without a mention of starcraft2.com. Do proceed on your own risk though.
Admin
I am sorry to say i doubted it at first..but its true. The whole true/false array, the code to validate...the script upon script of horror...
I still maintain that the israli web sucks, but this part is really all Microsoft...the init.js file where the script was found can be seen elsewhere on the web. Most users remove it because it makes the sites load slowly.. I am somewhat dissapointed to reiterate the expected - The REAL WTF is SharePoint, and probably Microsoft...
And also: When good men do nothing, The RIAA Moths win!
Admin
You're blaming the wrong people.
That site runs on SharePoint. The JS in question comes straight from Microsoft.
Admin
Oh gawd why does this not surprise me?
click bang
Admin
Swing... and a miss.
Admin
Godwin!
Admin
The confusion about ViewState isn't really surprising. Many ASP.Net developers do not quite realize what ViewState is and confuse it with the automatic repopulation of form controls after a postback.
All ViewState does is serialize the state of ViewState enabled elements on the page (textbox value, selected dropdown index, etc.) to a hidden field. When the browser performs a post, ASP.Net will check the values from the ViewState against the values being posted for each of those elements and raise events appropriate to what has happened to the state of the elements since the last post, such as OnSelectedIndexChanged for a dropdown.
Admin
Don't forget to vote in the poll on the left hand side. But don't pick the first option, it's over-represented as is (82% of the vote, with four options.)
Admin
Which is nothing compared with their train service.
Admin
var CommentChars = { false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, true, false, false, false};
Admin
If it's true that this is Microsoft generated XSLT, then that's just sad!
Admin
Using Firefox: Actually, there is some white area at the right of the page on that site, which makes the left part of the page scroll out on the left side of the screen. If I scroll back left and then try to open one of the links at the top (the menu that opens up) I am unable to select anything from the "popup menu" because when I move the mouse out of the initial link (always visible, opens the rest of the menu using onMouseOver or whatever), it closes again. Brillant.
Admin
np: CLP - I'm So Trill ft. Tunde Olaniran (Supercontinental)
Admin
(Of course it really shouldn't be storing state for stuff that's in it's default state, but at least my viewstate is safe if I hibernate my machine now and wake it tomorrow...)
np: CLP - Party Hardy ft. Yo Majesty (Supercontinental)
Admin
Ignoring possible standards issues, and certain brain-damage issues, every single piece of this drivel, taken in isolation, makes sense even for those of us with a rudimentary understanding of XSLT. It's only when you step back and ask the, fairly fundamental, question, "Why?" that it truly becomes a WTF. And no, "SharePoint" is not an answer to "Why?"
Loved the almost invisible non-escaped special characters, even if they do look like a mistake in translation. Such a wise choice of implementation. I liked the "CoreCore..." stuff, too.
Quoth the Raven, "Nevermore!"
Or, in view of the XSLT, unquoth.
Admin
That poll is a WTF in itself. It asks how often you use the railway website.
Even with the statistical fail, I can't believe 82% visit the site "every day or more often"
Admin
According to the site, it was built by netwise. I guess it's these guys:
http://www.netwise.co.il/Templates/HomepageEng.aspx
Admin
It's probably one of these Microsoft tricks to make a site not work in anything but IE, while making it impossible to see what's going wrong, so the alternative browser vendors couldn't even make it work even if they wanted to imitate IE and greasemonkey doesn't stand a chance either.
In related news, viewstate is on the page and not on the server so it doesn't matter what server your next request goes to (when using a clustering setup or even multiple datacenters).
Admin
And that makes it a good idea?
Needs more salt.
Admin
When good men do nothing The RIAA Moths win!
Admin
captcha: commoveo - not elitist
Admin
Best explanation of ViewState that I've seen so far. After reading various explanations & examples, I had been none the wiser. After years of refusing to allow ASP.net to generate my html & handle posts, I took the plunge recently, and actually I have to say it makes keeping track of form data quite pleasant (if you still remain vigilent).
Admin
No. If your application requires statefulness over a stateless protocol, keep it where it belongs: in the application, not on the server. ASP.Net ViewState is moronic, and the reason that a guerilla team inside M$ has been fighting so hard to bring back the wave of the past: MVC.
Admin
AddCommentCoreCoreCore(str, bAsComment, bFunny, bWTF, bCheckValidChars){ Core(str, null, null, null, bAsComment, null, null, bFunny, null, bWTF, null, null, null, null, null, null, null, null, null, null, 1, null, true, null, ValidChars[60], null, null, null, null, null, NaN, bFileNotFound); }
FTFY
Admin
The WTF is that they are asking for information they should be able to get from the server log. Even if it's not accurate (It'll count you as different users if you open the site from different comps) it'll still be more accurate than the poll (and FAR more accurate than their schedule:))
Admin
QFT. (also, QF passionate argument typo. ;)
The entire purpose of ASP.Net/Webforms was to bring windows developers over to the scary innertubes. The promise was automagical downlevel experience, because windows developers (rightfully) feared the retarded test matrix caused by [n] browsers, running javascript or not, on a mobile device or not, with accessibility features turned on or not, in [x] language.
Not only was "The Promise" never delivered: M$ bastardized internet development with their idiotic overlays; and delayed Ajax/Web2.0 (which they arguably started in the first place with the xmlhttprequest COM object) for the last 9 years, because of their own hubris. Web2.0 has been around (and in hiding) for some 10 years.
Admin
Or double-posting. But it's still retarded.
Admin
Delightful! Please continue to defend a blatant misuse of a stateless protocol and what should be RESTful endpoints; and the increased server power required to handle processing data, actions and workflow, that could have been handled by the client (validation still required).
I also would like to see a "Worst ViewState Contest". I've personally stumbled across pages with thousands and thousands of lines of
often on pages with less than, for argument's sake, 50 input elements, max. Would you care to take a stab at how those are generally a good idea, but simply caused by developer confusion? Please include a paragraph about WHY THE CONFUSION EXISTS IN THE FIRST PLACE, MICROSOFT, GOGGLES, FILE_NOT_FOUND!:D
Admin
When you get tired of the magically generated NON-COMPLIANT html, unstylable tables, inline css, wasteful form posts and fields, and kludgy fixes to non-existent problems(UpdatePanels, Ajax.ASP.Net, etc), be sure to check back in with us. And please bring some of your code to post.
We'll all be happy to see you!
Admin
Israel on Rails!
Admin
var LegalUrlChars=new Array ( 1, 1, 1, 1, 1, 1, 1, 1 = FF 1, 1, 1, 1, 1, 1, 1, 1 = FF 1, 1, 1, 1, 1, 1, 1, 1 = FF 1, 1, 1, 1, 1, 1, 1, 1 = FF 0, 0, 1, 1, 0, 1, 1, 0 = 66 = "f" 0, 0, 1, 0, 0, 0, 0, 0 = 20 = " " 0, 0, 0, 0, 0, 0, 0, 0 = 00 0, 0, 1, 0, 1, 0, 1, 1 = 2B = "+" 0, 0, 0, 0, 0, 0, 0, 0 = 00 0, 0, 0, 0, 0, 0, 0, 0 = 00 0, 0, 0, 0, 0, 0, 0, 0 = 00 0, 0, 0, 0, 1, 0, 0, 0 = 08 = "◘" 0, 0, 0, 0, 0, 0, 0, 0 = 00 0, 0, 0, 0, 0, 0, 0, 0 = 00 0, 0, 0, 0, 0, 0, 0, 0 = 00 0, 0, 0, 1, 1, 1, 1, 1 = 1F = "▼" 1, 1, 1, 1, 1, 1, 1, 1 = FF 1, 1, 1, 1, 1, 1, 1, 1 = FF 1, 1, 1, 1, 1, 1, 1, 1 = FF 1, 1, 1, 1, 1, 1, 1, 1 = FF );
But I don' know what it means
Admin
Funny, I was expecting a comment like that, mainly because I would have written the same a few months ago. I use VS to help with the forms, check the generated source and remove any of the crud.
It's all XHTML1.1 compliant. It's one of my requirements (all pages have to have a W3 strict XHTML link) and one of the major reasons I had put it off.
It validates on w3.org, VS applies styling in stylesheets rather than inline (finally, though not intelligently). Pages have to render properly in IE6+, Chrome, Firefox, Safari & Opera.
Basically, as long as you have the mindset of writing html by hand rather than dragging and dropping, it works quite well.
Anyone who expects an IDE to generate perfect code is an idiot, but to ignore the help an IDE provides is idiotic too. A little common sense is all that is needed.
This is coming from someone who used to use Notepad2 and has a "Made with Notepad" mug on his desk.
Admin
var LegalUrlChars=new Array ( 1, 1, 1, 1, 1, 1, 1, 1 = FF 1, 1, 1, 1, 1, 1, 1, 1 = FF 1, 1, 1, 1, 1, 1, 1, 1 = FF 1, 1, 1, 1, 1, 1, 1, 1 = FF 0, 1, 0, 0, 1, 0, 0, 1 = 49 = "I" 0, 0, 0, 0, 0, 0, 1, 0 = 02 = "☻" 0, 1, 0, 1, 0, 1, 1, 1 = 57 = "W" 0, 1, 0, 1, 0, 1, 0, 0 = 54 = "T" 0, 1, 0, 0, 0, 1, 1, 0 = 46 = "F" 0, 0, 0, 0, 0, 0, 0, 0 = 00 0, 0, 1, 0, 1, 1, 1, 0 = 2E = "." 0, 0, 0, 0, 0, 0, 0, 0 = 00 0, 1, 1, 0, 0, 0, 1, 1 = 63 = "c" 0, 1, 1, 0, 1, 1, 1, 1 = 6F = "o" 0, 1, 1, 0, 1, 1, 0, 1 = 6D = "m" 0, 0, 0, 1, 1, 1, 1, 1 = 1F = "▼" 1, 1, 1, 1, 1, 1, 1, 1 = FF 1, 1, 1, 1, 1, 1, 1, 1 = FF 1, 1, 1, 1, 1, 1, 1, 1 = FF 1, 1, 1, 1, 1, 1, 1, 1 = FF );
Admin
BTW, I've been in .Net since beta, and have yet to use the toolbox for anything (beyond hello-worlds); I also preferred write.exe to notepad.exe, only because it had better control stops. ;)
Then, one bright, sunny day, i met Ultra-Edit. Oh, the loves!
Admin
Guess it wouldn't help suggesting they tried rails, since they must have already lots of it.
Admin
The thing is, having used XSLT a lot, this only seems a little excessive.
The hoops you have to jump through sometimes....
Admin
On the positive side of things, at least they're not called \escapeProperly, \esc@peProperly and \esc@pePr@erly the way it's usually done in LaTeX.
Hey, I never said it was a big positive side.
Admin
You didn't even look. It's all centered.
Admin
Fuuny, the article itself is a bit of a WTF because a couple of
should actually have been written as
If you go and poke fun at someone else's HTML skills, at least make sure you're not goofing up yourself.
Admin
Admin
Very definitely right aligned: [image]
Admin