Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Slashdot Log In

Log In

[ Create a new account ]

DEBEDb (456706)

DEBEDb
  (email not shown publicly)
http://www.hrum.org/

Geek of procrastination.

Journal of DEBEDb (456706)

Programming puzzle

Monday June 21 2004, @02:47PM
User Journal
Write a "Hello world" program, without using a semicolon, in:
  1. C (puzzle taken from here) -- takes a while if you've switched your mentality from C to Java (is that a hint or what?)
  2. Java (a bit more thought and knowledge of language is necessary)

Comments below present the correct solutions, respectively, by Fuckhead Sr. and Fuckhead Jr., with guest commentary by FucksHisMomInTheAssCauseHerPussy'sFilledWithPus... And to think that all three of them is one and the same incestuous redneck schizo... wow...

While waiting for enums in Java

Tuesday May 11 2004, @02:05AM
User Journal
catamount suggested the following trick:

public static final int ZERO = 0x0;
private static int enum = ZERO;
public static final int FIRST = ++enum;
public static final int SECOND = ++enum;
...

Java sizeof

Wednesday April 28 2004, @01:39PM
User Journal
"Memory matters" article in Javadoc Q&A by Tony Sintes (referring to FAQ Question of the Week No. 107 of JDC) suggests a way using Runtime.getRuntime().totalMemory().

I suggest another way of determining object's size:

public static long sizeof(Object pObj) {
try {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(baos);
oos.writeObject(pObj);
byte[] bytes = baos.toByteArray();
oos.close();
baos.close();
return bytes.length;
} catch (IOException ioe) {
return -1;
}
}

From the "no shit" department...

Monday April 26 2004, @04:55PM
User Journal
A Microsoftie blogs (emphasis mine):

I'm a Microsoft guy, so reading news about the spread of Linux is often times disheartening. [...] Linux advocates will go to no end to find new and interesting ways to position the language, installing it on anything with a microprocessor.

Say what?

Link of the day

Wednesday April 21 2004, @12:55AM
User Journal