FAIL FAIL,FAIL FAIL,FAIL FAIL and More

Actually, the way to open a link in a new window makes sense. The reason is that "target" attibute isn't valid in some XHTML doctype (I believe it's Strict, which else right). So in order to keep validity it has to be done this way.

the beholder2012-05-14 09:08

How the hell someone creates a 83-parameter function and doesn't see anything wrong with that?

One can achieve only so much FAIL, FAIL, FAIL .

QJo2012-05-14 09:15

There's a cogent reason for defining SLASH = "/" and PERCENT as "%". They're control characters. When you want to build a string using them, in certain contexts, you don't want to muddy the waters by having to remember to escape them. Often more trouble-free to do it this way.

Se2012-05-14 09:15

Bednee:

Actually, the way to open a link in a new window makes sense. The reason is that "target" attibute isn't valid in some XHTML doctype (I believe it's Strict, which else right). So in order to keep validity it has to be done this way.

Agreed. That one isn't a WTF.

QJo2012-05-14 09:16

the beholder:

How the hell someone creates a 83-parameter function and doesn't see anything wrong with that?

One can achieve only so much FAIL, FAIL, FAIL .

How the hell someone counts the parameters to an 83-parameter function and doesn't see anything wrong with that? Get back to work immediately!

Actually, the way to open a link in a new window makes sense. The reason is that "target" attibute isn't valid in some XHTML doctype (I believe it's Strict, which else right). So in order to keep validity it has to be done this way.

Indeed. Remember, blame the developer before being open minded about why they would do something a certain way.

That ain't so bad. Probably just a text when a var. is empty.
although something like String blankText = "none"; or would have been better.

Otto2012-05-14 09:42

The "target" parameter is not valid in XHTML 1.0 Strict, so using it like that would not pass validation.

You have to consider your use-case with HTML, basically. Which makes HTML the real WTF here.

Foo Bar2012-05-14 09:44

If you read TDWTF via RSS, TRWTF was the bizarre indentation of the various paragraphs in this article.

$$ERR:get_name_fail2012-05-14 09:47

x:

There may be any number of reasons why here, the NONE string is not readonly; indeed, the comment about it having a default value implies that it is specifically not intended to be.

The WTF is not the string not being constant, it's the comment which - while being technically correct - includes no relevant information whatsoever.

Anyone who got beyond the value assignment part of the tutorial understands that the value of NONE is initialized to "none" in this line. Relevant information would be the meaning of the variable in the code below and why it is initialized to "none".

XXXXX2012-05-14 09:50

Can someone explain what's wrong with the JS validation?

Looks like they are doing some crappy validation on the client side before sending it to the server for true validation.

That ain't so bad. Probably just a text when a var. is empty.
although something like String blankText = "none"; or would have been better.

Ain't problem being veriable storage as Java is not creating new string instances when used insted of constants. Problem is coments redundancies (which some shops are actual requiring). I also try ain't to use redudancy coments instead trying to reword.

Nagesh2012-05-14 09:52

Also, value for NONE ain't being constant.

Nappy2012-05-14 09:58

The HTML 4.0 specification took away the target attribute, but it added another attribute: rel. This attribute is intended to specify the relationship between the document that contains the link, and the target of the link. The specification defines a bunch of standard values for this attribute (e.g. next, previous, chapter, section), most of which have to do with relationships between small sections of a larger document. However, the spec leaves the developer free to use nonstandard values for site-specific purposes.

http://www.sitepoint.com/standards-compliant-world/

$$ERR:get_name_fail2012-05-14 10:01

XXXXX:

Can someone explain what's wrong with the JS validation?

Looks like they are doing some crappy validation on the client side before sending it to the server for true validation.

The WTFs are:
1. using cryptic variable names t1 - t13
2. copying the values of more verbose variables to them although all that is done with them is read them once.
3. having a variable to store the return value of the function, and then always return immediately after setting it. Instead of "dataok = false; return(dataok);" you could just do "return false;"

Another thing you could nag about is the lack of localization, but this might not be required when the target demographic of the website are only english-speakers.

That Guy2012-05-14 10:04

XXXXX:

Can someone explain what's wrong with the JS validation?

Indeed. The variable names suck, and the inconsistent use of the the return-value flag is sloppy, but those don't make this a WTF.

There may be any number of reasons why here, the NONE string is not readonly; indeed, the comment about it having a default value implies that it is specifically not intended to be.

The WTF is not the string not being constant, it's the comment which - while being technically correct - includes no relevant information whatsoever.

Anyone who got beyond the value assignment part of the tutorial understands that the value of NONE is initialized to "none" in this line. Relevant information would be the meaning of the variable in the code below and why it is initialized to "none".

No relevant info whatsoever? Fast-forward two years when the code looks like this:

Perhaps there is no further explanation as to the purpose of this string elsewhere in comments or design docs. That would be bad. I see no problem, though, in a) indicating the intention of the variable where it is defined, and b) not documenting the entire system at this particular location.

oheso2012-05-14 10:12

Otto:

The "target" parameter is not valid in XHTML 1.0 Strict, so using it like that would not pass validation.

You have to consider your use-case with HTML, basically. Which makes HTML the real WTF here.

Links which open in new windows are TRWTF.

oheso2012-05-14 10:14

$$ERR:get_name_fail:

... which - while being technically correct - includes no relevant information whatsoever.

Sort of like software documentation in that respect, then.

oheso2012-05-14 10:17

$$ERR:get_name_fail:

3. having a variable to store the return value of the function, and then always return immediately after setting it. Instead of "dataok = false; return(dataok);" you could just do "return false;"

I wondered about that, too, but it's also possible from what we see that dataok is a global variable (well, in which case it's not necessary to return it, unless it's to cancel the event bubbling up).

But yeah, spot-on with the rest of the analysis (and in all likelihood, with this part, too).

dkf2012-05-14 10:18

I like how they need a byte to describe the sex of a client. That's very… modern of them…

OK, if you have to do it to satisfy the client, then you gotta do what you gotta do to get paid. But the requirement (opening in a new window, not XTHML compliance) is and will always be TRWTF.

TheCPUWizard2012-05-14 10:19

I guess GUID from our production db servers are better than local GUID

For Type 1 Guids, there are some valid reasons for wanting all of the Guids from the same source. For Type 3 Guids, the reasons are different, less important, but still exist [however, I would be accused of being pedantic if I pointed out why...<grin>]

oheso2012-05-14 10:22

byte ClientSex,

Kinky.

(And only with ClientPermission, please ... )

Ben Jammin2012-05-14 10:22

XXXXX:

Can someone explain what's wrong with the JS validation?

Looks like they are doing some crappy validation on the client side before sending it to the server for true validation.

