Firefox 2.0 Beta 2

I just installed the new Firefox 2.0 beta 2. There are a few nice improvements over 1.5:

  • The most visible change is the new theme. The changes are pretty subtle but seem to be aimed at improving usability.
  • One of my petpeeves: the lack of a search button in the toolbar has been fixed. The go button, which accompanies the url bar, has been there forever but until now the search box had to do without one.
  • Tabs now have their own close button instead of a global tab close button way on the left. This was a usability nightmare from the moment this ‘feature’ was introduced a few years ago. People have been complaining about it ever since. It’s a good example of how long it can take to convince software engineers of something when they have digged themselves into the sand :-).
  • The themes and extensions window have been merged into an addons window. This is probably a good change but it doesn’t go far enough for me: it should be integrated with the options window. I frequently confuse the two and open one when I intended to do something in the other.
  • There’s a ‘recently closed tabs’ option in the history menu. Nice! Also there’s a ‘undo close tab’ option in the context menu on the tab bar. I used to have an extension that did more or less the same. Nice to see good features being picked up by the developer theme.
  • Spell checking. This is a nice feature except for two things: it has no (permanent) disable function. You can toggle ‘spellcheck this field’ in the context menu but the setting does not persist so it comes back on the next time you edit a textfield. Also there is no configuration userinterface for the spellchecker. For example installing a dutch dictionary requires some configuration that requires a number of steps which are probably documented somewhere but not obvious from the present userinterface. So if I go to a dutch site with the us version of firefox (I prefer the english userinterface), basically every word I type will be highlighted as misspelled. Hidden in the context menu of a spellchecked field is an option add dictionaries which takes you to the addons site. The url ends with /dictionaries but there is nothing on the page related to dictionaries. So this needs some work. Suggestions: add a dictionaries tab to the addons window and a disable spellchecking option to the content options tab. BTW. the spellcheck feature is already annoying me. I guess I’ll be looking for an extension to get rid of it. Amazing how many non dictionary listed words can sneak into a post like this.
  • The subscribe to RSS feeds feature has been improved and you can now subscribe using an external feedreader or using several websites, such as Bloglines, which I have been using since a few weeks.
  • Apparently there’s a new phishing/malware detection tool. This might prevent people like my mother from installing spyware. I’ve depended on common sense for years now to prevent me from getting into trouble with worms, viruses, etc. That strategy seems to work fine but having some kind of advanced warning before clicking somewhere is of course nice.

I don’t see much negative stuff anymore so I think I’m going to use this build until the release candidates start appearing. I’ve blogged previously about the version number. Given that the half finished spellchecker + rss fixes are the biggest changes and the rest is merely minor cosmetic work, I still don’t think this counts as worthy of a major version number bumb. However, this seems to be another ‘heels digged into sand’ kind of thing. Everybody has been pointing this out for months and all the 2.0 reviews I’ve read so far seem to point out that there isn’t that much new in Firefox 2.0 as well (I predicted that this would happen on Ben Goodger’s blog a few months ago, seems I was right). For example, ars technica, which usually does a decent job of reviews, says this about the version number:

Is the new release really deserving of the 2.0 moniker? It’s hard to say, given the fact that it looks and feels very much like 1.x. Is it a better browser than 1.x? Definitely.

I think I agree with this assessment 100% It’s definitely a nice incremental improvement and who cares about version numbers anyway :-).

Hugin review

I just got back from Baltimore where I had a nice hotel room on the 21st floor with a view on the Baltimore skyline and harbor. In other words, I just had to shoot some nice panorama pictures. This afternoon I spent some time stitching them together. There are various tools you can use for this. There is the Canon specific stitch assist; there’s a commercial tool called panorama factory which I used long time ago and there is the photo merge included with photoshop. None of these tools are really up to the job, especially when stitching photos that are not perfectly aligned. So I spent some time searching for alternatives and stumbled upon a nice open source tool by the name of Hugin. Hugin is a frontend for a whole bunch of, mostly, commandline tools. These tools are very powerful and to be honest, I don’t understand most of them. But that’s what the frontend is for.

