April 30th, 2003

I wonder who knew this? Apparently it's possible to use UNC names in your command prompt, only the MS Gods have decided that you should use pushd instead of cd. Mysterious ways.

In case you're wondering why I should need this: I've just finished working on some utility that accesses the Windows registry via regedit, which only accepts files, and that file comes from an UNC location. After that, an .exe on your local machine is started. And that all from within your browser. I do feel a bit dirty now...

Re: dumb-ass

April 29th, 2003

Seems like I have some explaining to do: Outer Web Thought Log: False modesty. I didn't say that I felt a dumb-ass, I only meant that by the other guy, and any occasional innocent bystanders for that matter, I must have been perceived that way. Moreover, the time nor the context didn't allow us to go into an intellectual arm-wrestling to see who actually was more knowing, it only went "Hmm, yeah, Cocoon was hard to learn in those days." "No it isn't." "Yeah it was." "No it isn't." "See ya."

Now is this "Java" or "Personal"? Or "XML"?

Later: Oops, almost forgot: Thanks for the compliment, Steven!

Apple and its tune

April 29th, 2003

Funny funny: all the Americans hail Apple with its iTunes service, but as always, they forget that they're not alone on the world. Accepting non-US credit cards shouldn't be any harder than accepting US ones. In fact, that's the added value of credit card companies. And it's not that there are extra transportation costs involved.

Conclusion: Apple gets a tiny bit of it. But that's still more than one can say of most other "internet-minded" companies.

Cocoon flow

April 26th, 2003

To read: CocoonWiki: GettingStartedWithFlow (via various blogs). To hope: get a chance to do something with Cocoon again. It's been over a year and a half that I haven't been doing any real development in Cocoon. I'm still trying to keep up though. Pure love.

Side note: on a recent conversation, I mentioned the fact that Cocoon was hard to learn when I learnt it (somewhere in 2000, I think). The other guy didn't agree, and thought it was easy. He probably stepped in recently, and had tons of Wiki at his disposal. Anyway, I came out as a complete dumb-ass. Good news for Cocoon.

java.blogs going berzerk?

April 25th, 2003

My exercise entry generated a reaction from a java.blogs user:
Could you either categorize your blog, or remove it from javablogs. When I go to javablogs, I'm not interested in your exercise postings. :p
Well, first off: maybe most Java hackers can do with some more exercise :p Second: I agree. That's why I categorized my blog some time ago, during the first stir in the java.blogs community about just this issue. My first conclusion was that I made a mistake, so I checked my java.blogs profile. And what do you know? The URL provided for the feed is this one. As you see, this doesn't contain the exercise entry. But it got picked up nevertheless by java.blogs. So I'm guessing java.blogs is still using the old URL... Anybody knows about a solution to this? Is there a "flush cache" button somewhere I can press, or should I delete the blog profile alltogether, and create a new one?


April 24th, 2003