It is totally cause he could've put t13 with the rest of the required fields. I mean... WTF...

CAPTCHA: oppeto - You say oppeto, I say oppato

dark Yuris2012-05-14 10:22

not bad indeed. it's just a workaround of not having language constructs like symbols in ruby.

BS, this won't even "build". (That's is .NET's equivalent to "compile")

The function doesn't return a value.

Medinoc2012-05-14 10:50

As a .Net developer, I ABHOR the "throw ex" construct: It strips the exception of its stack trace, making debugging harder.

SilentRunner2012-05-14 10:52

Bunch of crap.

Each code sample shown here with no explanation is like showing me a picture of an empty chair in front of a computer and then allowing me to guess what is wrong with the picture.

What a damned waste of time.

oheso2012-05-14 10:58

Throw ex

So much satisfaction in one line of code ... who hasn't wanted to do this at one time or another?

Strolskon2012-05-14 11:08

$$ERR:get_name_fail:

XXXXX:

Can someone explain what's wrong with the JS validation?

Looks like they are doing some crappy validation on the client side before sending it to the server for true validation.

The WTFs are:
1. using cryptic variable names t1 - t13
2. copying the values of more verbose variables to them although all that is done with them is read them once.
3. having a variable to store the return value of the function, and then always return immediately after setting it. Instead of "dataok = false; return(dataok);" you could just do "return false;"

Another thing you could nag about is the lack of localization, but this might not be required when the target demographic of the website are only english-speakers.

Three minor WTFs in one function! That's got to be some kind of record.

TRWTF is using a system that has makes you write the forms in one language AND validate them in another language AND validate them again in another language.

Maybe in a few years web developers will be able to use native HTML5 form validation?

3. having a variable to store the return value of the function, and then always return immediately after setting it. Instead of "dataok = false; return(dataok);" you could just do "return false;"

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.

Anon2012-05-14 11:50

xorsyst:

oheso:

Otto:

The "target" parameter is not valid in XHTML 1.0 Strict, so using it like that would not pass validation.

You have to consider your use-case with HTML, basically. Which makes HTML the real WTF here.

Links which open in new windows are TRWTF.

Worse - links which open in new windows, but use javascript in such a way that middle-clicking them opens a blank new window.

Agreed. I hate that.

Anon2012-05-14 11:51

QJo:

There's a cogent reason for defining SLASH = "/" and PERCENT as "%". They're control characters. When you want to build a string using them, in certain contexts, you don't want to muddy the waters by having to remember to escape them. Often more trouble-free to do it this way.

That would be a great point. If they were, you know, actually escaped.

Something along those lines; I was trying to post C preprocessor stuff, but I've also had to do it at runtime in Ruby and such. You can get by feeding the OS forward slashes, but for reading existing data and/or formatting for display purposes, you have to deal with platform differences manually, unless you have the luxury of running on top of some other OS-abstraction layer.

pjt332012-05-14 12:08

$$ERR:get_name_fail:

XXXXX:

Can someone explain what's wrong with the JS validation?

...

The WTFs are:
...
3. having a variable to store the return value of the function, and then always return immediately after setting it. Instead of "dataok = false; return(dataok);" you could just do "return false;"
...

Ah, but. dataok isn't declared with var, so its scope isn't local to the function. It could be used by some other code which we weren't shown. If you really want to be sure not to change the behaviour the cleanest way (with idiomatic JavaScript) is probably an anonymous inner function:

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.

Ralph2012-05-14 12:46

My Name:

I don't know more than HTML basics

Right, so you must be the guy who wrote 97% of the sites on the web, right? Or else the guy everyone else is copying? (Sigh!)

Uh, yeah. You know, there was a web before someone got the profoundly indefensible idea to let every random idiot worldwide take control of your browser.

<a href="/the/path/to/the/url">link text</a>

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.

jmacpherson2012-05-14 12:57

Anon:

$$ERR:get_name_fail:

3. having a variable to store the return value of the function, and then always return immediately after setting it. Instead of "dataok = false; return(dataok);" you could just do "return false;"

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.

this.true

Anon2012-05-14 13:02

poohshoes:

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.

Yes, well done. Thank you for explaining the WTF that everybody else had already got.

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:

Uh, yeah. You know, there was a web before someone got the profoundly indefensible idea to let every random idiot worldwide take control of your browser.

<a href="/the/path/to/the/url">link text</a>

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.

Thanks! I was about to post the same, but wasn't able to keep so calm.

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:

This ain't the right aproach for Java app. Resource bundling is propar way for localization.

Larrik Jaerico2012-05-14 13:53

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.

x2012-05-14 14:07

Ralph:

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.

Oh, the humanity!

You should quit trolling2012-05-14 14:13

Ralph:

My Name:

I don't know more than HTML basics

Right, so you must be the guy who wrote 97% of the sites on the web, right? Or else the guy everyone else is copying? (Sigh!)

Uh, yeah. You know, there was a web before someone got the profoundly indefensible idea to let every random idiot worldwide take control of your browser.

<a href="/the/path/to/the/url">link text</a>

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.

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.

_2012-05-14 14:32

You should quit trolling:

Ralph:

My Name:

I don't know more than HTML basics

Right, so you must be the guy who wrote 97% of the sites on the web, right? Or else the guy everyone else is copying? (Sigh!)

Uh, yeah. You know, there was a web before someone got the profoundly indefensible idea to let every random idiot worldwide take control of your browser.

<a href="/the/path/to/the/url">link text</a>

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.

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.

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.

You should quit trolling2012-05-14 14:46

_:

You should quit trolling:

Ralph:

My Name:

I don't know more than HTML basics

Right, so you must be the guy who wrote 97% of the sites on the web, right? Or else the guy everyone else is copying? (Sigh!)

Uh, yeah. You know, there was a web before someone got the profoundly indefensible idea to let every random idiot worldwide take control of your browser.

<a href="/the/path/to/the/url">link text</a>

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.

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.

Name one.

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.

Zylon2012-05-14 14:47

_:

You should quit trolling:

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.

Name one.

The oh-so-common "(What's this?)" links. When you're in the middle of filling out a form, the very last thing you want is to dump the current page. Popup windows are ideal for presenting, y'know, popup information.

Cripes, there are some genuine idiots floating around these forums.

Zylon2012-05-14 15:02

Stefan:

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.

Ha! I'd do the same thing with numbers in ye olde Atari BASIC. Numeric literals were all 6-byte floats, but a variable reference was only one byte (possibly two... it's been a while). When coding in a paltry 8K of RAM, the advantages of doing this were significant.

Uh, yeah. You know, there was a web before someone got the profoundly indefensible idea to let every random idiot worldwide take control of your browser.

<a href="/the/path/to/the/url">link text</a>

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.

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.

It's happened to me2012-05-14 15:30

