Weeknote 38: Mint tea

It's a rainy and cool Saturday. Great! I have a hurty tummy. Not so great...

Gonna try to bash these weeknotes out before I lose the minerals. I haven't been eating fantastic and my stomach hasn't been super happy about it. I think some spicy chicken noodles I made yesterday pushed me over the edge. I'm wrapped up with a mint tea right now. A little worried that I've given myself food poisoning...

Let's get through this:

  • Finally got my PR to update our filesize stats comments with percentage changes into a re-reviewable state after spending basically the whole week boxing with TypeScript by way of JSDoc
  • Also finally got instances of components impacted by the brand updates into Percy
  • Helped moderate our monthly community call where we got feedback our current community 'offer' ie: are folks happy with what we currently do community-wise? Is there more we could do? etc
  • Had a little think about our use of github-scripts as a github action we make semi-regular use of in our workflow setup. I might expand on this more if it comes up again but the short story is that it doesn't let you specify Node version, doesn't get targeted by linting jobs and can't be tested, really.
  • Updated our internal documentation on Percy (still a PR at time of writing).
  • Helped release GOV.UK Frontend 5.11.1.
  • Prepared for end of cycle show and tell next week.

I feel like there's a bunch of stuff that is almost finished which is annoying because we're trying to bring less cycle work into reflection week. In all fairness we were a bit thin on the ground towards the end of the cycle with Brett off last week and Ollie off Thursday and Friday. I still think we got a decent amount done and the leftover bits are pretty quick to resolve, fingers crossed.

Praying at the TS pantheon

GOV.UK Frontend uses TypeScript via JSDoc to provide light-touch typing where we use types internally and get the benefits of type linting but don't publish our types (although if you're interested, we do have a us and (mostly) community maintained types directory via DefinitelyTyped).

I for a long while was averse to ts as a thing we should be using. I clung to reasons like project dependency bloat and strictness preventing you doing what you want but the real reason was that I didn't want to learn an extra, complicated thing to do my work. I was doing a lot more frontend-of-the-frontend work when it got added in and for a while I avoided engaging too much with our js to avoid having to deal with it and get an anxiety spike from my repo's js being unrecognisable.

I feel like I've come out the other side of that now. I already had but after this cycle I'm feeling lots more confident in it. It's not that hard once you get your head around making sure data types between functions are properly managed. I generally feel more comfortable knowing that I'm a kinesthetic learning so a bit of time in the code is all I needed. I think where I was previously anxious about using it also describes why it's scary to use.

I would describe ts as wanting what's best for you. Yes, right now this function is only called in two places and it will always have one of two properties and yes it's easier to reuse the same property but what if you expand the code and forget to update your types? This is often really annoying in the moment, however what it prods on is that your code's foundational solution is imperfect.

For example the existing stats comment stuff is reasonably complex and involves two ways to get data from 3 different places. Ideally we'd architect this to have a single method, which returned data that was always structured one way and further processing would always retain the same data structure... but we don't have time for that, and the only thing standing in our way from using a solution that is messier but 'works' is ts.

The fact is we do need to improve this code and this change is hopefully a step towards that. Besides prompting some interesting thonks about developer anxiety, it's a reminder that software is an iterative process and you should try to make as good an iteration as you can in the time given.

Non-work

I feel marginally better after writing all that.

This week between getting deep into types I went to see St. Vincent, preceded by a cracking meal at the Tandoor Chop House (who oh dear don't have a working SSL cert so I'm not gonna link to them. Look them up!). Are the lamb chops as good as Tayyabs? I'm not too sure, although it's an unfair comparison. Vinny was great as well! Lots of very sudden yelling and running around. She played Los Ageless so I'm happy.

I played Mouthwashing over last weekend and it is exactly as intense as I thought it would be. Very much a game that isn't fun per se but is still good. Your Substance's or Skin I live In's. I heard a podcast call it 'a bad time (complementary)'. If you can stomach the intensity of the game's text then it's a super interesting character study on a really particular type of delusional individual and how their mind starts to break down to maintain their delusion. Cartoon horses will never be the same.

I've moved onto a palette cleanser in Blue Prince which is an incredible puzzle game. I am so enthralled by the different mysteries and depths of this game's intrigue. I've filled several pages with notes now. Gonna go play another run now.