Wednesday, November 07, 2007

Angelina Jolie is my girlfriend

It's interesting to watch the swirl of responses to the announcement of the Open Handset Alliance platform, the culmination of collaboration around Google's 2005 acquisition of Android Inc.

There has been the expected response from Symbian about how Android will never get traction as a mobile phone platform. The rationale that "it's rocket science", and therefore too hard for the alliance, is just nonsense. I've heard that excuse too many times from those who think that means there is therefore no space for innovation and choice.

The other, rather puzzling response was from Sun's Jonathan Schwartz, who congratulated Google on the announcement, and set about aligning Sun's Java implementation, and Netbeans IDE, with the Android platform. I say 'puzzling' because he is apparently assuming that Sun's Java ME community will play a big role on the Android platform. However, Esmertec is a founding member of the Open Handset Alliance, and their 'Jbed' Java VM will be available on the Android platform immediately, including Java ME support.

To be clear, the 'Jbed' VM will be available under a commercial license, it is not being open sourced. And it is not based on JavaFXMobile or phoneME. It seems that Sun's welcoming Android to those communities is an unrequited friendship -- its like me unilaterally announcing that Angelina Jolie and I are now 'an item'.

It remains to be seen whether there will be an open source Java implementation made available for the Android platform that is compatible with it's "commercial-friendly" Apache License terms. I suggest that rather than speculating, the smart money will wait until the early preview becomes available on November 12th.

Tuesday, August 28, 2007

Sending best wishes to Greg Stein

I was shocked to read the news that Greg was set upon outside his home last Friday. Attacking somebody already on crutches has got to be about as low it goes even amongst the criminal elements of society.

I'd like to add my best wishes for Greg's speedy recovery, and hope that his cowardly attackers are brought to justice for their actions.

Thursday, July 26, 2007

Here be (multiple) dragons

Are you thinking about the impact of multi-core processors on the code you write? Are you just thinking about it or actually writing code that will exploit multiple cores?

"The computing industry changed course in 2005 when Intel followed the lead of IBM’s Power 4 and Sun Microsystems’ Niagara processor in announcing that its high performance microprocessors would henceforth rely on multiple processors or cores." [The Landscape of Parallel Computing Research: A View from Berkeley]
Programming for multiple processors is hard. I find myself having to make an explicit mental switch from a 'functional view' of what the program is trying to accomplish, to a 'multi-threaded view' of how the flow of control can help / hinder the program effectiveness in the light of multiple threads running on multiple cores. Then mentally switch back and forth until both worlds are reconciled. I'm sure smarter people can do this in a single pass, but I can't.

There are multiple dragons to consider too, that live in the regular world of parallel algorithms (deadlock, stalling, synchronization, ...), in the nuances of the system's memory model (visibility guarantees, NUMA, data races, ...), and in the language implementation choices (particular compiler's instruction reordering, effects of Java final, pthreads version, ...).

In Java there is a defined memory model (JSR133) and set of concurrency utilities that significantly help with writing correct, portable programs. Intel have released a set of libraries and utilities for C++ called 'Thread Building Blocks' that should improve the correctness and portability of those programs too.

The Intel suite (which appears to be descended from the OpenMP code) runs on Windows/P4 or Xeon, Linux/P4 or Xeon or Itanium2, and MacOSX/Core Duo and has been released under a modified-GPLv2 license, with the option to commercially license at a measly 300 dollars a platform.

That commercial license option means this is another 'parallel open source project'. If you want to contribute to Thread Building Blocks then you must assign copyright to Intel, and grant them a broad patent license. In return they license your code back to you to use as you choose. The Governance model is 'Intel decide' too. I have to say that I'm no fan of this style of project, but back to the technology...

Abstracting the 'multithreaded view' into a set of consumable APIs and pragmas helps the application writer focus on the functional correctness, and allows the compiler writers to optimize for known patterns without the disruption of language changes.

It will be interesting to see if these building blocks are adopted by the other major CPU/compiler vendors, and whether they are extended into languages beyond C++. Will they do it under the Intel terms for this project?

The technology is sound. Anything that helps us voyagers to navigate the uncharted waters and avoid the dragons will be most welcome.

Tuesday, July 24, 2007

Grand Poobah of the Harmony lodge

