Java Floating Point
“How Java’s Floating Point hurts everyone everywhere”:http://www.cs.berkeley.edu/~wkahan/JAVAhurt.pdf was written in 1998, and I’ve seen a reference to it every now and then. Makes as much of a fascinating read today as it was six years ago. Apart from a critique of Java’s floating point implementations, its also a reasonably good overview of the pleasures and pain of numerical analysis. Did you know that you could get completely different solutions to complex functions depending on how your compiler treats the difference between +0 and -0.
What has struck me most, is that it seems one needs to be knowledgeable in “linear algebra”:http://en.wikipedia.org/wiki/Linear_algebra as well as “computer architecture”:http://en.wikipedia.org/wiki/Computer_architecture – as classic a case of “leaky abstractions”:http://www.joelonsoftware.com/articles/LeakyAbstractions.html as one can get.
New Firefox
I installed Firefox 0.9 hours after it was released, and have been playing with it for a few days. A few observations are in order.
1. It “crashes”:http://bugzilla.mozilla.org/show_bug.cgi?id=246836 … on sites that older versions render correctly. Firefox 0.8 never crashed on me, and in older versions, the only problem I’ve seen has been due to the textbox completion bug.
2. It does Complex Text Layout better, for Indic languages. It seems to handle zero width glyphs correctly, which is a major improvement, but it still does not handle “negative width” glyphs correctly.
3. What’s with the default xft build? Doesnt anyone else believe that anti aliasing regular fonts is a “bad idea”:http://www.joelonsoftware.com/articles/fog0000000041.html ? Looks like I’ll have to rebuild from source, which I have tried to avoid, since building mozilla isnt your usual cofigure/make deal.
4. My “favourite theme”:http://fls.moo.jp/moz/breeze.html doesn’t work with 0.9, and its replacement is no match to the elegance of the original. So I’ve been messing around in the theme definitions to create my own… the biggest barrier currently is the fact that I cant find a way to test a new theme without packaging it up!
On Incompleteness
Gregory Chaitin has put up on the web his wonderful new book “Meta Math! – The Quest for Omega”:http://www.cs.auckland.ac.nz/CDMTCS/chaitin/omega.html (via “Tim Bray”:http://www.tbray.org/ongoing/When/200x/2004/06/11/Chaitin ). Some random thoughts … apart from the fact that the book itself is brilliant.
Services and Objects
Steve Loughran makes a “declaration”:http://www.iseran.com/Steve/blog/archives/000117.html :Autogenerating a SOAP service from implementation classes is dangerously brittle against accidental change, and misses out on the flexiblity opportunities of XML
Sort of agree, but got me thinking. I think one of the major reasons why CORBA failed to take off was the lack of tool support… it was too da’n difficult to build and test (There are other reasons, but thats probably the subject of another rant). Imagine if Visual Studio had a CORBA wizard instead of an ATL wizard. The fact that one can now wrap existing classes in almost any language, from Java or C# to Ruby as a Web Service without much effort is probably the biggest indicator that Web Services use will be widespread. So I was wondering, does the roots of WS’s success contain the seeds of its own disctruction?
I sure hope not. And thats because I don’t think this is really a object vs xml issue. Its much more a object vs service design question. When people start designing for SOA, I believe much of this will be moot. Will people mess up on the way? You bet. Will some architects continue to design traditional objects? Sure. But once most architects “get” SOA, thats when you start thinking differently, and thats when it doesnt really matter if your WSDL is compiled into a class with methods. I am pretty sure that over the next few years, different ways of implementing the WSDL “contract”:http://www.sys-con.com/story/?storyid=44354&DE=1 will be developed. We can surely access the power of the XML-Schema without having to manually parse and create XML documents. In spite of that, Web Services will be worthwhile only if one starts to design for services, as opposed to objects. That’s a shift that has to be made.
Compiled with GCJ
GCJ has always been an interesting project to watch, but only recently have I felt emboldened enough to try out some (precompiled) apps, thanks to the “folks”:http://people.redhat.com/gbenson/naoko/ at RedHat. I used the precompiled versions of tomcat and ant on some of our smaller projects, on a RH9(RedHat 9) desktop. Herewith, some experiences.
Network Tuning
We’ve been busy at work tuning a high performance network application. We were having trouble tuning the Windows network stack, with a 30% throughput drop compared to Linux. Searching MSDN, we got some clues, but not a solution. Following those clues into “man socket” and its friends on a Linux machine told us what we needed to do!
So we now have similar performance in Linux and Windows, which is good.
Lesson: MSDN is an amazing resource, but it sure could be improved. Bigger Lesson: Thank god for BSD heritage!
Naked POJO's
James Strachan asks if it is time for “Naked POJO’s”:http://radio.weblogs.com/0112098/2004/03/02.html#a461.
When I first came accross “Naked Objects”:http://www.nakedobjects.org/ a couple of years ago, I was excited at what I thought was a cool idea. That thought quickly turned into mild derision when I realised that all objects need to extend from Naked Object… read the gory details in max’s “criticism”:http://weblog.hibernate.org/cgi-bin/blosxom.cgi/2004/02/12#notsonakedobjects if you are interested.
Naked Objects would probably be the best way to prototype an Object Oriented System. You can focus on creating and validating the business objects without worrying about UI. I can also see how such an effort would be useful in ensuring a cleaner/”pure-er” object model.
Another useful case would in to create simple data admin screens for application. One often spends a large amount of effort in creating data admin screens which are quite incidental to the rest of the application.
I’ve never liked O-R tools that insist that all your objects should extend “PersistentObject” or some such thing. To me, its a bad architectural smell. Same here.
From a practical perspective (since this is quite a revolutionary idea for most users)l, I would first like to see how users react to naked Objects using an existing application. Again, I think no-one can, in his right mind, justify the cost-benefit of coercing existing classes into the Naked Objects hierarchy.
So, I imagine its time for a Naked POJO. I am certain its technically feasible as well. If anyone wants to write one, consider me an early beta user 🙂
Brian
Just back from the “BLUG”:http://www.linux-bangalore.org meet where Brian Behlendorf spoke. It was interesting to hear “Apache”:http://www.apache.org history from the “horse’s mouth” … I thought he quite held the audience captive. Personally, it was great to meet up with someone you’ve only known through emails.
Pipelines and OpenAdaptor
The “Pragmatic Duo”:http://www.pragmaticprogrammer.com have published a nice “article on Pipelines”:http://www.pragmaticprogrammer.com/articles/nov_03_pipelines.pdf in a recent issue of IEEE Software. It talks about moving the idea of pipes from the realm of unix shell programming into general software architecture. Couldnt agree more.
The implementation section however suffers from a little bit of “handwaving”. I would suggest that rather than writing a thread/processor/queue implementation (which is a dog to get right unless you are Doug Lea :), or using a messaging middleware (which is usually an overkill if you dont need distributed messaging), try out “OpenAdaptor”:http://www.openadaptor.org. There is nothing that’s easier for getting a random set of data sources, sinks and filters tied together without much coding. I think its the best way to do pipelining, at least in Java … it’s saved me months of work at various occasions.
Talk Slides
I have uploaded the slides for my talk on OpenBSD firewalls at Linux Bangalore/2003 “here”:/talks/openbsdfirewall/ .