Friday, June 17, 2011

3D in the browser

We've recently done a project where we needed to do 3D visualizations in the browser. It's not incredibly fancy, mostly showing walls and floors of rooms and some stuff in them.

Before we started coding, we were discussing what platform to run it on. After some going back and forth, we ended up deciding that despite the 3D requirement, going for a web app would probably pay off in the long run because we then don't have the hassle of installed software and perhaps worse, the problem of predicting what particular platform Microsoft will declare obsolete next year.

So in the end, we settled on the web, going for HTML and canvas for the 2D part and WebGL, the new OpenGL standard for the web, for the 3D.

There's only one problem, WebGL was so new that at the time, only Chrome had a release with support. Not long after, Firefox joined the ranks. But still, it's a technology you can't rely on unless you can control the user base and ensure they install the right browser.

Similar problems kept the 2D HTML canvas back until a project like excanvas turned up. Until Internet Explorer support is there, new standards are a no-go for many.

Thus Martin has been working on and has now released JebGL, a WebGL emulation layer for older browsers and most importantly Internet Explorer, back to IE 6.

It relies on the OpenGL support in Java, translating WebGL calls into JOGL calls in a Java applet. We've had a look at other options, such as using the Flash 3D API, but we needed support for some of the fancy stuff in OpenGL so it would be a pretty huge task to try to emulate that in a completely different API (on a lower level, that's what Google is doing with the ANGLE project to try to work-around bad OpenGL drivers).

So as long as Java is in, you can now rely on WebGL (well, barring bugs and missing features in JebGL). And if Java is not there, there's at least the option of asking people to install it, most browsers seem to handle that gracefully these days, rather than requiring them to switch to a completely different browser.

Monday, May 30, 2011

Organizational patterns

We went to a seminar not too long ago in a local interest group on agile software development. One of the speakers was Jim Coplien. He's a good at it, speaking emphatically on what to do and not to do.

Also he had the interesting point that if you're going to try to change what a software development organization is doing, process improvement programmes turn out to be less effective than one thinks because processes tend to come from the underlying structures. So if you don't change them, people fall back after some time.

For instance, if you have the problem that the developers aren't good enough at coming up with what the users need, then instead of installing a process where they must fill in check lists to try to force them to listen, maybe you need to look at the fact that they aren't communicating directly with the users, but perhaps through a manager who dictates what should happen. If you change the manager's role, maybe the rest will follow automatically.

Anyway, he talked at some length about some organizational patterns he and others have come up with, which was interesting because many of the seem to describe what we're doing at IOLA. He's collected a big bunch in a book he's written (together with Neil B. Harrison), "Organizational Patterns of Agile Software Development".

If you're interested in software development and what works when you structure the work, the team and relationships to stakeholders and users, it's worth a read.

What's interesting in it is that most patterns may be profound in their effect, but are really lightweight in what you actually need to do. For instance, if you have the problem that developers are interrupted too much, you can sacrifice one person and make him a firewall that people have to go through. Simple as that. No big piles of lists and specifications and meeting minutes and memos necessary.

I think the big downside of the book is that it's not very friendly written. It's in the style of a reference in many places with only little background rationale and so many crossreferences that you need to have read most of the book to understand what's going. This probably works well for Jim Coplien when he travels around on his research and consultancy campaign to fix sick organizations, but I think the audience for a gentler style would be much higher.

Still, it has material I haven't seen elsewhere and it's actually based on research on succesful software teams rather than just handwaving.

Friday, April 8, 2011

GNOME 3 is nice

So GNOME 3 is out and I decided to give it a try with the Fedora live CD (or should I say USB stick). I must say I'm impressed. Overall it's really clean and just works. The new application chooser is downright brilliant compared to the old menu. I've tested some of the previews of GNOME Shell, and the thing has come a long way.

Of course, Alt-tab is still broken, the default (and only) theme is a bit top-heavy, window movement wasn't quite smooth on Intel GMA 950, there was the occasional crash of the new settings stuff, but all in all not bad for a .0 release. And the new direction means that there are now people working on the core user experience, something that appears to have been more or less neglected for a very long time.

Plus much of the new shell stuff is written in Javascript so should be easy to hack on in case the designers don't come to their senses any time soon (there's already an Alt-tab hack).

Tuesday, March 29, 2011

A take on good, reusable Java design

This is just too amusing not to pass on.

Wednesday, March 23, 2011

Spring time!

It's that time of the year again here in Denmark.


