Comment On Please Write This Down

If only C.E.'s Jury Summons letter had a VBScript error on it … [expand full text]
« PrevPage 1 | Page 2Next »

Re: Please Write This Down

2007-08-24 12:03 • by Cb (unregistered)
Makes you wonder how these companies that make programs such as the library example, are able to land the jobs.
I know lowest bidder etc, but don't people investigate companies before using them?

And why must everyone make their business apps so darned ugly......


First btw :)

Re: Please Write This Down

2007-08-24 12:13 • by Alin (unregistered)
as usual, VB rulez !!!!
Who needs error checking?

Re: Please Write This Down

2007-08-24 12:16 • by akatherder
151161 in reply to 151160
Alin:
as usual, VB rulez !!!!
Who needs error checking?


The example is dealing with dates and the Function that generated that error is FormatCurrency. It's not VB's fault.

Re: Please Write This Down

2007-08-24 12:19 • by Pkillur (unregistered)
151162 in reply to 151161
That is so awesome. Too bad that they don't print the little yellow exclamation point is.

Re: Please Write This Down

2007-08-24 12:31 • by Old Skool (unregistered)
151165 in reply to 151158
Am I the only one who wishes libraries still used tn3270's and plain-text catalogs? I hate web-based library catalogs.

For Surfing the Net

2007-08-24 12:44 • by George S (unregistered)
I'm the original submitter for the second item (I had submitted it back in May, I think, and had forgotten about it since then). I had to go to the library to use their Printer for a tech job 'application', as my Printer wouldn't work (because Windows wasn't installed on the C:\ drive. No, I'm not kidding you, and I have screenshots of the conversation with the tech support guy to back it up!)I received that window after I logged on.

All of that just to surf the internet. Cripes.

Re: Please Write This Down

2007-08-24 12:46 • by Chris (unregistered)
151168 in reply to 151161
Perhaps they should have checked for an error thrown from FormatCurrency?

Captcha: waffles! (mmmmm waffles)

Re: Please Write This Down

2007-08-24 12:47 • by Keithius (unregistered)
151170 in reply to 151161
There still should have been error handling - an error like this should not have been allowed to bubble up to the user, the program should have intercepted it. Unless they are using a "debug" version or something... which wouldn't surprise me.

And it kind of IS VB's fault... for not having better exception handling. (Thankfully, VB.NET rectifies this.)

Re: Please Write This Down

2007-08-24 12:52 • by Sgt. Preston (unregistered)
151173 in reply to 151165
Old Skool:
Am I the only one who wishes libraries still used tn3270's and plain-text catalogs? I hate web-based library catalogs.
It was much better when all you had to do was ask the librarian who knew where every scroll was stored.

Re: Please Write This Down

2007-08-24 12:59 • by ben (unregistered)
151175 in reply to 151173
Just don't call him a monkey.

Re: Please Write This Down

2007-08-24 13:07 • by Bart (unregistered)
I think the asterisks in the second image are supposed to hide sensitive information like your library card number and the last 4 digits of your phone number. Of course they could have just stated that and omitted the asterisks altogether. Still not quite an Error'd.

Re: Please Write This Down

2007-08-24 13:12 • by John Smallberries
151177 in reply to 151170
Keithius:
There still should have been error handling - an error like this should not have been allowed to bubble up to the user, the program should have intercepted it. Unless they are using a "debug" version or something... which wouldn't surprise me.

And it kind of IS VB's fault... for not having better exception handling. (Thankfully, VB.NET rectifies this.)

Here we go again, blaming the language. "On Error Goto" is pretty lame, but it's there and the programmer is responsible for using it. Also, a simple redirect for any untrapped 500s would help.

Re: Please Write This Down

2007-08-24 13:35 • by akatherder
151179 in reply to 151170
Keithius:
There still should have been error handling - an error like this should not have been allowed to bubble up to the user, the program should have intercepted it. Unless they are using a "debug" version or something... which wouldn't surprise me.

And it kind of IS VB's fault... for not having better exception handling. (Thankfully, VB.NET rectifies this.)


It's not VB's fault. It's the programmer's fault. This is a programming bug, plain and simple.

The program wants a DATE. The programmer accepts a date, then calls FormatCurrency on it. CURRENCY IS MONEY. We don't have any evidence that the programmer isn't validating the date before it's passed in.

Re: Please Write This Down

