Monday, December 31, 2007

Happy new year 2008

New Year's is a harmless annual institution, of no particular use to anybody save as a scapegoat for promiscuous drunks, and friendly calls, and humbug resolutions, and we wish you to enjoy it with a looseness suited to the greatness of the occasion.
-Mark Twain

Sunday, December 30, 2007

Tipping pizza delivery guy

It was always confusing how much to tip and whether to tip, when the store already adds delivery charge on online order. I called the pizza hut and they told it as store charge. Some other time I tried to order the pizza on phone order, they told it was 10, which was 6.99 with online coupon. This looks tricky and confusing to me.

Google shows tipthepizzaguy website.
"The common courtesy is 15% for normal service. On small orders, when 15% is less than $2, the proper amount is the $2 minimum standard. It should be a $2 minimum to have someone come to your house. 20% or more if the service is excellent. 10% or less for poor service. Nothing for very bad service. If the order is $50 or more, at least 10%. 1 or 2$ more for long distance and bad weather."

Wednesday, December 12, 2007

Shell script code

See Advanced bash scripting guide by Mendal Cooper. In reality, it is simple enough document so that beginners can start.

Things that I recollected today is special exit codes, 1 - catchall for general errors, 126 - command invoked can not execute, permission denied or command can not execute, 127 - command not found, 128 + n - signal number recieved, 255 - exit status out of range.

$ let var=1/0
bash: let: var=1/0: division by 0 (error token is "0")
$echo $?
1

$./directoryname
bash: ./directory: is a directory
$ echo $?
126

$ unknowncommand
bash: unknowncommand: command not found
$ echo $?
127

$ vim somefile
ctrl-z
[1]+ Stopped vim
echo $?
148

Tuesday, December 11, 2007

Cluleless marketing

Discount on ham purchase for Chanukh!
See "Let's all eat trafe for Chanukah" for full details.

It seems to me like giving discount on beer on Gandhi's birthday in India. India observes dry day on october 2nd in honor of him.

Saturday, December 8, 2007

Indiana Pi

Once upon a time, one man thought he found a way to squaring the circle(that also means representing the exact value of pi on paper) and had copyrighted it and proposed it as bill in a state assembly. It was almost passed by the assembly. See Indiana Pi history and Indiana state Bill 246 for details.

It starts with the claim that it as "A Bill for an act introducing a new mathematical truth ... to education to be used only by the State of Indiana free of cost ..." and supposed to be used on royalty by the rest of the world.

Monday, December 3, 2007

Do easy to use powerful callbacks exist?

They do.

Good reading about how powerful callbacks can be implemented . It is very good education.