- 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
There is actually an argument for the GUID from the production DB server: in SQL newid() returns a sequential ID, so it's much better for indexing than most GUIDs (which are much more random).
If the GUIDs are sequential new records appear at the end of the index, not somewhere in the middle, making inserts to clustered indexes not require as many page splits.
If the GUID could be generated by multiple client instances and needed to be indexed at serious scale then getting the GUID from the server makes sense.
Otherwise it probably is just stupid.
Admin
Worse - links which open in new windows, but use javascript in such a way that middle-clicking them opens a blank new window.
Admin
There's nothing wrong with that. Named parameters to some service are best done this way for reasons such as:
1)Ensuring no silly, hard to track down, case mistakes 2)Finding all references without using "find string" 3)Refactoring
Admin
Actually, I think the bigger WTF is returning immediately. It stops them from reporting more than one problem with the validation at a time. Nothing is more annoying that submitting a form, finding a validation error, fixing that problem, submitting again and then having it tell you there's another error (which existed on the first submission).
If they remove the returns and let it fall through to the bottom, it would report all the identified errors in one go.
Admin
Agreed. I hate that.
Admin
That would be a great point. If they were, you know, actually escaped.
Admin
Admin
Admin
Too funny. I always wondered how to convert an int to a double.
Admin
When you Throw Ex it resets the stack trace of the exception to the current position. To keep your valuable exception stack information just Throw.
Admin
Of course, it is better. If all GUIDs are generated on the DB server, they increase monotonically (depending on type of GUID but I presume this is why it was done) and it is faster to add rows with such GUIDs if any indexes are applied to these columns (like when primary key column is a GUID). TRWTF is the programmer who sent this.
Admin
link text
That's it! Simple, right? But that's all you have to do! In fact that's all you should do.
(Whine) But I want it to open in a new window...
Fuck you and the horse you rode in on, arrogant asshole! It is MY computer not yours!!! If I want a new window I can right click and open the link in a new window or a new tab. That's my choice not yours. Go to hell.
Admin
this.true
Admin
Yes, well done. Thank you for explaining the WTF that everybody else had already got.
Admin
For example, keyboards in Tajikistan don't have the "%" character, so they use ":" when writing percentages. (The ":" does not otherwise appear in Tajikistanish.) For Tajikistanian deployment I need change only one line:
Unfortunately, in Kyrgyzstan the "/" is called "SKLON", so for that country I still had to a global search and replace of all my back-end code: Etc.-Harrow.
Admin
The "open new window" WTF is not a WTF if the intention is to degrade gracefully. If the onclick event isn't caught, the link will still open.
Admin
Lot of code is writing because of comercial demand. If business want to have 83 params or 84 params in function, developer should do it.
After all, the person holding the cheque book is always right!If you had told Shah Jehan, Taj mahal can not be built, he would have cut off your head and fed it to the pigs. Great monument in art always built on sacrifice.
So don't worry if getting code to production ready state is going to upset a few people like your wife and children.
Admin
Admin
Why?
Silly absolutists comments like this are TRWTF.
First off, if there's not a "client" for what you're building, then it doesn't count. Who cares about anything with your toy code, testing, validation, standards, code smells, etc. all included.
Secondly, I can name some generic cases where you "need" to open a new window. The first being ajaxified oauth where opening the oauth flow in the same window is not possible (or undesirable).
Admin
Admin
Admin
I don't really see much wrong with #3.
Is it because Save() looks like a pointless wrapper around SaveMeeting()? I can imagine a few situations that may mean it isn't so pointless. I also do know (VB.Net?) well enough to see if this is actually a method, which would make it even less of a WTF.
Is it that they re-throw the exception? That's clearly so they can breakpoint on the exception. I do that all the time. It's not supposed to to get into production, but it ain't a WTF.
Admin
Admin
You're wrong, the feature was implemented for a reason. Sometimes (frequently) the user flow only makes sense to open as a popup or new tab. Just because you can't follow the simple flow of a website doesn't mean we should all become ludites.
Admin
Admin
From an (older) program of mine:
CONST EmptyString : STRING[1] = ''; CONST LetterH : STRING[1] = 'H'; CONST PlusStr : STRING[1] = '+'; CONST MinusStr : STRING[1] = '-'; CONST ClosePar : STRING[1] = ')'; CONST StartIdStr : STRING[3] = ' (#'; CONST YesStr : STRING[3] = 'Yes'; CONST NoStr : STRING[2] = 'No'; CONST CCExt : STRING[3] = '.cc'; CONST Percent : STRING[1] = '%'; CONST SpacerStr : STRING[3] = ' - '; CONST ColonSP : STRING[2] = ': ';
Why? The Turbo Pascal compiler generates code which is magnitudes more efficient for string constants taken from named values than for literals. At least in many cases. And those constants are used a few hundred times each.
Admin
When opening up a reference, you should be able to maintain the article you are reading while being able to flip to the reference material seamlessly. Before you say "Oh but I know how to open a new window if I want to". All of us know that for every person that knows how to use their browser that way and is willing to, there is at least 50 users that don't have a clue.
Admin
Cripes, there are some genuine idiots floating around these forums.
Admin
10 N1=1 : N2=N1+N1 : N3=N2+N1 : N4=N3+N1 : N5=N4+N1 : N100=100 : N256=256
etc...
Admin
It's not "your" computer. It belongs to the Government, like everything else in this country. They just let you use it in exchange for you parting with some money. They can get it back from you at any time, by arresting you for some crime you've probably done (and if not they'll make one up) and confiscating all your "assets" as proceeds of illegal activity. Then you'll be arseraped in jail for the rest of your life.
Have a nice day.
Admin
Admin
Admin
The "public static final String PERCENT = "%";" thing reminds me of what you have to do in VB6 code because of how stupid the string tables are.
If you say:
The compiler will create two separate string constants, both set to "%", because it is too stupid to check to see if they are identical strings. If you have a VB6 app with a lot of strings, this can bloat up the EXE file really fast. The workaround is to define a string constant like PERCENT = "%" and use that in string expressions.
Admin
[voice=buthead] heh, heh, heh. He said "Backside" [/voice]
Admin
That said, I tend to agree with Ralph and _. These cases when _blank is a good thing are few and far between, but this option is abused whenever some idiot decides they like it.
FTFY.Admin
I guess the standard answer would be to use the 'target' attribute. However if you're trying to write xhtml with strict compliance, you can't do that, because 'target' was not a permitted attribute.
Given that restriction, this javascript solution suddenly doesn't look so bad.
However that said, xhtml strict mode is a WTF in itself.
Admin
By the way, the word you are looking for is "Luddite" not "ludite". Looooser.
In case you haven't noticed, the idea that anyone anywhere should be able to take control of your browser has led to billions in financial fraud, not to mention the frustration of countless users who lost data because their systems were hosed and they were too clueless to make backups.
But you don't care about all that, just so long as you get to control the "flow".
By calling people who understand what you apparently don't "ludites" you suggest that any technology must be accepted, no matter how bad. When we finally get flying cars who cares if most of them randomly explode? To speak against them means you are just resisting progress.
I hope the Terminators come for you first.
Admin
Captcha: vindico. See? I'm right. The captcha gods said so.
Admin
Sounds like you have a PEBCAK problem :)
Admin
If you're trolling, you're really not doing a very good job of it. And if not... god help you.
Admin
There are many times when a stateful web app cannot be easily restored with a back click. Sure you might be able to put everything in a session var, and restore from that, but that could be hours to days of work to implement... or you could just have the click spawn a new window. Try explaining to grandma that she has to fill out the 30 field form page again because she should've ctrl-clicked that link, or how about "sorry you lost your flash game score little kid when you clicked to read the contests rules, shoulda right-clicked that link dontchya know". Your arrogance is pretty funny though, you must be a real treat to work with.
Admin
We'll still need to revalidate server-side, which ain't gonna be in HTML anyway.
Admin
Insisting on "strict" HTML compliance, only to pollute your source with needless Javascript hacks to regain functionality lost through that choice, means you really didn't want strict HTML.
Understand your options. Make the correct choice.
Admin
Adding onclicks in in-line code isn't the right way to degrade gracefully. See, e.g., Heilmann.
Admin
But it's not necessary to open a new window to accomplish that.
Admin
Admin
Code written for these users is usually a real WTF. See, e.g., the ribbon and Clippy.
Admin
Ralph's position isn't degrading gracefully.
Admin
Can give the user the choice without forcing it on him. IOW, a regular link with no target specified.
FTFY.