I guess GUID from our production db servers are better than local GUID?

I faced this very issue on my team. Two other developers insisted that we use a common database and its GUID function to generate all UUIDs in our code. The reason... to prevent duplicates. *sigh* To encourage "team harmony", (i.e. two against one) I was told by the tech lead to do such. We thus introduced the performance hit of going to a database to get a UUID.

dkf2012-05-14 15:39

Matt Westwood:

It's not "your" computer. It belongs to the Government, like everything else in this country.

And there I was thinking it was big business that had bought the government. Or is there no real point in distinguishing between the two, and we're in fascist wonderland?

BoringJames2012-05-14 15:41

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.

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.

Spudley2012-05-14 15:46

<X-Backside-Transport>

[voice=buthead] heh, heh, heh. He said "Backside" [/voice]

the beholder2012-05-14 15:47

Zylon:

_:

You should quit trolling:

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.

Name one.

The oh-so-common "(What's this?)" links. When you're in the middle of filling out a form, the very last thing you want is to dump the current page. Popup windows are ideal for presenting, y'know, popup information.

There's another situation: when you're writing an email on Gmail and you remember you need info that's in a message somewhere in your Inbox/Sent box/whatever. Why lose your current email when you can click the nice little diagonal arrow to pop your mail out and enable you to use the other window to search for the info you want?

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.

Zylon:

Cripes, there are some genuine idiots floating around the whole internet.

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.

Ralph2012-05-14 15:59

You should quit trolling:

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.

So you think you are in control of the "user flow"? More arrogance.

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.

Ralph2012-05-14 16:05

Spudley:

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.

Hmmm. Why do you suppose they deprecated it? I guess they probably had no reason. Never mind that studying and defining standards is pretty much what they do. You know better. Right?

Spudley:

Given that restriction, this javascript solution suddenly doesn't look so bad.

No, this javascript "solution"^W hack is a back door the standard didn't successfully close, that you are exploiting to continue your misbehavior.

Captcha: vindico. See? I'm right. The captcha gods said so.

dogmatic2012-05-14 16:11

SilentRunner:

Bunch of crap.

Each code sample shown here with no explanation is like showing me a picture of an empty chair in front of a computer and then allowing me to guess what is wrong with the picture.

What a damned waste of time.

Sounds like you have a PEBCAK problem :)

Zylon2012-05-14 16:21

Ralph:

So you think you are in control of the "user flow"? More arrogance.

Controlling the "flow" of user interaction is in fact one of the major issues that competent UI design concerns itself with, you blithering tinfoil-encrusted halfwit. The abuse of popup windows does not invalidate their legitimate application.

Ralph:

Hmmm. Why do you suppose they deprecated it? I guess they probably had no reason. Never mind that studying and defining standards is pretty much what they do. You know better. Right?

Apparently so, because they reinstated the _target attribute in HTML5.

If you're trolling, you're really not doing a very good job of it. And if not... god help you.

dogmatic2012-05-14 16:28

Ralph:

My Name:

I don't know more than HTML basics

Right, so you must be the guy who wrote 97% of the sites on the web, right? Or else the guy everyone else is copying? (Sigh!)

Uh, yeah. You know, there was a web before someone got the profoundly indefensible idea to let every random idiot worldwide take control of your browser.

<a href="/the/path/to/the/url">link text</a>

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.

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.

oheso2012-05-14 16:46

Strolskon:

Maybe in a few years web developers will be able to use native HTML5 form validation?

We'll still need to revalidate server-side, which ain't gonna be in HTML anyway.

stew2012-05-14 16:48

Actually, the way to open a link in a new window makes sense.

No, it doesn't. The "target" attribute provides this functionality built-in. "target" is in HTML 5, and HTML 4 offers three standards-compliant doctypes of which two allow it.

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.

oheso2012-05-14 16:50

AN AWESOME CODER:

The "open new window" WTF is not a WTF if the intention is to degrade gracefully.

Adding onclicks in in-line code isn't the right way to degrade gracefully. See, e.g., Heilmann.

oheso2012-05-14 16:52

AN AWESOME CODER:

ajaxified oauth where opening the oauth flow in the same window is not possible (or undesirable).

But it's not necessary to open a new window to accomplish that.

Ralph2012-05-14 16:54

dogmatic:

stateful web app

WTF #1. The web is stateless. Most hacks to pretend otherwise have harmful side effects.

dogmatic:

cannot be easily restored with a back click

WTF #2. Breaking the back button. Do Not Want.

oheso2012-05-14 16:55

You should quit trolling:

there is at least 50 users that don't have a clue.

Code written for these users is usually a real WTF. See, e.g., the ribbon and Clippy.

Zylon2012-05-14 16:57

Ralph's position isn't degrading gracefully.

oheso2012-05-14 16:59

the beholder:

Why lose your current email when you can click the nice little diagonal arrow to pop your mail out and enable you to use the other window to search for the info you want?

Can give the user the choice without forcing it on him. IOW, a regular link with no target specified.

FTFY.

oheso2012-05-14 17:03

Zylon:

they reinstated the _target attribute in HTML5.

They (re)instated a whole bunch of crap in HTML5 and made code soup the norm.

I'm not saying there isn't a whole bunch of useful stuff in HTML5; there is. But to say something is right because it was included/allowed for in HTML5 is pretty much akin to justifying spelling and grammar via finding matching examples on the internet.

Ralph2012-05-14 17:04

dogmatic:

sorry you lost your flash game score little kid when you clicked to read the contests rules, shoulda right-clicked that link dontchya know

Oops, almost missed that one! So explain to me again how you got that game running on little Timmy's computer without sending him any executable code?

You see, this is the core problem.

The web is for distributing knowledge.

Ignorant cool-tards have turned it into a medium for distributing software.

This is a fundamentally flawed idea that can never be made secure. We knew in the 1960s not to mix data and code! But then we forgot, I guess.

But who cares about all the victims of this silliness? Timmy must have his dancing cartoons, mustn't he? And we can't think of any other way to get him some entertainment software. Pathetic.

oheso2012-05-14 17:07

dogmatic:

There are many times when a stateful web app cannot be easily restored with a back click.

It's doable and it should be done. Don't pop up a new window on me because you're a lazy programmer.

I have to work every day with other peeps' screwy web apps where the back button breaks stuff, and it gives me pleasure every day to think of awful things happening to those developers. Really awful things.

Zylon2012-05-14 17:08

oheso:

But to say something is right because it was included/allowed for in HTML5 is pretty much akin to justifying spelling and grammar via finding matching examples on the internet.

No, saying something is right because it's in a spec is exactly as valid as saying something is wrong because it's NOT in a spec, which is what Ralph tried to claim.

Do try to keep up, would you?

