April 29, 2004

Speed

This morning's commute's speed. Yup, that's average speed, in km/h. Not including the time spent waiting for traffic lights, but including the time spent slowing down before and speeding up after a red light. If you would've told me this two months ago, I would've laughed at you in the face. Oh, yes, that's on a bicycle.

Posted by tomk at 04:45 PM | Comments (5) | TrackBack

April 28, 2004

23: my turn

Outer Web Thought Log: 23: I'm in!. My turn (now that I'm finally near a book :-/ ):

To be truly versatile, the EJB component design had to be smart.

Nobody defined the rule "the closest book you agree with"....

Enterprise JavaBeans, 3rd edition, Richard Monson-Haefel, O'Reilly

Posted by tomk at 12:12 PM | TrackBack

TCPView

Bloogmark: TCPView: see which processes are using which ports on your windows machine, and TDIMon: see when packets are sent.
Posted by tomk at 11:35 AM | Comments (0) | TrackBack

JNN

I've just peeked into the code of jnn: The Juicy News Network, a weekend project by he who some call God (I won't mention any names though). And again, I'm worried.

For ten years now, people keep saying "In Java, variables start with a lower case letter." James Gosling sometimes uses capitals. "Structure your code." James doesn't even bother to hit the <enter> key an extra time between methods. "Use high-level constructs" I see bit manipulation all throughout. "Separate concerns" And why shouldn't Mr. Gosling makes his Feeds classes aware of the fact that they belong to a GUI, and thus have arrangements made for events?

It look like a new truth that I've just heard recently: "When coding, everybody falls back to his level of comfort." When you're used to Java, you'll program in Java following all those nifty design patterns and coding practices. When you're used to databases, you'll program in stored procedures. And I guess that, when you invented Java, your level of comfort is not Java, but more like C/C++.

What worries me most, though, is that it just works. Maybe there is a lesson to be learnt here.

Posted by tomk at 01:02 AM | TrackBack

April 22, 2004

Java and Linux links

Bloogmark: Java and Linux Links
Posted by tomk at 11:00 PM | TrackBack

Naive security

If you believe one word from this article, you might be in deep trouble.

Make methods private as security measure? Ever used reflection?

public class Reflect { private static String indent = " "; private static String demarcation = "======="; private Reflect() { } public static void dumpAllMethods(Class clazz) { Class curr = clazz; while (curr != null) { dumpDeclaredMethods(curr); curr = curr.getSuperclass(); } } public static void dumpDeclaredMethods(Class clazz) { dumpArray("Declared methods", clazz, clazz.getDeclaredMethods()); } public static void dumpMethods(Class clazz) { dumpArray("Methods", clazz, clazz.getMethods()); } public static void dumpConstructors(Class clazz) { dumpArray("Constructors", clazz, clazz.getConstructors()); } private static void dumpArray(String subject, Class clazz, Object[] array) { System.out.println(demarcation + " " + subject + " for " + clazz + " " + demarcation); for (int i = 0, n = array.length; i < n; i++) { System.out.println(indent + array[i].toString()); } System.out.println(demarcation + " End " + subject + " dump " + demarcation); } }

Et voila, all methods accesible to you.

Make jars sealed? Ever heard of WinZip? Do you remember crimson in it's beginning days? If you wanted to use another XML parser (or was it XSLT engine), it was standard and well-known practice to unseal the crimson.jar.

I hope these people aren't going to secure my application.

Posted by tomk at 07:42 PM | Comments (5) | TrackBack

April 20, 2004

"Flaws" in open source

Hear, hear. Most OSS developers develop for fun. If this ain't what you're looking for, go look somewhere else. And try to understand the above sentence: we develop for the fun of developing. Just like you collect stamps for the fun of collecting. Or do you want to tell me that you want to earn money with that?

Posted by tomk at 10:17 AM | Comments (1) | TrackBack

April 16, 2004

EJB vs Hibernate

The world has become a weird place: during last JavaPolis, I heard Floyd Marinescu say "Alternatives to EJB are rising. They might be a better solution for you." Today, I read Gavin King saying "EJB's are not that bad after all." What's next? World peace?

Posted by tomk at 09:31 AM | Comments (5) | TrackBack

April 14, 2004

April 09, 2004

Kids...

... they make everything else seem so futile, even to the most avid coders: Andrew. Vincent. You're warned.

Meanwhile, he still seems to fight this feeling. We'll see how long it lasts...

Posted by tomk at 10:04 AM | TrackBack