Wedding details

To those out there that are coming (or are yet to be invited – not all invitations have gone out yet), I have made up a small website giving directions to the various places involved. That website is here.



Sorry for the lack of updates, I have been at the same time hectic and very lazy. I thought I’d pop on here to bring things up to date.

Firstly, my research into plugins is still progressing really well. I just performed some metrics on my code, and apparently since mid-March I’ve written 9836 lines of code (which does not include comments and whitespace). Based on my calculations, that’s a little under 2000 lines of code a month. Last week alone (when I started a new plugin, so I can easily see the number of lines written), I wrote 1889 lines of code. Taking into consideration I underwent surgery recently on my left hand, this is a pretty decent workload I would say. And yes, I’m willing to stand behind my code – it ain’t machine generated or poor-quality :P.

Additionally, the preparations for the wedding are coming along well. Julia and I have basically prepared most things now (invitations, locations, timing, etc). We recently upgraded our photographer to someone far better, and to be honest I’m very excited about this improvement. Julia and I have additionally selected the groomsmens suits, as well as my own. Suit hireage costs have gone up a lot since I last went to a formal ball! But ah well, a wedding is a wedding, its all about showing off the guys looking good and being well-groomed :P.

So that explains the ‘hectic’ part. The lazy part is due to the fact that I have long spells – up to weeks at a time – where I get very little work done. This means that frequently stuff just doesn’t happen until far later than it really should. I put it down to mainly getting far too engrossed in my plugins work – and then getting sick of any work in general.

Anyway, I guess I should plug the MS Student day in Wellington which I was emailed about (so probably all Massey guys already know this):

Jonathan Giles

Arm operation is now done

Well, operation is now over. I’m fully one-handed now – my left arm is half plastered up so it ain’t moving 🙂

I’ll keep this short:
* Good operation – surgeon found a 2cm long compression on my nerve, and cleaned it all up.
* At the moment the hand is no better, but it will hopefully improve in the coming months.

I was really wasted after the op, so I ended up staying the night – and so did Julia in the bed next to me, so I didn’t need to call the nurses at all in the night <:) I think I'll leave it at that, Cheers, Jonathan

Arm Operation is Nigh!

Yup, my arm operation is pretty much exactly in a week, so the countdown begins.

Basically, the operation is on my left arm around about my elbow. I already have a scar there from a previous operation, so that will be reopened and extended, as well as I’ll be having another cut running parallel to that a few cm’s to the left. The aim of the operation is to try and find anything putting pressure on a branch of my radial nerve called the posterior interosseus nerve. Basically this nerve is responsible for lifting up the fingers, which is something that has progressively become harder for me, and its now at the point of being all fingers, and basically no lift at all in any of them.

After my last operation there was a slight improvement, but it was clearly not fixed completely as it continued to get worse after that. In all likelihood the overall problem wasn’t fixed, with the nerve being moved but then falling back into it’s previously entrapped state. Hopefully this operation coming up will do a better job of fixing this.

So, I’m sorry to say you’ll all be deprived of my rantings on the state of plugin architectures and my pending wedding. I’m sure you’ll all cope :P.

Finally, I must thank the Dickinson family for donating to my arm operation fund, which was very, very much appreciated. The contribution was significant, and it has considerably reduced the cost of my operation (which as I mentioned isn’t cheap thanks to the costs associated with private medical practices – I’m on the waiting list for the public system, but there is a large amount of mucking around in this system – like when I had my last operation I was rung the day it was due and told that it was delayed. There is also the added benefit of being able to schedule the operation for the break between semesters).

I’ll probably post again before my operation, but wish me luck 🙂


Dynamic Context Menus & Plugins

Well, this is certainly a tech blog. I kinda want to keep this brief, but I want to outline how plugins change the way you program GUI’s.

The old way of having a dynamic context menu (i.e. a popup menu that changes its items based on what thing you click on) is roughly:

You somewhere have a popupmenu (JPopupMenu in Java terms). You populate the popupmenu with the full list of possible menu items. You have a show() method that gets called, which is passed the thing you click on. Using this argument, it is possible to create a series of if … else … statements to decide what items to show, and what to hide. The menu can then be shown. If an item on the menu is clicked, it is necessary for this popup class to handle farming out the ActionEvent that is created to the relevant class.

This results in a popup menu class somewhere that is horribly designed – it has dependencies to basically everywhere else in the system. I always hated writing this kind of code. I really hope there are better ways to doing this that I don’t know of….

Plugins make this far better. I define an extension point that any plugin can add themselves to called ‘ContextMenuItem’ or similiar. Any plugin is able to add into this. When a context menu is shown for the first time, it goes out and says ‘get me all plugins wanting to extend this point’. It builds up a list of all such plugins. Whenever the context menu is shown, it then simply iterates through each plugin, passing it the JPopupMenu onto which it may insert its menu items, and of course the thing that was clicked on. It can then be up to the plugin to actualy decide what menu items to add based on the thing clicked on. Once all plugins have added what they want to add for this particular item, the menu can be shown.

That is pretty cool, cos the dependency hell from above is removed entirely, as all method calls are simply calling an interface, instead of directly to the plugin classes. Note also that ActionEvents can actually be handled internally within the plugin, reducing the size of the popup management class incredibly (it effectively just calls the plugins and handles showing the popup only).

Ok, that’s enough. Sorry if you don’t care, but I do get emails and MSN messages from people asking about this, and I’m personally very interested, so meh…:P

oh, btw, I’m down one ‘exam’ (it was only 1.5 hours), and have to wait until next Saturday (the 24th) until my next one – hence more work on plugin functionality.