Categories
Personal

Monthly Review: January 2022

At the beginning of the year, my only resolution was to review the past month and set some focuses, themes, and goals according to where my life was at that point. Hopefully as a way to try to avoid the pitfalls of all or nothing boolean resolutions. Consider this a trial into having a semi-public semi-regular monthly review.

The goal I set for January was to recover my fitness and get back to my pre-Christmas weight. Fortunately, as of this morning, not only am I sub-pre-Christmas, but my weight hit the goal I set back at the beginning of August when I started this journey. I have a couple of potential blog posts around the past 6 months and how I got to here – joining a running club, slow-carb-dieting – but they deserve some time and thought to themselves.

It’s not a direct goal or aim, but I need to figure out where to go next. I’ve never got to my goal weight before – when I’ve lost significant weight previously, it’s been until “that’ll do” and then it’s gradually (or sometimes quickly) piled back on again. So my focus needs to be, what about this eating program has really worked for me, and how do I adapt that to focusing on other things like fitness, strength, and not necessarily a calorie deficit? This is something I will think about over the next week, and in the meantime, I’m going to keep “slow-carbing” – if only because I have a leg injury right now and am running minimum mileage.

With that goal in mind, throughout the last month, fitness has been my main non-work focus. I’ve run in a couple of cross country events, and started to see some gains in my speed.

Outside of fitness, I made some decent progress on my playground project, without doing much more than fiddling with code while I watched TV. I did a bit of CSS tidying up – although that’s something I’m hoping to revisit after I have a calendar-like visualisation implemented (which might be a month or two away). It looks horrible, almost as if I’ve just mashed a bunch of styling together without much thought. Mad that 👀.

I got generic WordPress pages loading in, which allowed me to initially bring my /now page across – so I can not keep that up to date in two places, rather than one.

I think that most significantly, I got podcast integration working. I’m really pleased with this, it’s a set of data that I can’t look at at a glance anywhere else. It also might serve as a jumping-off point if I ever want to write anything about the stuff that I’m consuming day-to-day. I have a bunch of Permanent Notes in my Zettelkasten that start off as Fleeting Notes from podcasts, maybe there’s something I can do here to make some of that process public?

And I started in earnest doing something with my Weight data. There’s a bit of a spike over at https://playground.breakfastdinnertea.co.uk/weight/, but that might change significantly in the next week or two. I might even pivot libraries, given my experience with Nivo so far.

February

Next month, there are a few things I wish to focus on:

  • I want to write more. Not necessarily on here, but rather in Roam (or maybe DayOne, depending on what’s more natural) – whether that’s free journaling, morning pages, or something else. I know that if I want to write better, I need to write more. I also want to do more reflecting on what I’m doing to take stock a little and figure out whether I’m just doing stuff for the sake of doing it.
  • I want to lock down an approach to pivoting my diet and fitness regime to something more long-term sustainable and runner-friendly. I have something in my head around this, but I need to better formalise it – it’s a combination of things that work for me across Slow Carb, Intuitive Eating, and Racing Weight. But I guess I have to play with it and see if it meets my longer-term goals (improve running performance, don’t put weight back on, maybe lean up along the way), and whether it is sustainable as a set of life-long habits.
  • Finally, don’t let my ego get the best of me, and fully recover from this injury, even if it means my weekly mileage suffers temporarily.

Consumption highlights

Films

Not a massive movie month, but saw some corkers.

TV

I caught quite a bit of good TV this month. Yellowjackets was by far my favourite. Our lunchtime light binge has been Mortimer and Whitehouse: Gone Fishing, which I’m now sad to have finished.

Podcasts

  • This week, one of my favourite podcasts, The Tip Off which covers stories of fascinating and important investigative journalism cases, returned. This one covers slave labour in the British building industry, it is a great listen.
  • One from back in July, but I listened to a fascinating interview with UK Ultrarunner, Damian Hall on the Strength Running podcast – great listen, all about the dangers of drinking too much water and his experiences running stupidly long distances.
  • If you’ve not caught one yet, you should give Blindboy’s podcast a listen. His “hot takes” are amazing, I would love to see his process for putting this stuff together, because they go all over the place, make a billion great points, and then always seem to resolve to a nice take-home message full of nuance and humanity. I listened to one about pineapples in Ireland this month, and it didn’t disappoint.