oheso2012-05-14 17:11

Zylon:

No, saying something is right because it's in a spec ...

Inclusion in the spec does not make it mandatory.

I am not Ralph. I understand his position. I don't keep to it myself exclusively, but I will say that by default sites I visit do not execute JS on my computer.

DataURI2012-05-14 17:35

Ralph:

dogmatic:

sorry you lost your flash game score little kid when you clicked to read the contests rules, shoulda right-clicked that link dontchya know

Oops, almost missed that one! So explain to me again how you got that game running on little Timmy's computer without sending him any executable code?

You see, this is the core problem.

The web is for distributing knowledge.

Ignorant cool-tards have turned it into a medium for distributing software.

This is a fundamentally flawed idea that can never be made secure. We knew in the 1960s not to mix data and code! But then we forgot, I guess.

But who cares about all the victims of this silliness? Timmy must have his dancing cartoons, mustn't he? And we can't think of any other way to get him some entertainment software. Pathetic.

Zylon2012-05-14 17:38

oheso:

Zylon:

No, saying something is right because it's in a spec ...

Inclusion in the spec does not make it mandatory.

Congratulations on insisting on following the conversation in your head, and not the one that's actually happening.

was that the obvious explanation is that the catch block is there to let you <I>place a breakpoint</i> to catch it in the act, rather than being 'real' code intended to do anything useful in and of itself.

This makes even more sense if SaveMeeeting is, say, a method in a DLL that you don't have access to the internals of.

J2012-05-14 18:33

dogmatic:

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.

This is a job for one of those little floating page elements, warning you you're about to lose all your form data. Or better yet, the information she's looking for itself should go in a little floating box, instead of opening a new window.

You can probably tell I don't know a whole lot about web development. I'm speaking from a user's perspective -- I prefer if the sites I visit never open new windows on their own.

Zylon2012-05-14 18:41

J:

This is a job for one of those little floating page elements, warning you you're about to lose all your form data. Or better yet, the information she's looking for itself should go in a little floating box, instead of opening a new window.

You know what those little floating boxes are called? "Windows".

Don't try to re-invent the tools that the OS has already given you.

anon2012-05-14 19:31

Congratulations, Ralph. You've just convinced anyone that previously thought there was no place for opening links in a new window to change their mind. Simply because they don't want to be on the same side as you.

Ignorant cool-tards have turned it into a medium for distributing software.

Yeah, I always wondered who allowed "ftp://" in URLs, and why. Next I wondered why someone allowed http to transport the same kinds of files.

J2012-05-14 19:38

Zylon:

J:

This is a job for one of those little floating page elements, warning you you're about to lose all your form data. Or better yet, the information she's looking for itself should go in a little floating box, instead of opening a new window.

You know what those little floating boxes are called? "Windows".

Don't try to re-invent the tools that the OS has already given you.

Yes, that's what I meant. Instead of a window, why don't you try a window?

Ralph2012-05-14 19:57

anon:

Congratulations, Ralph. You've just convinced anyone that previously thought there was no place for opening links in a new window to change their mind. Simply because they don't want to be on the same side as you.

I didn't realize this was a popularity contest. I'll get back in line immediately sir!

Johnny come lately2012-05-14 20:10

QJo:

There's a cogent reason for defining SLASH = "/" and PERCENT as "%". They're control characters. When you want to build a string using them, in certain contexts, you don't want to muddy the waters by having to remember to escape them. Often more trouble-free to do it this way.

That ain't so bad. Probably just a text when a var. is empty.
although something like String blankText = "none"; or would have been better.

and if we ever decide that "none" is a valid value we can simply change it to "zilch"

Dongle2012-05-14 20:19

oheso:

Otto:

The "target" parameter is not valid in XHTML 1.0 Strict, so using it like that would not pass validation.

You have to consider your use-case with HTML, basically. Which makes HTML the real WTF here.

Links which open in new windows are TRWTF.

Exactly. When surfing pr0n and you want videos in each window you can right click and explicitly choose what should be opened in a new window

Samran2012-05-14 20:31

Nagesh:

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.

Don't trust man with cheque book - he can't pay...
Better work for company with cash or card

Chief2012-05-14 20:43

Ralph:

dogmatic:

sorry you lost your flash game score little kid when you clicked to read the contests rules, shoulda right-clicked that link dontchya know

Oops, almost missed that one! So explain to me again how you got that game running on little Timmy's computer without sending him any executable code?

You see, this is the core problem.

The web is for distributing knowledge.

Ignorant cool-tards have turned it into a medium for distributing software.

This is a fundamentally flawed idea that can never be made secure. We knew in the 1960s not to mix data and code! But then we forgot, I guess.

But who cares about all the victims of this silliness? Timmy must have his dancing cartoons, mustn't he? And we can't think of any other way to get him some entertainment software. Pathetic.

Damn-straight Ralphy. They should pay for it like we used to!!

JB2012-05-14 20:48

anon:

Congratulations, Ralph. You've just convinced anyone that previously thought there was no place for opening links in a new window to change their mind. Simply because they don't want to be on the same side as you.

Not true - if anything he's strengthened my opinion...

Cheong2012-05-14 22:20

"I had to look over some C# code written by a colleague of mine," notes John D, "the following lines represent just the tip of the iceberg of the pain that I had to go through while understanding the code."

Uh, yeah. You know, there was a web before someone got the profoundly indefensible idea to let every random idiot worldwide take control of your browser.

<a href="/the/path/to/the/url">link text</a>

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.

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.

Name one.

Opening a help window on a form that is now halfway filled out comes to mind.

David2012-05-15 02:31

Ralph:

The web is for distributing knowledge.

Ignorant cool-tards have turned it into a medium for distributing software.

This is a fundamentally flawed idea that can never be made secure. We knew in the 1960s not to mix data and code! But then we forgot, I guess.

But who cares about all the victims of this silliness? Timmy must have his dancing cartoons, mustn't he? And we can't think of any other way to get him some entertainment software. Pathetic.

(The scene: somewhere, in the past.)

Luser: I shouldnt have to put in any effort whatsoever! The computer should just *work*!

Marketroid: Yeah! You engineers, make it just *work*!

Engineers: What? No. Just... no.

PHB: Do it or youre fired.

Engineers: Well, all right then. But this is a *really* *bad* *idea*.

(The scene: some time later.)

Luser: It broke and all my stuff is gone! Waa! Waa!

Engineer (to second engineer): Fancy a cup of tears? I saved some for you.

Second engineer: Mmm. Delicious!

will2012-05-15 02:34

Don't have a problem with the GUID code.<br>
Worked on one system where the application language, middleware language, and database all had GUID function and all three created them in different formats. Finally standardized on just one and because of the nature of the project GUID had to be created but not used in the database you had stuff like that to get a GUID.

