One of those famous notes to self. A smart way to avoid using temporary tables in DB2: Using VALUES to build a recursive query
Month: October 2006
Looking forward to Java 5+ support in Notes
I’m currently trying to figure out some replication issues for a customer and to help me diagnose the problems I’m writing a reporting tool. I hope to be able to share the tool shortly as it has proven an invaluable tool to help monitor cluster replication as well.
The tool is written in Eclipse using Java and I wrote it using some of the features of Java 5 such as the enhanced for-loop, autoboxing and generics since it was to be a one time thing running from a console. Well as with all quickies – they turn out to stick around…
Now the customer would like to keep monitoring the replication and by far the easiest way is to schedule it using an agent. This however meant that I had to port the code to Java 1.4.2… 🙁 I don’t think you fully appreciate the new features of Java 5 until you have to revert to Java 1.4.2.
For those not in the know in Java 5 you can use an enhanced version of the for-loop to loop all types of java.util.Collection instances and arrays. This means that instead of writing:
public void loop(Collection my_col) {
Iterator ite=my_col.iterator();
while (ite.hasNext()) {
Customer c = (Customer)ite.next();
c.bill();
}
}
...or...
public void loop(Collection my_col) {
for (Iterator ite=my_col.iterator(); ite.hasNext(); ) {
Customer c = (Customer)ite.next();
c.bill();
}
}
you can simply write
public void loop(Collection<Customer> my_col) {
for (Customer c : my_col) {
c.bill();
}
}
Isn’t that nice… Apart from being shorter is much easier to read and understand. Also the added use of generics (i.e. specifying that the passed collection contains Customer objects by using the bracket notation) means no more casting of objects all the time.
Can’t wait for Java 5+ support in Notes/Domino. I wonder what the Java level is in Hannover…
Geek to Live: Top Firefox 2 config tweaks
Geek to Live: Top Firefox 2 config tweaks via Lifehacker.
It’s been a busy browser week…

Just upgraded my Firefox to version 2.0 and I’m posting this using it. Total time of upgrading the browser was 35 seconds incl. downloading the installer. Nice! Try that with Internet Explorer… I have a couple of extensions that no longer work since no compatible versions are available:
- Qute theme (not an issue since I like the new theme)
- View formatted source
- Live HTTP Headers
The new version of Firefox adds a number of nice new features such as in-line spellchecking for web-forms.
Update: I had to disable one of my extensions called “Tab Mix”. When the extension is enabled Firefox refuses to load new pages once the configured homepage(s) has been loaded. Disabling the extension solves the problem.
Sametime 7.5 error message for the math wiz among us…
I have configured 100MB as the maximum filesize for file transfers via Sametime 7.5. I was however a little surprised when I saw how Sametime Connect chose to let me know that the file I was trying to send was above quota. Is there really a need to:
- show the maximum configured size in bytes!
- show the size of the file in scientific notation (1.024E8) and in bytes!
I guess that’s a thing for service pack 1…
Upgraded to IE7
This morning I upgraded my production laptop to Internet Explorer 7. The upgrade was without problems and I haven’t experienced any problems with it. While I’ll continue using Firefox as my preferred browser I still have some e-banking and some customer stuff I need to do through IE (using the nice IE Tab extension for Firefox) so it’s nice to get the security updates etc. that IE7 affords.
I haven’t messed too much around with the IE7 but I’m impressed by what I have seen so far (new favorites, RSS support, tabbed browsing and dedicated search bar). I think it will become a strong competitor to Firefox for the non-geeks among us… 🙂
Using the right version of MSXML in Internet Explorer
I have previously written about the Microsoft XML parser (MSXML) and have had quite a lot of fustrations with it and was pleasantly surprised to find a post on the Microsoft XML Team’s WebLog on the subject. The post is called “Using the right version of MSXML in Internet Explorer” and provide details on the different versions of MSXML and which version to use where. The post even has an executive summary section which I recommend you skim though I’ll reproduce the most important 4 bullets for MSXML here:
- Use MSXML 6.0 – it is “in the box” on Vista and available for download on Win2k, XP, and 2003. It has the best security, performance, reliability, and W3C conformance
- MSXML 3.0 is our preferred “fallback” – It is installed on every OS from a fully patched Win2k SP4 installation on up, so it requires zero-deployment and is serviced regularly with the OS
- MSXML 4.0 was released to the web about 5 years ago, but at this point has been superseded by MSXML 6.0 and is only intended to support legacy applications
- MSXML 5.0 for Microsoft Office Applications is purpose-built for Office applications and isnt intended for broad deployment. Internet Explorer 7 actually has the MSXML5 components “off-by-default” in the Internet zone so your customers will get a goldbar for each MSXML5 control on a page if your code tries to instantiate it. The best recommendation is to avoid MSXML5 in your web apps (only machines with Office 2003 or higher will have it, anyway.).
Skim it now or save the bookmark for when you need to deal with MSXML.
Nice review of IE7
Internet Explorer 7 Review on the SuperSite for Windows. The review touches on design, new features, security web standards compliance and when and how to upgrade. A nice read.
Web Thumbnails
Nice blog post on how to create thumbnails of web sites using a web service. If the test script on his blog doesn’t work he might be over his daily quota so you might have to go and get your own API key to test…
Simple SWT File Drag’n’Drop example
Drag’n’drop example in SWT (the Eclipse GUI framework used by Sametime 7.5 and Hannover) by Allan Williamson: Simple SWT File Drag’n’Drop example