codepad.org:分享程序代码的最佳去处

    codepad是一个新的在线小工具,它的界面很清爽,使用方法非常简便,你甚至根本不用注册。你可以随时用它来保存、分享程序代码,提交后系统会给你一个形如codepad.org/xxxxxxxx的地址。它支持纯文本、C、C++、Python、Perl、Ruby等各种格式(不支持Pascal),并且提供了自动语法高亮功能方便大家阅读。最神奇的是,它可以显示你的程序代码的运行结果!因此这绝对是你保存和分享程序代码的最佳去处。
    我在http://codepad.org/my2f2wEP分享了一个IOCCC的代码。
    难以置信的是,这么好的东西居然在那个伟大的建筑之外!?反正我裸着是连不上的。

    顺便帮忙八卦:)

如果在Google Code Search里搜索fuck……

    Ben orenstein尝试在Goolge Code Search里输入脏话,在众多的开源软件中找到了一些非常牛B的代码:

gdb-6.4.50.20060515:
/* OK, now set up the filehdr...  */

/*   We will NOT put a fucking timestamp in the header here. Every time you
     put it back, I will come in and take it out again.  I’m sorry.  This
     field does not belong here.  We fill it with a 0 so it compares the
     same but is not a reasonable time. — gnu@cygnus.com  */

Siesta-0.66:
    # This job would be great if it wasn’t for the fucking customers.

CGI-FormBuilder-3.0202:
        # Get field from radio buttons or checkboxes
        # Must cycle through all again to see which is checked. yeesh.
        # However, this only works if there are MULTIPLE checkboxes!
        # The fucking JS DOM *changes* based on one or multiple boxes!?!?!
        # Damn damn damn I hate the JavaScript DOM so damn much!!!!!!

DJabberd-0.81:
    # Trillian, again, is fucking stupid and crashes on just
    # about anything its homemade XML parser doesn’t like.

gift-0.11.5:
void list_lock_insert_sorted (ListLock *lock, CompareFunc func, void *data)
{
    if (lock->locked)
    {
        /* TODO: this is obviously not right ... this whole fucking module
         * sucks anyway */
        list_lock_prepend (lock, data);
        return;
    }

    lock->list = list_insert_sorted (lock->list, func, data);
}

bh-asia-03-grugq:
    /* if we get here, there are massive fucking problems, for a start
     * our stack is fucked up, and we can’t return(). Just crash out. */

trunk:
    /* FIXME: please god, when will the hurting stop? Thus function is so
              fucking broken it’s not even funny. */

SQL-Abstract-1.20:
    # Note to self: I have no idea what this does anymore
    # It looks like a cool fucking segment of code though!
    # I just wish I remembered writing it… :-

mendax_linux:
for(i = 0 ; i < pktcount; i++) {
    from.sin_port = htons(ntohs(from.sin_port) + 1);
    pktlen = gen_tcp_pak(&pak, &from, dst, ip_id++,
                     seq_num, 0L, 0, flags);
    seq_num += 64000;

    /* don't fire dem packets too fucking fast */
    usleep(1000);

    send_pak((char *) &pak, pktlen, ether);
    putchar('.');
}

SugarOS-for-Microsoft-Full-4.5.0h:
    /*   Outlook can’t fucking follow RFC if someone PAID them to do it…
        oh wait, someone paid them NOT to do it. */

AfterStep-2.2.5:
    /* No we fucking don’t! DB entries should be stored in the same order
       as they are in the file ! I can’t belive I was so fucking stupid !  */

gallery-2.0.4/modules/core/classes/GalleryStorage:
else if ($affectedRows > 1) {
   /* Holy shit, we just updated more than one row!  What do we do now? */
   return GalleryStatus::error(ERROR_STORAGE_FAILURE, __FILE__, __LINE__,
                        "$query (" . implode('|', $data) . ") $affectedRows");
}

linux-2.4.34.1/arch/sparc/lib/checksum.S:
        /* Sun, you just can’t beat me, you just can’t.  Stop trying,
         * give up.  I’m serious, I am going to kick the living shit
         * out of you, game over, lights out. */

linux-2.6.1/arch/mips/kernel/sysirix.c:
    /* 2,191 lines of complete and utter shit coming up… */

nfs-utils-1.1.0/utils/statd/misc.c:
    if (!(ptr = malloc (size)))
            /* SHIT!  SHIT!  SHIT! */
            die (”malloc failed”);

dada-2_10_12:
    # code below replaces code above - any problems?
    # yeah, it doesn’t fucking work.

AppJet:编写并发布你的网络应用程序

    AppJet是一个免费的网络应用程序制作网站,你不需要数据库、动态网页语言等知识,也不需要拥有支持动态网页的空间,就可以在线编辑、运行你的代码,并且以yourname.appjet.com的形式发布出去。
    使用AppJet,你可以轻易制作出留言板、投票系统等网络应用程序,甚至还可以做出像字谜游戏我的网站首页那样的小程序。这里就是一个用AppJet制作出来的留言板,它的代码不到50行,你可以在这里看到它的全部代码。

网站推荐:The Python Challenge 第一个编程解谜站点

    The Python Challenge是一个过关式的解谜站点,使用的是经典在线解谜站点Not Pr0n的模式:根据提示找出下一关的网页地址。和Not Pr0n不同的是,在每一关里你都需要编写程序来寻找答案。虽然这个解谜站点的名字叫做Python Challenge,但事实上你可以使用任意一种程序语言(除了少数一两关可能会用到点Python的知识)。
    虽然这个解谜站点已经很火星了(05年建立的),但在国内似乎流传得并不广。偶然发现这个站点,想到NOIp也快到了,多一个有趣的coding练习也是一件好事,因此这里推荐一下这个站点,大家可以一起来试试。

本日志评论原则:禁止“剧透”