Daylight Saving Time

On a blog trip through mpt, Matthew Yglesias, Jeff Cooper I started wondering about Daylight Saving Time and why we have it. WebExhibits has a detailed explanation.

Conceived by Benjamin Franklin, and first advocated by William Willett it's basically a trick to prolong the amount of daylight we work with to reduce economic costs associated with artificial lighting. Electricity in our day, candles in Ben's time. Satistically it has also been shown to reduce traffic injuries and crime.

Since it's easier to adjust law and concepts rather than people's behaviour it was thought easier to tell everyone that for half the year it was one hour ahead of time. Personally I wish it was always DST since I tend to rise later than most except that it would be darker much longer during winter mornings and the sun would never be at it's highest point at noon.

Back in Two (Months)

Wow. I have been busy!

It's now been two months since I've posted to my website. I've been a hermit living away in my office with not even enough time to spit out a few words on my website. Hell the U.S. overthrew an entire regieme since I've been out of touch. Not to mention the whole SARS issue in Toronto and the rest of the world. All work and no play makes me cranky. We'll see if I can't post a little more often.

Google's SafeSearch Criticized

When you're the incumbent, be prepared to take criticisim.

Ben Edelman produced a detailed report released through the Berkman Center for Internet & Society that shows how Google's SafeSearch feature not only blocks adult material but tens of thousands of sites not pertaining to adult content.

Based on Google's description of SafeSearch they filter for keywords and phrases, URLs and Open Directory categories. Just like traditional spam filters, unless it's heuristically based, expects lots of errors. I'm sure Google would rather error on the side of extreme caution rather than have occasional incidents of missed adult content spring up on little Billy's computer screen.

Heavy statiscial analysis on each page is probably too costly for Google at the moment. A two stage filter might prove more effective. Of those classified adult material, run them through a more intensive analysis to be sure and leave a good margin of error to keep out the false negatives.

Sun's Internal Java Memo.

Now making the rounds in Slashdot, blogs and email the internal memo from Sun regarding problems with the Java language.

Being a Java developer I have a bias towards Java. The memo however, is justified in a lot of its comments. Don't run for the hills just yet though. This is constructive criticism that should be looked upon as a way to make some serious improvements and think about the next evolution of Java. Slashdot readers love to dump on Microsoft whenever internal critique comes about, but I'd be more scared of a company that thinks their product is perfect and makes no serious examinations of its flaws.

The idea of Java is fantastic but the implementation falls short first in the area of performance and second in implementation. It's time to stop making excuses and put up or shut up. That said I'm still sticking with Java. The ability to rapidly develop applications with easier debugging and a fantastic library and documentation at my disposal is enough to sell me.

In response to the major points:

"The JRE is very large"

This is a bit misleading in my opinion. I think what they mean is that the JVM can take a significant amount of memory during runtime and is slow with several applications noted. I assume this since a compiled "Hello World" class file would not be anywhere near 9MB as indicated. The size of the JVM is an issue that is separate from the language itself but quite effectively points out that the model for bytecode execution needs some serious examination. The scope of this is quite beyond my level of understanding of the JVM at this point in time. Comparing to Python may be significant although I'm not familiar with Python to determine if it is appropriate.

"Extensions do not support modularity".

Convenience dictates that extensions (javax.*, etc) be put into the main JRE distributions. I think this unnecessary inclusion of optional classes is wasteful. The various Java packages are separate enough that developers can include the .jar files along with their application. This also creates dependency problems as packages such as XML parsers that were once in an application's library are now in the JRE and conflicts arise. I don't know how to back out of this scenario other than to stop adding unnecessary extensions and give precedence over application libraries.

"It is not backward-compatible across minor releases"

The JRE release number has always confused me. JRE 1.2 is Java 2 1.0. Huh? Shouldn't this be Java 2.0? Well yes and no depending on where you draw the lines. In a lot of cases there is backwards compatibility but not in all as the memo points out. Regression tests would be nice. Upgrade to a 2.0 or better yet 3.0 to avoid confusion with Java 2 and start over from there. Make sure that all methods and classes are backwards compatible and that point releases are either an addition of functionality or major bug fixes.

Implicit Saves

Matthew P. Thomas: "Half a second before he clicked, I realized what he was doing, but I regret to say I was struck immobile by horror and disbelief."

I've had this happen to me multiple times usually while using my Flash editor. If you unfocus the browser window while using the editor then refocus the window, the editor will lose focus and you'll have to click within the editor to regain focus. If however you hit the backspace key because you still see the flashing cursor within the editor your browswer will back up a page and lose your changes upon returning as the editor was not really focused. This is probably a bug that might be fixable within the confines of the current Flash player but it illustrates that it would help to retain a documents state upon an unexpected exit of the page.

An addition I'll make to the editor's wanted feature list is frequent saving most likely to a local session variable that will re-populate the lost document if it hasn't been posted but was lost.

Ideally it would be best to create the document then have it continually saving thus removing the idea of the "Save" button altogether. Also inspired in part by mpt's When good interfaces go crufty.

Native WYSIWYG

Paolo has asked at Dave Hyatt's request, that Safari recognize a parameter in the textarea field to enable a native WYSIWYG editor. Not a bad idea, but you'll need an element with parameters and not a single parameter if you want to satisfy everyone's needs. You'll also have to agree on the return format of WYSIWYG editors including simple items such as CSS versus FONT tags and what additional tags are supported.

