Wednesday, October 28, 2009

Easy Day

Okay, this is a repeat, but, previously I had thought that the navy seal's motto was

"The easiest day was yesterday."

This statement implies that the training gets easier. Because, on any given day d, day d-1 was easiest. But on day (d+1) the easiest day is d. This means day d is easier than day (d-1). aha, each day gets easier.

I was properly corrected today:

"The only easy day was yesterday."


Which is definitely different.

Day d: the only easy day is (d-1)
Day d+1: the only easy day is (d)

so...... on day (d+1) day (d-1) is not easy having experienced day (d)... Hmmm, so..., seems like the same statement as above.



But still, I recall admiring the training when I heard about the navy seal as a teenager... And certainly, I didn't realize the implicit series until recently, and this realization in no way decrease my admiration for the training.


And of course, I should mention that I also realize that "getting easier" may imply a growth of the trainee, that the trainer cannot keep providing harder and harder days. Which would make sense as well.

Tuesday, October 20, 2009

Castle haha

Castle: "Yeah, I almost ordered a Russian bride once..."
....


"A check-mate"


hahah!!!

(as in a Czechoslovakia, nationality near Russian, companion, but also a state of game play in chess, a game popular in Russia, and probably also popular in the Czech Republic)

To err or not to err

Same old question. Should we throw exception or return error code? In a long running process, what principles should we follow in the design to handle the rare, the expected, and the unexpected?

I've been struggling with this problem for about 5 years now. (shorter than the time I've been writing code)

There are many ways to analyze this, but certainly one way is to look at our goals and costs of achieving these goals.

Okay, so let's drop the act and face the facts: There will be errors and there will be cases that you haven't thought of and murphy's laws are enforced in most industry settings.


The goal is very very important. The goal here is to:

1.) run to achieve the goal of the software
2.) communicate from one piece of code to another piece of code an expected error. (program continues correctly)
3.) communicate from one piece of code to another piece of code an unexpected error. (fail, or continue gracefully)
4.) communicate to operator of program that the program is in need of immediate attention.
5.) communicate to operator of program the total amount of problem (fatal or not) the program encountered in it's entire lifetime.



The cost of these error handling modes are consumed are:
1.) immediate cycles in cpu to generate error message, log to disk, etc.
2.) network/storage costs to store this error.
3.) human attention: oncall receives a message marked "PRODUCTION ERROR!"
4.) machine/human resources required to analyze the log of error and notable conditions.


Considering these aspects may help me to design the error handling system.

Thursday, August 27, 2009

random quote

"This is the xenophobic perverted morons' club of the world."

Healthcare

A discussion on nationalized health care:

"""
me: Health is a fundamental human right, much like the right to life, liberty, and expression. The US government should protect this right as does to protect these other rights.

him: But competition is the most important mechanism to guarantee efficiency, improve equality, and reduce all negative effects of greed. The only way we can make health care work is if the agents providing health care are put in competition with each other.

me: Well, as you know, the US government provides many basic service to it's citizens (actually to its residents): It spends money to pro-actively protect life through police force and fire companies (that makes effort to protects all residents from death).... It set up roads so people can travel, and do all those other things that people do on roads. This is done because it is recognized (and democratically agreed) that these are very very basic actions made to protect it's citizens and residents. I feel that health, basic health, life protection health care is a basic service. It should be provided for free, like police and fire company, and roads, ....

him: Well, no. The reason why that won't work, is the same reason why so many roads are broken with potholes and police fail to protect it's people, and police brutality and all kinds of injustices. It won't work because there is no competition. The natural selection mechanism is the only thing that will ensure that the best affordable service is provided.

me: Yeah! but precisely because we want to provide very basic service, which does not have a payoff directly to support these services, that it cannot be privatized. There is no way that they can provide that service AND still make money. e.g. paid police? nobody can afford that, and government provides it "at loss" The consequence of privatization is that substandard service will be provided and nobody will be healthy.

him: ...many examples about why competition will bring the bestest and britest out of people...

me: ...same example but change such that the competition forces people to do inhumane things because it optimizes criterion of competition...

him: well! fine! here's why it won't work! The reason why nationalized health care won't work is the same as if you asked the government to provide food for all of its people. They will fail.

me: .......................................................(long silence)...............[[ Mmmm, .......... Hmmmm... I change my mind. I do think governments will fail to provide basic food supply to its people.......... (they certainly have, repeatedly)... such a simple thing... and they fail at it... and health care, even basic health care is a more complicated thing. Hmmm........]] You are right.

him: [[happy with winning argument.]]

me: [[unhappy]] [[murmer in my breath, as Galileo, Health is as basic a right to human just as the earth moves around the sun]]
"""