Make no mistake, this is a tool for the professional. It delivers excellent quality but has rather poor usability and requires a specific way of working that is discussed in detail on the Hugin homepage. Actually, the process is rather easy. First you tell it what image to use as a reference point for exposure and stitching the other images to. Usually this is one of the images in the center of the panorama. Then you need to define a bunch of control points for each image pair in the panorama. A control point is a clearly regognizable feature in both images. You define one of them by clicking on the feature and then you click in the other image roughly on the same spot and Hugin will try to find the corresponding feature where you clicked. They recommend a minimum of four control points per image pair.
The next steps are about optimizing and tweaking the control points a bit. Essentially what happens in this stage is that Hugin tries to fit the images together using various algorithms. Once the preview looks more or less like what you want you go to the stitch panel and set it to work. I just stitched 9 images of the Baltimore skyline (zoomed in) and the result are great (click for full version):

View from my hotel in Baltimore

Ok, this version has been compressed a bit. The photoshop file on my harddisk is a whopping 219 MB (15826×2435 pixels). It is composed of 9 8 megapixel photos and is extremely rich in detail. I had to downsize it a little to squeeze that down to 245KB :-). As you can see it is pretty hard to find the seams, yet there are 8 of them. This is pretty much close to a 170 degree view.

Update: a must have if you are going to use Hugin is autopano which produces a hugin project file with automatically recognized controlpoints. It’s a separate tool but not having to manually identify controlpoints is of course a real timesaver.

Welcome to the USA!

I spent yesterday traveling to Baltimore, USA. Quite a lot of stress and uncertainty is involved these days due to the USA overreacting to terrorist threats. Most of the measures are not really effective but they certainly are time consuming.

The first part of my journey was a regular european flight from Helsinki to Frankfurt. Everthing was pretty much normal. Me, my hand luggage and suitcase were checked for dangerous/illegal objects and substances (e.g. a bottle of water 🙂 ), I proceeded to the gate, got on the plane and flew to Frankfurt.

In Frankfurt I had to move from one terminal to another to get to gate B22. For this purpose there is a nicely designed tunnel that is several hundred meters long. Once in the B terminal there were a lot of people and they were all queueing for something this was around gate B4. So I walked along the queue towards my gate when I started te realize that these people were queueing for a security checkpoint. A security checkpoint that I had to pass. With the plane already boarding I started to get a little nervous. By my estimation there were about 1500 people waiting to get to their gate. And they were all in a hurry.

Like the rest of the people I tried my luck with the indifferent security people. In short, they don’t care if you miss your plane. They said it politely but the message was basically to try your luck at the other end of the queue (several hundred meters away) and go F*** yourself. So I squeezed in about 30 meters back and ignored the angry looks from the people behind me (you have to be pragmatic). Slowly the queue moved forward, about a meter per minute.

At last the security people started to do something smart: removing the people from the queue who had time to spare and moving the people forward that like me were supposed to be on the plane already (and still had a good chance of getting on it). The desperate faces of people who were pulled out and told to come back later was heartbreaking. Some had been queuing for 2 hours or more. About 30 minutes later I was searched (no rubber gloves type treatment, don’t worry). The search was pretty quick since there was a lot of pressure on the security guards to hurry up. They glanced in my bag in a way that convinced me that I could have easily hidden stuff in there provided it would not look too suspicious on the scanner.

Anyway, I made it to the plane just in time, that is about 30 minutes after it was supposed to leave and about an hour before it actually left.  The trip was uneventful except for the fact that Lufthansa sees no problems in handing out metallic cuttlery. Yep, that’s right after having been stripsearched for nailcutters, pocketknives and other mettalic objects they gave me a knife and fork that would definately have set off all alarms if I would have had them in my pocket at the security checkpoint. The knife was definately usable as a weapon (though not of mass destruction). Weird.

Arrival in the US (Washington Dulles airport) was a lot smoother. They have these weird shuttles that move between the terminals there. Apparently having dozens of custom made shuttle vehicles that can elevate the cabin to the right height (3 or 4 meters) to move in and out of the terminal is cheaper that just digging a 400 meter tunnel or letting people use an escalator + normal buses. Weird, who’se paying for that?

Security checks were aimed at preventing illegal entry of the country this time. I only had to wait for about 45 minutes this time (last time in the US it was 2 hours). After that I collected my luggage and left the terminal.
Welcome to the USA!

My hotel is quite nice. I’m on the 21st floor and have an excellent view over Baltimore including skyline, harbor and city behind the skyline. I’ll post some panorama pics when I’m back in Finland.

