Archive for the ‘General’ Category

Holidays at our place

Sunday, December 26th, 2010

The monsters


had fun (blame Uncle Declan for the Santa costume). But it was tiring


I was pretending to sleep. He, most definitely, wasn’t pretending.

Introducing Caitlín

Saturday, December 11th, 2010

No pictures yet, but she was born on the 11th December weighing in at 3.03kg. Mother and child doing well.

Update:

A picture

A video

Mother and child are now home and both are eating well.

On the importance of backups

Thursday, December 2nd, 2010

I’m a bit paranoid about backing up. Particularly when it comes to the crown jewels i.e. my long-term research projects. Or, at least, I *thought* I was paranoid about backing up. It turns out I’m not. Consider the two following maxims of backups

  • If you need your backups you’re already in a compromising situation.
  • A backup is not a backup until you’ve seen a full restore.

So my backup strategy means taking the content from my laptop and pushing it onto my home NAS box. I normally use a nice GUI program such as Deja Dup which uses an implementation of the venerable rsync underneath. Then for the long-term research projects I use the git version control system (I also use darcs and have largely given up on bzr, due to SCM proliferation). I do a “git push” of all my projects from my laptop, to my home NAS and to a server in Ireland. This is a paranoid strategy….or is it.

This last week the disk in my home NAS box died. I’ve since replaced it, but have not had the time (or an external 3.5″ SATA caddy) to recover the data. The disk is foobar’ed, so I’m expecting only a partial recovery. That’s fine. I have all my data on my laptop. However, bang! Maybe it was the cold, or just plain entropy, but my laptop has developed a hardware fault. Thankfully, it’s not a disk fault. If it was I’d have lost my entire music collection, but not much else.

You see, when my NAS drive failed my paranoia kicked in. I asked my mate Neal to give me ssh access to his home NAS for my most important long-term research projects. I pushed up to his system, and the system in Ireland. But think about it…if I had a disk fault on my laptop, because I was already in a compromising situation, I could have lost a lot of important data. Already two independent random events were conspiring against me, why not a third? There was a window of a day between which I had no NAS storage and when my laptop failed. If I had replaced that disk a day later, I could have lost some data. Less important data, but data costs money.

All is well. I have all my data. Even my music collection (which isn’t too important with respect to my 8 years of research work). I’m also confident in my backups as every time I use git to back up a research project I can verify, using “git log”, that all my data *is* actually backed up. There have been many occasions on which friends or colleagues have told me that they assumed their backups were working. They have lost data due to not doing a systematic full restore. They’ve never verified their backup worked by *actually* trying to recover some data. Hopefully that’ll never happen to me, but you can’t be too complacent…or too paranoid.

Smoothing paths in Inkscape

Sunday, September 19th, 2010

Inkscape is an extremely powerful tool. I’ve played with the lib2geom code which is the underlying representation of paths and shapes used in Inkscape. I think a small fraction of the power of this API is exposed through the graphical interface. The following is a quick guide to smoothing a freehand path in Inkscape. The correct term for this in the tool is “simplification”. This is inherited from the lib2geom API.

First, choose the draw freehand tool.

Then, secondly draw some kind of path.
A drawn curve

Finally, with the contour highlighted press “Ctrl+L” i.e. hold down the Ctrl key and the L key. Alternatively, choose “Path” from the menus and “Simplify”. You may need to simplify the path a lot to see a visual difference. Here’s the above path after I hit “Ctrl+L” about ten times
A smoothed path

And we’re done :) .

Diagrams 2010, my retrospective

Saturday, August 14th, 2010

I flew, with colleagues, to Portland in Oregon for the Diagrams 2010 conference. We arrived on a Saturday and departed the following Thursday. This makes it the shortest period that I’ve ever taken a long-haul flight for. So today I’m feeling rough: approximately one part dead, four parts like I have some painful communicable disease and six parts hungover. I’m counting on a smoked rasher sandwich to right all the ills in the world.

