随笔-67  评论-88  文章-0  trackbacks-2
  2006年4月7日
日本的一家公司要招聘10名员工,过一段严格的面试,公司从三百多应徵者中选出了10位佼佼者。放榜这天,一个叫水原的青年看见榜上没有自己的名字,悲 痛欲死,回到家中便要切腹自杀,幸好亲人及时抢救,水原没有死成。正当水原悲伤之时,从公司却传来好消息:水原的成绩原是名列前茅的,只是由于电脑的错误 导致了水原的落选。正当水原一家人欣喜若狂之时,从公司又传来消息:水原被公司除了名。原因很简单,公司老板说:如此小的挫折都受不了,这样的人在公司是 不成什么大事的。

美国的一家公司要招聘10名员工,过一段严格的面试,公司从三百多应徵者中选出了10位佼佼者。放榜这天,一个叫汤姆的青年看见榜上没有自己的名字,悲痛 欲死,回到家中便要举枪自尽,幸好亲人及时抢救,汤姆没有死成。正当汤姆悲伤之时,从公司却传来好消息:汤姆的成绩原是名列前茅的,只是由于电脑的错误导 致了汤姆的落选。正当汤姆一家人欣喜若狂之时,美国各大州的之知名律师都来到汤姆的家中,他们千方百计的鼓动汤姆到法院告这家公司,要求支付巨额的精神赔 偿,并自告奋勇的充当汤姆的律师。

德国的一家公司要招聘10名员工,过一段严格的面试,公司从三百多应徵者中选出了10位佼佼者。放榜这天,一个叫萧恩的青年看见榜上没有自己的名字,悲痛 欲死,回到家中便要跳河自杀,幸好亲人及时抢救,萧恩没有死成。正当萧恩悲伤之时,从公司却传来好消息:萧恩的成绩原是名列前茅的,只是由于电脑的错误导 致了萧恩的落选。正当萧恩欣喜若狂之时,萧恩的父母却坚决反对自己的儿子进入这家公司。他们的理由不容置疑:这家公司作业效率如此差劲,进入这家公司对儿 子的成绩毫无益处。

中国的一家公司要招聘10名员工,过一段严格的面试,公司从三百多应徵者中选出了10位佼佼者。放榜这天,一个叫志强的青年看见榜上没有自己的名字,悲痛 欲死,回到家中便要悬梁自尽,幸好亲人及时抢救,志强没有死成。正当志强悲伤之时,从公司却传来好消息:志强的成绩原是名列前茅的,只是由于电脑的错误导 致了志强的落选。正当志强欣喜若狂之时,志强的父母来到公司,一看到公司老板便跪了下来,他们含泪的说:多亏你救了我儿子,我们家世世代代感谢你的大恩大 德!

台湾的一家公司要招聘10名员工,过一段严格的面试,公司从三百多应徵者中选出了10位佼佼者。放榜这天,一个叫俊杰的青年看见榜上没有自己的名字,悲痛 欲死,回到家中便要磕药自杀,幸好亲人及时抢救,俊杰没有死成。正当俊杰悲伤之时,从公司却传来好消息:俊杰的成绩原是名列前茅的,只是由于电脑的错误导 致了俊杰的落选。正当杰欣喜若狂之时,媒体大幅报导此事,并邀请俊杰参加各种CALL IN评论及综艺节目,全国舆论热烈讨论电脑为何会出错,是否有黑道介 入或官商勾结,反对党更进一步提出「阿扁下台、以示负责」的要求.....至于俊杰到底有没有去该公司上班,根本没有人关心。
posted @ 2006-04-07 15:11 Allen Young 阅读(128) 评论(1) 编辑
“Decorator的招供”,用采访的方式讨论了Decorator模式的缺点,这本书中处处都是这种恰当的拟人写法。

HeadFirst: Welcome Decorator Pattern. We’ve heard that you’ve been a bit down on yourself lately?
Decorator: Yes, I know the world sees me as the glamorous design pattern, but you know, I’ve got my share of problems just like everyone.
HeadFirst: Can you perhaps share some of your troubles with us?
Decorator: Sure. Well, you know I’ve got the power to add flexibility to designs, that much is for sure, but I also have a dark side. You see, I can sometimes add a lot of small classes to a design and this occasionally results in a design that’s less than straightforward for others to understand.
HeadFirst: Can you give us an example?
Decorator: Take the Java I/O libraries. These are notoriously difficult for people to understand at first. But if they just saw the classes as a set of wrappers around an InputStream, life would be much easier.
HeadFirst: That doesn’t sound so bad. You’re still a great pattern, and improving this is just a matter of public education, right?
Decorator: There’s more, I’m afraid. I’ve got typing problems: you see, people sometimes take a piece of client code that relies on specific types and introduce decorators without thinking through everything. Now, one great thing about me is that you can usually insert decorators transparently and the client never has to know it’s dealing with a decorator. But like I said, some code is dependent on specific types and when you start introducing decorators, boom! Bad things happen.
HeadFirst: Well, I think everyone understands that you have to be careful when inserting decorators, I don’t think this is a reason to be too down on yourself.
Decorator: I know, I try not to be. I also have the problem that introducing decorators can increase the complexity of the code needed to instantiate the component. Once you’ve got decorators, you’ve got to not only instantiate the component, but also wrap it with who knows how many decorators.
HeadFirst: I’ll be interviewing the Factory and Builder patterns next week – I hear they can be very helpful with this?
Decorator: That’s true; I should talk to those guys more often.
HeadFirst: Well, we all think you’re a great pattern for creating flexible designs and staying true to the Open-Closed Principle, so keep your chin up and think positively!
Decorator: I’ll do my best, thank you

posted @ 2006-04-07 14:31 Allen Young 阅读(206) 评论(0) 编辑
昨天想在Ubuntu上装个jdk,因为用apt-get安装的是jre,有的时候不好 用。但是从网上下载的rpm安装文件在Ubuntu上却安装不了,这才想到Ubuntu是基于Debian的,只能安装deb文件。上网搜了一下,发现Alien Package Converter可以蒋rpm和deb等文件相互转换,正好可以解决这个问题。

sudo apt-get install alien
sudo alien XXX.rpm
sudo dpkg -i XXX.rpm

但是好像alien会使得软件间的依赖关系变得混乱,所以最好的办法还是尽量使用Ubuntu源上的软件,或者去找deb格式的安装文件。

posted @ 2006-04-07 10:43 Allen Young 阅读(2222) 评论(0) 编辑