Monday, May 04, 2009

your silence and my silence

"In the End, we will remember not the words of our enemies, but the silence of our friends"

-MLKJ.


I will admit, that I am silent more than I should be and often at important junctures. I hope to overcome this shortcoming though...










But, I also hope I will remember your silence and the silence of those around me.

Sunday, May 03, 2009

gota talk about that pig cold

Okay, so call me stupid, but why do they call the bird cold "avian flu" but the pig cold "swine flu" Does the parts of speech not match?

The adjective for of or pertaining to pig is "porcine" so..., correspondingly, "porcine flu".

Of course,... they never spoke of "bovine mania",... probably because it sounds like crazy _for_ cows, instead of "mad cows"

YMMV I suppose.

Thursday, March 05, 2009

Shakespear's Tombstone

Brilliant even in death:

Good friend for Jesus' sake forbear
To dig the dust enclosed here!
Blest be the man that spares these stones,
And curst be he that moves my bones.

And if it must be...

Good friends for goodness sake forbear
To peek the register enclosed here!
Bless be men who spares the load,
And curse be he who mod's my code.



Saturday, February 21, 2009

肉麻博客strikes again

"""

Commit!?? That's what you do when you go to the insane asylum

"""

heheee, good one.

Monday, February 16, 2009

The duality of love (来自肉麻恋爱博客)

"""

One time, a very dear friend told me that she permits her husband, departing for the wild wild far east, to engage in safe sex with other women--with the restriction that he must change partner each night, so that he does not fall in love with them... (so that he does not develop feelings...)

Recently, I've come to a similar decision... Except I told my s.o., who is also afar, that development of loving feelings is not only allowed but highly encouraged with and for other people, except that I have a limit too: that no physical relationship takes place, no exchange of fluids, and minimized touching of skin.

"""

sigh... what a sad turn of events for the owner of 肉麻博客。Looks like the puppy love will soon turn into a massacre! A blood bath!! What a travesty of all that is holy beween people!! What torture these two people put themselves and their Loving Other Halves through!!

uhh!! I cannot bear to read this blog any more !!!!!!!!!!!

Friday, February 13, 2009

a few more couplets

书山有路勤为径
学海无涯苦作舟

好读书不好读书
好读书不好读书

闲人免进贤人进
盗者莫来道者来

鸡饥争豆斗
鼠暑上梁凉

多来米发索拉西
一二三四五六七

Saturday, February 07, 2009

好帅/美

祝英明神武盖世无双,人见人爱花见花开,打遍天下无敌手,情场杀手鬼见愁,晕倒一堆迷死一片的老Q打球得胜

我是英俊潇洒、玉树临风、天下无敌、人见人爱、花见花开、气死潘安、羞死宋玉、号称一朵梨花压海棠、宇宙第一高手,人送绰号玉面小飞龙、山崩地裂水倒流鬼见愁、美貌与智慧结合、英雄与侠义化身



天下无敌宇宙无双人见人爱花见花开男女老幼一律统杀金刚不坏旋风霹雳任意风格


神武英明盖世无双,人见人爱花见花开,打遍天下无敌手,情场杀手鬼见愁玉面飞龙,人称美貌无双心地善良,晕倒一片


宇宙超级无敌霹雳人见人爱花见花开车见车载十全九美青春美少女


玉树临风.风流潇洒

妩媚伶俐、天下无双、人见人爱、花见花开、车见车爆胎、打遍天下无敌手、情场杀手鬼见愁、沉鱼落雁、闭月羞花、晕倒一片、迷死一帮

神武英明,盖世无双,人见人爱,花见花开,打遍天下无敌手,情场杀手鬼见愁;人面桃花,倾国倾城,沉鱼落雁,闭月羞花,心地善良,晕倒一片