2007-08-24 13:38 • by KattMan
151180 in reply to 151177
John Smallberries:
Keithius:
There still should have been error handling - an error like this should not have been allowed to bubble up to the user, the program should have intercepted it. Unless they are using a "debug" version or something... which wouldn't surprise me.

And it kind of IS VB's fault... for not having better exception handling. (Thankfully, VB.NET rectifies this.)

Here we go again, blaming the language. "On Error Goto" is pretty lame, but it's there and the programmer is responsible for using it. Also, a simple redirect for any untrapped 500s would help.


And honestly, proper use of On Error Goto is exactly like Try, catch. For example, there is no difference between the following:

The VB6 way:
On Error Goto ErrorCatch
'Do stuff here
Goto Cleanup
ErrorCatch:
'Do your error trapping stuff
Cleanup:
'Do your cleanup

The VB.Net Way
Try
'Do stuff here
Catch ex
'Do your error trapping stuff
Finally
'Do your cleanup
End try

It is all about the programmer. VB6 could trap errors just as well as VB.Net. Please note, all I had to do was copy my example and change a few minor lines.

Re: Please Write This Down

2007-08-24 13:55 • by wikipantia (unregistered)
How about considering the crazy concept that the script may actually have been trying to format currency at that point, considering that it already printed the date?

Like, say, printing how much the juror was compensated in case the employer is one who would pay for a day of work minus the compensation amount.

Re: Please Write This Down

2007-08-24 13:57 • by wbrianwhite
That letter was not a jury summons. It was something saying the person had attended. Presumably needed to give to a place of employment so they would excuse the absence.

Now, why do you all think there was an error passing a date to the FormatCurrency function? The date is printed on the letter, hence no error occurred displaying the date. I'm guessing there's some kind of form that also lets you specify how much the juror got paid for jury duty so the employer can dock their pay (yes some people do this) and THAT is presumably were the error occurred, probably because it was left blank.

I don't know why you're all talking about VB6 either. The error clearly indicates the error came from /j_attlett.asp. Even if the error source weren't listed, VB6 is strongly typed to prevent you passing non-currency values to FormatCurrency in the first place, you would get an error trying to assign "" to a Date variable before you got to the format function call. ASP/VBScript is loosely typed so there is no error until you call FormatCurrency. So, absolutely none of the On Error Goto discussion is relevant as ASP/VBScript doesn't support that. The most likely design flaw here is simply a complete lack of validation on user input, which is incredibly common in web applications, government or non, ASP or ASP.Net or whatever.

Re: Please Write This Down

2007-08-24 14:13 • by Kemp (unregistered)
The most amusing thing for me is using the last four digits of your phone number as your pin, all someone has to do is look you up. At least with random pins, or ones you choose yourself, the guy impersonating you has to do a little guesswork (sometimes a very little, but nonetheless...).

Re: Please Write This Down

2007-08-24 14:29 • by AbbydonKrafts
151184 in reply to 151182
wbrianwhite:
ASP/VBScript is loosely typed so there is no error until you call FormatCurrency. So, absolutely none of the On Error Goto discussion is relevant as ASP/VBScript doesn't support that.


Never tried it, have you? ;-)

It is there. I use it for logging detailed errors and handling them gracefully.

Re: Please Write This Down

2007-08-24 14:37 • by dpk (unregistered)
What is with all of the serious analysis on every one of these images posted? It's not-entirely-tested code that produced an amusing result. It's funny. Laugh. heh.

Re: Please Write This Down

2007-08-24 14:38 • by erissian
151188 in reply to 151165
I like how my library has it set; they still have a few TIGER terminals that you can use scattered around, they have a web interface that feels just like the original, and they have a more modern web interface.

The best one is the dialup terminal that's still active, just in case you still have that Tandy lying around. It still has the vulnerability (or is it a feature?) that if you throw 13 carriage returns at it before the main menu, it drops you into lynx.

I wonder if the Konami code does anything :)

Re: Please Write This Down

2007-08-24 14:50 • by Pat (unregistered)
151191 in reply to 151175
ben:
Just don't call him a monkey.


winner!...even if nobody else got it :)

Re: Please Write This Down

2007-08-24 14:50 • by poochner
151192 in reply to 151165
Old Skool:
Am I the only one who wishes libraries still used tn3270's and plain-text catalogs? I hate web-based library catalogs.


I miss cards. Having said that, the web-based catalog we have locally (most of Georgia*) is pretty good. I'm not sure who makes it, but it seems to have a remarkably low suckage to utility ratio. I believe the software itself is called "Evergreen" and the public library network is called "PINES."