Books

  • This month saw me finally complete Staff Engineer: Leadership Beyond the Management Track – a book that I finished the meat of earlier in the year, but I trickled the interview section as and when I had the breadth. Well worth a read for anyone wanting to know what a software engineer might do beyond senior. (Without spoiling much, it is one of a billion things).
  • I’ve also progressed and nearly finished Team Topologies, which is full of pragmatic wisdom about how to create teams that foster both autonomy and alignment. And in fictionland, I’ve been really enjoying A Wizard of Earthsea, one of those many “classics” that I’m only now getting around to.
Categories
Technical

Exporting my Outlook daily agenda to Roam using Hammerspoon

Recently, I posted on here about using Hammerspoon to scratch a personal itch. It was a nice exercise in documenting stuff for myself while hopefully putting something out into the ether that might be of use to others. So I thought I’d try it again.

The problem

During the summer, I started using Roam Research for all of my note-taking and personal knowledge management. You don’t need me to tell you why you should or shouldn’t be using it, there are enough of us out there already proselytising about this thing. But the long and the short of it is that absolutely everything I come across and think about is going in there – personal stuff, work stuff, little snippets of data that might one day be useful to me again. It has become a vital tool in my day-to-day thinking and planning.

One of the templates I’ve been using to take personal notes for meetings looks like this:

- [[Meeting/MEETING TITLE]]
  - Category:: #meeting #OTHER #KEYWORDS
  - Attendees
    - [[Simon Scarfe]]
    - [[Unfortunate saps talking to me...]]
  - Agenda
  - Notes

I find this fantastically useful, the “Attendees” section is particularly good for some of the natural cross-referencing it provides. But when you have a day of six or more meetings, filling in those can be tiresome, to the point where I actively avoid doing it (even with TextExpander shortcuts). When this happens, I both lose the value it provides, and I feel like a bit of a failure – which is never nice.

The solution

I decided to see if I could script exporting those meetings to markdown – trying to turn what is a bit of a laboured, several-times-a-day process into a simpler, single keyboard shortcut. And without wanting to spoil too much, it turns out I could. Not only that, but it was pretty straightforward.

I started out by using MacOS’s Script Editor to hack around the Outlook API so I could see what I might query on. When researching this, I found several pages about getting information using the frankly-quite-weird AppleScript language, but very few using Apple’s JavaScript for Automation extensions (JXA). After about 20 minutes of screwing around, most of what I required could be retrieved using Application("Microsoft Outlook").selectedObjects() (seriously). The trick to enable this is to activate Outlook Calendar’s “list view” (CMD+CTRL+0), so you can select several meetings without triggering extra UI elements.

Once I’d accessed those events, I turned them into plain ol’ JSON with the intention of letting Hammerspoon deal with them – before realising that Lua is not a strength of mine – so I continued using JavaScript to transform those objects into Roam-compatible markdown. You might wonder how bad Lua not being “a strength of mine” could possibly be by looking at the digital “chicken scrawl” that is the chained JavaScript I assembled to do that here.

Finally, it was a matter of hooking it all into Hammerspoon. Hammerspoon provides hs.osascript.javascript to execute JavaScript, hs.pasteboard.setContents to copy the results of that JS to the clipboard, and hs.hotkey.bind to hook it all up to a keyboard shortcut. I’ve probably overused the sentence a bit in this post, but it was all rather straightforward. Honestly, look.

Limitations

This isn’t without some slight flaws, the biggest one is Roam’s (or maybe it’s MacOS’s?) treatments of soft line breaks. I couldn’t find a way in Roam to paste in soft breaks, which leads to agendas pasting in as multiple blocks. That may be less problematic for more traditional outliners, but a lot of Roam’s power comes from blocks being first-class citizens that stand on their own. To get around this, in the short term I replaced them with `------` text, which I can quickly edit around if/when I find it appropriate. Fortunately, most agendas are a bit rubbish, and I only need a couple of lines of a LOT of (usually Zoom-related) bumph.

Also, none of this has been tested on “New” Outlook 365. I am a bit worried that if I upgrade (forced or otherwise), this functionality will quickly disappear. Maybe then I’ll finally start using a more portable/flexible email/calendar client?

And on a similar theme, as I have been reading around Applescript / JXA, those technologies might not be in Apple’s long term plans. That the information on how to do all of this was hard to find, could probably be taken as a symptom of this. However, if you are interested in digging more into JXA, the JXA Cookbook is a decent starting point

But all of that aside, once I’d got my head around the JS/Applescript nastiness and weird Osascript APIs, it was a pretty simple experience. Even if it all went away tomorrow, I’ve likely already saved some serious time manually adding people’s names to [[Meeting/]] posts.