Safari, what the fudge do I need to do to get you to recognise that I go to Google Photos quite frequently, so as to stop you from deleting the authentication cookie? Having to constantly login is so unbelievably frustrating! 😑

Reading Greg Morris’s post about self-censoring on his own blog got me wondering why more blogging CMS’s don’t support private posts. Well, I guess I do know why: generally a blogging CMS is to make posts available on the open web. But for CMS’s that are geared towards individuals that just want a place to write, it seems like having the ability to publish a post that is only visible to yourself would be a nice feature. And yeah, I know there are some CMS’s that do support this, but it would be nice to see this on the newer ones that have been released.1


  1. And no, drafts or “in review” posts don’t count; they need to be fully published posts, completely integrated into the timeline and nav that are otherwise hidden from public view. ↩︎

πŸ”— RS.S Joy

This was shared in the Hemispheric View Discord a few days ago. A lot of really good blogs listed (enrolled? As in blogroll?) there. I took a look at it yesterday and was just ducking in and out of blogs for ages.

Must say rebinding the keyboard shortcut for Keyboard’s Maestro’s Clipboard Picker has been quite successful. It’s definitely easier to remember and invoke, and I’m using the clipboard picker a lot more now than I was previously (which was never).

Rubber-ducking: On Context

I’m torn between extracting auth credentials in the handler from a Go Context and passing them as arguments to service methods, or just passing the context and having the service methods get it from the Context themselves.

Previously, when the auth credentials just had a user ID, we were doing the former. But we’re now using more information about what the user has access to and if we were to continue doing this, we’ll need to pass more parameters through to the service layer. Not only does this make things a little less neater, it’ll mean the next time we do this, we’ll have to do the whole thing again.

But, it means that the service methods would need to get the user IDs themselves, along with this new stuff. Not that that’s an issue: there will be providers that are also using the context to get this info. So this is a viable option. And yet, I feel uneasy about using the context for this.Β 

πŸ¦†: So what are your options?

L: I guess I could replace the use of the user ID with a structure that holds both the user ID and this extra stuff.

πŸ¦†: Would that work?

L: I mean, I guess it would? It would make it clearer as to who’s request this. It would also mean that we’re being explicit about what the method needs.

πŸ¦†: Do you see any downsides with this approach?

L: The only thing I can see is that it would be inconsistent with other parts of the system that are getting it from the context.

πŸ¦†: Your hesitating. You don’t seem sure about this.

L: Well, I just don’t like the fact that we’re passing both the context which holds this auth info and the auth info alongside it. And I know that it’s unclear, and would mean that the tests would need to be changed (I mean they’ll need to be changed anyway if we went with this “principal” approach).Β 

πŸ¦†: So what’s really going on? Why are you unsure about this?

L: Well, it’s just showing this in a review and having people say “oh, that’s not the right way to write Go.”

πŸ¦†: They say that?

L: We’ll, not exactly. But they do have opinions about how best to do this (like pretty much everyone, I guess).

πŸ¦†: Do they have an opinion about this decision?

L: Well, not really. In fact, I think they’re pretty okay with either approach.

πŸ¦†: So if they’re okay with either approach, it probably doesn’t matter that much. But if it were me, I’d probably prefer something a little more readable.

L: Well, yeah. But how can I trust you? You’re me.

πŸ¦†: Am I? I’m a duck. Are you a duck?

L: No, I’m not. But you’re not a duck either. You don’t exist. You’re just a figment of my imagination.

πŸ¦†: Really? Then how are you speaking to me?

L: Because I conjured you up so I can work through this problem I’m having.

πŸ¦†: So you’re having a go at me because I don’t exist, yet you still need me because you’re stuck on this decision and you need a resolution.

L: Well, I didn’t say I don’t need you. It’s probably still helpful to me to have this conversation.Β 

πŸ¦†: Ok, I think we’ve gone off track a little. What are you going to do about this context decision?

…

πŸ¦†: Well?

L: Ok, I’m not certain that implicitly including the user ID will work, as the user ID may be different to what is actually in the context. I also don’t like how it’s implicit in the context, and I think I do prefer something a little more readable. It pains me to think that I’ll be effectively duplicating values that are already available to the method. But we’re doing that anyway with the user ID.