*The US state, not the country.

Re: Please Write This Down

2007-08-24 14:52 • by poochner
151193 in reply to 151175
ben:
Just don't call him a monkey.

Orangutans aren't monkeys. Of course he would be insulted!

Re: Please Write This Down

2007-08-24 14:54 • by KattMan
151194 in reply to 151184
AbbydonKrafts:
wbrianwhite:
ASP/VBScript is loosely typed so there is no error until you call FormatCurrency. So, absolutely none of the On Error Goto discussion is relevant as ASP/VBScript doesn't support that.


Never tried it, have you? ;-)

It is there. I use it for logging detailed errors and handling them gracefully.


No he hasn't. Makes me wonder, does he make a living out of programming Jury duty attendance letters?

Re: Please Write This Down

2007-08-24 14:56 • by KattMan
151195 in reply to 151191
Pat:
ben:
Just don't call him a monkey.


winner!...even if nobody else got it :)


The more inquisitive ones here might.

Re: Please Write This Down

2007-08-24 15:04 • by Rowboat Woodpecker (unregistered)
151197 in reply to 151176
Bart:
I think the asterisks in the second image are supposed to hide sensitive information like your library card number and the last 4 digits of your phone number. Of course they could have just stated that and omitted the asterisks altogether. Still not quite an Error'd.


DUH! I can imagine the QA person going to the developer and whining about "sensitive information" being displayed on screen. And the asterisks were the fix. How it got past QA is the realWTF(tm).

Re: Please Write This Down

2007-08-24 15:06 • by Rowboat Woodpecker (unregistered)
151198 in reply to 151195
KattMan:
Pat:
ben:
Just don't call him a monkey.


winner!...even if nobody else got it :)


The more inquisitive ones here might.


Don't get me CURIOUS.

Re: Please Write This Down

2007-08-24 15:32 • by captain library (unregistered)
Envisionware! lol. yeah that interface is horrid looking.

Re: Please Write This Down

2007-08-24 15:37 • by rumpelstiltskin (unregistered)
151202 in reply to 151192
poochner:
Old Skool:
Am I the only one who wishes libraries still used tn3270's and plain-text catalogs? I hate web-based library catalogs.


I miss cards. Having said that, the web-based catalog we have locally (most of Georgia*) is pretty good. I'm not sure who makes it, but it seems to have a remarkably low suckage to utility ratio. I believe the software itself is called "Evergreen" and the public library network is called "PINES."

*The US state, not the country.


How hard could it be to catalog all 7 books in Georgia?

Re: Please Write This Down

2007-08-24 15:41 • by khedron
151203 in reply to 151167
George S:
I had to go to the library to use their Printer for a tech job 'application', as my Printer wouldn't work (because Windows wasn't installed on the C:\ drive. No, I'm not kidding you, and I have screenshots of the conversation with the tech support guy to back it up!)


You have an HP printer? I ran into the same problem, and the tech guy recommended I reinstall Windows (and this time, do it right ;)). After a similar experience with Dell, I declined.

I think they use an externally produced program to compress their setup files. I got round it by running the executable in a sandbox. Close the Setup screen when it appears, copy the setup files out of the sandbox and run in real Windows land. I was quite pleased with myself after that!

Re: Please Write This Down

2007-08-24 16:15 • by Ken (unregistered)
151208 in reply to 151161
akatherder:
Alin:
as usual, VB rulez !!!!
Who needs error checking?

The example is dealing with dates and the Function that generated that error is FormatCurrency. It's not VB's fault.

I think Alin's point was that if you make a language that even idiots can use, they will.

Re: Please Write This Down

2007-08-24 16:19 • by Ken (unregistered)
151209 in reply to 151165
Old Skool:
Am I the only one who wishes libraries still used tn3270's and plain-text catalogs? I hate web-based library catalogs.

Hmm... http://www.westchesterlibraries.org/text.html

Unfortunately, they don't tell you what the login is for the telnet link.

Re: Please Write This Down

2007-08-24 16:32 • by MustBeUsersFault
151210 in reply to 151192
poochner:
I believe the software itself is called "Evergreen" and the public library network is called "PINES."


Do you know what PINES means in french.....

Re: Please Write This Down

2007-08-24 16:33 • by StuperGenius68 (unregistered)
So the real WTF is that the submission is a photo of the page on a wood table top.

Re: Please Write This Down

2007-08-24 16:34 • by PeriSoft
If I recall correctly, the Currency datatype is the only way to do a double long in VB6. I nearly busted a gut when I saw our guy type a strut encoder count accumulator as CURRENCY during a late night test session.

