delphij's Chaos

知足 (五月天) zz

Shared Chaos

怎么去拥有 一道彩虹
怎么去拥抱 一夏天的风
天上的星星 笑地上的人
总是不能懂 不能知道 足够

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

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 分钟 )

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.

参与评论

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

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 分钟 )