So here’s what I’ll do. I’ll replace it with a dedicated type, retrievable from the context and holding all the information that is needed to authorise the user. I’ll also retroactively make those changes to other areas of the code that are doing it.

πŸ¦†: Okay. And what of your peers?

L: If they ask about it, I’ll just tell them that I prefer something a little more explicit. I know it’s a departure from how I did things previously. But the benefits outweigh the costs I think in this case.

πŸ¦†: Okay. Sounds like you’ve got a way forward now.

L: Great. This has been helpful. Thanks for that, D.

πŸ¦†: No worries.Β 

Had a rubber-ducking session with myself between passing auth info within the Go Context through to the service methods, or passing them as explicit parameters.

I decided to go with passing it as explicit parameters. It’s kinda painful to see both the auth info passed through in both the Go context and a parameter. But it will result in more readable code, and it does make it clear that this information is needed. Plus, we’re already doing this already in the codebase I’m working on already (previously it was just the user ID, but we’re going to be including some additional auth info alongside it).

I am kinda glad that this tension has been resolved. It’s been weighing on me a little.

Also, for a bit of fun, I wrote this rubber-ducking session in a post. Well, it’s not entirely for fun: that’s how I was able to work through the problem. But writing it as a dialogue and posting it online was fun.

It would be nice if the CSV diff in Gitlab had a “row order not important” mode, in that any changes in row order are treated almost like whitespace changes. It won’t be something that’ll apply to all CSV files. But more often that not, the CSV files I deal with are not dependent on any row order.

Oof, turns out you can’t trust a browser to tell you the right MIME type for a file upload. I expected some logic involving magic numbers, but it just looks like a mixture of guessing based on file extension, deferring to the OS, and giving up and sending you application/octet-stream.

Spent the last few days building a small site which will convert an OPML file of RSS subscriptions into an HTML list of links to their respective websites. I needed it for a blogroll I’m planning to add, but I figured this might be something others may find useful.

Goland Debugger Not Working? Try Upgrading All The Things

I’ve been having occasional trouble with the debugger in Goland. Every attempt to debug a test would just fail with the following error:

/usr/local/go/bin/go tool test2json -t /Applications/GoLand.app/…
API server listening at: 127.0.0.1:60732
could not launch process: EOF

Debugger finished with the exit code 1

My previous attempts at fixing this β€” upgrading Go and Goland β€” did get it working for a while, but recently it’s been happening to me again. And being at the most recent version of Go and Goland, that avenue was not available to me.

So I set about looking for other ways to fix this. Poking around the web netted this support post, which suggested upgrading the Xcode Command Line tools:

$ sudo rm -rf /Library/Developer/CommandLineTools
$ xcode-select --install

I ran the command and the tools did upgrade successfully, but I was still encountering the problem. I then wondered if Goland used Delve for debugging, and if that actually need upgrading. I’ve got Delve via Homebrew, so I went about upgrading that:

$ brew upgrade dlv

And indeed, Homebrew did upgrade Delve from 1.21.0 to 1.22.0. And once that finished, and after restarting Goland1, I was able to use the debugger again.

So, if you’re encountering this error yourself, try upgrading one or more of these tools:

  • Goland
  • Go
  • Xcode Command Line tools (if on a Mac)
  • Delve

This was the order I tried them in, but you might be lucky by trying Delve first. YMMV


  1. Not sure that a restart is required, but I just did it anyway, “just in case”. ↩︎

I’m a bit surprised that Jira doesn’t have a notion of drafts. You start writing a task, then you think that it might be best to know whether it’s worth doing. What do you do with this half written task? Do you create it? At the moment I just keep them in an open browser tab, which is… not ideal.

Need to find a way to represent a collection of IDs in Go, all representable in different ways, with each one having a different type. Kinda wish Go had algebraic data type like Elm or Haskell, or even just enums with associated data like Java or Swift. Would be so useful for this.

