My Royals Royce is not Going Fast Enough

I am experiencing up close what when I was young was taught was a horrible evil, “socialised medicine.” I had been having abdominal pain off and on for a while, with it getting more and more serious and lasting longer.  Like all men, I procrastinated going to the GP, only to go in for some blood tests on Monday morning.  By the evening, I got a very urgent call from the GP that I needed to go to the AE (ER for Americans) because one of my test results was extemely alarming.

I had been to an AE before in the UK with kidney stones and found it very efficient and while waiting like at ERs in the US, a lot less paperwork (as in none) and a lot more willingness to offer choices and keep you quite well informed.  The challenge I had though, was that my condition was serious enough (pancreatitis) that they needed to admit me.  So this was going to be my first experience in a hospital ward in the NHS.  Surely this is where it was going to go horribly wrong, where socialised medicine would fall apart…

It hasn’t, the most challenging thing is it is never fast enough, things that are time critical happen right on time, things that don’t, well they happen when they need to happen, which is never quick enough.  I didn’t get up to the ward until just after midnight and everything on the ward is what you would expect.  There are 6 beds in my ward and coming up on two days, I am the longest patient in my bay.  There are a few private rooms for the more serious cases.  I have space for my bed, a private TV, a chair and some storage in addition to all the appropriate sort of hookups.

I needed an unltrasound, and it was ordered first thing in the morning by my Consultant (who was attended by about 4 – 5 other doctors) but it took until 2PM to have it done.  In addition they also needed an MRI, which was ordered as well, but that is what is taking a bit longer than is comforable.  It didn’t get done yesterday by the time they closed and the ward nurse is saying it should be sometime this afternoon.  This morning, meeting with one of the Registrar doctors (who was part of the pack from yesterday) he explained very well what the process from here on out is.  They always seem to do a good job of letting people know what is actually going on with them, which is particularlly comforting for me.

They let me start eating last night and the hospital food wasn’t half bad.  What you would expect from a canteen.  They basically cart in a hot table that has been done in a bigger kitchen and serve up the food hot from just down the hallway.  Of course the food is bland and veg have no salt or pepper added, obviously to meet the various dietary needs, but a bit of salt was enough to liven up the veg.

The thing that is still very striking to me is the lack of paperwork on my part.  From entering the AE thought to now, the only thing I had to sign was that I had some valuables with me when I got up to the ward and that they were my responsability, not the hospitals.  Not one other form to sign, or fill out, because they don’t have to make sure you can pay or that they have your insurance details.

It isn’t like healthcare is metered as much as it is efficient, only going just as fast as it needs to, in order to be able to repsond to those who have an urgent need, and validate that people don’t waste resources, but all the resources you need to have a high quality level of care are there.

So, while basically every Britain will complain about the NHS from time to time, I think really what it, like I read in another article about the NHS from another American, was that they are really complaining about their Royals Royce not going fast enough.

Rewriting History

On Friday, Simon and I re-wrote history.  We walked into the Wandsworth Registrar’s Office and walked out as a couple who had been married since December 2006.

In December 2006, after about 6 years of being a couple, we entered into a Civil Partnership.  Civil Partnerships had been available in the UK for less than a year, and I was immigrating to the UK on the basis of forming a Civil Partnership.  Fast forward 8 years and a week, and the UK had finally figured out how to allow those of us who had entered a Civil Partnership to convert to a Marriage.  Same gendered Marriages had been available since March, but bureaucracy being bureaucracy, it appears they forgot about those of us in Civil Partnerships.

We took the opportunity to convert, because while it only makes a minor difference in the UK (addresses an issue around pensions), it does two things for us.  One is very tangible, in that the US only recognises marriages at the Federal level and doesn’t regard our Civil Partnership as anything.  The other is less tangible, in that it rights something we have felt is wrong.  We have lived as a married couple, in our hearts, for almost 15 years.  That is a long time, but Friday was the first time I had a spouse.  It was nice having a partner in 2006, and a huge relief to be in a legally sound situation as a couple in the UK.  But, nothing can replace the feeling of legitimacy and validation being like “everyone else” affords.

Those of the moral right complain that such things dilute the institution of marriage.  I think the way Simon and I have led our lives, being a loving supporting couple, is huge validation that marriage has a place in society and that it isn’t just about procreation.  I personally didn’t think I would feel as strongly about a simple change from “Civil Partnership” to “Marriage”, but having done it, it feels great.

