December 22, 2007

Lawiki

I love wikipedia and I use it a lot. Although I haven't felt the urge yet, I am likely to submit an article of myself to wikipedia. I use wikipedia to find definitions for terms that I use in documents that I write, and I regularly refer to wikipedia from my blog. I have never doubted the correctness of the articles. Sure, I can see the differences in quality of the articles, but the explanations of the terms that I look up are always useful.

Google is launching another wiki based encyclopedia named "Knol" (short for knowledge). My first thought when I heard this news was: "Huh? do we need another wikipedia?". Google wants Knol to be a true wiki. Anyone can submit knols and edit any knol at any time. All editorial responsibilities and control will rest with the authors. In other words: Knol will rely on the care and precision of the knowledge communities. Google will not edit or screen submitted knols.

I am positive that Knol will work. All maliciousness will be muffled by the sheer size of the community. Isn't it amazing that this principle of complete anarchism will probably work if the community is large enough?

Suppose we would apply this to the civil and penal codes of a country that has a sufficient community of inhabitants that are actively involved in submitting and editing the laws in an online law book: the Lawiki. Would the submitted laws be fair to everyone automatically? Would all egoistic laws be muffled by the sheer size of the community? It makes you wonder, doesn't it?

November 28, 2007

Meet MARIA: The Maintainable And Rich Internet Application

Currently, building a MARIA is quite a challenge. A Rich Internet Application (RIA) is often put together using a mixture of languages: Javascript+HTML+CSS+SOAP+XPATH+PHP+... Of course, many RIAs are short living, disposable applications as they are often built for a certain event and need only to last for a short period. Maintenance is not a large issue then. But it is for the RIAs that are supposed to last.

Writing Ajax based RIAs without a reasonably sophisticated Ajax framework usually results in a maintenance nightmare, let alone all the browser compatibility issues you will undoubtedly need to solve. Ideally, you never write even a single line of Javascript. However impressive some of the Ajax based RIA frameworks are, it is still limited to the possibilities of DHTML. Adobe's Flash Player is far better suited for running RIAs than DHTML.

Adobe's Flash Player is a ubiquitous platform for smooth and sexy web applications. Since version 9, it is called Flash Virtual Machine. It resembles the Java VM in several ways. Like the JVM, it provides for garbage collection, remote debugging and uses JIT compiling. The Flash VM was designed and optimized specifically for Rich Internet Applications built with Adobe Flex.

All development tools of the Flex SDK are built in Java. Adobe also provides an expensive but impressive serverside framework, entirely based on Java for connecting Flex applications to Java backends: Flex Data Services (FDS). A good and very affordable alternative for FDS is MidnightCoders' WebORB.

A Flex application usually consists of a set of UI component specifications that are written in an HTML-like markup language (MXML) and a number of classes written in Actionscript for handling events and doing client side processing. Since Flex version 2, ActionScript 3.0 is used. AS3 is a mature, object oriented programming language that is fairly easy to learn for Java developers. However, there is one annoying difference which lies in the way variables and class methods are declared. In action script, you declare a local variable like this:

var x: int;

whereas in Java, you are used to writing this:

int x;

A class method in Actionscript looks like this:

public function square(x: int): int {...}

You know what the Java version will look like. I think you see my point.

There exist other RIA frameworks that create shockwave binaries. The best known alternative for Flex is OpenLaszlo, which is also entirely built in Java, and supports most J2EE Application Servers.

So, developing a Flex based RIA including the required backend services requires your team to use at least three different languages: one for specifying the UI components, one for client-side event handling and processing and (hopefully) one for all the backend stuff.

It would be most ideal if it were possible to use a single programming language for all layers of your application (backend to frontend). The Google Web Toolkit gets you a good way in that direction. You write (and debug) your RIA in Java, and compile it to Javascript (a native javascript for each supported browser). Very cool. I wonder, when will Google introduce a Java to shockwave (Flash) compiler?

November 20, 2007

Google Mashup Editor

After hearing about it on the Google Developer Podcast, I immediately signed up for beta testing Google's new Mashup Editor.
It sounded very promising. I understand that the Mashup Editor itself is written with itself. That sort of stuff keeps impressing me. I just love recursive patterns like that.

With the mashup editor you can easily mix your own web cocktails and share your code so others can blend that into yet other mashups. Very much in the spirit of Web 2.0.

I haven't done anything with the mashup editor yet, but I intend to play with it a little bit and write about my experiences on this blog.

In the mean time, surf (do modern internet users still use that word?) to http://editor.googlemashups.com and take a tour.

November 18, 2007

Control Windows Media Player from an Adobe Flex application, part 2


With respect to my previous post, here's a link to a little demo. The figure above shows a screenshot. On the left side you see a list of channels, which is a very simple Flex application showing a DataGrid with single column. Out-of-the-box, the Datagrid allows you to change the sort order by clicking on the header. Clicking on a channel results in the playing of that channel in the WMP object displayed on the right side.



