Spiral Dive
|
|
Sunday, February 23, 2003 |
No JSR necessary.
public class BreakMe extends RuntimeException { Are you one of this idiot library coders who tests for the end of an array by waiting for ArrayIndexOutOfBounds? Or do you test the existence of something by catching NullPointerException? I hate you. You make me nuts. I don't want your code throwing an exception during its normal run. Some of the Apache stuff is guilty of this and it drives me nuts. I don't give a crap if you saved 0.0234 ms during a routine. You screwed up my ability to debug code. My code never throws exceptions during the normal course of a run. Yours shouldn't either, especially if it's a library and you expect rational human beings to use it.
11:32:06 AM |
Overreactions.Tom Friedman wonders if we are. Yes, we are. This has been a real week of disasters -- two club fires, crazy weather, buildings collapsing...every once in a while Joe America needs to pull out his pocket calculator and figure out where the real dangers in his life come from. Let's see -- probability wise, the most dangerous thing you do each day is get in your car and drive to work. 44,000 people die each year in automobile accidents, and a hell of a lot more than that get injured. These kinds of problems have become routine, though. 9/11 was bad, yes, but more people die each month on the roads than died in 9/11. Heart disease can kill ya. Terrorism punctured our juvenile illusion of invulnerability as a society. The thing to remember is, we didn't lose anything. We've always been in danger; we just forgot about it for a long time. Do you want to overreact? Those people in Chicago are dead because they thought they were in a terrorist attack, and there was panic. I think it is fundamentally irresponsible of our current government to be engendering (even if through good intent) such an atmosphere of fear and distrust. There are bigger, scarier things out there than terrorism. They're the things that live in your everyday life, and they're far more likely to hurt you or kill you than an Islamic idiot on drugs. 7:32:31 AM |
|
|
Saturday, February 22, 2003 |
Use the right Rule Tool.Ted's looking at drools. I say, cool! Rules are excellent. I respect the work that Bob's done on drools, but XML syntax? Youch! It's OK for machine generation but it ain't a human language...Take a look at Ted's example, then see this: (deftemplate person (slot name)) The "prolog-like" language is actually significantly more LISP-like -- it came out of NASA and is called CLIPS. Jess is a very cool (and fast) adaptation of it to the Java platform. I highly suggest you check it out (as I've stated in previous blog entries). The point is, CLIPS is pretty good at declaring these kinds of rules. Its syntax has stood the test of time. It's not perfect (Jess makes some extensions that are good, and more should be there), but once you get into "rule think" it's hard to stop...I can't. I spent a chunk of the last week thinking about this stuff, while I was on planes. Planes are good for thinking. 6:45:57 PM |
|
|
Thursday, February 13, 2003 |
|
|
Monday, February 10, 2003 |
Permissions.
Hi Stu...one point here -- generating lots of small scale permissions is the point! See erights.org. But...if you know that substantially all of the permissions in a category are being used (like all of them), then I guess a wildcard is OK. Wait -- it's not. The reason is that in the future, you may be granting a permission, due to the wildcard, that you really didn't mean to. Stay small, stay granular. 10:49:55 PM |
Clay Shirky Gets It.Dave Winer doesn't think so. Are we on the same planet? It is intuitively (and experientally) obvious that there are weblogs that get read a lot more than others. This does have something to do with the content of those weblogs, but it also has a great deal to do with exposure through "top rank" lists and other mechanisms. List ranking mechanisms tend to perpetuate the present, and as time goes by, make it more difficult for new information sources to gain any traction. Writing good things and getting referred can work, but generally fail to deliver much critical mass. Whether Dave wants to admit it or not, there is an A-list. He's on it, for sure. The very vast majority of us do operate at the departmental level. All Shirky is saying is that a web log is not a great equalizer. You can say whatever you want, but don't expect very many people to be aware of what you've said, or react to it in any way. I give up this text in an attempt to be disproven. 4:01:15 PM |
|
|
Sunday, February 09, 2003 |
Huh?
Dear Graham. You are a badass coder but a highly questionable movie reviewer. Awesome? Did we see the same movie? Maybe I just don't like Colin Farrell all that much. I liked even the cheesy Spy Game considerably more. I fell asleep during Solaris. Of course I was pretty tired. I can't believe I liked How to lose a guy in 10 days. It's exactly the kind of movie that I don't like (I like "serious" films). But I couldn't stop laughing. Plus I had the secondary screen of my friend Christina's face, watching her laugh her ass off! I did see a few guilty looks on the faces of women in the theater...hah! 9:32:28 AM |
Power.
My power is growing exponentially. Muahaha. Cool trick! And a major step in the right direction for permission policy files! 2:05:55 AM |
|
|
Friday, February 07, 2003 |
Generate the Policy.
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 EnumsNo 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? |
|
|
Saturday, February 01, 2003 |
Good run.Clears the head of whatever's bothering you. Six hours of good coding today, and I'll have a relaxing time tonight. One of the good days. 6:47:00 PM |
Languages.
After my last post, I gotta calm down/switch gears. Hmm. Learning Ruby, I gotta say that I don't think you're pushing your boundaries. Want to learn something new and truly mind-expanding? Go find Ernest Friedman-Hill's Jess system. Read the manual, think hard, and you'll find out where computer science is going in the long run. Yes, he's created a CLIPS system for Java, and perhaps that on its own is not worthy of what I've just said. But when you start thinking about what you can accomplish with it, and what happens when you attempt to create aspect-based systems and couple them with rule programming, you get to a very interesting place. I've been in this game a long time (17 years) and that combination represents the first truly new thing I've been exposed to in some time. 4:16:19 PM |
What are we doing?
Ted's right -- we need to get back out there. I've often asked myself over the past few years a question: What is this country trying to do? If you don't live in the US, feel free to ask yourself the same question about your own country. Are we trying to create peace and prosperity? Are we trying to make our citizens happy? Those are such internal goals. Should not the desire of a great society be to build something of beauty, expand the knowledge of the world, or discover a new truth? So enthralled are we with the twin notions of obedience and prosperity that we have forgotten the essential core of the human spirit, that which I believe justifies our existence -- our ability to surprise God and expand the boundaries of what we know and achieve. There is an 8 year old boy without a mother, in Racine, Washington, because our politicians felt that saving a few dollars was more important than safety protocols that would have kept his mother alive. Seventeen years ago, a teacher's family lost their mother because a subcontractor falsified test documents to avoid cost overruns. Seven remarkable human beings are dead because we don't have our priorities straight. That's you and me, and the people who represent us. We're about to spend somewhere in the neighborhood of $200 billion crushing the leadership (and hopefully only the leadership) of a small country in the middle east. Is there not another way? Billions of dollars go, in farm subsidies, not to support our nation's farmers, but to prop up the massive agricultural companies that rob them of their lives' work. Here in DC, the leaders of the local teacher's union gleefully robbed their membership of their dues money, using it to buy themselves whatever they felt like. They, in particular, had no concept of consequence. What has happened to ethics? What has happened to responsibility? We so often declare a "moral person" to be someone who takes certain stands on certain issues -- the unsolvable issues, the ones that don't actually matter. I think the ethics of our interactions with other people, and with society as a whole, are the next frontier of human awareness. Without finding the right way to live together, to work out our differences, to be good to each other, we will not survive. It is time that we declare that lack of regard for known consequence is a prime failing, and try to better ourselves. Have we dug too deep of a hole? You -- the politicians who axed NASA's budget. Did you care how the money was spent? Were you concerned at all with what was being accomplished? Were you just trying to eliminate an annoyance, an easy target? Were you being political when you voted to slash the budget? You now reap the deadly and tragic consequences of your decision. 4:08:23 PM |