SPLC workshop papers

Next week, I am attending the Software Product Line Conference 2006 in Baltimore. I’m presenting a paper in on variability mechanisms in service grids (posted about this a few months ago) and two workshop papers.

I submitted a paper to the Managing Variability for Software Product Lines: Working With Variability Mechanisms. The paper, which I wrote with Christian Prehofer, discusses some ideas on using version management systems during product derivation:

Version management tools as a basis for integrating Product Derivation and Software Product Families.

This paper considers tool support for variability management, with a particular focus on product derivation, as common in industrial software development. We show that tools for software product lines and product derivation have quite different approaches and data models. We argue that combining both can be very valuable for integration and consistency of data. In our approach, we illustrate how product derivation and variability management can be based on existing version management tools.

An edited version of this paper will be published after the workshop comments have been incorporated.

The second paper is a position paper about applying open source development practices in the context of software product line development:

OSS Product Family Engineering.

Open source projects have a characteristic set of development practices that is, in many cases, very different from the way many Software Product Families are developed. Yet the problems these practices are tailored for are very similar. This paper examines what these practices are and how they might be integrated into Software Product Family development.

This paper was accepted for the First International Workshop on Open Source Software and Product Lines.

I will update my publications page after the conference after it is clear how and where the papers will be published.

Some adventures with ejb 3 and jax ws

You may recall some of my recent frustrated posts regarding the poor state of web services in java. While I still stand 100% behind these comments, I’ve found a somewhat more convenient way of implementing web services using JAX WS 2.0 now. I spent a few hours with jboss 4.0.4 AG to explore its implementation of some of the new JEE 5 (formerly known as J2EE) stuff. Up to now I’ve never bothered with J2EE 1.x since I consider it an overarchitected, complicated technology aimed at addressing what are (or should be) simple issues such as persisting an object to a database.

The nice thing with the latest incarnation of the specification is that it supposedly removes much of the burden of telling the application server to just do its thing. Using annotations you specify what it should do and then it actually goes about and does it without me editing hundreds of little xml files and googling an afternoon for the corresponding documentation; googling some more for stuff the documentation does not tell you and finally yet more googling to explain the obscure exceptions in the log. Well it turns out that some googling skills remain essential but it sort of works as advertised. Basically the process is to write some Pojos, add some annotations and hand the whole thing to the app server to have a magic layer of web services, persistence and transactional semantics generated automatically.
Lets be fair, jboss does not address all issues in J2EE 1.4 and the JEE 5 implementation is definately not complete. But overall it is a huge improvement over the way things used to be, provided you do it exactly as they want you to. The only other open source implementation of the latest specs is Sun’s glassfish so there is not exactly that much choice. Luckily, JBoss is pretty nice technology.
I had some issues which were related to various things not being deployed because of errors in (jboss specific) files, which actually cost me most of this morning. My original aim was to re-implement a hibernate+tomcat based web application I already had and which I am going to do some feature development on soon. This should be easy because jboss uses hibernate to implement ejb 3 persistence and tomcat to run web applications. Indeed I had some benefit since I could copy paste a bit of the more obscure things in the hibernate configuration, thus bypassing several hours of agonizing googling for issues with mysql (did that a few months ago).