I will publish some source fragments later as well.

November 16, 2007

Control Windows Media Player from an Adobe Flex application

I know it's been out there for some time already, but I have just discovered how beautiful Adobe's Flex-Ajax-Bridge is. The FABridge allows you to access Flex applications from javascript. It even allows you to listen for events that occur inside the Flex application and hook javascript callback functions to those events.

This makes it possible to make embed both a Windows Media Player object and a Flex application into a website and make them work together seamlessly. Of course, you probably don't want to actually do this, but that's besides the point. You can replace WMP with any other embeddable third party object that you can control through javascript.

Here's what I am so manically enthusiastic about:
I created a very crude webpage that embeds a WMP object and a very simple Flex application. The Flex app just shows a list of live channels (*.asx) that the user can choose from. When a channel is clicked, the WMP loads that channel and starts playing it. All it takes to make this happen is about 8 lines of javascipt that hooks a tiny event listener function to the click event on the channel list in the Flex app. At each occurance of that event, the listener function sets the URL property of the WMP object to the URL of the channel the user has clicked on. Wonderfully simple. Thank you Adobe!

Just wanted to share this with you. I will post a follow-up on this post with some code fragments and such later.

October 30, 2007

Q

Remember Q? He is a fictional omnipotent being from star trek. Being uninfluenced by time and laws of physics, Q can overcome all but the other members of the Q Continuum. A nasty piece of work. However, that is entirely what this article is not about.

In fact, this article is about the exact opposite of a nasty piece of work, which is a neat piece of work. It's about Quality, or short: Q.


Is Q important?


Answer 1: "Sure, but not now" .
More often than not, time-to-market is considered more important then quality. This surely is Microsoft's phylosophy about product development: Put in on the market first, fix Q later.


Answer 2: "Yes, people's lives depend on it".
Think medical devices, airplane control systems, nuclear energy plant emergency systems. Obviously, such systems are among the neat pieces of work.


Answer 3: "Sure, but I want to have it for free".
This is what I always see in the projects that I am participating in (is that just me, or what?). In the best cases, quality requirements are made at the project's inception: We want high performance, high robustness, high availability, high reliability, high user friendlyness, high everything...except cost. Often, these requirements are very poorly quantified. Please be very specific about your Q-requirements. How in the world are we otherwise going to be able to measure it and prove afterwards that the required Q has been achieved?

Of course, in the worst cases, Q is a somebody else's problem: no specifications whatsoever are made on quality. In these cases, Q will become a very costly issue. Q will make it's first appearance as a minor priority issue in the the project's problem and issue tracking system. But it will become more and more important over time as actual system and acceptance tests will point out that the system is way too unstable and that it is a good thing the intended users are coffee junkies. Arrived at that stage, Q becomes an enemy that is very hard to overcome indeed.


What is Q anyway?

Here's wikipedia's definition of quality: the non-inferiority, superiority or usefulness of something. Huh? So, if a product is considered highly usefull, then the quality of it is high. Could it be that simple? Would you say that a website that is very user friendly, very fast and very up-to-date but is unreachable half of the times you access it, is of high quality? No, the unavialability will annoy you, rendering the website useless in spite of its other qualities. This makes me wonder: Could Q really be just about usability?


They way I perceive Q is as a set of demands made upon a product that say something about the usefulness of the product. You should always attempt to have a very clear idea of how critical these demands are for the overall usefulness of the product. Would it be bad if amazon.com would be down half of the time? Hell yes, but probably not for pimpyournailclipper.com. Next attempt to quantify the critical Q demands as precisely as possible. And make sure that these critical Q demands are assured throughout the development process.


Instances of Q

Examples of Q instances are:

  • performance
  • user-friendlyness, ease-of-use
  • maintainability
  • dependability, reliability
  • acuracy
  • actuality
  • availability
  • adaptability
  • flexibility
  • portability
  • compatibility
  • safety, security


Is assuring Q easy?

If Q is specified sufficiently SMART and measured and maintained throughout the development process, than QA could be easy. Quantifying quality can be challenging though. For example, how do you quantify user-friendlyness? You can't, but luckily, it can be tested.

But no matter the demands you make on a product's quality, make them as clear as you can, as early as you can and verify. I guess I can conclude with: Q is simple, but not necessarily easy.

September 19, 2007

The night I broke Duke's arm

The night I broke Duke's arm

Yesterday, I was humming this old reggae song from (I believe) the 80s. It's probably a good thing that this is a plain blog post, because, first, I can't sing and second, I actually hate the song. Nonetheless, I have been humming the stupid song all day. Why? Because I was looking forward to a major event that was going to be held at the Dutch Capgemini headquarters: The Javanight.

