Friday, February 07, 2003


Generate the Policy.

Turn that security manager on!. Most Java developers I know download and execute applications all the time, without using a SecurityManager. (Admit it, you have tried various open source projects.) The madness stops for me today. Whenever I download some Java app, I am going to start with SecurityManager on, and policy empty. Then, it is simple to read exception traces (or turn on -Djava.security.debug) to figure out what permissions are needed. For example, it took me all of five minutes to produce this policy file for jing: /* assumes that files are all in the current directory */ grant /* codeBase "jing.jar" */ { permission java.util.PropertyPermission "user.dir", "read"; permission java.io.FilePermission "*", "read"; }; Of course, building these files can be laborious. Maybe somebody should start a repository with sample policy files for key Java applications... [Ockham's Flashlight]

I think it would be cool if there was a flag on the Java runtime that just generated a policy file automatically as you ran the app...as the developer you could quickly get a nicely fine-grained policy file appropriate to your app and distribute it.  As a user, you could look at the generated policy file and see if it makes sense to grant the application the rights it wants...


1:19:46 PM    

JDK 1.5 Enums

No sir, I don't like it. Enums in JDK1.5 are a good idea -- they make your code a hell of a lot more readable. But doesn't anybody get that sets of enums are just great?

Delphi had a set construct. Each enum gets a unique identifier. You can declare a set of enum. The compiler handles these very efficiently, and just uses numbers for them whenever possible. If the number of bits in an integer is exceeded, you can use a bit vector or something like that. Very fast set operations are possible (then again, Pascal had set operations built into the language).

Why does such a simple concept have such inefficient implementation in Java, and most other languages?
10:58:50 AM    


Reading Things.

Radio vs Syndirella. [Sam Ruby]

I have a simpler reason why I like Radio better.  It doesn't make the stupid assumption that practically every reader in existence makes.  Who the hell wants to read things one at a time?  I sure don't.  You know those excessively broken up HTML documents you find on the web every once in a while?  The ones that give you two sentences, then require you to click on the "next" button to see the next part?  Why on earth can't they just load the whole thing?

Some web sites make you do that stupid "click for the next page" crap.  I hate that.  I usually just choose the printable version -- I get the whole thing in one nice big article, and I can scroll through and read it at my leisure.

Radio gives me nice weblog articles and lets me read them all at once.

My wish list for a newsreader would include an "everything" view.  This view simply builds one giant document of everything I'd want to look at, annotates it appropriately, and let's me get through it quickly.  For newsreaders and that ilk, it's probably more effective to divide things by "topic".  There are tons of ways this kind of thing could be presented visually.

 


12:07:14 AM