Wednesday, June 02, 2004 - Posts

Link Interface 31.

Some more bunch of interesting links that i found while browsing...

Code Humor Challenge at Kuro5hin.

There is a new article up on Kuro5hin called Code Humor Challenge.

Overall, it talks about some of the weirdo code that people do write and those which do end up in production systems ...

The author starts of with a few examples and one of them which stood out was an IntWrapper method that wraps the Integer type. Oh yeah ... This is how it goes ...

public class IntWrapper
{
  private final String value;

  public IntWrapper(int p_iValue)
  {
    this.value = p_iValue.ToString() ;
  }

  public String GetValue()
  {
    return value;
  }
}

You can't wrap the primitive Int better than that .. Can you ?!

And the best one yet is this particular post in one of the comments .. I loved the comment in the code ! Wow !

From a threaded tftp server written for class, I created a 'pocket' datatype that consisted of a tftp packet and a socket:

From a threaded tftp server written for class, I created a 'pocket' datatype that consisted of a tftp packet and a socket

struct pocket {
        struct packet * p;
        struct sockaddr * s;
};

(note: this was so I could pass it as one argument on the stack, using thr_create)

Hence, this comment (shamelessly stolen, apologies to Dr. Seuss and the original author(s)):

/*********************************************************
If a packet hits a pocket on a socket on a port,
And the bus is interrupted as a very last resort,
And the address of the memory makes your floppy disk abort,
Then the socket packet pocket has an error to report!
*********************************************************/

WTF ?! I kept laughing my guts out on this one ... Sheer poetry and still conveys the meaning ... I wish i could write comments like that !

Read on ...

First 64-bit Windows virus sighted

Anti-virus researchers at Symantec yesterday spotted the first virus capable of infecting 64-bit Windows systems.

Rugrat was created to prove a point rather than to be released into the wild. The proof-of-concept virus poses no immediate risk to Itanic users, but as the population of IA64 systems grows that risk of 64-bit worms will also increase. The virus is also capable of infecting 32-bit computers running 64-bit emulation software.

via The Register