- Feature Articles
- CodeSOD
-
Error'd
- Most Recent Articles
- Office Politics
- Secret Horror
- Not Impossible
- Monkeys
- Killing Time
- Hypersensitive
- Infallabella
- Doubled Daniel
- 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
OK here is my attempt to get a piece of the PI: [image]
Admin
Well - that was simple! Just put in an IMG tag in the HTML view:
<IMG src="/users/avatar.aspx?userid=1705">
Admin
Heh, you are all just copying his avatar.
[image]Admin
That may get the job done but as far as I'm concerned, an img tag is a workaround.
Admin
Admin
[image][image][image]
[image][image][image]
[image][image][image][image]
Seems to work for me
Admin
Admin
Well, for you, since you're a fellow WTF poster, I have a special for you! I will correct the attitude of that bill for only $9.95!
Admin
Here are some
pi pi
Admin
(pi) :-)
Admin
[image]
Admin
<FONT face=Tahoma>With $10 i could enjoy some [image] and </FONT> [image]
Admin
There's another elusive WTF here, I believe. It's not easy to find, though.
A pity problem that many programmers never realize until after they have implemented a system that receives heavy utilization---is that these precursor checks aren't really good at preventing a resource conflicts.
Assume that the file should only be used for exclusive writing (you don't want to write code to lock sections of a file). Process A checks to see if the file exists and can be opened and returns. Assuming the FSO destructor is called and the locks are freed, there is some time (very, very short) that process B could come in and perform the same action (locate and open the file).
Ok, so what if Process B has higher priority than process A and managed to do a subsequent action, like open the file for exclusive use, start writing data, then process A tries the same thing? Process A bombs.
99% of the time this problem with locking data has been eliminated with RDBMSes that have good contention-handling code, but with the need for developers to read and write out XML and other artifacts to the filesystem, I've seen developers become perplexed by this simple problem.
Admin
And thanks to the watchful wiki-editors, deleted already. )-;
Admin
Wait a minute. I am to understand that all this time [pi] is not intended to be an ascii emoticon of a square-headed big-nosed person looking askance?
Can I use it?
--RA
[pi] I think someone has tampered with my pizza [pi]
Admin
How about IBREW ?
Invented But Reinented Even Worse
Admin
LMFAO!
Best... reply... ever!
[pi]
Admin
Those of us that are used to foreign languages will find IHBLRIA easy to pronounce - ihb-l-ria with a partially silenced "l" sound. ihb is like ib except with an "ih" sound.
Admin
Yeah, an img tag is a workaroud but... [B][image][B] gives a few exciting opportunities.
Admin
in DAO you had to explicitly set things to Nothing in the right order otherwise things could stay alive due to circular references. This then seeped into VB programmers brains as "you must set everything to Nothing" as leaving things to go out of scope doesn't always work.
Admin
"On Error Resume Next" is the worse f**king statement in VB/VBScript. It essentially says "yeah, I know we're screwed but we're gonna get to the end regardless". Nothing like real error handling, is there?
Admin
[image][image]
Admin
Isn´t it true that the Resume statement will clear the error anyway?
But even if it doesn't, it reminds me of some discussions about 'exception-' handling in Java....
Admin
As "Anonymous Wikiwatcher" has already said, it has been deleted. Please don't add these sort of things to Wikipedia, not a brain-dump; Wikipedia is meant to be an encyclopedia, and its content needs to be verifiable. If it becomes a widely used term, then it would be suitable, but until then, it's just a tounge-in-cheek term that's been used a few times on this website.
Admin
It would more likely qualify as a tentative to start a meme than a simple statement/term.
Admin
A few weeks ago I was reading what was formerly known as Woody's Office Watch. In that issue, their local Access guru proposed an even worse implementation: Take a filename as a string, open it up with the Open function, then try to read from it. As if this sample here isn't wtfy enough, she had to actually open the file without using the FSO then try to read it. Her excuse when I emailed her about it: doing this requires a user to add a reference to the Scripting Host Library within their project, while anyone using VB can use the Open statement. ^o)
I used to do this myself...until I was reading up on the FSO and noticed that there was a FileExists() function. It'll compress to one line, so the only reason I place it in an extra function is because I don't want to have to type this all the time:
Application.CreateObject("Scripting.FileSystemObject").FileExists(strFileName)
Drop this in a function called "Function isFile(strFileName As String) As Boolean" and you're set to go.
Admin
[:pi]
Admin
NOOOOOOOO
Admin
Weird. When I did it in Firefox a thread or two ago, it just showed up as broken image blocks.
Let me give it another shot:
[image][image][image][image][image][image]
Admin
So thats how you make this forum work: bet it won't.
Actually it works for me, but I learned early on that you never go to the html editing page, never try those fancy icons, and I let it do whatever it wants with the formatting of my message. So long as I'm not posting code samples things normally look ok.
Well most of the time that works. I'm not betting any of my money on it working on any particular post. If I'm going to bet my money I'd like something deterministic in my favor, or at least deterministic even odds. (which is why you never see me in a casino) Though I guess I have money in the stock market, so I'm not sure if that is really the case...
Admin
<FONT face="Courier New" size=2>hey, he's got ears!</FONT>
Admin
Code Re-invented After Publishing?
[pi]
Admin
<FONT face="Courier New" size=2>are you from molvania?</FONT>
Admin
Let's try again...
Code Re-invented After Publishing
[image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image]
[image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image]
[image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image]
[image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image]
[image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image]
[image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image]
Admin
Hah now we're back to our 3 option bool post from Monday. True, False, and ... uh.. something else. KindaSortaMayabe was my personal favorite.
H
Admin
"I want to party with you cowboy"
Admin
Nope, Resume Next means it will continue to the next line regardless of errors and it will keep that error flagged until you check it or clear it yourself:
Err.Clear
It will also clear the error once you exit the function/sub (I think).
My attempt at a slice of the pie: [image]
Admin
I see a lot people saying, "It's not that bad, it still does what it's supposed to."
But it doesn't. First of all,
FileExists = File.FileExists(FullPath)
Is the right way to do it...this implementation is less capable, less efficient, and less useful than the original. And second, this code can throw back a false negative if the file is locked or unreadable due to a permissions issue, something I would hope FileExists would not do. With this, after it has decided erroneously that the file doesn't exist based on the fact that it can't open it, the code may then go on to try and create the file, which, if this is not possible, could cause a full on crash, or it could write over the existing file, destroying any data in it.
Bad code! Bad bad code!
Admin
How is that different from:
Admin
ugh.
well, you get the idea.
what is the canonical way to show code in this damn forum, anyhow?
Admin
Admin
Strictly speaking, acronyms are pronounceable - per definition. Otherwise they are initialisms. (At least according to some, according to http://en.wikipedia.org/wiki/Acronym)
Admin
What you both missed is that the OpenTextFile call (IIRC) will try to create the file if it does not exist. :)
Admin
I've got to see how tough this is: pi
(Practicing on a thread a couple days old to not annoy the old pros).
pi
Ooh, clicking on the html tab shows this is mucked up. href="" doesn't seem right...
Can't drag and drop into the html version (at least not using firefox).
And trying the :'( emoticon::'(
nerfer
Admin
[image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image][image]
I like that. It appears us Firefox users are banished to copy from other posters.
I see better html links when I look at the HTML tab on this message, but I keep losing things I've typed since flipping tabs. Also the captcha things is one page behind a couple times.
<img src="../emoticons/emotion-33.gif">
If it doesn't show up on the post you're writing, it won't show up in the resultant post either.
img src="../emoticons/emotion-33.gif"
nerfer
Admin
Well, why didn't that work? It shows up in this editing page!
[image]
<img src="../emoticons/emotion-33.gif">
[image]
nerfer
Admin
A more better acronym:
WAWWAROWAAWD
Why A Wheel When A Round Object With An Axle Will Do?