PDA

View Full Version : Funny things on linux



chris-harry
11-17-2005, 12:03 PM
one great thing about open source, is that everyone has to put in their own little funny thing , like in a serious program trying to tell the reader something serious, and have blab blab blab as the title...

here is one which i just came across on planeshift...


depends of how much cash you have spent on hardware. ;) Please wait..

what other stuff have you found or done in programs...

Cuddles
11-18-2005, 07:36 PM
Well,

Back in my days of VB programming, I used to make "front-end" and "back-end", as well as the "user interface" for database programs, and tons of utility programs ( to make up for the lack of them, within the OS ).

One of my biggest "pet peeves" was making sure that anything that wasnt expected, or "planned" to happen, was brought to the "users" attention, this, in itself, lends itself to a myriad of possibilities. Even some of my own scripts in Kanotix, do this... either in comments, or, in, out-right "echo's" to the screen...

I have a script I made to transfer files from one system to another, the script uses another script, that I made, to handle openning a secure shell (root) session to the other system, and also mounts the complete hard drive tree of the other system. In the mounting script, I do not assume the "remote" hard drive tree is mounted, and check, to see if it might be "pre-mounted" already... if it isnt, a comment states that it isnt, and we try mounting it... after the mount, we test again, to see if its mounted... if it is, we be OK... if it isnt, a nice, polite, echo is pasted to the screen stating: "we attempted to mount 'system x', it must have failed! Major BOO-BOO here! Cant handle it! You look at it! Im crashing now! BYE!"

In some of my database days, in VB, and in Windows - when we attempted to shift indexes, in a complete 10,000 entry database, and something was "wrong" or "unexpected", I usually popped up a nice error message, to inform, probably me, of what it was doing, where it was at, and, just how bad it was, or IS... Errors commonly used by me, were, of the nature:


Database index shift in progress.
*** At entry 554 of 20,503 = "text of the entry".

PROBLEM!
MAJOR!
DISSASTEROUS!!!
UNRECOVERABLE!!!!!!!

WARNING: Database is CORRUPT! Unable to recover from "error: xxxxxxxx"
Database is being left in UNUSABLE STATE! Manual recovery is needed!

*** SERIOUS ***
Database is the LIVE version! ( hope you had a backup!! )

ADDENDUM:
This is going to catch some major head-rolling!
( as a side note: is your resume current? )

This would have been one of my "early" database conversion programs, later versions, started to make backup copies first, have the ability to follow a log file of what "exactly" it was doing at the point of crashing, and, yes, have recover ability... Considering that "I" would probably be the only one seeing the above message, I could do away with any "pleasantries" of an error message, and state exactly, not mincing any words, what was wrong... As I started to program in a "work" environment, my messages had to become more obscure, and fall back to using log, or error, files for my output. What someone might see, on one of those programs, seeing the same from above, happens, but, at work, it might look like this:


Something "unexpected" happened!
CONGRATULATIONS! You did something that I hadn't planned for!

*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
PLEASE:
*** Contact "technical support" to claim your PRIZE!
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

With the above message, to the user, examinine the error log, or audit log, it might have spewed about 30 to 50 lines of messages on just "exactly" went wrong, and where. One program I wrote, a MAJOR crasher, had echo statements to the audit log on, what option was picked from the menu, what section the code was in, where it was called from, how many calls, and a complete tree of the subprocesses ( functions or subs ) that had been called, and in what order. Considering the program ran, for, I think it was five hours, dealt with billions of dollars of transactions, and disk space was a premium, we couldnt run from a backup copy, or even have the space for a backup file, it had to be run on a "live" database, it was catastrophic when it crashed. It took, even with all the audit trail log entries, at least three hours to recover from a "minor" boo-boo, a "serious" one, could take as much as ten hours, to even get the database back to its "original" pre-run state. The program, which was actually, about ten sub-programs in chain, was more than 100,000 lines of code, and that was without the autil log entries, echos, displays, this was just the "processing meat" of the program. Spent tons of time working on it, making changes to functions, subprocesses, routines, etc... in hopes to make it more "robust" to crashing, but, it was still a bugger when it ran ( lots of finger crossing from the support people, thats for sure )

About the funniest error message I ever saw, and one of our "programmers" like to use it, it was there own "calling card", and they usually used it, when, lets say, words can not express, how much "doo-doo" the error has caused, was, just a simple word:


***** OOPS! *****


They usually used a nice, RADIOACTIVE icon symbol for the error pop-up, too - was rather fitting :D

Ms. Cuddles

chris-harry
11-19-2005, 04:07 AM
haha... evil aint you...

well, next time you have the something unexpected happened...

have a picture like this

http://img156.imageshack.us/img156/286/evilsquirrels7xw.jpg :D

eco2geek
11-19-2005, 09:54 AM
http://img501.imageshack.us/img501/8799/warninglabel3zw.jpg

Linux kernel swear counts (http://www.vidarholen.net/contents/wordcount/)

jjmac
11-20-2005, 10:25 AM
chris-harry ...

:D

don't get me wrong m8, but ...

the day you actually start making sense :roll: , well ... who knows :) ... i'll have to double check my lotto i think (grin) ...

Ms cuddles ... an excellent interpretation (hehe)

yes ...

-=- (and lovinging it chief !)


jm

chris-harry
12-01-2005, 12:44 PM
the day you actually start making sense Rolling Eyes , well ... who knows Smile ... i'll have to double check my lotto i think (grin) ...

am i where??

Kowood
12-01-2005, 06:39 PM
When I write scripts to do stuff and give them to people, I like to have it echo things like "No useable files found. Jesus hates you." and I remember like a year ago, the apt-get --help said "this apt has super cow powers" at the end.

chris-harry
12-05-2005, 01:50 PM
i think i remember the cow powers one... its was on me laptop...

jjmac
12-09-2005, 12:32 AM
I nearly posted something ... arrrrrr, it must be contagious, or i'm just sobering up or something (there is a tea-totalling streak in the family too :roll: )

>>
am i where??
>>

Always sense (grin) ...

All the best for head-ache season too, u-all :)


jm



arrrrrrrr --- i did post something !

chris-harry
12-11-2005, 07:56 AM
i remember posting something here when i was drunk... thank god i didnt say anything bad...

Kowood
12-17-2005, 04:57 PM
Why are you at the computer when you're drunk? ^_^