dk2012-05-15 02:34

You're wrong. This will compile; and return 'False'.

In VB.Net, you can ommit the 'return' and the method will return the default value (which is 'False' for boolean).

About those constants, and how the submitter questioned they were real, I found this in our code the other day:

$us = "_"; // underscore

xorsyst2012-05-15 04:31

the beholder:

There's another situation: when you're writing an email on Gmail and you remember you need info that's in a message somewhere in your Inbox/Sent box/whatever. Why lose your current email when you can click the nice little diagonal arrow to pop your mail out and enable you to use the other window to search for the info you want?

I never noticed that arrow before. I've always just middle-clicked on "Inbox", to open my inbox in another window. No silly javascript required.

Artem Chachanidze2012-05-15 04:58

Recording ALL possible personal details abount clients is a common practice in Georgia (Country in Caucasus).
(I'm one of the maintainers of that 'serious' banking app)

zirias2012-05-15 05:07

Bednee:

Actually, the way to open a link in a new window makes sense. The reason is that "target" attibute isn't valid in some XHTML doctype (I believe it's Strict, which else right). So in order to keep validity it has to be done this way.

Indeed, definitely not a WTF. Even has a nice fallback for clients without javascript and avoids data duplication.

TheRider2012-05-15 05:21

Ralph:

(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.

This definitely depends on the audience. I know plenty of people in my vicinity who don't have a CS degree, who only use computers very irregularly and who can't distinguish between entering a URL in the address line of the browser and entering a search term in the Google window that happens to be their startup site. These people also have no clue that their mouse has more than just the left button. When I tell them to right-click to open the context menu, I am regularly met with blank stares -- or prolonged, astonished silence, when on the phone. To help these people out, I regularly make within-a-homepage-links open in the same window and outside-of-the-current-homepage-links open in a new tab. They love me for that. So it's not so much that *I* want it to open in a new window (I, personally, couldn't care less), it is more of an ease-of-use thing.

peter:

Opening a help window on a form that is now halfway filled out comes to mind.

You are, of course, right in so far as most of the time, in these circumstances, we would lose the form content if the help came up inside the same window. But that is only because most web programmers don't know their asses from their elbows. Technical correct solutions are possible, and help-in-a-new-window is just the easy way out. Don't get me wrong, I don't hate new windows when they make sense, and they *do* make sense if the web developer doesn't know any better.

MORAN2012-05-15 05:37

David:

Ralph:

The web is for distributing knowledge.

Ignorant cool-tards have turned it into a medium for distributing software.

This is a fundamentally flawed idea that can never be made secure. We knew in the 1960s not to mix data and code! But then we forgot, I guess.

But who cares about all the victims of this silliness? Timmy must have his dancing cartoons, mustn't he? And we can't think of any other way to get him some entertainment software. Pathetic.

(The scene: somewhere, in the past.)

Luser: I shouldnt have to put in any effort whatsoever! The computer should just *work*!

Marketroid: Yeah! You engineers, make it just *work*!

Engineers: What? No. Just... no.

PHB: Do it or youre fired.

Engineers: Well, all right then. But this is a *really* *bad* *idea*.

(The scene: some time later.)

Luser: It broke and all my stuff is gone! Waa! Waa!

Engineer (to second engineer): Fancy a cup of tears? I saved some for you.

Second engineer: Mmm. Delicious!

I don't get it. Are you agreeing with him or not?

Jake2012-05-15 05:42

Bednee:

Se:

Bednee:

Actually, the way to open a link in a new window makes sense. The reason is that "target" attibute isn't valid in some XHTML doctype (I believe it's Strict, which else right). So in order to keep validity it has to be done this way.

Agreed. That one isn't a WTF.

Disagreed. Although the author of that particular snippet of code may have had no choice, it's most definitely a WTF to be forced to use Javascript over plain standard HTML to open a link in a new window. Forcing your own WTF upon thousands of other developers? Not only is that a WTF, it takes WTF to a whole different level.

Will actually result in the stack being lost beyond the line Throw Ex.

If you wanted the stack to keep earlier entries in the stack, then you will have todo:
Try
SaveMeeting()
Catch ex As Exception
Throw New Exception(ex.ToString(), e)
End Try

Well in C# anyway

omghi2012-05-15 06:45

How odd that .NET behaves that way. In the sane world of Java, catching e and throwing e a bit later preserves the original stack trace, as you're throwing exactly the same exception object you caught. Of course, catching e, and throwing new Exception() would lose it...

Herr Otto Flick2012-05-15 06:52

oheso:

the beholder:

Why lose your current email when you can click the nice little diagonal arrow to pop your mail out and enable you to use the other window to search for the info you want?

Can give the user the choice without forcing it on him. IOW, a regular link with no target specified.

FTFY.

Because users are idiotic twats who need to be guided by the hand to do anything. This doesn't cover you? Tough shit matey, the world doesn't revolve around "making things perfect for oheso".

It's people like you that ensure that the target attribute of an href is not valid in so many 'standards'*, because it upsets their semantic sensibilities of what HTML 'should be'. TRWTF is arguing about how evil opening a new window is to the extent that people use some crufty JS to work around the 'standard'.

* The best thing about standards is that there are so many to choose from.

Medinoc2012-05-15 07:02

Glad:

If you wanted the stack to keep earlier entries in the stack, then you will have todo:
Try
SaveMeeting()
Catch ex As Exception
Throw New Exception(ex.ToString(), e)
End Try

Well in C# anyway

Or you could simply use Throw without argument.

Mathew2012-05-15 07:17

Nappy:

The HTML 4.0 specification took away the target attribute, but it added another attribute: rel. This attribute is intended to specify the relationship between the document that contains the link, and the target of the link. The specification defines a bunch of standard values for this attribute (e.g. next, previous, chapter, section), most of which have to do with relationships between small sections of a larger document. However, the spec leaves the developer free to use nonstandard values for site-specific purposes.

http://www.sitepoint.com/standards-compliant-world/

Please don't cite bs. the rel-attribute was there long before HTML4.

NMe2012-05-15 08:55

Ralph:

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.

You give the guy more credit than he deserves. I'd bet he used XHTML, validated the site and got the message saying that the target-attribute is not allowed, then figured this would be the way to solve that. Classroom example of someone who uses validation as a goal instead of a means to an end.

Jake:

Bednee:

Se:

Bednee:

Actually, the way to open a link in a new window makes sense. The reason is that "target" attibute isn't valid in some XHTML doctype (I believe it's Strict, which else right). So in order to keep validity it has to be done this way.

Agreed. That one isn't a WTF.

