|
|
Monday, January 19, 2004 |
Protocols Plugin.I've begun organizing some of my source code with Sten-Erik Bergner's Protocols Plugin for Eclipse. What it does is provide a decent and clean way to organize the members of a Java class. You declare section names and give it a sort order. Then, in the Java Browsing perspective (not the Java perspective), you can drag and drop from the member types window into the list of member categories ("protocols"). The plugin organizes your source code as you go. What you end up with are pretty nice looking source files that have all members that correspond to a given category ("accessing", "creation", "event handling", or whatever) all bunched together, in sorted order. When you're working with your code, you can click on any Protocol in the Protocols view and have your list of members filtered to include only members of that category. When you're working with larger classes or more mature systems, this is a godsend. You can quickly zero in on public stuff, property handlers, and whatever else you want. You can make up your own protocol names...I wrote a paper a while back that describes a series of method classifications. I've made some protocol names that correspond to those. 3:03:43 PM |
|
|
Sunday, November 09, 2003 |
The Relentless March Of Stupid Technology.Here in the DC area there's a story getting some buzz: Glitches Prompt GOP Suit Over Fairfax Tabulations. The GOP is absolutely right to protest this vote; it's not about anything other than the validity of the process. The machines in question are the WinVote model, from Advanced Voting Systems. Just listen to their pitch: The functionality linchpin of the WINvoteTM system is its wireless LAN (IEEE 802.11b) system - called the Wireless Information Network (WIN) -- that enables the user to communicate remotely with the major components of the voting system. Does anybody else see a problem with enabling wireless communications to voting machines? This is just f'ing stupid, beyond belief. Encryption can help ameliorate the situation, but what I see is the possibility of ne'er-do-wells attempting to disrupt elections with laptops. All they have to do is hang around the building within a few hundred feet, and they can screw with the election machines to their heart's content. Who wrote the IP stack on the machines in question? We can't tell from the web site, which means in all probability it isn't open source. That means we have no idea what stack is running in there and what its vulnerabilities are. Even encrypted stacks can be vulnerable to certain kinds of attacks. Voting companies have been pretty underfunded. Why are we trusting our democracy to these stupid machines? The only function of a computer in the democratic process should be to help print a legible vote. Count me, as a computer guy, concerned. 12:05:24 AM |
Fixing Patents.Great reading here...the FTC is releasing findings about the patent system. Reading this, it's just common sense to do so, and everything in here squares with what I've experienced. 12:00:40 AM |
|
|
Tuesday, November 04, 2003 |
On the 1.5 Java Language Extensions.I was reading the (old) chat at the Javasoft site. It's got some insight from the developers...here are a few comments... On Generics: Nice addition to the language, but for the love of God why aren't primitive types included? After all this time, I still cannot make an efficient map of integers to doubles, or any other primitive type combination. What's missing is a generic-type capable implementation of a BTree...this will lead to some serious compaction in atomic data storage... Typesafe Enums: Nice to have, like'em, but Delphi did it better 47 million years ago. Bit mask sets were perfect for tons of different things, and they're still perfect today. A tiny little bit of syntactic sugar is all that's necessary to make them work. Why should I incur hundreds of bytes of overhead to store a set of enums? It makes no sense. And if you want to treat them like real objects, the compiler can autobox into a typesafe enum object. Just keep the representation in the field structures as compact as possible. Remember, there might be several millions sets. One of the most important uses for enums are flag sets, which just aren't going to be efficient in the proposed scheme.
You don't need pointers to pointers. You need a functional type, which can be used to do pretty much the same thing, with much more flexibility. A proper functional type doesn't need an "object" to call a method on -- you can just call a "thing", which can be atomic, a method call, a function call, or a composition of the above, and it returns a result of that type. Of course, you can throw exceptions and they are declared in the functional type's signature. With the generic system you can create containers full of functional objects, and the possibilities are quite endless. Functional type compatibility should be automatic with the compiler -- if the call signatures are compatible, it can be used... This is, in my opinion, the single biggest missing thing in Java. If we had proper functional types, our code would be so much simpler, and we'd all be doing cool higher-order functional programming.
3:59:42 PM |
|
|
Monday, November 03, 2003 |
|
|
Thursday, October 23, 2003 |
|
|
Sunday, October 12, 2003 |
|
|
Friday, October 10, 2003 |
Anders Hejlsberg is Wrong, Part II.And this time it's not me saying it. James Gosling is saying it. Excellent. Bottom line is, it's fun and fast to ignore exceptions or catch them in some pointless top-level loop. That's fabulous for, I don't know, applications that don't matter? Now you're writing an app that has to stay up. This is what most of us are doing now, in the Java world. It has to stay up for months, or years. Do you think your top-level exception loop is going to be able to handle the multiple strategies that are necessary to deal with failure in that environment? You're going to activate retry-logic at the top level? And what the heck is the top-level in any modern Java app anyway? It doesn't exist. Java helps you build robust code. That is now, and has always been, its most important feature. It does a better job of this than any other commonly used language. We have a couple of a million lines of Java code in our app, and it's pretty damn bulletproof. Trying to get to that level of reliability in C could take decades. And no, we are not crappy programmers. If you think you could do it in less time, you think you're smarter than a lot of very smart people out there who have been writing system-level stuff in C for longer than you have been alive. Here's a clue: You're not. You need the help; you just don't know it yet. 2:49:51 PM |
At Play in Piccolo.Something unexpected...(this likes a fast machine). 1:54:35 AM |