(Yes, we're controlling hardware with a VB app. No, it's not doing any low-level motor control. Yes, it's far more than quick enough to handle 100hz updates which aren't hard realtime. No, our code is only about 500 lines in total, so it's easy to maintain even though it's VB. And yes, the machines work, and the software is dead reliable. Go figure!)

Re: Please Write This Down

2007-08-24 16:56 • by John Smallberries
151214 in reply to 151182
You should really try thinking before typing.
wbrianwhite:
Even if the error source weren't listed, VB6 is strongly typed to prevent you passing non-currency values to FormatCurrency in the first place...
Ever heard of the Variant data type?
wbrianwhite:

ASP/VBScript is loosely typed so there is no error until you call FormatCurrency.
And C++ and C# have some magic way to detect and error (at runtime) before executing a function?
wbrianwhite:
So, absolutely none of the On Error Goto discussion is relevant as ASP/VBScript doesn't support that.
And the best for last! Of course VBScript supports it. Works well, if somewhat inelegantly.

btw, that "thinking before typing" idea does wonders for your code too.

Re: Please Write This Down

2007-08-24 17:55 • by PACE (unregistered)
151217 in reply to 151214
John Smallberries:
You should really try thinking before typing.
wbrianwhite:
Even if the error source weren't listed, VB6 is strongly typed to prevent you passing non-currency values to FormatCurrency in the first place...
Ever heard of the Variant data type?
wbrianwhite:

ASP/VBScript is loosely typed so there is no error until you call FormatCurrency.
And C++ and C# have some magic way to detect and error (at runtime) before executing a function?
wbrianwhite:
So, absolutely none of the On Error Goto discussion is relevant as ASP/VBScript doesn't support that.
And the best for last! Of course VBScript supports it. Works well, if somewhat inelegantly.

btw, that "thinking before typing" idea does wonders for your code too.


So you're comparing "On Error Resume Next" and "On Error Goto 0" in VBScript to the way it's supported in VB6??
Simply turning error reporting off is not what I'd call a mechanism like Try/Catch...

Re: Please Write This Down

2007-08-24 18:20 • by IvyMike (unregistered)
What a coincidence, '**********' is my password, too!

Re: Please Write This Down

2007-08-24 18:50 • by its me
151225 in reply to 151202
rumpelstiltskin:
poochner:
Old Skool:
Am I the only one who wishes libraries still used tn3270's and plain-text catalogs? I hate web-based library catalogs.


I miss cards. Having said that, the web-based catalog we have locally (most of Georgia*) is pretty good. I'm not sure who makes it, but it seems to have a remarkably low suckage to utility ratio. I believe the software itself is called "Evergreen" and the public library network is called "PINES."

*The US state, not the country.


How hard could it be to catalog all 7 books in Georgia?


Ha! I almost spewed water all over my monitor.... LOL

Personally I love my local library's online access. I can browse the card catalog, check out a book, renew a book, etc all from home. When I've checked out a book I simply go to the library the next day and it's waiting for me.... I've probably saved hundreds of dollars being able to renew online too....

-Me

Re: Please Write This Down

2007-08-24 19:43 • by Grimoire
151228 in reply to 151191
Pat:
ben:
Just don't call him a monkey.


winner!...even if nobody else got it :)

Oook!

Re: Please Write This Down