Disagreed. Although the author of that particular snippet of code may have had no choice, it's most definitely a WTF to be forced to use Javascript over plain standard HTML to open a link in a new window. Forcing your own WTF upon thousands of other developers? Not only is that a WTF, it takes WTF to a whole different level.

Validation is not a goal in itself. There is not a single browser out there that will break upon seeing a target="_blank". Worst case scenario, a browser will ignore it. It will never break the website. It will never cause the user problems.

Twisting and turning yourself into the strangest code constructions just to conform to a guideline is the kind of mindless idiocy that ruins so many websites out there. A site does not have to validate as long as you can explain why it doesn't and why you need the feature that breaks validation. Choosing to break your site's functionality just to have a validating site shows to me you clearly haven't gotten the point.

Martin2012-05-15 09:59

Actually there is a good reason why DB GUIDs are better. We've had a problem with Windows generating a repeating GUID about once every 20 000 times where SQL Server does not.

Mathew2012-05-15 10:04

anon:

Congratulations, Ralph. You've just convinced anyone that previously thought there was no place for opening links in a new window to change their mind. Simply because they don't want to be on the same side as you.

Generally, complete retards don't change their mind that fast

Zylon2012-05-15 10:51

Norman Diamond:

Ralph:

The web is for distributing knowledge.

Yeah, I always wondered who allowed "ftp://" in URLs, and why.

Technically speaking (which we bloody well should be), FTP isn't "the web".

xorsyst2012-05-15 11:41

Mathew:

Links to external websites should ALWAYS be opened in a new tab. If you don't agree you're a fucking retard that know nothing about ux.

Maybe they "should", for "normal" users, but I know that when I'm browsing, I don't want them to. If I want a new tab/window, I'll tell the browser I want one, thank you very much. I'd be perfectly happy if I could configure my browser to ignore target.

As I said in a previous post, the thing that really bugs me is when javascript it used for this in a way that means that me opening a link in a new window doesn't actually work, and I have to normal-click it instead. That's just brain dead implementation.

blowhole2012-05-15 11:53

Would have liked XXX-Backside-Service even more.

Mathew2012-05-15 12:05

xorsyst:

Mathew:

Links to external websites should ALWAYS be opened in a new tab. If you don't agree you're a fucking retard that know nothing about ux.

Maybe they "should", for "normal" users, but I know that when I'm browsing, I don't want them to. If I want a new tab/window, I'll tell the browser I want one, thank you very much. I'd be perfectly happy if I could configure my browser to ignore target.

As I said in a previous post, the thing that really bugs me is when javascript it used for this in a way that means that me opening a link in a new window doesn't actually work, and I have to normal-click it instead. That's just brain dead implementation.

Oviously you don't know always beforehand know whether it makes sense to open a page in a new tab. This is why the target-attribute is important.
And yes, browsers should provide an option to ignore it. Just like you can disable js, images, css.
Even better they should allow you to configure rules which pages to open in a new tab and which not - taking presedence over the authors target suggestion (just like user/author css).

The reason this doesn't exist yet, maybe is due that most people like having external links in new tabs.

was that the obvious explanation is that the catch block is there to let you <I>place a breakpoint</i> to catch it in the act, rather than being 'real' code intended to do anything useful in and of itself.

I'd love to believe that, but I doubt it somehow. Our current codebase is full of this thanks to former VB6 developers learning C# who've been lead to believe that including a try-catch counts as "error checking", even if they haven't actually done anything with it.

And, as others have pointed out, throw ex will mess up the stack trace info so even if you really needed to put a breakpoint there (instead of just breaking on exception) you ought to rethrow the original exception properly.

I have a whole slew of WTFs from the same developers that I really ought to submit at some point....

dogmatic2012-05-15 15:25

NMe:

Validation is not a goal in itself. There is not a single browser out there that will break upon seeing a target="_blank". Worst case scenario, a browser will ignore it. It will never break the website. It will never cause the user problems.

Validation could be a client requirement, it has been for me on a few projects. Perhaps HTML Strict is TRWTF, but it's also possible that the project was inherited with that doctype already set. Without context we can't really know if this is a WTF or not. I do know one thing, it's definitely no big deal, not like some monstrosities I've seen, like CC numbers that pass over http and are stored unencrypted in a db. Or perhaps the nice Flex "Framework" that I had to work with one time that had it's own broken way of parsing xml, even though e4x had been around for years already. When I suggested we just use e4x instead of debugging their crap, I was met with angry silence. That's months of hard work gone to waste dontchyaknow!

Meep2012-05-15 15:44

QJo:

the beholder:

How the hell someone creates a 83-parameter function and doesn't see anything wrong with that?

One can achieve only so much FAIL, FAIL, FAIL .

How the hell someone counts the parameters to an 83-parameter function and doesn't see anything wrong with that? Get back to work immediately!

You assume he's counting 83 lines by hand instead of copy and pipe the pasteboard into wc -l? You FAIL, FAIL, FAIL.

me solve2012-05-15 19:39

TheRider:

Ralph:

(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.

This definitely depends on the audience. I know plenty of people in my vicinity who don't have a CS degree, who only use computers very irregularly and who can't distinguish between entering a URL in the address line of the browser and entering a search term in the Google window that happens to be their startup site. These people also have no clue that their mouse has more than just the left button. When I tell them to right-click to open the context menu, I am regularly met with blank stares -- or prolonged, astonished silence, when on the phone. To help these people out, I regularly make within-a-homepage-links open in the same window and outside-of-the-current-homepage-links open in a new tab. They love me for that. So it's not so much that *I* want it to open in a new window (I, personally, couldn't care less), it is more of an ease-of-use thing.

Yes, that's right, users shouldn't have to right click. Instead, each time they select a link we should prompt them "Would you like to open a new tab for this window or replace the page you're viewing". Much more friendly for the morons.

MS made the mistake of trying to cater for idiot users, and only succeeded in creating more idiotic users.
Idiots will always find a way to make their own life inconvenient. Write GUI's for competent (not necessarily expert) users. Users will (out of necessity) either become competent or fall by the wayside.
Writing GUI's to support idiots only makes a cumbersome interface for everyone else, and (if anything) turns otherwise competent users into morons.

OK, if you have to do it to satisfy the client, then you gotta do what you gotta do to get paid. But the requirement (opening in a new window, not XTHML compliance) is and will always be TRWTF.

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).

Are you absolutely sure you can't use an iframe for that ?

L.2012-05-16 01:48

the beholder:

Zylon:

_:

You should quit trolling:

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.

Name one.

The oh-so-common "(What's this?)" links. When you're in the middle of filling out a form, the very last thing you want is to dump the current page. Popup windows are ideal for presenting, y'know, popup information.

There's another situation: when you're writing an email on Gmail and you remember you need info that's in a message somewhere in your Inbox/Sent box/whatever. Why lose your current email when you can click the nice little diagonal arrow to pop your mail out and enable you to use the other window to search for the info you want?

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.