I'm delighted to have been appointed to the Chair of the Apache Harmony project, taking over from fellow harmonizer Geir Magnusson, who has been chair since the project's inception in 2005. Geir moves on the Apache Board, and remains Apache's JCP SE/EE Executive Comittee member.

In truth, the position of Grand Poobah doesn't grant any exceptional powers -- I don't even get a big hat or fancy medal or anything :-). Of course, the Harmony project is the community of developers who show up on the dev' list every day, and it is managed day to day by the committers on the PMC.

Since Apache is a 501(c)3 not-for-profit corporation, the Board requires a corporate officer acting on their behalf within the project, and in turn all project members provide oversight and guidance to the project. This delegation model provides shared responsibility with the umbrella protection of the Foundation as a whole.

It's an honour to be appointed V.P., Harmony. Now if you'll excuse me, I'm off over to eBay to look at the hats on offer.

[For the avoidance of doubt, "no" that is not me in the photo (or Ken Coar), it is His Holiness Pope Shenouda III photographed by Michael Sleman]

Thursday, July 12, 2007

OSSummit call for speakers is closing

If you were thinking of submitting a talk proposal for the joint Eclipse / Apache sponsored OSSummit conference being held in Hong Kong at the end of November this year -- then you don't have much time left to act! The Call for Participation (CFP) closes on July 13th.

While the CFP promotes the meeting's interest in Apache and Eclipse projects, I'd personally be particularly interested to see a significant number speakers from local free software and open source efforts in the P.R.China.

The organizers are also providing a generous allowance for flights and accommodation to all conference speakers, so it should be a great opportunity for everyone to meet and exchange experiences and advice.