In spite of the above mentioned song, Javanight was a huge success. I thank and praise the organizers. There was too much to see but I selectively picked and sat out two talks, before I walked away, enlightened and quietly humming some old reggae song, to catch my train.

First there was the keynote speech by Steve Jones. The auditorium was packed to the ceiling. Steve's speech was very entertaining and misleadingly witty, but contained an important message: Sensible Java developers should speak up more in the JCP forums, and dumb, 'ADHD' Java developers should shut up (and preferably be sacked (these are Steve's words, not mine...)).

Steve's best slides (imho) were about "cleaning up" Java (we don't need midi support in an enterprise server). To start, there should be a single Java core that should provide the bare necessities for anything Java (just basic language stuff, support for designing by contract and, oh yeah, async support). Java SE and Java EE should further be completely customizable in the sense that it should be possible to pick what you need from them and drop all the rest. Hear hear!

After Steve's performance the lot of us lined up for a Chinese/Indian/Indonesian mashup (a typical Dutch dish). During the buffet there was plenty of time to socialize and visit the stands of the Javanight sponsors. From the friendly Sun people, I got a cute styrofoam Duke which you only got if you knew its name (duh...).

I further attended these talks: Jan Ypma's (Capgemini) talk about Model Driven Architecture, and Ted Farrel's (Oracle) talk about Building RIAs with JDA (A JSF framework). I am very glad that I choose Jan's talk. Very inspiring, kept my full attention until the end. MDA is important. If used properly, it ensures consistency, code quality and maintainability throughout the entire software development cycle. What impresses me most is the fact that Jan has already done several MDA projects and has built up very valuable knowledge on how you do (and shouldn't do) MDA.

It was during the first half of Ted's performance that the terrible accident happened: I broke the cute little styrofoam Duke's left arm. It must have happened while I was listening to Ted, presenting us an endless list of all the cool features of Oracle's JDA. I must have gotten a tiny bit impatient because I was rather aggressively squeezing and stretching poor old Duke, until suddenly, the left arm came off . I sincerely apologize Duke, I really mean you no harm.

Now I come to think of it, the arm came off fairly easily. I hope it does not mean anything in a metaphorical sense.

March 29, 2007

iMark

It finally happened. I am going slightly...well, not mad, but I am definitively very enthusiastic about my new iPod. To straighten things out first: I do not own Apple stocks. I wish I did, but unfortunately, I don't. So, all this ranting about my new iPod has nothing to do with any commercial intentions whatsoever. Good, glad that's out of my way. What was I ranting about? O, yes, my new prrrrrrecioussss. Hmm, maybe I am going mad after all.

The iPod has definitely caused a change in my behaviour. The thing is not only a very cool and slick looking gadget, but it also is very usefull and fun. When you see it, you instantly want it, almost like a swiss bar of chocolate that has 80% cocoa printed on it. Irresistable!

What amazes me most about the iPod is its simplicity. All its functions are accessed through this ingenious "click-touch-wheel" (I don't know how it is officially called). Basically, an iPod plays audio and video clips. Nothing special about that in my humble opinion. No, the real use of the iPod is in its ability to synchronise itself with your collection through iTunes. In iTunes you manage your collection of music, movies, TV-shows and podcasts. Almost too conveniently, iTunes is connected with Apple's online media store. Very smart.

I mostly use my iPod for listening to all sorts of podcasts and for watching video podcasts. The quality of the podcast shows varies, but some of them are actually very informative and fun to listen to (or watch). My favority at this moment is the Web 2.0 show. The name is utterly ridiculous, but the content is very good. The concept is simple. The hosts (Josh Owen and Darren Stuart) of this show interview inventors/creators of popular or interesting Web 2.0 web sites. And there's no traveling involved. All you need is Skype and an audio editor.

In the most recent Web 2.0 show they interviewed John O’Halloran, one of the founders and inventors of TrailFire. With TrailFire you can leave a trail on the internet of pages that you visited while you were browsing for something. You simply leave a sticky note on a page that you found interesting and link it to other, previously visited pages about the same subject. The real value of this is that you can share these trails with the rest of the world. Each trail has a unique, public URL that is indexed by search engines just like any other web page. Very usefull. Using google to search for hybrid cars will first show you a list of sponsored links to car vendors. These sites will not refer you to sites of competitors, but a TrailFire trail will. Many other people may have browsed vendor pages for hybrid cars and put sticky notes on those pages with comments stating the usefullness of the page and such. By following a trail, you could save a lot of time. Very much web 2.0 - like.

See, I learned all this by just listening while I was waiting for my delayed train. Thanks to my iPod, that time was not wasted! Now I am continously virtually connected to the internet. That's exactly what the iPod changed in me: now I am even more online even while I am offline. Does that sound mad to you? Well, I could care less (meaning that I could NOT care less about anything you could possibly think of)! This very phrase was enough reason for John Cleese to create a video podcast where he points out the utter stupidity of this often used american phrase. Of course, he is right.

January 23, 2007

The Zeros

It's a typical Wednesday morning in overcrowded Lowland. The traffic on my route (the A12 from The Hague to Utrecht) comes to a full stop. Off course, I was prepared for this and take a sip from my still hot coffee (a custom I copied from American commuters which are rarely seen without coffee).

There is nothing I can do about the situation, so I might as well make the best of it. I tune my car radio to a station that plays 80s and 90s classics. Nice, familiar tunes from the decades I grew up in. Somehow, my musical preferences (and also my fashion preferences for that matter) never got past the 80s.

I wonder what the current decade will be called 20 years from now. The zeros perhaps? And what about the next decade? The 10s? I will be undoubtedly old and hopefully wise in those days. My children will then see me as old fashioned and will not understand why I would want to listen to those horrible, old, screeching noises on those old, impractically large "compact" discs. Very hard to imagine, and I better stop doing it while I am still in the prime of my life!

January 17, 2007

The omnireachability syndrome

Like everyone else on this planet, I have a cell phone. Nothing special about that. While I have it on me and switched on, I can be reached everywhere and always. No surprises here too. However, what many people do not realize, is that this omnireachability can seriously deform you. It starts very subtly, but when it is left undiagnosed for too long it will cause serious social and behavioural deformation.

Early symptoms of the omnireachability syndrome are:

  • breaking into a cold sweat when you suddenly realize that you forgot to switch on your cell phone,
  • having slight feelings of doubt when switching off your cell phone.
If you recognize these symptoms it could well mean that you have been infected too. Don't panic! You are only mildly deformed and there is still hope for you. Just realize what is happening to you and be extra aware of the serious symptoms:
  • always leaving your phone switched on and on a loud ring setting no matter where you are or what you are doing,
  • always answering any call even in the middle of a meeting (not feeling bothered when witnessing such behaviour basically comes down to the same symptom...),
  • getting into a serious panic after discovering that your cell phone's battery has less than 5 minutes worth of power left while having no opportunity of recharging it for the next hour or so,
  • feeling very restless and being unable to focus when you suddenly realize that you have left your cell phone somewhere,
  • feeling light headed at the thought of having to switch off your cell phone (and fainting when accidentally switching it off).
People who have all of these symptoms should be really worried. They are severely deformed and should be sent on a long holiday to some isolated island where no telco has coverage.

January 04, 2007

Clearing your mind

You have probably used and heard the phrase "I needed to clear my mind first before I could..." as many times as I did myself. But how exactly do you do that? O, all right, it's just a metaphor, or isn't it? In any case, I clear my mind a lot. A long walk, preferably along some sort of waterline and involving wind (the force of which depending on the state of my mind) blowing through my hair usually does the trick for me.

In my own head, the mind clearing process seems to sort my thoughts. It purges dead-end-thoughts and categorizes the remaining, potentially fruitful thoughts. I usually end up with a clear idea on how to continue whatever I was doing that required a mind clearing. I guess you could call this process the human equivalent of garbage collection or even defragmentation.

This reminds me a little bit of dreaming. When you dream, your brain is sorting your experiences of that day and puts them in perspective with experiences you had before. After waking up, you usually are better capable of dealing with the experiences of the previous day.
I wonder if there is any relation between mind clearing and dreaming.

I have three young children who produce quite a mess each day of which a huge part consists of laundry. I like my environment to be in an orderly state. I become a little bit restless in a room where all sorts of things are lying around in an unorganized fashion. Don't get me wrong, I don't need my environment to be crisp and sterile. I just want it to be organized to a certain extent. So, I clean up after my kids a lot. As that happens, my mind is somehow triggered to do the same thing. During cleaning up, I often get Aha Erlebnisse (German for Eureka moments).

In our little household, I usually do the laundry as well. Of course, the washing machine and the dryer do all the work, but the laundry folding machine is not yet invented (Or is it? Please let me know where I can buy one!). So, I manually fold all laundry and order it into neat, categorized stacks. Laundry folding has become such a routine for me, that I can do it absent mindedly. I can hold a conversation while doing it, or "dream off" and clear my mind. I found that laundry folding is strangely relaxing, almost therapeutical, and it provides me with new ideas and insights. Now this really looks a lot like dreaming, doesn't it?

Could this be generic? I mean, do routine exercises (like walking a fixed route or folding and sorting laundry) generally clear the mind of the person doing the exercise? I wonder if this has been researched by someone. Let's see what the wikipedia has on mind clearing: ... nothing!

However, Google finds this article on Briangle: mentalrobics. What this article describes reminds me of meditation. That does not really surprise me since hiking is known to have meditative effects on people. I guess that completes my circle: clearing your mind is a form of meditation. There you have it.