The best thing so far is I told people at work today that I needed to go home, because I was cooking my husband dinner.

Gastric Sleeve Two Years On

I am coming up on almost 3 years since I have had my Gastric Sleeve weight loss surgery.  Some people might wonder how I am doing and how does the long term look like for someone with the surgery.  Well, the news is good.  I updated everyone that seven months on, I was approaching my target weight of 195 lbs (13st 13 lbs/88.5 kg), well I met that and then exceeded that by about another two pounds, reaching my lowest point of 193 lbs.

Over the next 18 months or so, I started to slowly creep back up, eventually reaching about 215 lbs (15st 5lbs/97.5 kg).  Lot of this was due to my lifestyle at the time, which was pretty sedentary and the “enjoyment” of simply not worrying about how much I ate.  This was my new natural weight.  But even then it did start to bother me that I was starting to not fit some of my shirts and trousers.

I was lucky, in that I had been working full time in Scotland but in August of this year, relocated back to London for work.  The simple fact of being back in London and having to walk around, as well as being back day to day with my partner has let me focus on being more active and eating a little bit better.  That has quickly returned me to 195 lbs.

The challenge when I reached 195 lbs before was that I didn’t look healthy.  My family in the States, when they saw me around that weight thought I looked “ill”.  I think in a lot of ways it was my body getting used to that weight.  Two years on, and hitting that milestone again,

My appetite has increased after the surgery, but I am still not able to eat what most people would consider a “normal” sized meal.  Although I don’t directly pay attention to what I eat specifically, I find that my subconscious mind goes for the softer foods.  Really the only thing that really gives me too much issue are large amounts of dry and fibrous foods.  I also struggle sometimes, getting quite hungry now, of my eyes being far larger than my stomach.  Again, getting used to not eating everything you are served in a restaurant is something you have to get used to.  I am lucky again in that my partner has a very very high metabolism and is a marathon runner, so my leftovers are quickly absorbed.  We really enjoy meals like tapas and dim-sum, which allow each of us to eat each at our own pace, share in the meal and have a variety of foods.  That more than anything is something I value, the variety.  I would rather have a couple bites from several dishes then try to eat one thing.

Being honest, constipation is a bit of a battle for me.  I seem to go into bouts where I will get heavily constipated and times where I don’t, though my diet doesn’t change in a way I am aware of, though my bowel movements have never returned to a state before I had the surgery.

The other long term downside that I suspect is related to the surgery is that my face has developed an exceedingly dry skin, which is often flakey and itchy.  I take religiously a multi-vitamin and oil supplements as well as wash my face daily with hypoallergenic products and use a moisturiser, but generally, I can’t seem to fully deal with the issue.   My partner has said I should really see a doctor, which maybe I should.

Even with the two “downsides”, feeling far more healthy, being more active, and not standing out in society for the wrong reasons make the decision to have the surgery the best decision for myself I have ever made.  While a gastric sleeve surgery may not be for everyone, it clearly works for some really well.  I couldn’t have expected a better outcome.

Marriage Equality, Finally

Yesterday I was in tears, in the office.

Kit and Simon
Kit and Simon

Simon and I met each other in 1999 and started our relationship in 2000.  We struggled for a number of years trying to settle down and started to realise that was difficult for bi-national same gendered couples.  We spent a few years living in limbo between North America and Europe.  We had decided that we would try to find a way to move to the US.  We were respecting the immigration laws of the US and realised that it was an uphill battle, but eventually US ICE decided that Simon didn’t belong in the US and denied him entry.  Our friends and family were shocked that this could happen.  They encouraged us to fight it, but we knew, really knew, that there was nothing we could do, that the Federal government was barred, legally, from recognising us.

In 2005, the UK made the bold step of allowing Civil Partnerships.  This presented a unique opportunity for US.  I knew my skills were portable enough for me to find work in the UK and the UK had been Simon’s home for most of his life.  It wasn’t originally first choice, but it would do.  So I started through the motions of immigrating to the UK.  I ended up conversing with the entry clearance officer who issued my proposed Civil Partnership visa a few year later (as I become involved in immigration rights in the UK) and he told me that I was the first Civil Partnership visa he had every issued, in the Summer of 2006.  He was quite happy to find out that things had worked out for myself and Simon.  In November 2006, I moved to London.