This sounds like something I might want to try. I've been trying to figure out how to get some exercise into my life, but with a 1-hour commute, a baby son, and a girlfriend who works irregular hours, it isn't so easy. But I know I feel better when I exercise (from the few times I've tried it), so I dearly long to do it. If you exercise in the morning, you get all this stuff they call oxygen in your blood, and that gives you a multi-hour rush. It surely beats caffeine.

Via Keith via Erik.

Composing Strings

April 22nd, 2003

An entirely non-issue, but I'm curious nevertheless: What do you, Java programmer, use to create sentences while looping through a list? Often, you have to generate some String based on the contents of some Iterator (to generate output, or an error message, or whatever). In most cases, this asks for some kind of separator, which should be between two elements, but not in the beginning nor the end of the resulting String.

The construct I like most till now, is

StringBuffer sb = new StringBuffer();
String and = "";
for (Iterator iter = myList.iterator(); iter.hasNext();) {
  and = " and ";

I've also seen boolean to keep track of whether you're handling the first element or not, and I've seen StringBuffers loosing their tails after the loop... The above is quite nice, but the scope of the and String is too large.

Anyway, consider this an exchange of taste: what construct do you usually use to achieve this?

PHPer goes Java

April 22nd, 2003

This is the first of a kind I've ever read. I've seen many Java developers suddenly going crazy about Perl, PHP, Python, Jython, and the likes, but never the other way around. Nice. Feel the love, man.

Record locking

April 22nd, 2003

Matt Raible asks how to lock a DB record in a webapp. A method that always works (I learnt it from a VB guru (yes, those do exist)), is a very bare-bones optimistic locking. On each table, add a column LAST_EDITED, of date type. Now, whenever you do an update, include the LAST_EDITED in your WHERE clause, and fill in the local time. So you get:

UPDATE my_table SET blah='bluh', LAST_EDITED=now WHERE blah='bleh' AND LAST_EDITED=time-you-got-from-your-select-query
IIRC, the "now" is a function in Oracle. The alternative is to provide another time (System.getTimeInMillis()), but this will only work for 99.99% of the cases (granted, if you happen to have 2 updates on the same split millisecond (according to 2 different machines), you'll probably get gray hair trying to solve it anyways).

As always, I'm not sure if I made myself clear. Drop a comment if I didn't.

USB Tootbrush

April 18th, 2003

Gizmodo : A USB toothbrush. And I thought I was geek with my USB Light. (Coming to think of it, that light has already proven its value during a power outage in our house. Replacing fuses by the light of a laptop powered USB light... who said I was losing my geekiness?)

Via Alan via atog

During college, I've spent quite some hours playing Frozen Bubble. IIRC, it's even one of the first games I've played over a network. And now, it's an applet. Enjoy :-)

Thanks to atog for mailing me the link. Apparently, he believes I don't read his blog.

Damn the spam!

April 17th, 2003

Apparently, one or the other spam tycoon has finally developed a program to send MSN Messenger messages automatically. This day alone, I've gotten one invitation to visit big tits, one to visit teens, and one to visit something I don't even remember. On one hand, I'm astonished that it has taken them so long to catch on. On the other hand, I wish them very short arms and lots of itches.

So much for trust. Now where can I turn the "allow everybody to send you a message" feature off....

Mind games

April 17th, 2003

These are fun mind games. Read it before you continue here. I'll wait.

Have you read it? Now, extra game: produce an example that demonstrates the same issue(s). Really, try it. I'll wait again. I've got time.

Not as easy as you thought, hein? Tht ability, my friend, is what makes a good engineer a great teacher...

Various bloggies

April 17th, 2003

I feel a strong urge to do a "me too" on various blogs today. So let's get on with it:
  • Compress your data: Seems like a good idea. Every browsers supports compression AFAIK, and the client machines usually have CPU to spare to do some decompression. What I'm not entirely sure of, is that every RSS aggregator supports zipped streams. Well, they should, of course. People are kind enough to provide you with free content, you could be at least so polite to not drain their bandwidth. And CPU usage (to do their compression) is not billed.
  • Classifying programmers, or how terminology gets obfuscated over time. I've read the same discussion about "programmer" vs "architect" not so long ago (sorry, I don't think I can Google the link back up). A related issue: should you present yourself as "Software Engineer" or as "Senior Software Engineer", with "senior" in the meaning of "knowledgeable"? It sounds weird to be active in a field for 5 years, and call yourself "senior" already. OTOH, 5 years experience in one specific IT domain is very likely to make you the oldest one in that domain ;-)
  • Vera, a New Free Font Family From Bitstream: cool. Looks like a clean font (to somebody who can hardly make the distinction between Serif and Sans Serif). The only problem of course: how an I use fonts? When I think "font", I think "improve the look of a web page", but I don't know of any method to force a user to download a font to look at your page. (I might be wrong about this -- tips&hints as always welcome). As a side thought: nice to see that an open source community can convince a commercial entity to release something under a *PL. Even nicer to see that a commercial entity lets itself be convinced to release something under a *PL.
Have fun!


April 17th, 2003

Another Bridge joins the world: Mit. Congratulations to you and your wife, Rik! Enjoy her as much as I do this little chap!


April 16th, 2003

To whom it concerns: JUI 0.6

Thanks Erik.

Blogging is popular

April 8th, 2003

Blogging is more popular than I thought. I've just discovered that an intelligent collegue of mine also maintains a blog: atog. (his previous blog was on blog-city) Java and Movies. Entertaining :-)

Shower thought

April 4th, 2003

Shower thought: first, I wrote

I basically suck at programming.
A few weeks later, I write
The more you know, the more you know what you don't know.
Wow. I must be a great programmer.

Hey, it's Friday, gimme a break!

Scary referers

April 2nd, 2003

This kind of scares me: my referers sometimes include my so-called homepage. This means that people who have been searching for "Tom Klaasen" (presumably) are reading my thoughts. I wonder who those people are.

Blog overload

April 1st, 2003

Blogs are very interesting, and provide lots of information. However, one needs time to digest this information into knowledge. And I seem to be missing that. So in an effort to remind myself of what I still need to look at to improve my knowledge, a list of not-yet-digested blog entries:

You're looking for something older?