- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Admin
Admin
Admin
Random error messages are introduced for purpose of leting client beleive that something euniquely different occur in computer each time. This way client think, he has wonderfull system
Admin
You are in a maze of twisty passages all alike.
Admin
Admin
Starship Catan.
Admin
You have died of cholera.
Admin
Admin
Admin
These two classes look a bit too tightly coupled in concept for my liking. I think the core logic needs to be factored out into implementation(s) of a TimeDomainDrivenErrorMessageGenerationStrategy interface, then the Behaviour object can probably be pared down to a simple collection of key/value pairs.
Admin
In fact, this has already been covered by Damian Conway (notable perl hacker) with the module Quantum::Superpositions.
Admin
Also IIRC, many of the Sierra Games used to crash with: "You did something we didn't expect"
Admin
Admin
As long as you have more than 2 error messages when there's 10 cases, sure, it's all good.
Admin
FTFY
Admin
Was it Shadowgate? I remember my adventure ending in that a lot, mostly involving falling into pits and such :)
Admin
It certainly beats the "Oh bugger" that used to spontaneously appear at the bottom of the screen when running a program that appeared on my list of programs to maintain and upgrade a few years ago.
When I reprogrammed it to get the error to explain itself, disappointment was raised by all the people who would never again be graced with the delights of "Oh bugger" when they fatfingered the input. Silly buggers.
Admin
Still seems over-engineered.
Admin
Not at all -- but for the sake of sanity, at least calculate the millisecond only once. This guy probably thought he was setting up the equivalent of a switch() structure, but instead it's a sieve: the first error message has a 10% chance of triggering, the second has a 20% chance, and so on, all independent. It needs a variable, like the GWBasic version posted upthread. If you're gonna do the wrong thing, do it correctly!
Admin
Admin
Fool! This function is not multiverse-safe!
Admin
So, -7 % 2 != 1?
Admin
in Java, -7 % 2 = -1 I think....
Admin
Akismet blows dead goats fallopian tubes
Admin
Your solution is not as efficient as the original code, but nice try.
I would have enjoyed more messages, like 'I tried my best, but I failed, sorry', 'I've to confess that the task didn't go the way I planned', 'I messed this one up, I am so sorry!', 'Apologies, the task was aborted'
Admin
Shouldn't we suspect ambiguous requirements: it probably said "give a different message for each error condition."
Admittedly the solution doesn't quite do that.
Admin
i smell a off-by-1-error there - didn't check thou since i am lazy by nature (=> i code for livin')
Admin
Admin
Usual case when people keep shift from PHP to PERL to PYTHON to JAVA to C# to VB.NET, confusion occuring on massive scale in brain.
Without compiler it is difficult to sort out problem. Real programmer using Notepad and avoid this issue of mixed languages.
In real world, I use Hindi word while speaking in English. Happens every day. Now lets go jaldi-jaldi on next topic please.
Admin
Aren't random, useless error messages an industry standard ?
Admin
According to Google, it's from a website called TheDailyWTF.com. Check it!
Admin
Shadowgate?
Admin
Admin
No, that's Oregon Trail.
The correct answer is Shadowgate.
Props to anyone who got it :D
Admin
Nice that it keeps system testers busy.
Is this a repeatable error? Sometimes. OK, possibly a separate defect for each error message. I'll raise one for each.
Anyway, forget the apology. How about including a message that tries to shift the blame and accuses the user of system mis-use? Maybe with a reminder that all errors are logged and reported?
Admin
I like accusatory validation on user input i.e. "Email address is invalid" changes to "Do you not really know your email address? Have you not really learned to tpye? We're blocking your IP cause obviously you are one of 'those' clients who is gonna be clogging all our support lines."
(yes, in that instance tpye would be purposeful)
Admin
Just like Bachmann. Wonder what ol' Crazy Eyes is up to nowadays...
Admin
I'm pretty sure Alex needs to write a GenerateApologyMessage() method for the days he can't get this site up and running or I'll pound his face.
Admin
Is that a new .net language? "hisface#"
Admin
Admin
Admin
Admin
probably being trolled, but the frist thing to hurt my eyes was the declared type being anything more specific than java.util.List
Admin
I actually had an instance once to do something like this. There was an executive manager that would constantly try to delete something, get the popup asking if he is sure, always saying yes, then suddenly realizing what he did and come running in to us to fix it. Of course the system just marked it as deleted, without really delting it so recovering was easy.
On the next release he found something interesting. He tries to delete a record, it asks if he is sure, he clicks yes, then it asks if he is posistive, then absolutly sure, then unequivically certian, then politly denied him the right to delete said record. He had to have his secretary do it for him. We triggered this only on his user id so no one else saw it.
Took two weeks before the next release came out so he could get back to normal and he rarely ever had his "mistakes" again. He was actually a good guy to IT, he saw the humor in it and laughed about it later with us.
Admin
In this case, since you were already using soft deletions, an undo feature should have been fairly straightforward to implement.
Admin
Admin
I see you're familiar with PowerSchool.
Admin
They'd really need someone like that to prevent such awful code.
Admin
I know right, havign a female programmer walk in would stop all code from being written as the male programmers all stop and stare in disbelief. Then of course everyone gets back to work once they realize it's just Jim in drag.