2007-08-24 21:02 • by LibTech (unregistered)
151230 in reply to 151158
Actually, we use this at the library I handle the PCs for. There are two check boxes in the configuration of PC Res for hiding this information. And, since you assumably know your library card number and pin number (which you can change if you don't want it to be the last four of your phone), then hiding it is a good option. Currently, we have a small problem with patrons NOT clicking the final OK when they make a reservation and their library card number is visible. To make matters worse, we don't currently require PINs. THAT is the WTF, if you ask me. Together, this adds up to folks snagging library card numbers that aren't theirs and using them to get more time on the PCs than they're allowed.

So, the program is essentially fine. It's the political decisions that make for the problems here. But I still had a good laugh seeing this here. :)

Re: Please Write This Down

2007-08-24 21:04 • by Pap
IvyMike:
What a coincidence, '**********' is my password, too!


http://bash.org/?244321

Re: Please Write This Down

2007-08-25 00:46 • by hexatron (unregistered)
The library in my college still used 'write the due date on the pocket card' for some items (in the 1960s). I still remember the book of Southey poems I once took out. It had been printed before 1830, and (on the pocket card) had been taken out once in the 1850's and once in the 1920's (as I recall).

The names of the borrowers were also recorded. And we worry about privacy now (though a miscreant could always go back in the stacks and erase or destroy his record).

Southey wrote long epics about Conan-like heros gorefully swording their way from poverty to kingdom.

Re: Please Write This Down

2007-08-25 07:12 • by Paddington Bear (unregistered)
Surely somebody picked this sheet of paper off of the printer and put it in an envelope and mailed it.

Isn't that where the error occurred? Don't you always check what you actually printed before you mail it, in case the date's wrong, or you've got some horrific typo in it, etc?

If they'd have spotted the error before blindly sticking it in an envelope, somebody could have alerted the developer had they'd have fixed it in a moment... wouldn't they?

(and where's the wooden desk?)

Re: Please Write This Down

2007-08-25 10:40 • by Control_Alt_Kaboom
151245 in reply to 151228
Grimoire:
Pat:
ben:
Just don't call him a monkey.


winner!...even if nobody else got it :)

Oook!


May you live in interesting times.

Re: Please Write This Down

2007-08-25 12:54 • by Sidnicious (unregistered)
151247 in reply to 151165
Old Skool:
Am I the only one who wishes libraries still used tn3270's and plain-text catalogs? I hate web-based library catalogs.


Raises hand. Dumb terminals were simple, fun, useful, and pretty much couldn't fuck up, unlike the cheap-ass dell b0xen that my library's using now.

I want a revival some day.

Re: Please Write This Down

2007-08-25 16:56 • by GodLike (unregistered)
I like that court letter, do I see that's laid an a wooden table desk ?


Re: Please Write This Down

2007-08-25 18:15 • by John Smallberries
151255 in reply to 151217
PACE:
John Smallberries:
You should really try thinking before typing.
wbrianwhite:
Even if the error source weren't listed, VB6 is strongly typed to prevent you passing non-currency values to FormatCurrency in the first place...
Ever heard of the Variant data type?
wbrianwhite:

ASP/VBScript is loosely typed so there is no error until you call FormatCurrency.
And C++ and C# have some magic way to detect and error (at runtime) before executing a function?
wbrianwhite:
So, absolutely none of the On Error Goto discussion is relevant as ASP/VBScript doesn't support that.
And the best for last! Of course VBScript supports it. Works well, if somewhat inelegantly.

btw, that "thinking before typing" idea does wonders for your code too.


So you're comparing "On Error Resume Next" and "On Error Goto 0" in VBScript to the way it's supported in VB6??
Simply turning error reporting off is not what I'd call a mechanism like Try/Catch...

No, of course not. Where TF did I mention VB6? The idiot I'm qoting mentioned it, but I'm trying to get this back in context of VBScript (the language used, btw).

Listen, we all agree VBS error handling sux. That said, you still need to use what it gives you. The canonical way is:


On Error Resume Next 'don't break on errors
TrySomethingRisky()
If Err.Number <> 0 Then
ReportError(Err)
Err.Clear
End If
On Error Goto 0 'break on errors


Notice, it's not simply "turning off error reporting". It's bypassing the the system's error reporting and checking with your own code. Clearly, this is clunky and suboptimal but you still have to use what the language provides. The error mode is procedure-local (not global), so intelligent use of Subs and Functions makes this easier.


Re: Please Write This Down

2007-08-25 23:46 • by operagost
151262 in reply to 151202
rumpelstiltskin:
poochner:
Old Skool:
Am I the only one who wishes libraries still used tn3270's and plain-text catalogs? I hate web-based library catalogs.


I miss cards. Having said that, the web-based catalog we have locally (most of Georgia*) is pretty good. I'm not sure who makes it, but it seems to have a remarkably low suckage to utility ratio. I believe the software itself is called "Evergreen" and the public library network is called "PINES."

*The US state, not the country.


How hard could it be to catalog all 7 books in Georgia?

I suppose all 7 books must be in the Center for Disease Control's library. They're pretty smart. Hint: they're not all inbred hicks down there.

Re: Please Write This Down

2007-08-26 00:16 • by Mr. Eleganza (unregistered)
151263 in reply to 151239
I agree. I'm also not convinced the error was supposed to capture the amount paid. There doesn't seem to be any context for that, unless it was going to be evident if the error hadn't occured, and most of the time, one is committed to jury duty for more than a single day.

« PrevPage 1 | Page 2Next »

Add Comment