Zylon:

Cripes, there are some genuine idiots floating around the whole internet.

FTFY.

few and far between. like every single download link. or every time you don't want to implement your own tabbing system - which is exactly what you described for gmail - and exactly what I do for webapps.

Holding a grudge against _blank just because your porn sites spammed you isn't very smart either.

L.2012-05-16 01:59

oheso:

dogmatic:

There are many times when a stateful web app cannot be easily restored with a back click.

It's doable and it should be done. Don't pop up a new window on me because you're a lazy programmer.

I have to work every day with other peeps' screwy web apps where the back button breaks stuff, and it gives me pleasure every day to think of awful things happening to those developers. Really awful things.

You may be living in the past.

My webapps are single page and your back button is both useless and not supported.

What I mean there, is that there are much better ways to navigate than simply back and forward (that scheme only handles one path by the way), like a recent list adapted to your application for example.

IMHO, any application DIRECTLY supporting the back button is a WTF in this day and age, there is only bad consequences to that kind of stuff.

And any application supporting it INDIRECTLY is so missing the point because for the same work, one could simply put a better navigation scheme in place than ol' stupid backforward reload everything except some is cached but some is not ...

L.2012-05-16 02:02

Zylon:

J:

This is a job for one of those little floating page elements, warning you you're about to lose all your form data. Or better yet, the information she's looking for itself should go in a little floating box, instead of opening a new window.

You know what those little floating boxes are called? "Windows".

Don't try to re-invent the tools that the OS has already given you.

Actually you have so much more control AND interaction possibilities with a popup div that using the OS windows would be the worst approach, hitting popup blockers as well.

L.2012-05-16 02:09

Martin:

Actually there is a good reason why DB GUIDs are better. We've had a problem with Windows generating a repeating GUID about once every 20 000 times where SQL Server does not.

lol.

And this is why you shouldn't trust anyone's GUID code to be correct.

By the way, do you know if the source for SQL Server GUID uses hashes ?

Cuz if it's the case, you've got hidden collision potential ;)

Oh and, even java's GUID function is broken, so I doubt you'll find a perfect implementation in microsoft land ;)

Neil2012-05-16 10:42

Foo Bar:

If you read TDWTF via RSS, TRWTF was the bizarre indentation of the various paragraphs in this article.

You don't need to read it via RSS to see that the third <BLOCKQUOTE> in the source should be </BLOCKQUOTE>.

Zylon2012-05-16 10:57

L.:

IMHO, any application DIRECTLY supporting the back button is a WTF in this day and age, there is only bad consequences to that kind of stuff.

Also, fuck you Akismet. Let's see how much blather I have to tack on here before your incompetent heuristics decide this isn't spam.

Interesting study, but that makes no goddamn difference.
I'm talking about web applications, not websites or blogs or whatever.
I'm talking about an application that has much easier ways to handle nav than back or forward.

The fact that people using the web as it is today, i.e. ever so retarded and still in dire need of back forward nav due to its mainly folder file tree design, require a back button has absolutely no relevance when you design an application.

Do you have a back button in Outlook ? calc ? notepad ?

No, there are only back buttons where it makes sense, explorer, winamp and vlc.

So quit using your failed rethoric on how websites should remain in the dark ages of folder-based html and join us in 2012, it's great here.

Zylon2012-05-16 14:27

"Folder-based HTML"?

Hooooo boy, this thread is really bringing out the moonbats.

Callin2012-05-16 15:07

I don't fail often.

But when I do, I FAIL FAIL FAIL FAIL FAIL FAIL FAIL FAIL!

Cricket2012-05-16 15:15

Zylon:

moonbats

Fucking racist.

Fred2012-05-16 18:24

L.:

oheso:

dogmatic:

There are many times when a stateful web app cannot be easily restored with a back click.

It's doable and it should be done. Don't pop up a new window on me because you're a lazy programmer.

I have to work every day with other peeps' screwy web apps where the back button breaks stuff, and it gives me pleasure every day to think of awful things happening to those developers. Really awful things.

You may be living in the past.

My webapps are single page and your back button is both useless and not supported.

What I mean there, is that there are much better ways to navigate than simply back and forward (that scheme only handles one path by the way), like a recent list adapted to your application for example.

IMHO, any application DIRECTLY supporting the back button is a WTF in this day and age, there is only bad consequences to that kind of stuff.

And any application supporting it INDIRECTLY is so missing the point because for the same work, one could simply put a better navigation scheme in place than ol' stupid backforward reload everything except some is cached but some is not ...

Maybe I just don't get what you're saying (or maybe you a troll), but I would think supporting the back button is important irrespective of the paths you intend to support in your page - if it exists in the browser, user will (try to) use it - if you circumvent their ability to use the back button as they believe it will work then you are merely pissing off potential clients. You don't have to believe the back button is necessarily a good idea, but you have to understand that users expect certain behaviours in browsers where it's present (which I think is all of them at the mo)

Fred2012-05-16 18:43

L.:

Zylon:

L.:

IMHO, any application DIRECTLY supporting the back button is a WTF in this day and age, there is only bad consequences to that kind of stuff.

Also, fuck you Akismet. Let's see how much blather I have to tack on here before your incompetent heuristics decide this isn't spam.

Interesting study, but that makes no goddamn difference.
I'm talking about web applications, not websites or blogs or whatever.
I'm talking about an application that has much easier ways to handle nav than back or forward.

The fact that people using the web as it is today, i.e. ever so retarded and still in dire need of back forward nav due to its mainly folder file tree design, require a back button has absolutely no relevance when you design an application.

Do you have a back button in Outlook ? calc ? notepad ?

No, there are only back buttons where it makes sense, explorer, winamp and vlc.

So quit using your failed rethoric on how websites should remain in the dark ages of folder-based html and join us in 2012, it's great here.

Now I'm even more confused.

"I'm not talking about Websites, I'm talking about web apps, which is why Websites shouldn't support a back button". So...Websites are old fashioned are they? I notice the likes of google, yahoo and facebook are still banking on them pretty heavily.

When they start trying to get out of them at a rate of knots, I might start to worry...

Ladel2012-05-16 18:47

Fred:

L.:

Zylon:

L.:

IMHO, any application DIRECTLY supporting the back button is a WTF in this day and age, there is only bad consequences to that kind of stuff.

Also, fuck you Akismet. Let's see how much blather I have to tack on here before your incompetent heuristics decide this isn't spam.

Interesting study, but that makes no goddamn difference.
I'm talking about web applications, not websites or blogs or whatever.
I'm talking about an application that has much easier ways to handle nav than back or forward.

