4个程序员的一天zz

| Shared Chaos

From: https://www.cnblogs.com/linkcd/archive/2005/07/19/196087.html

【声明:本文没有贬低某个编程语言的意思】

你,一个DotNet程序员,刚刚加入一个新项目组。除了你之外,其他的成员包括:Ceer,一直从事C项目的程序员,他刚刚转入C#不到一个月;Jally,整天抱着本Design Pattern(没错,就是GoF的那本)在啃的前Java程序员;以及Semon,你对他完全不了解,只是听PM介绍说他是搞Scheme的(传说中的第二古老的语言LISP的方言之一)。不过你也没在意,毕竟计算机这玩意,老东西是不吃香的。

周一,刚打开电脑,老板就跑到你们组的办公座面前:“好吧,伙计们,现在有个function需要你们来搞定。具体是这样的:用户输入2个数,并输入一个操作符。你根据输入的情况来得出相应的运算结果。”

Example:Foo(+, 1, 2) = 3; Foo(*, 3, 6) = 18; Foo(/, 2, 4) = 0.5

Ceer最先作出反应:简单嘛,判断一下输入的操作符就好了。说着,他很快在白板上写出如下代码:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
public class CStyle_Calculator
{
    static public double Foo(char op, double x, double y)
    {
        switch(op)
            case '+': return x + y; break;
            case '-': return x - y; break;
            case '*': return x * y; break;
            case '/': return x / y; break;
            default: throw new Exception(What the Hell you have input?");
    }
}
阅读全文…( 本文约 2435 字,阅读大致需要 5 分钟 )

工作五年之后的十三种痛

| Shared Chaos

From http://bbs.hvacr.hc360.com/bbs/bbs/hvacr/dispbbs/569/3569_1.htm via 车东

1、很快你就会发现几千元的工资不算什么。

2、很快你就会发现金钱的获得是以时间和个人生活的牺牲为代价的。

3、很快你就会发现自己有点小钱但不幸福。

阅读全文…( 本文约 432 字,阅读大致需要 1 分钟 )

Signal in init(8)?!

| Development

Strange thing happen.

  1. Start your FreeBSD single-user.
  2. Run /etc/netstart so your network is up.
  3. Run /etc/rc.d/sshd start so you have sshd
  4. Use ssh to login localhost, then su(1) to root
  5. Type “init q”

Then init(8) would crash with signal 11. Yes, it was killed. As soon as kernel found this, it would panic with “Going nowhere without my init!”.

参与评论

Preparing for 6.0-RC1

| Development

Well, this Saturday and Sunday is not for rest, because we have a 7-days’ vacation from October 1.

I think FreeBSD 6.0-STABLE (RELENG_6) is in a quite nice shape and it’s a good time to cut 6.0-RC1 (also RELENG_6_0) and be more careful committing code against RELENG_6. However, according to my diff service there are still a lot of unmerged changes.

I have submitted a plenty (about 4 or 5 or even 6 dozens) of MFC requests last week. I wish that the diff reduction part of these changes, in conjunction with important bugfixes, would got approved soon so we will have a healthy RC1 for test.

参与评论

FreeBSD.org改版了

| Development

Emily Boyd同学设计的新版 www.FreeBSD.org 今天上线了,很漂亮。不知道我们什么时候能让中文版跟上……

参与评论

该好好总结一下了

| Diary Excerpt

From MSN Space.

很久没有更新 http://blog.delphij.net 上的内容了。我不知道该说什么。

阅读全文…( 本文约 281 字,阅读大致需要 1 分钟 )

为啥咱的中文翻译就这么差劲呢?

| Life

在邮件列表里面收到一封邮件,里面的签名是:

The information in this email is confidential and may be legally privileged. If you have received this email in error or are not the intended recipient, please immediately notify the sender and delete this message from your computer. Any use, distribution, or copying of this email other than by the intended recipient is strictly prohibited. All messages sent to and from us may be monitored to ensure compliance with internal policies and to protect our business.

阅读全文…( 本文约 271 字,阅读大致需要 1 分钟 )

关于道德、阶级、信仰、迷信的起源zz

| Shared Chaos

From: FreeBSDChina.org

主题:-道德的起源-

把五只猴子关在一个笼子里,上头有一串香蕉实验人员装了一个自动装置 一旦侦测到有猴子要去拿香蕉,马上就会有水喷向笼子而这五只猴子都会一身湿 首先有只猴子想去拿香蕉,当然,结果就是每只猴子都淋湿了 之後每只猴子在几次的尝试後,发现莫不如此 於是猴子们达到一个共识:不要去拿香蕉,以避免被水喷到 後来实验人员把其中的一只猴子释放,换进去一只新猴子A 这只猴子A看到香蕉,马上想要去拿结果,被其他四只猴子海K了一顿 因为其他四只猴子认为猴子A会害他们被水淋到,所以制止他去拿香蕉 A尝试了几次,虽被打的满头包,依然没有拿到香蕉 当然,这五只猴子就没有被水喷到 後来实验人员再把一只旧猴子释放,换上另外一只新猴子B

这猴子B看到香蕉,也是迫不及待要去拿

当然,一如刚才所发生的情形,其他四只猴子海K了B一顿

特别的是,那只A猴子打的特别用力(这叫老兵欺负新兵,或是媳妇熬成婆 ^O^)

B猴子试了几次总是被打的很惨,只好作罢

後来慢慢的一只一只的,所有的旧猴子都换成新猴子了,大家都不敢去动那香蕉

但是他们都不知道为什麽,只知道去动香蕉会被猴扁

这就是道德的起源

阅读全文…( 本文约 1807 字,阅读大致需要 4 分钟 )

向左转,向右转

| Life

最近两天听说很多惊人的消息。例如这个。其实这条消息不仅是对他所在的公司,也是对整个IT业界在心理上的一次沉重打击……

参与评论

安装 - 爱 zz

| Shared Chaos

发现本杰明同学总能有惊人之语。。。


客服工程师:

您好!有什么我可以为您服务的吗?

顾客:

嗯,我考虑以后,决定安装「爱」。

你能够一步一步教我怎么做吗?

阅读全文…( 本文约 1002 字,阅读大致需要 2 分钟 )