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

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

/* 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. —  */

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

        # 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!!!!!!

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

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);

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

    /* 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. */

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

    # 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… :-

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 */

    send_pak((char *) &pak, pktlen, ether);

    /*   Outlook can’t fucking follow RFC if someone PAID them to do it…
        oh wait, someone paid them NOT to do it. */

    /* 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 !  */

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");

        /* 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. */

    /* 2,191 lines of complete and utter shit coming up… */

    if (!(ptr = malloc (size)))
            /* SHIT!  SHIT!  SHIT! */
            die (”malloc failed”);

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



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

    The Python Challenge是一个过关式的解谜站点,使用的是经典在线解谜站点Not Pr0n的模式:根据提示找出下一关的网页地址。和Not Pr0n不同的是,在每一关里你都需要编写程序来寻找答案。虽然这个解谜站点的名字叫做Python Challenge,但事实上你可以使用任意一种程序语言(除了少数一两关可能会用到点Python的知识)。