Discovered a new artist through a YouTube channel I watch. They make some pretty good chill-out music. I can recommend Synths Working Overtime and Music For Podcasts 6, particularly “Cloudloop” (track 6) and “Systematic” (track 7). 🎡

Falling into the trap of not using a particular mug because it’s “special”. I bought the mug to be used, I should actually use it. As the appraisers on Antiques Roadshow are wont to say, it’s a real shame that such a special thing never leaves the cupboard.

It’s about time I started seriously using the clipboard support that comes with Keyboard Maestro. I think the first step is making it easier to show the history. I’ve remapped the history picker to ^ βŒ₯ ⌘ ⇧ which feels easier to invoke, and probably easier to remember. We’ll see how it goes.

Keyboard Maestro macro with the single action 'Activate Clipboard History Switcher' triggered when Control+Option+Command+Up Arrow is pressed

So after logging in this morning, I had to:

  • Enter my 1Password master password,
  • so I can get to my laptop password to log into the VPN,
  • so I can enter my admin passwords in Settings,
  • so that MacOS knows I have admin rights,
  • so I can enter my admin password again to upgrade Slack.

Yep, we truly live in a golden age. πŸ˜’

People Are More Interested In What You're Working On Than You Think

If anyone else is weary about posting about what projects they’re working on, fearing that others would think they’re showing off or something, here’s two bits of evidence that I hope would allay these fears:

Exhibit 1: I’m a bit of a fan of the GMTK YouTube channel. Lots of good videos there about game development that, despite not being a game developer myself, I find facinating. But the playlist I enjoy the most is the one where Mark Brown, the series creator, actually goes through the process of building a game himself. Now, you’re not going to learn how to use Unity from that series (although he does have a video about that), but it’s fun seeing him making design decisions, showing off prototypes, overcoming challenges β€” both external and self imposed, and seeing it all come together. I’m aways excited when he drops one of these videos, and when I learnt today that he’s been posting dev logs on his Discord, so interested am I in this topic that I immediately signed up as a Patreon supporter.

Exhibit 2: I’ve been writing about my own projects on a new Scribbles blog. This was completely for myself, as a bit of an archive of previous work that would be difficult or impossible to revisit later. I had no expectations of anyone else finding these interesting. Yet, earlier this week, while at lunch, the conversation I was having with work colleagues turned to personal projects. He ask if I was working on anything, and when I told him about this blog, he expressed interest. I gave him the link and that afternoon I saw him taking a look (I not expecting him to be a regular visitor but the fact that he was interested at all was something).

It turns out that my colleague gets a kick out of seeing others do projects like this on the side. I guess, in retrospect, that this shouldn’t be a surprise to me, seeing that I get the same thrill. Heck, that’s why I’ve subscribed to the tech podcasts like Under the Radar: I haven’t written an iOS app in my life, yet it’s just fun listing to dev stories like this.

Yet, when it comes to something that I’m working on, for a long time I’ve always held back, thinking that talking about it is a form of showing off. I like to think I’m getting better here, but much like the Resistance, that feeling is still there. Wispering doubt in my ear. Asking who would be interested in these raw, unfinished, things that will never go beyond the four walls of the machine from whence then came? I don’t think that feeling will ever go away, but in case I loose my nerve again, I hope to return to the events of this week, just to remind myself that, yeah, people are interested in these stories. I can put money on that assurance. After all, I just did.

So don’t be afraid to publish those blog posts, podcasts, or videos on what you’re working on. I can’t wait to see them.

See also, this post by Aaron Francis that touches on the same topic (via The ReadME Project).

Well, it’s around 4:15 on a Friday and the last code change I pushed didn’t fix the bug I was working on. Looks like that’s something to look at again on Monday.

Now to clock off and put on my Friday after-work music. Oh, wait! That’s an opportunity for a new Album Whale list.

Posted my first “real” list on Album Whale: my list of new and rediscovered albums of 2023. It’s a little on the small side, but that’s because I tend to listen to familiar stuff most of the time. I do have plans to post those as well, but we’ll start with something small.

πŸ”— Pika

Seeing this makes me want to try it. I think I have a problem: I want to try all of the blogging CMSes. But I have no need for it now, so I’ll just keep a link to it here for later.