About two years ago, Simon and myself realised that we wanted to change our lives.  We realised, after many many many years of debate that we wanted a family.  We also weren’t in a personal situation which would allow us to raise a family, with my work being in Scotland and Simon’s work being in London, it wasn’t the life we had envisioned for ourselves.  So were decided to move.  We looked all over the world and settled on Vancouver.  In part because we knew the US was simply not an option for us.  We started down the process of finding a way to get that accomplished.  We accidentally found the best immigration lawyer in Canada, I suspect, named Marina Sedai.  But with everyone’s best intentions we realised that we couldn’t get the immigration process in Canada to match our desired timelines.

This last month, as the stark reality that the timelines for Canada immigration weren’t viable, we resigned ourselves to what we called “Plan B” which was to settle down in London for the next 18-24 months while we started the family and then hopefully the Canada process would catch up with us by then.

I had been closely watching the Supreme Court on DOMA and Proposition 8.  I followed the arguments with rapt attention.  I had always admired the US Supreme Court and while it may not always get things right, it gets far more right then it gets wrong.  I knew, that if the US was to ever become a viable option for Simon and myself, DOMA needed to be struck down.  I also realised that based on the US Constitution and how the Supreme Court operates, that they would likely strike it down, unless they sidestepped the issue on jurisdictional grounds.  In the end, the what I wanted and what I expected merged.

While this won’t be straight forward, and Simon and I never wanted or asked to be trail blazers, we suspect that, as we progress with our family plans, we will find a way to move to the US, now that the US Supreme Court has made it clear, if a State determines we are married, then the Federal government has to respect that determination and extend the same rights and benefits.  After 13 years of frustration, I can finally say again that I am proud to be an American.

Marriage Equality

Being “gay” does not dominate my life and I don’t often think about being “gay”. I do often thing of my civil partner, Simon, much as I would assume any married couple would. As I have mentioned before, after about 6 years of being in a relationship with Simon, I moved to the UK in 2006, in large part, to take advantage of the recent civil partnership laws that were created. Simon and I entered a civil partnership in 2006 and in 2013 will be celebrating 13 years as a “couple”.

Myself and my partner at a family event.
Myself and my partner at a family event.

For the most part, we just get on with our lives, as an “traditional” couple would. As we approach our middle ages, we realised that we had reached the point where we could make a choice about us and potentially family, instead of careers. We both have very well paid jobs and have been very successful, but we know there is more to life than just work. So a couple of years ago we put the wheels in motion to change our lives. Being of sufficient means, we knew we could go a lot of places in the world. We short listed 7 cities across the globe and assessed each one. Sadly, no US city made our short list. That isn’t because we have anything against the US. Being an American, there is still a big part of me the longs for the US and Simon also sees lots of advantages of the States. But the land of my birth has chosen to not recognise my relationship with Simon. Even if we both were US citizens, there would be 50 different versions of what our relationship meant, which means we would have to be very careful about where we lived in the US.

While the Supreme Court this week is hearing arguments on Proposition 8 and DOMA, there is far more at stake for Simon and myself than I think we would like to admit. While our immediate plans are to move to Vancouver, as Simon has been accepted at UBC and I am sure we will like Canada, neither of us is Canadian and therefore we don’t have a “right” to settle in Canada, though it may very well be possible. We would like to be in a situation where at least my country of birth is an option and that we don’t feel like exiles.

I know the Supreme Court, rightfully so, is far more concerned about keeping a balance between the Federal Government and States rights, but they also look after us as individual rights, and I as a US Citizen am being denied my birthright to pursue happiness. If there are Federal benefits that are extended to traditional married couples, they should be extended to me, including immigration benefits, irrespective of whatever definition the State puts to similar laws.

Having been used to being treated equally under the law for the past 6 years, it is something that I am unwilling to give up, and anyone who knows Simon or myself wouldn’t demand that of us.

Dojo 2.0

I have been working on a few things which I will be trying to campaign for as being part of Dojo 2.0. Almost everything I have been working on is included in my d2-proto GitHub repository. I want to cover off some off some of my thinking.

Object Composition

declare has been the foundation of the “class” structure of Dojo. I know Eugene has developed dcl, which is the successor to declare, but one of things that I think declare doesn’t do is actually embrace JavaScript and its prototyping based language with constructor functions. Instead it tries to take the path of classical OOP inheritance.