As I previously posted, Portland is fantastic. We partook in many of the local cultural delights such as visiting Powell’s book store, sampling ale at the Deschutes micro-brewery and visiting the Bite of Oregon festival. I spent $10 at Powells and picked up a copy of Flatland and a copy of Wittgenstein’s Brown and Blue book. To my lifelong shame, I made a beeline for the maths section, but totally forgot to visit the computing section! The conference banquet was in the local art museum, which was excellent. They have a collection of American abstract art which Paolo Bottoni kindly explained to me. They also have some Rodin sculptures and a sculpture by Picasso, a Monet water-lilly, an early Van Gogh and several other impressionist works by artists such as Cezzane. All very beautiful.

The conference itself was an excellent event. I thoroughly enjoyed Randall Davis’ keynote. He demonstrated the breadth and depth of research that you might expect from an MIT lab. His assertion that we should be having a conversation with our computers has already influenced how I think some of our sketch recognition work should proceed.

There were lots of excellent papers. Two in particular will, I think, influence future directions of my own research. The first is by Koji Mineshima, Mitsuhiro Okada and Ryo Takemura titled “Two Types of Diagrammatic Inference System: Natural Deduction Style and Resolution Style”. In this paper they do lots of interesting things, including quantifying free rides by comparison of Euler diagrams and certain sentential forms used in reasoning. The second is by Mathias Frisch, Jens Heydekorn and Raimund Dachselt titled “Diagram Editing on Interactive Displays Using Multi-Touch and Pen Gestures”. They demonstrated some really well done software for drawing certain types of diagrams. I’m particularly interested in taking the approach described in Davis’ keynote, the design and technology described by Frisch et al. and the constraint based layout described by Tim Dwyer in “Hi-tree layout using quadratic programming ” to inform our sketch recognition stuff.

There were some other great papers. David Landy spoke about his “Toward a physics of equations” and demo’ed his very, very cool iPhone/iPad application that helped him capture his findings. The papers that won the best paper prizes were, unsurprisingly, interesting and well presented.

All in all, I had a great time in Portland. I enjoyed the beer and the food was better than food I’ve eaten anywhere I’ve visited in the US. And thankfully, the rasher sandwich seems to be doing its thing. I might even get some work done later :)

Diagrams 2010 – day 0 (well, mostly -1)

Sunday, August 8th, 2010

We arrived in Portland, Oregon last night (local time) after a 23 hour trip from London. My first impressions of this city are very positive. We’re on the Portland State University campus, which is it’s own – couple of square blocks – district about a 20 minute walk from the centre of down town. The rooms are large, clean and have lots of services.

Portland appears to have a very good public transport system. Buses are a common site and there’s a train/metro system. Furthermore, cycling seems to be actively encouraged through public notices. This morning I witnessed a cycling event over the bridges which must have had several thousand participants. Other than public transport, recycling appears to be taken as a core civic responsibility. I suppose, I get the feeling that Portland has an outlook that chimes with my European biases. Unfortunately, like many US cities I’ve visited, there seems to be a very visible population of homeless people. Again, my Euro-social-safteynet bias kicks in and I assume that the proportion of homeless people in Dublin/London/Berlin is lower.

There’s a food festival today, which I intend to attend. Portland is also noted for it’s numerous micro-breweries. In order to escape the effects of jet-lag, we partook in a sampling of the local Ale specialities last night. And as a food and beer lover I was impressed. Moreso by the beer than the food, however I’ve high expectations from the food festival today. It was recommended by some locals we got talking to in one of the Ale establishments. For what it’s worth, in the 15 hours or so that I’ve spent here I’ve only encountered friendly people.

And the blurry image reveals…

Friday, June 11th, 2010

The blurry image below is of the shiny new baby that Lorraine is expecting. This development is on an aggressive time/feature based release cycle and is due in time for the Christmas market . This baby reflects a 100% growth in our child portfolio.

Our last experience having Cillian on the publicly funded NHS was brilliant. So far it appears that the standard of maternity care has maintained it’s excellence. We’ve met the midwife and (obviously) been in for a scan. It may be hard for some people (particularly USians) to understand the depth of appreciation British society has for the NHS (it took me a while to learn this). Sufficing to say that there were massive protests last year when local maternity services were threatened with cuts. Nothing gets the British onto the streets quicker than poll tax, illegal wars and threats to the NHS.