In the meantime, replace your TEXTAREA fields with an object.

Merry Christmas

After all the hustle and bustle at the malls as I sit quietly here at night on Christmas eve, I remember the passages that my parents would read with me on this night when I was very young. Merry Christmas.

And she brought forth her firstborn son, and wrapped him in swaddling clothes, and laid him in a manger; because there was no room for them in the inn. And there were in the same country shepherds abiding in the field, keeping watch over their flock by night.

And, lo, the angel of the Lord came upon them, and the glory of the Lord shone round about them: and they were sore afraid. And the angel said unto them, Fear not: for, behold, I bring you good tidings of great joy, which shall be to all people. For unto you is born this day in the city of David a Saviour, which is Christ the Lord. - Luke.2

The Isolated Blackberry

I have the privilege of playing with a Blackberry 5810 and soon perhaps a 6710. Both of these handhelds are Java based for use with GSM/GPRS networks. Both have cell phones integrated with the traditional wireless PDA. Awesome I thought. I can ditch my cell phone and have the world at my fingertips. Until...

I use Mozilla, so the first thing I check is how to synchronize the address book. Now I'm not that naive to think that this will be simple. I never dreamed that Mozilla's calendar would work but I thought there would be a chance to get the address book synched.

No dice. Blackberry doesn't synch with Mozilla in any way. Perhaps I can write a conduit as you can with Palm? Nope. The synch operations are integrated with the desktop with no third party conduits allowed in as far as I can tell. To make matters even worse, the address book in Mozilla isn't based on a very widely accepted standard but rather a format referred to as Mork, I believe.

Even if Mozilla were a little more open with it's address book, such as implementing it as an LDAP server or something similar the Blackberry software doesn't even offer that as an option.

The calendar is also limited in it's synching abilities but it's still very much a new work in progress. At least if the Blackberry software supported it I could set-up a WebDAV calendar server.

Now the Blackberry is still a wonderful device. I can check email and surf the web wherever I have a connection, and make a phone call with the same device, but it's basically useless as a PDA since I can't synch addresses, memos, tasks or appointments. So I'm trapped using Outlook or another PIM software that Blackberry prefers. The Treo still looks like the best option at this point.

Santa, are you listening?

Flash Text Editor 1.2.1

Flash Editor 1.2.1 is now up. A bug in the export routine that caused sibling nodes to inherit their previous sibling's properties has been fixed.

Also, please email me if you are experiencing problem highlighting text. I've had a few reports mentioning this problem and I need to fix it. It's most likely caused by the need to update the toolbar and explicitly having to place the cursor selection back into the textfield after the update. If anyone has a suggestion for a better algorithm please let me know. Stuart Schoneveld's editor doesn't seem to be affected by this problem but since he hasn't released the source I can't determine how he's accomplished this.

I'm also trying to find some time to add comments to my weblog so that people can discuss in a forum rather than simply emailing me.

Jboss Theory

I saw Marc Fleury speak at the latest Toronto Java Users Group meeting. Marc has great ideas about the next level of EJB that's produced in the Jboss product he brought into reality. Most of the room was trying to grasp the concepts while Marc kept pushing more ideas out at us, myself included.

I'm now busily working with the new Jboss 3.2 beta and learning about the 3.x interceptor concepts.

Read Marc's Blue paper "Why I Love EJB" for more information on Jboss concepts and the future of Jboss and EJB.

TheServerSide.com also has a video interview with Marc.

Flash Text Editor 1.2

Version 1.2 of my Flash Text Editor is available. Numerous additions have been made including backend support for browsers that don't support JavaScript communication with Flash and a totally redone export routine. I'll be the first to admit that the import and export code is getting out of hand and is not a great example of my typical work. Hopefully over the next two versions I'll be able to produce something much more readable. Flash is totally pass by value so my parsing needs to get a bit more creative.

Some may notice the text selection to be a bit wonky. I'm still wrestling with Flash to get the interface behaviour down pat. If anyone can discern a better algorithm please let me know. I've had a few suggestions and submissions but each implementation had certain flaws that I wasn't happy with. This version has the best behaviour yet and I will continue to try and improve it.

Please play with it and let me know if something is amuck. If you have a solution to the issues listed by all means, fire it off to me.

A special thanks on this one to Anthony Hunt who provided assistance and example code for backend communications.

Forget the Rules

Matt Haughey mentions that SpamAssasin no longer appears to be working effectively against spam. Why? Because SpamAssasin is rules based. Not only that but they display their rules list for spammers to analyze. Just like any game if you show the other team your playbook or run the same plays over and over they'll know your game.

Statistical probability filtering or Bayes filtering techniques are the only way to effectively block spam. When working at SonicBoomerang filtering news and opinion postings we quickly found that rules have inherent error due to human bias. At first we thought that classifying news and opinion was a matter or identifying simple rules. Try as you might you can't come up with a rules based system that is as effective as statistical analysis based on a large training set.

Based on my experience 2000 spam messages are an effective training set to start with. Did your filter get a false negative or false positive? No problem. Add the error to the training set and your filter just got smarter without the introduction of bias.

I had attempted to find a server side Bayes filter but couldn't install the one I found without numerous errors. I'll try again shortly and hopefully come up with a web interface so all the users on my server can have this at their disposal.