The crocuses started flowering, and I managed to sit outside for quite a while in a short-sleeved shirt without freezing to death. There's no doubt. Spring arrived this weekend.

It's been a busy winter. I...

... managed to fall sick with flue-resembling symptoms and fever three times in 6 weeks, beginning with the Christmas holidays.

... shoveled a great deal of snow away, like last year.

... closed probably around 100 issues in the Flot issue tracker (and had the misfortune not to discover a well-meaning fork until a month after).

... mapped a big bunch of roads in OpenStreetMap, mostly centered around Janne's parents home. Thanks to the effort of volunteers, we've got aerial photos of almost the entire country and will, I think, within this year have a complete free street map of Denmark. I found out mapping is a fine hobby; it's a nice way to relax while gaining the usual open source feeling of contributing to something greater than yourself.

... read 16 books on local history of Vendsyssel and Himmerland, the regions where I live, told by old people that recount their youth around 1900-1930, mostly with farming, quite an eye-opener, really, and a great complement to the things we were taught in history lessons in school. I also read the Arthur trilogy by Bernard Cornwell (it wasn't quite as good as his Saxon book series, although maybe I'm just biased because I prefer the brought-up-as-a-Dane protagonist from those).

... wasted some time with Tremulous 1.2pre after having stopped playing Tremulous for a long time. It is a surprisingly difficult multiplayer FPS. I mostly play the alien side because I like the speed, but since I'm still not very good at it, this means I have to trick other players into coming close enough to be vulnerable.

... and annoyingly failed to get into the habit of regular piano practicing again.

Tuesday, March 22, 2011

Flot 0.7 released!

I just released Flot 0.7! Highlights are multi-axis support, area charts and a pie chart plugin, and a big bunch of bug fixes, including an IE 9 fix and reworked replotting support that reuses the canvas elements to put an end to the memleak troubles. The complete list of changes is here. There are some API changes from the axis rewrite.

In related news, I've moved the source code repository to github to make it easier for other people to contribute.

It has been clear to me for some time that more of the things that are currently inside core Flot needs to move to plugins. As time goes, more specific things turn up on people's wishlist, and right now it's just not possible to satisfy them all without bloating the core. Having specific feature sets in a plugin also makes it much easier for people to customize them a bit by hacking the plugin code without having to maintain a delta with the whole of Flot.

Fortunately, some people have expressed interest in helping out, partly due to me taking a hiatus from the mailing list for some time last year, so with a bit of luck some of these things may happen in a not too distant future. Maybe we'll even get a better hyperlinked format for the documentation, something that has never really managed to climb to the top of my list of priorities so far.

Friday, February 25, 2011

Lyrics for GNY Beirblakken

Janne and I had some trouble finding the lyrics for Beirblakken performed by GNY (listen to it on their Facebook page). Turns out it's from a Norwegian folksong Beiarblakkjen (which perhaps originally means a war horse). There are a couple of versions of it. The full reconstructed text sung by GNY is approximately this:

Der satte tre kjerringar under ei bro
- dei trea gullsko
Dei skapte blakkjen av mannblo',
- så vide fara dei løyndar ord

Dei skapa blakkjen af manne bein,
- dei trea gullsko
og Beiarblakkjen så kalla dei han.
- så vide fara dei løyndar ord

Og då dei hadde blakkjen gjort,
- dei trea gullsko
då sende dei han til kongjens port.
- så vide fara dei løyndar ord

Da kom'e Niklas fride,
- dei trea gullsko
sa: Eg tore blakkjen ride.
- så vide fara dei løyndar ord

Niklas red til han bli' mo.
- dei trea gullsko
Til støvlane hans bli' fulle av blo'.
- så vide fara dei løyndar ord

Dei første steg som blakkjen sprang
- dei trea gullsko
Da kom han sig til helvede frem
- så vide fara dei løyndar ord

Da han kom til himmelriks dør,
- dei trea gullsko
der hadde blakkjen voret før.
- så vide fara dei løyndar ord

Gravde dei ham i vigde jord,
- dei trea gullsko
så inkje ravnane drikke hans blo'.
- så vide fara dei løyndar ord

This Norwegian dictionary was most helpful in deciphering some words - "kjerring" means wife/old woman, "løyndar" hidden, "trea" tread, "fride" fair, "mo" tired/paralyzed, "vigde" consecrated, and "blakkjen" is a horse (of the old Norwegian fjord horse kind).