A lib2geom braindump

Friday, April 30th, 2010

I’m hacking with lib2geom, the base geometry library that underlies Inkscape. I don’t understand a lot of it, so here’s a braindump of what I’ve figured out now. I’ll modify it as I figure out where I’m wrong. (We’re all n00bs all the time :) )

A user inputting using a mouse or pen device can click and drag. On click we record a sequence of points in device coordinates until the user releases the mouse button. However close these recorded points are, they are not a continuous function. If you zoom in close enough, there are gaps between the points. In order to solve this problem we interpolate between the points. We’re – effectively – guessing the path of the mouse/pen movement in real space (i.e. R^2) as we can’t know the real function.

There are several ways to interpolate. The most common using cubic or Bezier curves. We fit an n-order polynomial between each pair of points. To ensure the smoothness of the curve we insist that either the first or second derivative (or both derivatives) of the join is a continuous function. Thus fitting multiple cubics to a set of points results in a cubic-spline. Fitting multiple Bezier curves to a set of points results in a Bezier-spline. It is common for graphics APIs to allow curve representation using non-uniform rational B-splines.

Recently [2000] S-power basis functions were proposed as a basic building building block of splines. Inkscape represents interpolated input strokes as sequences of pairs of S-power basis functions (SBasis functions in lib2geom speak).

Each SBasis function is lifted into two dimensions. Thus a D2 function (from the documentation) “provides a 2d parametric function which maps t to a point x(t) y(t)” [[Todo: Explain This With a Diagram]]. A sequence of D2 functions, as interpolated from input pen strokes, is a Piecewise<D2 >. A Piecewise has the added advantage of storing the temporal nature of the input points.

Iterating through a Piecewise<D2 >:
Piecewises are useful for two reasons
(a) we may compute very high fidelity operations such as dot product, and
(b) we may compute stuff that uses the temporal information stored in a Piecewise.
For general computation, such as computing the intersection of a Piecewise and a primitive shape, we need to build Paths from our Piecewise. The joins between the splines in a Piecewise are called knots. The following builds a Path from a Piecewise (with thanks to Johan Engelen):

// Where spline_path is a Piecewise<D2 >
Geom::Point knot = spline_path[i].at0();
Geom::Path path = Geom::Path(knot);
for (unsigned i=0; i < spline_path.size(); i++) {
path.append(spline_path[i]);
}

Eight years (really!) since MiNDS>

Monday, January 4th, 2010

As an undergrad I was quite active in the NUI Maynooth IT society. We called it MiNDS>. Though These days it’s written as Minds. I have a soft spot for Rowan Nairn’s original site design and logo featuring that angular bracket. To my surprise I was recently contacted by some guy wanting to talk to MiNDS>. I think he was flogging SEO, however I pointed him at the committee email address. I don’t run MiNDS> anymore. But I did write a small paragraph on why the committee may not reply to him on the subject of SEO. It makes for good reading as to the personal accomplishments of several alumni.

“Many of our past members are the technical plumbers for both the Google and Amazon Irish operations. At least one of our alumnus works in the PowerSet team that develops an engine that Microsoft are integrating with Bing. Furthermore, several other alumni members have completed PhDs in the area of heterogeneous distributed searching and sorting and several others own web development and SEO firms. We’re bursting at the seams with high-quality talent.”

And that’s just from the people I know about. I’m getting all teary eyed thinking about days in the Union, modding Athlons into MPs and general mayhem. Someone should write an official history. Maybe I can meet Mags for a coffee some day and get the story about the founding. I was at the meeting that she took over from the postgrads (or I believe I was) but I don’t remember the whole story.

Feeding cheese to monkeys

Tuesday, July 28th, 2009

Sometimes you’ve got a monkey and he won’t sit still. How do you manage to take a picture of him? The answer is simple. Feed him cheese. Try our non-patented, copylefted Cheese, now with burst mode support.

Example: