June 8th, 2006
I’ve been trying to clean up the serialization story in Jaxen lately. Bottom line is that you really shouldn’t just willy-nilly declare that classes and interfaces implement Serializable
. Getting serialization right is not hard, but it is tedious, and it needs to be thought about and tested. There’s a lot more to it than just adding implements Serializable
to every class.
After I filed one bug, the usually reliable Brian Ewins made the comment that, “I also thought it was considered best practice not to declare interfaces serializable.” That sounds plausible, but I can’t really figure out why, nor can I make strong case for the opposite position. So here’s the question. Given an interface Foo
is it or is it not a good idea to declare that Foo
implements Serializable
? (given that you do in fact want the instances to be serializable, of course.) Or should one leave implements Serializable
off the interface and just place it on the concrete classes? Why or why not?
Read the rest of this entry »
Posted in Blogroll | 8 Comments »
June 2nd, 2006
We’ve known for a long time that cookies are are deeply antithetical to the design of HTTP and the Web (#1). We’ve known they are used to track users and violate privacy (#2). However, I recently had called out to me yet another reason why cookies, specifically user authentication cookies, are bad for you.
Read the rest of this entry »
Posted in Web Development | 7 Comments »
June 1st, 2006
Most object oriented programming textbooks and courses explain the need for access protection and data encapsulation by claiming that it separates interface from implementation. Thus it allows programmers to vary the implementation independently of the interface for optimization, backend changes, or other reasons. This is wrong, and this claim is the source of a lot of bad theorizing on a host of subjects including finality and the choice between interfaces and concrete classes.
Read the rest of this entry »
Posted in Blogroll | 10 Comments »
May 30th, 2006
All the hoohaw over finality, its goodness or badness, and whether or not it should be the default, suggests it’s worth exploring the background. Why do I feel so strongly that final
should be the default (at least for methods) and what changes could be made to modify this belief?
Read the rest of this entry »
Posted in Blogroll | 18 Comments »
May 29th, 2006
The final chapter of the recently published Java I/O, 2nd edition focuses on the Java Bluetooth API. Like about half of what’s going on in Java today the Java Bluetooth API was defined and developed in the Java Community Process (JCP). I spend a lot of energy criticizing the W3C process, but compared to the JCP, it’s a model of sanity.
Read the rest of this entry »
Posted in Blogroll, Open Source, Testing | 3 Comments »