Monthly Archives: November 2016

Sabbatical Week

My list of engrossing side projects get longer year after year. This year as I ticked over another birthday, I decided it was time to take some “me time” and choose a project from the list and make some serious progress. What was needed was a “sabbatical week” – a week off from work dedicated to goal of making progress on a specific side project.

I have no shortage of side projects littering various Trello boards and entered on Mac “Stickies” on my desktop. I have tinkered with mobile apps and Unity assets of late. This time a ghost from my past became the focus. Long ago, I co-created a package, GRTensor, for the symbolic math package Maple to do calculations for general relativity (GR).  It has continued to be used by a small group of relativists who find it useful for off-loading the horribly tedious calculations that come up in curved spacetimes. In the intervening years Maple has changed significantly and the package was becoming difficult to install and was basically unusable on Macs. I got back to GRTensor because I was going to use it do some simple calculations for geodesics on two-surfaces for a Unity asset – but I discovered as a Mac user that this was not going to work out.

As sabbatical week approached I decided it would be fun to wake up the part of my brain that once knew something about GR, so I decided that rehabilitating GRTensorII into GRTensorIII would be the goal of the week off.

After exchanging a few emails with Maple, they agreed to extend me a multi-platform license so I could look into fixing up this mess. I contacted my collaborators and we pulled together the source code. Most from 1996 with some updates “as recent as” 1999.

Oh, dear.

Initially I planned to allow a bit of diversity in my week and mix in some time on a second project, learning some new drum riffs and reading. Not to be. With a specific project and goal in mind, and only a week I ended up coding 10 hours a day. I was able to zone in to the point where I would look up from my morning coffee to discover it was lunch time. This is the “magic” of a sabbatical week!

Twenty years ago, we build GRTensor around the idea that tensor objects in GR could be constructed algorithmically. If you decide you want to define a tensor Foo, then the package created variables for Foo and auto-generated code to calculate Foo based on the formula used to define it. LOTS of global variables.

In order to make GRTensor fit into the modern Maple package paradigm, with GRTensor as a Maple module and good citizen in the eco-system, the globals in the Module needed to be defined and scoped – and not created on the fly. This led to a LOT of fairly mundane changes to push the objects into a wrapper, which in turn is scoped. A bit of Python scripting made this not too terrible. Other quirks we exploited in the 90s no longer worked in the modern Maple and hunting these down took additional time.

Another chunk of work required changing all the user input prompts to adapt to the new dialog-based input used in Maple. Lots of interactive testing.

After blasting on this for a solid week – I now have a decent beta offering that will get tested by a few researchers. Hopefully GRTensorIII plus source code will be open for use by the end of the year.

I had a great time and got a big feeling of accomplishment from the week off. The daily sense of “flow” was intoxicating. Sabbatical week is an excellent idea – which I now plan to make an annual event.