The object relational mappings were of course reusable but the whole point of ejb3 is that these are now replaced with much less verbose annotations. Adding the annotations was pretty straight forward. Next step was convincing jboss to do something with them. This is as easy as embedding a persistence.xml file in the jar file with the classes. The main purpose of this file seems to be to tell the appcontainer to hook up a database resource to the entitybeans inside the jar. Additionally some database specific configuration is embedded as well. IMHO mixing configuration with deployment artifacts is not a good idea but I guess we’re stuck with this for a while since it is part of the standard now.
The next step was less easy: dependency injection. It turns out that jboss, or rather tomcat, is not quite ready for the new servlet specification that comes with JEE 5. In other words, any annotations in a servlet are ignored. If you want to use your persistent objects you need to create a so called entitymanager manually. Some googling delivered various code fragments of which one seemed to do the trick. The omnipresent fragments depending on an annotation only work inside an ejb.
Next on the agenda was creating a stateless session bean to encapsulate the business logic. Again some simple annotations do the trick and supposedly dependency injection does work here so getting the entitymanager injected actually works (with the added advantage that the app container is a lot smarter about figuring out transactional semantics). The only problem: it wasn’t getting deployed :-(. Entity beans in a war (web application archive) file are no problem but session beans are.

So I figured I should create a nice ear file (enterprise application archive). This step btw is missing in action from the nice JBoss tutorial I had been glancing through. OK it’s just a zip file with some stuff in it and a pretty straightforward. Essential is the application.xml which you shouldn’t need but which JBoss needs anyway and crucial is the little jboss-app.xml which only needs to contain a few lines to trick it into deploying the session beans with the ejb3 deployer. Similarly the war file with my servlet needs a jboss-web.xml. Anyway, the whole point of an ear is tricking jboss into deploying jar files with the right deployer. None of the info in application.xml and jboss-app.xml actually tell jboss something it couldn’t figure out itself.
The above took quite a few hours of trial and error. I wrote all java code in under 5 minutes however. The rest of this time was spent googling for the right bits and pieces. Any mistake leads to obscure errors such as a null pointer error when using the entity manager which should have been injected but wasn’t. Anyway it now works and I managed to JAX WS 2.0 enable my code with a mere two annotations. Two simple annotations to expose a session bean as a webservice is way more cool than generating wsdl + crappy stub code using axis and hooking up your code to it. I’m definately going to use this some more.
The good:

  • It actually all works as advertised.
  • Writing the java code is considerably easier when you don’t have to worry about boilerplate stuff for setting up database connections, transactions, etc.
  • I will be able to do all of the above in ten minutes in future projects.
  • JAX WS is getting quite close to how I want to work with web services: i.e. keep the stinking WSDL out of my sight.

The bad

  • Plenty of container specific gotchas left but much less than there used to be.
  • Still some pointless configuration files that I want to get rid off. Application.xml; jboss-*.xml; persistence.xml; web.xml all could be simplified or removed entirely. IMHO the jboss-* files are there because the specs omit important features related to deployment. If the spec were improved there would be no need for these files.
  • There’s likely to be a few issues I just have not ran into yet.
  • Documentation is sketchy, misleading and incomplete. The tutorial not explaining how to hook an ejb up to a servlet (kind of essential) without annotation support has cost me quite a bit of time. Since I first had to figure out why the ejb wasn’t being deployed and then how to fix that.

Overall, I’m positive and will continue to use this stuff.

More photos

I’ve visited my good friend Michel Jaring in Oulu this weekend to check out his nice place, eat some makkara and admire the latest member of his family. 12 photos is of course a piece of cake compared to 190 so I put them online already.

190 new photos

I finally finished editing the many photos from my holiday. I’ve dropped about one third of the pictures and polished the 190 remaining photos. This was a lot of work obviously but much less (per photo) than last year when I still had to struggle with the powershot A40 which required extensive fiddling with color balance and curves to get somewhat good results. As mentioned before my new Canon S80 is really good. Basically all I did was use auto levels to maximize per channel contrast; boost the contrast slightly using the curves tool and finally, if necessary, crop the image. In a few cases I had to employ some more tricks due to poor exposure and clipping caused by bright sunlight.

Here are some of my favourites, go see the rest here or here on my new mobile site.

Rohne seen from above

My mother

Marseille

Milan

some sloppy engineering

torino

new site: mopho.jillesvangurp.com

I recently got a new phone for testing purposes which is equiped with our new open source browser, wifi, a full keyboard and a nice screen with pretty good resolution (it’s the Nokia E70). Anyway, my regular photo site contains a nice collection of pictures but is a bit too heavy for this otherwise nice phone. So I created a light version of the site which contains almost all my photos and is still only 10 MB. The light version uses smaller thumbnails of lower quality and scales the full pictures to fit in a frame of 350×300 pixels and compresses them pretty strongly. The picture size should just about fit in the browser screen of the E70.

mopho.jillesvangurp.com

I will still keep my regular site of course and in fact I will upload a large number of new photos from my vacation soon (to both sites). I’m slowly working my way through the 300+ pictures I took with my S80 (I’m processing them chronologically and am about 2/3rds of my vacation). The picture quality is excellent and I am now really happy with this camera. But of course because it doesn’t do much contrast enhancing or other cheap tricks to boost quality at the cost of loss of detail, that means I have to go and edit each of the photos manually. I’m discarding quite a few but still the end result will probably be close to 200 pictures.