[Disclosure: I'm on the organizing committee for OSSummit]

Monday, July 02, 2007

G-WMAA cleared for take off

I live in Hampshire which, until yesterday, was the only remaining county in the UK that didn't have an air ambulance service. The service will be particularly useful to residents of the nearby Isle of Wight if they need emergency care only available on the mainland, as well as medical emergencies along the area's coast or in the county's broad rural areas.

Through the hard work of the staff and volunteers of the associated charity the Bolkow 105 aircraft has been bought (call sign G-WMAA) and has become operative. The charity needs £2,000 per day to keep the air ambulance aloft, and all of it is raised through community donations since the charity receives no money from the government.

This project has been particularly interesting to me. As a bit of an aircraft nut, and such a clear benefit to the community, I have been happy to contribute (in a very small way) to the challenge over the last couple of years. It's great to see the service finally get off the ground, literally.

I hope never to need the service, of course, and wouldn't wish the need on anyone; but accidents happen, and when they do we should provide the best service we can to help the unfortunate victims.

The beginning of the beginning of the end for the JCP

There is trouble brewing in the world of Java. The evidence is not so apparent at the moment, but it has the potential to rock the Java ecosystem to it's foundations if the issues are mishandled.

The principal issue is around the definition of 'standard' Java. By mutual agreement, companies and individuals contribute to the definition of new Java standards through the Java Community Process (JCP). The 'mutual agreement' of these contributors is written down as the Java Specification Participation Agreement (JSPA), which is the legal document describing the terms under which the contributions are made and can be used. Like all legal documents, it doesn't describe every last nuance of the community interaction, nor should it attempt to do so, but in general the JCP has worked because there has not been an unreasonable agent at play -- everyone has been participating for the general improvement of Java, and everyone benefits from the general improvement of Java.

So what happens when somebody tries to tip the balance of community participation in their favour? Would you expect other community members to cry foul? try to right the wrong? withdraw their collaboration? Well, yes!

It is well documented how Apache have written an open letter to Sun asking for a license to the the Java SE 5 JCK. So far, Sun have refused to grant such a license under terms that community members consider reasonable. The details of the unacceptable terms are not so important here, but if the majority of the community feels that the work they have contributed via the JCP is being misappropriated by an unreasonable agent, what do you think they are likely to do?

I suggest that unless Sun engage in a round of diplomacy and negotiation with the 'heavy-lifters' on the JCP Java SE/EE Executive Committee, such 'heavy-lifters' will decide pretty quickly that contributing to Java via the JCP is not a safe, smart thing to be doing, and the centre of gravity will move elsewhere.

In the current situation, Apache is the fall guy and the JCP members are watching carefully to see how the issue will be resolved. Whereas licensees normally negotiate with dollars behind closed doors, Apache are holding up (open source) principals and (now) negotiating in public. JCP members know that next time they could be the target

We can only speculate as to why Sun are taking the current position. Maybe it is a control thing -- their marketing certainly leads people to believe that Java == Sun, rather than Java is a result of contributions from many people that are brought together by Sun in the JCP.

Maybe it is the fear that the JCK is inadequate to ensure Java's value proposition of 'write once run anywhere' (WORA). There is a huge gap between being compliant (passing the JCK) and being compatible (behaving like the reference implementation). For WORA to work, Java developers have to code only to the specification, or every implementation has to behave the same way down to very small details. For so long, there has been only one game in town that developers have coded to the reference implementation, not the specification. So when Apache deliver a compliant implementation, and Sun have to admit that it is real Java, but it doesn't run half of the Java applications on the planet... what damage will that do to the Java brand?

So I further expect that Sun will try to migrate the work currently conducted "through JSR's in the JCP" to work being conducted "in projects in OpenJDK" -- that is, try to blur the distinction of the specification and the implementation. The goal being to ensure that there is only a single implementation. Of course, with only a single implementation the specification becomes moot -- the implementation does whatever it does.

That's how I get to my conclusion, that this may be the beginning of the end for the JCP. By granting a suitable license to Apache, Sun would demonstrate to the community that the JCP is more than a mechanism by which they attract contributions to a single implementation they control. They may be persuaded to do so, even if they would prefer not to.

[2007-07-09 Edited to remove duplication junk, maybe caused by using a dollar sign?]

Sunday, July 01, 2007

Bank of Tim International opens today!

Being a Dad often feels like being a bank to the family, and the most popular transactions tend to be withdrawals! But this weekend I upped my game and became an International Commercial Banker.

I've made a loan to a Samoan sewing business to be repaid over a term of 18 months. Maybe. I've never met Freida Lisa Makesi (pictured), the businesswoman who took out the loan, which has been granted with no security or guarantee, and for which there is no interest payable (back to me).

Ok, I'll come clean. I signed up with a microloan site called Kiva. The money at stake is only USD$200, and I'm partnering with 15 other people to provide the full value of the $850 loan that Freida's business needs to buy a sewing machine.

Kiva is an interesting way to link those of us for which a couple of hundred bucks is not a life-changing amount, with those for whom it most certainly is. The website details a number of needy businesses that have applied for microloans under conditions that a 'real' commercial bank would not touch. You use your own criteria for selecting the borrower, and lend them any amount from $25 up to the full loan amount.

As the loan is repaid you get to see the payments being returned as credit to your Kiva account. From there you can withdraw the money for a new gadget you don't really need, or lend it out again to help another business move one small step up the ladder. Of course, you may never see the money again for any number of reasons, not least is that the mortality rate in the countries supported is way higher than where YOU probably live, or the borrower simply disappears with the money; but the field workers who administer the loan on your behalf select the borrowers based on their experience, and have an remarkably low defaulting rate on the loans they arrange.

I have a structured approach to my charitable giving, but this is the first time I've tried lending money to a worthy cause. I'll let you know how it goes, but Freida Lisa Makesi has to be a better risk than my daughter for making good use of the money, and maybe paying it back!

Tuesday, June 12, 2007

Apache and Eclipse Foundations' closer collaboration

The Apache Software Foundation and the Eclipse Foundation are continuing to build a mutually-respectful working relationship by jointly organizing a conference to be held in Hong Kong later this year.

OS Summit Asia 2007 is the first time the two open source software foundations have joined forces to promote the exchange of experience and knowledge spanning the foundations' common interests. Apache and Eclipse are generally considered to be particularly "business friendly" as their licenses are receptive to combining open source and proprietary code in software products.

In March, EclipseCon extended Apache committers a reduction to their conference registration fees equivalent to Eclipse's own committers. Eclipse 3.3 redistributes various Apache-developed code (like Apache Ant build system, Apache Jasper JSP engine, the Apache Lucene search engine, and so on), and Apache projects are free to redistribute EPL code in binary form.

The OS Summit Call for Participation invites talk submissions on Apache and Eclipse projects, issues facing the open source community, and experience reports. There are also plans for in-depth tutorials leading up the conference proper. The meeting will be held from November 26 - 30 at the Cyberport in the southern district of Hong Kong Island.

[Disclosure: I'm on the organizing committee for OSSummit]

Friday, June 08, 2007

GNU forks OpenJDK (despite claims to the contrary)

The folk who have used Firefox code to produce Iceweasel, have now taken OpenJDK and produced "IcedTea".

Apparently impatient with Sun's progress on establishing the code repository, governance model, and replacements for the encumbered parts of the implementation, the GNU project have gone ahead and started the work on their own terms.

Red Hat's Tromey told people at last month's JavaOne meeting that the company were stopping work on GCJ and Classpath to focus their finite resources on OpenJDK.

In announcing the IcedTea project, Haley (also of Red Hat) is keen to say that this is not a fork of the OpenJDK project, and that the code will be contributed back to OpenJDK "once the legal and technical issues are resolved". In the meantime, go and make yourself an IcedTea as an alternative to your cup of Java!

Welcome to the stable of open source Java SE implementation projects.

[p.s. I see that the image of a glass of iced tea that the project chose to front their homepage appears to have been taken from Poor Richard's Restaurant's on-line menu. Perhaps they'll use their own IP there too if they are that serious about free legal issues ;-) ]

Thursday, June 07, 2007


My transport of delight is a 2000-model Honda CB600 Hornet motorcycle. I've owned it for about four years, and use it for daily commuting a short distance all year round.

Last Tuesday I crashed into a car that pulled out from a side road without seeing me. I'm afraid the bike is probably not going to make it, but thankfully I walked away from the accident virtually unscathed.

It was a bright sunny day and I left home at 8:30am, the same time as my wife in the car with the children on the school run. It was a warm sunny day and I was wearing the same gear I religiously pull on for every trip no matter how long -- full face helmet, ballistic nylon HeinGericke jacket and equivalent trousers with in-built armour, motorbike gloves, and leather motorbike boots. I joke that on days like this you have to keep moving to avoid cooking in all that gear, but it is only ever too much gear until you crash, at which point every piece is well appreciated. I also always ride with my headlight on dipped main beam to make me more visible.

I pulled onto the A3040 highway which has a 40mph limit, and was probably at 30mph and accelerating when I came up to a junction with a side road on my left. A car was in the side road waiting to turn right onto the A3040 (i.e. to go in the opposite direction to me).

A habit I learnt from taking the ROSPA Advanced Riding course is to watch the driver and check that they actually look at you to ensure they have seen you. I was looking at the driver, and she appeared to look back, but...

As I got close to the junction she set off across my path. I slammed on the brakes.

I had only just set off from home, so my tyres had not warmed up, and my bike doesn't have ABS, so it is always a gamble between under-braking or locking the wheels and provoking a skid. Once that front wheel looses grip you can kiss goodbye to staying upright and I didn't want to slide under the car!

Then there is that point where you know you are not going to be able to stop in time. I assume the other driver saw me upon them and instinctively hit the brakes, but it left me with little option as I simultaneously tried to steer round the back of the car blocking my way, but to no avail. I smashed into the offside rear door with an almighty crunch! The right side of my motorbike and my body took the full force of the impact. Since I had got some braking in, I was probably doing about 20mph when I hit them.

As my motorbike came away from the car I obviously was no longer in control of it, and it was going down on it's right side with me astride it. I didn't want the weight of a full sized motorbike falling on my leg, so I jumped/fell off and rolled into the road. And lay there.

You'll recall that my wife had left home at the same time, and was in fact following behind me so saw all this unfold in the road ahead. I knew I was ok, but I can only imagine the fear and distress that seeing me perform this stunt caused the family.

A passenger in the car I hit was immediately on the phone to the emergency services. He was out of the car, standing over me, next to my wife, and telling the controller on the phone that "...he looks quite badly injured and in pain...". I was thinking 'no I'm not, I've just been beaten to the ground'. I started to get up, and about three people shouted "don't try to move, the ambulance is on it's way". My wife put her face down to plead me not to move, so as I lay back down I opened my visor and said "I'm fine, really I am". After a few seconds I started to sit up again, and was on my feet by the time the ambulance arrived -- which to their credit was only two or three minutes after they got the call.

As I was finding my feet, my wife went back to the car and got the children out. It was within walking distance of school, so she released the children into the care of a passing friend, thinking it was better for them to be out of the way once they saw I was ok. We are both grateful to the friend and school for the way they dealt with the inevitable shock that the children had had.

The ambulance crew were a welcome calming influence at the scene, very matter of fact. A police car arrived with full lights and sirens too. The policeman saw I was up and moving ok, and started dealing with the traffic, and presumably dealing with the other driver -- but I didn't really see much of him. It may have been the policeman who lifted my motorbike for me, at which point I saw fuel and coolant leaking from it, so I reached over and turned off the ignition. That's all we needed.

I went in the back of the ambulance for a check-up, and after a short time of talking to them and having blood pressure taken etc they gave me a clean bill of health, and released me back onto the street to get a lift home with my wife, who had gone to the school to ensure they were aware of what had happened and were dealing with the children properly.

I came home, dumped my gear, phoned the insurance company to report the incident, and have a strong cup of tea! After a cuppa, I drove back up to the school to visit the children and assure them I was ok -- that was a good move.

I'm convinced that the clothing I was wearing saved me from much more serious injury. It makes me shudder when I see motorbike riders wearing shorts, t-shirts, no-gloves, trainers, etc. It's just not worth it.

I just need to wait now and see if the insurance assessor writes off the bike. Though I have to say, I think it is unlikely I'll see it again :-(

Friday, June 01, 2007

My enemy's enemy is my friend

It is great to see changes have been made to the Final Draft of GPLv3 to make it compatible with the ALv2. There is now a 29 day public comment period before it is formally put into action.

Beyond the technical changes to the license, how encouraging it is to see the two foundations working through their issues with a determination to get to a mutually acceptable solution. Of course, there are fanatics on both sides, just as there are for any number of areas where people have a choice, and at times it is easy to forget that the similarities are far stronger than the differences.

Kudos to Cliff and Eben for helping drive this to a conclusion.

Let's hope that GPLv3 enjoys a wide adoption, and that people take the opportunity to look for new areas of collaboration made possible by an increased body of compatibly licensed code.

Thursday, May 31, 2007

When I use a word, it means just what I choose it to mean - neither more nor less.

It's scary to look back and see how long it is since I last wrote in this blog. Time flies by so quickly, and since I last wrote I've been lucky enough to organize an internal company conference in Toronto on open source software, present at EclipseCon in Santa Clara, and present at JavaOne in San Francisco - where there was a strong theme around OpenJDK.

I like to think that I follow the open source JSE community reasonably closely, but I'm confused about the 'message' coming from Sun and the reality of what is happening. For example, in the opening keynote at JavaOne Rich Green (Executive VP Software), talking about the open sourcing of Java, announced "the completion of that task"; whereas the technical sessions delivered by the troops on the ground clearly show there is lots of work to do in opening the full codebase, defining the governance model, building the community, and so on. There are numerous tricky problems outstanding and I think the executives do the team no favours by these sound-bite announcements.

One issue that has been picked up by a few people is the dependency on Apache licensed libraries in OpenJDK. It would seem that the weasel words are being polished to explain how it is ok to continue the dependency between ALv2 and GPLv2 code, because OpenJDK is Sun's code and they get to play the Classpath exception as they see fit. I said, as they see fit deliberately.

The Classpath exception allows applications to run on the JRE without considering the application to be covered by the so-called viral effects of the GPLv2 as the VM links the class files into a single runnable system. Sun declare, understandably, that the Classpath exception applies to the public API and SPI only, i.e. those places where an end user is expected to call or extend the standard runtime. How then can this same exception be used to justify embedding differently licensed parts of the class library that they are missing? What makes those parts of the implementation special to an end user? Some ALv2 libraries, like BCEL are very low-level, bit-twiddling operations that form core parts of the runtime by any reasonable definition.

Sun are on a journey, I'm supportive of their efforts to change. There are enourmous hurdles to overcome based on the history and inertia of the existing in-house development effort, and I certainly am not going to stand at the side throwing stones as they change that. It's tough.

One jaw-dropping moment for me occurred during the open source panel discussion at JavaOne, when Tom Tromey declared that he sees no value in GCJ/Classpath beyond OpenJDK worth the investment from Red Hat, and that a single implementation of the specification is preferable. I deeply disagree with this view. What is the purpose of a specification if there is only one implementation? -- by definition, the specification would become "whatever the implementation does". Perhaps Tom would be happier if there was only one Linux distro too. How about we all agree that SUSE wins, and Red Hat and others can contribute there?

Java gets used in so many places, there is room for multiple implementations with different characteristics and target audiences. Of course, the spec should restrict the madness, and foster common criteria that make the runtime usable (clutch on the left, brake in the middle and accelerator on the right etc.). The JCP is established to evolve the specification, but there is plenty of scope for competition to drive innovation and enhancements in the platform within that remit.

So why does Sun continue to block Apache Harmony from demonstrating their compatibility with the spec through the JCK? Well it is a mystery to me. I'd have thought that encouraging implementations to be compliant rather than forcing them to produce look-alikes would be of benefit to the Java ecosystem. Certainly the people who contribute to the evolution of Java through the JCP seem to expect that.

I hope to reduce my conference-going over the next few months, and get back to the code. Its a joy to watch the Harmony project continually move at the speed of the quickest person. When I'm away for two weeks there is a load of mail to read, commits to review, new docs to review, and progress to catch up on. I'm happy we are not delivering sound-bites.

Wednesday, January 31, 2007

You are only as old as the keyboard you feel

It's easy to forget how young computing is still. Or maybe it's just easy to forget how old I'm getting.

I recently had reason to remind myself about the projects I have worked on in my professional career, and that required some archeology through my old papers and notebooks. What really struck me was how recent the dates appear to be -- surely 1997 wasn't that long ago? and yet 10 years ago we were nowhere near where we are today with the connectivity, Internet, wireless commuting, portable devices, and so on.

If I go further back in time to university, and pre-university days things get really interesting. I really can't remember what prompted my interested in computing, but I recall vividly the trips I made as a schoolboy to the University of Bradford Computer Centre as a guest, looking round the machine rooms and punched tape/card terminals etc.

I took it upon myself to travel on the bus for an hour each way every Wednesday afternoon to use their teletype machines (I bet a random kid couldn't show up and use their machines today!) There was great excitement when they got six Commodore PETs. You could book an hour session on the PET, and I spent many of those PEEKing and POKEing various memory locations described in computer magazines of the day to create some kind of external effect -- and typing in long sequences of BASIC to implement something like the Eliza pseudo-therapist programme.

The first computer that I owned was a TRS-80 portable PC. I remember pestering my dad to buy it for Christmas one year. He is a gadget person, so probably didn't need much persuading really, but he put up a good pretence. That gift probably cemented my future choice of career. I spent many hours programming that thing, and over time I bought the tape deck interface and 16-character per line printer too!

Once things got established I went with my dad to choose a desktop -- and we spent a few hours at a very stylish showroom with four computers proudly on display, spotlit and surrounded by black curtains. We ordered an Apple IIe, and waited eagerly for it to be delivered (you couldn't just buy one off the shelf in those days). It was a great machine. Green screen and limited graphics, etc., but enough for me to write a pretty decent application to track some data on employees and customers in my dad's business. I submitted that application as part of my O-level Computer Studies, the first year it was offered in the UK.

To make a long story short, I later went off to study Computer Science at university, and at some point was the proud owner of an Atari Portfolio. I bought an Amstrad PCW to write up my thesis, and shortly after went mobile with an Apple PowerBook 100, and later replaced the Portfolio with a Palm Pilot (I craved an Apple Newton, but never bought one).

Since then it has been a succession of heartless PC clones, that look really boring and are only differentiated by the chips in them with different numbers.

It's fun to look back and see that old stuff. It brings back many memories of happy hours tapping on keyboards, the people who so generously gave of their time, knowledge, and enthusiasm to help some kid who could give nothing back to them -- which is very humbling, would I be so helpful and accommodating?

And when the time comes to bounce my grandchildren on my knee, I won't be telling them about fighting for my country in foreign lands, or how I had to work my way through crushing poverty through hard manual labour; I'll tell them how I have programmed everything from teletypes to a supercomputers. Will they be impressed? They'll probably laugh.