I'd like to echo Arnold Zwicky's praise for the third edition of Jesse Sheidlower's fan-fucking-tastic dictionary, The F Word. (See page 33 to read the entry for fan-fucking-tastic, dated to 1970 in Terry Southern's Blue Movie. And see page 143 for the more general use of -fucking- as an infix, in use at least since World War I.) Full disclosure: I made some contributions to this edition, suggesting possible new entries and digging up earlier citations ("antedatings") for various words and phrases. I took a particular interest in researching effing acronyms and initialisms. For instance, I was pleased to contribute the earliest known appearance of the now-ubiquitous MILF — and no, I'm not talking about the Moro Islamic Liberation Front. (For the record, a Buffalo-based rock band adopted the name MILF in early 1991, based on slang used by lifeguards at Fort Niagara State Park.) Another entry I helped out on is the endlessly flexible expression of bewilderment, WTF.
Anyone who has encounted WTF in the wild probably knows that its primary meaning is "what the fuck," but the W can also stand for various other question words. When I started trawling through early examples in the archive of Usenet newsgroups, I was surprised to discover that this inherent ambiguity has been present in WTF all along, since its first popularization in the mid- to late '80s. Here are the earliest examples I've found for the different possible expansions:
WTF = "what the fuck"
1985 "Ramblings 5/85" net.micro.mac (18 May) I asked myself, "W.T.F.?"
WTF = "why the fuck"
1985 "Proline C preliminary review" net.micro.cbm (26 May) WTF do I need a C primer if I am buying the compiler for the language?
WTF = "where the fuck"
1988 "sgipie.ps (file 2 of 5)" comp.windows.news (28 Aug.) wtf did all that junk on the stack come from?
WTF = "whatever the fuck"
1990 "Ageism, Lookism, straightism, Eeekism[tm]" soc.motss (15 Mar.) i don't believe the 'gay community' (wtf that is…) has formal input in this process.
WTF = "who the fuck"
1990 Jargon File, Version 2.1.5 (28 Nov.) WTF: The universal interrogative particle. WTF knows what it means?
The last example from the Jargon File is wonderfully self-referential, forcing the reader into the who interpretation and thereby illustrating how you can only know what the abbreviation means by judging the surrounding context. Absent from these early examples (at least the ones I could glean from Google's not-terribly-reliable Usenet archive) is WTF with an expansion of "when the fuck," but rest assured, that's attested in later sources:
2002 "More ELF buggery…" bugtraq mailing list (26 May) cathy, wtf are you coming over for beer?
2004 ""Fraser and Weiz won't be in Mummy 3" rec.sport.pro-wrestling (21 Feb.) So…wtf will the story be around?
2004 "Comment on *Fangfingers's profile" deviantART (15 May) DAMN, man! Wtf are you gonna FIX that thing!!
By the early '90s, the abbreviation had become so entrenched in online lingo that it also came to be used as a noun with various meanings:
1990 "One hell of a screwwed up article" rec. humor (30 Mar.) This may have been funny had it required a bit less translation from WTF to english.
1991 "Devil bunnies! I snort the nose,Lucifer!" alt.fan.monty-python (12 Oct.) All I get is a couple nominations for a Rory and a WTF!
And then it began to be used attributively:
1994 "sendmail: how is | (pipe) supported?" alt.fan.warlord (1 Feb.) I'm glad that barphic is clearly labelled, otherwise this would be a WTF? post.
The attributive usage took off especially in the expression "WTF moment." Here on Language Log, "WTF moment" begat "WTF grammar" in a March 2005 post by Mark Liberman, shortly followed by "WTF coordinations." (See here for links to other WTF posts on Language Log Classic, and here for more recent posts.)
Just to cover my bases, I'll note that WTF spelled backwards is FTW, a popular online abbreviation standing for "For the Win!" Fittingly, FTW! is quite the opposite reaction to WTF? And if you want to know the history of another expansion of FTW, namely "fuck the world," go get the new edition of The F-Word and turn to page 68.