The first challenge with this is that it leads to confusion among those developers coming from other languages. I remember recently having a debate with a developer trying to figure out how to create static methods in Dojo/JavaScript.

Something that I think embraces the concepts of prototypes and constructor functions is Kris Zyp’s ComposeJS. It provides a way to “compose” prototypes and constructor functions. It also leverages the concepts of Aspect Oriented Programming that have heavily leveraged in “modern” Dojo, in particular the join point advice.

I have brought that into my Dojo 2.0 repository and have added an important key element in my mind, in embracing ES5 property descriptors. By using the decorator, you can generate ES5 properties in your prototypes:

In addition the accessor descriptors understand the other decorators, like the AOP ones of compose.before(), compose.around() and compose.after() to be able to provide very feature rich direct property access while not requiring discreet property accessors like the current Dojo/Dijit .get() and .set().

Object Observation

In Dojo 1.5 dojo/Stateful was added, which was a core module that provided the concept of discreet accessors and the ability to “watch” properties for changes. .watch() was a debugging concept added to SpiderMonkey (Mozilla/Firefox) to allow a level of debugging and never became mainstream. dojo/Stateful adopted this. The concept is very useful, to know when a property changes and do something about it. Now, ES5 properties deal with the ability to allow direct property access, they don’t necessarily provide a easy way to actually observe changes to your properties, for key concepts like data binding.

ES6 has the Harmony project, which part of it is specifying Object.observe() which provides in native code this feature of being able to observe changes to objects. Of course waiting around for ES6 and Object.observe() is untenable for most. So in order to solve this problem for now in Dojo 2.0, I have developed a new foundation module named Observable which tries to provide a very similar API to that of Object.observe() but only leveraging ES5 features. It should be possible to offload this to the native API when generally available.

DOM Manipulation

Within the committers, there has been a fair amount of debate around the direction of DOM manipulation in Dojo 2.0. The current thinking is to potentially adopt JQuery 2.0 as the DOM manipulation engine of Dojo 2.0, or to rewrite/refactor the existing DOM manipulation modules. There is also some who think that Kris Zyp’s put-selector is worth consideration. I wanted to understand more about put-selector and so I brought it into my repository as put. Once I got my hands on it, I was impressed with it. For those not familiar with it, it leverages the concepts of CSS selectors to perform DOM manipulation. Instead of having a complex API to create, modify, move and place DOM nodes and structure, you simply use the one function of put. You likely have been using one form or another of CSS selectors to select your DOM, which are the core of both JQuery and dojo/query, so why not extend that paradigm to DOM creation and manipulation?

There are those who are familiar with it who feel that its concise syntax can easily lead to abuse and confusing code. This is potentially true, but like all powerful tools, they can be misused. This is true of RegExp, which can easily lead to confusing code, but they solve complex problems much quicker. My biggest argument is that DOM selection requires a good grounding in CSS selectors, so why not build on that knowledge? Developer’s being aware that other people may read their code is far more important than hobbling people by dumbing down their tools. A good developer should document their RegExp just as well as they document their selectors.

Declarative Syntax

As many of the Dojo committers know I am a huge supporter of having functional parity between JavaScript and the Dojo declarative syntax. The declarative syntax is one of the main reasons I was drawn to Dojo in the first place. While I don’t use it personally anymore, I have quite a lot of interest in the dojo/parser which drives the declarative syntax. Some of my first significant contributions to Dojo are around the parser.

So of course I couldn’t pass up the opportunity to provide a new parser as a candidate for Dojo 2.0. From an API perspective is is very similar to the current dojo/parser and has the same features, but it wholly drops the legacy of the current parser. Also, it is designed to be a “speed demon”. My tests indicate for certain tests it is about twice as fast as the current parser and is even 20% faster than the dojox/mobile/parser which was specifically designed to be efficient on mobile devices.

It still needs additional work, but my hope is that there will be only a single parser for Dojo 2.0, once that is as lightweight and performant as possible for mobile, provides only what is needed for complex templating and is as feature rich for desktop applications. It might even be possible with dojo/has to provide opportunities to built code that is tailored to the environment.


With, in my opinion, two of the core parts of the toolkit being different in Dojo 2.0, it sort of calls for a different path with widgets. If object composition and DOM manipulation change, there is an opportunity to take a look further. Dijit has been a great strength of Dojo. Again, it was one of the reasons that I was drawn to Dojo in the first place, because I wanted a JavaScript toolkit and a widget framework as “one”. When I was looking around in 2008, there were very few that combined the two well, if at all.

But in my opinion, time has marched on. Dijit has become solid, feature complete, but also relatively feature static, because the number of people and organisations that have built on it. It is now almost impossible to make a significant improvement in Dijit without causing havoc somewhere else downstream. People need that dependability and stability though. There is a lot of good in Dijit, a lot.

While I understood how to create my own Dijit based widgets, I will admit I didn’t understand deeply the underpinnings of Dijit and widgets in general. Therefore I wanted to see if I could create a widget based on compose and put. I have created a very rough Widget base module based on this. This gave me enough to think about.

What is clear to me now is that while there needs to potentially be a Dijit 2.0 that works off Dojo Core 2.0, there needs to be another widget system as part of the eco-system that can start afresh, being informed by Dijit but being unleashed from the “shackles” of the Dijit 1.X legacy. I think there are some key points that a new widget system needs to address:

  • Isomorphism – The concept that the widget shouldn’t care about where it is rendered.  As server side JavaScript continues to mature and there are constraints on the speed and power of mobile devices, isomorphism becomes even more important.  One of the aspects of put is that it can render DOM strings without the need of the likes of esprima.  It is quite conceivable isomorphism is achievable without too much work.
  • Data Binding – Some additional solutions have been added to Dojo to solve this problem, like dojox/mvc, but ultimately I think that data binding is something that should be built into the core of a widget framework, instead of an adjunct.  While Dijit has always been able to read from a data store to populate things like select lists, it hasn’t been as robust in being to update records and state based on binding to underlying data.
  • Responsive – “Modern” widgets need to be built from their foundations to meet responsive design.  Right now, the current solution is to touch enable Dijit and then develop dojox/mobile.  And while there has been a lot of work between dojox/mobile and Dijit, they are essentially two different projects with dojox/mobile being built ontop of some of the foundation of Dijit.  The need to have efficient code on the mobile platforms has led to a significant “fracturing” of the bases of Dijit to maintain the two different sets of widgets.  The current framework also lacks any specific API features that allow developers to build responsive widgets.  A new framework should build this into its foundations.
  • Bundling of all 3 Technologies – Widgets are not just JavaScript objects with a DOM structure.  There is a 3rd technology that is often relegated as a 2nd class citizen, that being CSS.  Visual presentation and theming.  To me, this has always felt slightly disconnected and there is no easy way of “bundling” or even “unbundling” the necessary CSS to run a widget in the current Dijit framework.  There is no way for a widget to ensure its styling is loaded, nor a way to encapsulate it, so it can be composited into a “built” widget.

There maybe other key factors in widgets for Dojo 2.0, but in my mind these are the key things at the moment we don’t have a ready answer for.

Packaging, Wrap and Toolchain

One of the main areas that I first expressed a lot of my thinking for Dojo 2.0 was in the area of packaging, wrap and toolchain. It is the areas where my thoughts were the most mature. As far as packaging, I laid out my thoughts as well as took a lot of feedback from others in the Dojo 2.0 Packages and Distributions. From a toolchain perspective, I laid out my thoughts about package management, again with lots of feedback in Dojo Toolkit 2.0 Package Management. There is more, but probably best left to a future post or discussion!

In Conclusion

As always, these thoughts are my own, they don’t represent the way Dojo 2.0 will go, but they lay out my thinking and will form the foundation of what I will “campaign” for in Dojo 2.0. I always have always said, I would look into the items I was interested in instead of trying to “boil the ocean”. I may pickup more items that are of interest to me as we get further down the road to Dojo 2.0. The biggest thing I would like to do though is encourage (provoke?) others to start making their case for Dojo 2.0.

ES5 Accessor Properties

I have been messing around this weekend with Object.defineProperty and realising some unanticipated behaviour when using accessor properties and prototype inheritance. Essentially it boils down to this, accessor properties are only ever owned by the Object they are defined on.

For example, if I were to do the following:

Now I hadn’t actually expected that. So you have a choice, in your constructor function, you can iterate through your prototype, looking for accessor properties and copy the property descriptor directly on the instance, or you can leave well enough alone.