The fact that people using the web as it is today, i.e. ever so retarded and still in dire need of back forward nav due to its mainly folder file tree design, require a back button has absolutely no relevance when you design an application.

Do you have a back button in Outlook ? calc ? notepad ?

No, there are only back buttons where it makes sense, explorer, winamp and vlc.

So quit using your failed rethoric on how websites should remain in the dark ages of folder-based html and join us in 2012, it's great here.

Now I'm even more confused.

"I'm not talking about Websites, I'm talking about web apps, which is why Websites shouldn't support a back button". So...Websites are old fashioned are they? I notice the likes of google, yahoo and facebook are still banking on them pretty heavily.

When they start trying to get out of them at a rate of knots, I might start to worry...

Trolled by a classic troll:

1) Say something that on the surface sounds cromulent, but with some thought implies crazy
2) wait
3) Get angry at any opposition and accuse them of being so last year

Captcha: appellatio - oh dear....I've never enjoyed fruit so much

Zylon2012-05-16 19:59

Ladel:

Trolled by a classic troll:

1) Say something that on the surface sounds cromulent, but with some thought implies crazy
2) wait
3) Get angry at any opposition and accuse them of being so last year

The problem is Poe's Law, as applied to UX wonks. We may never know whether he's trolling or not. It's impossible to determine from observable data.

Fortunately, calling him an idiot is applicable either way.

iMalc2012-05-17 04:55

So if you FAIL at FAILing, have you succeeded?

L.2012-05-17 05:11

Zylon:

"Folder-based HTML"?

Hooooo boy, this thread is really bringing out the moonbats.

Yes, it's also called an URL.

Who the fuck wants every screen to have its own URL ????

The only reason people are attached to that is because in the past it was the only way, using static webpages that were files located in folders, thus the "folder-based" term referring to the directory structure of the old web.

L.2012-05-17 05:14

Fred:

L.:

oheso:

dogmatic:

There are many times when a stateful web app cannot be easily restored with a back click.

It's doable and it should be done. Don't pop up a new window on me because you're a lazy programmer.

I have to work every day with other peeps' screwy web apps where the back button breaks stuff, and it gives me pleasure every day to think of awful things happening to those developers. Really awful things.

You may be living in the past.

My webapps are single page and your back button is both useless and not supported.

What I mean there, is that there are much better ways to navigate than simply back and forward (that scheme only handles one path by the way), like a recent list adapted to your application for example.

IMHO, any application DIRECTLY supporting the back button is a WTF in this day and age, there is only bad consequences to that kind of stuff.

And any application supporting it INDIRECTLY is so missing the point because for the same work, one could simply put a better navigation scheme in place than ol' stupid backforward reload everything except some is cached but some is not ...

Maybe I just don't get what you're saying (or maybe you a troll), but I would think supporting the back button is important irrespective of the paths you intend to support in your page - if it exists in the browser, user will (try to) use it - if you circumvent their ability to use the back button as they believe it will work then you are merely pissing off potential clients. You don't have to believe the back button is necessarily a good idea, but you have to understand that users expect certain behaviours in browsers where it's present (which I think is all of them at the mo)

No. You will press the back button if you want to go back, that's true for all users.

Now what does that mean when there's no "back" ? nothing. And it will not even cross your mind to press mouse4 because you don't want to go "back".

I am talking about APPLICATIONS, not friggin websites OR random users OR potential clients.

L.2012-05-17 05:15

Fred:

L.:

Zylon:

L.:

IMHO, any application DIRECTLY supporting the back button is a WTF in this day and age, there is only bad consequences to that kind of stuff.

Also, fuck you Akismet. Let's see how much blather I have to tack on here before your incompetent heuristics decide this isn't spam.

Interesting study, but that makes no goddamn difference.
I'm talking about web applications, not websites or blogs or whatever.
I'm talking about an application that has much easier ways to handle nav than back or forward.

The fact that people using the web as it is today, i.e. ever so retarded and still in dire need of back forward nav due to its mainly folder file tree design, require a back button has absolutely no relevance when you design an application.

Do you have a back button in Outlook ? calc ? notepad ?

No, there are only back buttons where it makes sense, explorer, winamp and vlc.

So quit using your failed rethoric on how websites should remain in the dark ages of folder-based html and join us in 2012, it's great here.

Now I'm even more confused.

"I'm not talking about Websites, I'm talking about web apps, which is why Websites shouldn't support a back button". So...Websites are old fashioned are they? I notice the likes of google, yahoo and facebook are still banking on them pretty heavily.

When they start trying to get out of them at a rate of knots, I might start to worry...

Nobody's talking about websites here.

Zylon2012-05-17 10:59

L.:

Nobody's talking about websites here.

Everyone except you is talking about websites here.

You're just off in the corner being the spittle-spewing crazy guy.

JJ2012-05-17 16:53

L.:

Do you have a back button in Outlook ?

Yes. It's not there by default, but you can add it to the tool bar. And it'll let you navigate back through the folders you've been clicking on.

JJ2012-05-17 17:11

Keith H:

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).

Anon:

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.

Addition: The shown code as a "WTF" looks like VBScript, which has no built-in GUID-class or GUID-methods, so the function shown as a "WTF" is a good idea.

That was my thought while reading the article, but a quick Google search before I posted showed a way to generate GUIDs in VBScript without the need for an external system like a database, so I declined to mention that part in my reply.

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).

Anon:

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.

was that the obvious explanation is that the catch block is there to let you <I>place a breakpoint</i> to catch it in the act, rather than being 'real' code intended to do anything useful in and of itself.

I'd love to believe that, but I doubt it somehow. Our current codebase is full of this thanks to former VB6 developers learning C# who've been lead to believe that including a try-catch counts as "error checking", even if they haven't actually done anything with it.

And, as others have pointed out, throw ex will mess up the stack trace info so even if you really needed to put a breakpoint there (instead of just breaking on exception) you ought to rethrow the original exception properly.

I have a whole slew of WTFs from the same developers that I really ought to submit at some point....

That is exactly how it got there.

First... this probably made the front page because I used the VS extension, and I will agree it's not a really horrible WTF.

However, it is a useless function that does nothing but push the stack. It causes a compiler warning (which the vendor says is "ok, it's just a warning, nothing important") because it can never return a value, but it does build. The SaveMeeting() function is the very next block in the code file, and it's not implementing an "ISaveAble" interface or something. All it does is push the stack, eat the exception, and return null. I don't buy the debugging argument, because you can just as easily put your breakpoint in the SaveMeeting function, or its exception handler (which does the same thing as this one... nothing).

burberry outlet2012-08-01 02:45

Well, the content of the bh, let me see the also want to see a few times more, content directly highlighted a theme, let the subject becomes more bright, and theme and then in line with the be fond of, it is too good, I'll focus on.