Blog

More than you expected?

You're reading everything on Dan's blog - including notes, reposts, checkins, videos and comics.
That might be more than you wanted to see, if you're only interested in blog posts (articles) Dan has written.

Wonder Syndrome

Ruth wrote an excellent post this month entitled Wonder Syndrome. It attempts to reframe imposter syndrome (which is strongly, perhaps disproportionately, present in tech fields) as a positive indicator that there’s still more to learn:

Being aware of the boundaries of our knowledge doesn’t make us imposters, it makes us explorers. I’m going to start calling mine “Wonder Syndrome”, and allowing myself to be awed by how much I still have to learn, and then focusing in and carrying on with what I’m doing because although I may not reach the stars, I’ve come a long way up the mountain. I can learn these things, I can solve these problems, and I will.

This really resonated with me, and not just because I’ve totally bought into the Automattic creed, which literally opens with the assertion that “I will never stop learning”. (Other parts of the creed feel like they parallel Ruth’s post, too…)

Dan and Jacob look at a piece of code together; Dan is smiling but Jacob looks disgusted.
I don’t recall exactly what I’m advising a fellow Three Rings developer to do, here, but I don’t think he’s happy about it.

I just spent a week at a Three Rings DCamp (a “hackathon”, kinda), and for the umpteenth time had the experience of feeling like everybody thinks I know everything, while on the inside I still feel like I’m still guessing a third of the time (and on StackOverflow for another third!).

The same’s true at work: people ask me questions about things that I suppose, objectively, are my “specialist subjects” – web standards, application security, progressive enhancement, VAT for some reason – and even where I’m able to help, I often get that nagging feeling like there must be somebody better than me they could have gone to?

Pair of Venn diagrams. The first, titled "In my head", shows "things Dan is good at" as a subset of "things others are good at". The second, titled "Reality", shows an intersection between "things others are good at" and "things Dan is good at" but plenty of unshared space in each.
You’ve probably seen diagrams like this before. After all: I’m not smart or talented enough to invent anything like this and I don’t know why you’d listen to anything I have to say on the subject anyway. 😂

You might assume that I love Ruth’s post principally because it plays to my vanity. The post describes two kinds of knowledgeable developers, who are differentiated primarily by their attitude to learning. One is satisfied with the niche they’ve carved out for themselves and the status that comes with it and are content to rest on their laurels; the other is driven to keep pushing and learning more and always hungry for the next opportunity to grow. And the latter category… Ruth’s named after me.

Woman on laptop, looking concerned towards camera, captioned "are you even good enough to have imposter syndrome?"
Wait, what if I’m not Have I been faking it this entire blog post?

Bnd while I love the post, my gut feeling to being named after such an ideal actually makes me slightly uncomfortable. The specific sentence that gets me is (emphasis mine):

Dans have no interest in being better than other people, they just want to know more than they did yesterday.

I wish that was me, but I’m actually moderately-strongly motivated by a desire to feel like I’m the smartest person in the room! I’m getting this urge under control (I’m pretty sure I was intolerable as a child and have been improving by instalments since then!). Firstly, because it’s an antisocial pattern to foster, but also because it limits my ability to learn new things to have to go through the awkward, mistake-filled “I’m a complete amateur at this!” phase. But even as I work on this I still get that niggling urge, more often than I’d like, to “show off”.

Of course, it could well be that what I’m doing right now is catastrophising. I’m taking a nice thing somebody’s said about me, picking the one part of it that I find hardest to feel represents me, and deciding that I must be a fraud. Soo… imposter syndrome, I guess. Damn.

Or to put it a better way: Wonder Syndrome. I guess this is another area for self-improvement.

(I’m definitely adopting Wonder Syndrome into my vocabulary, as an exercise in mitigating imposter syndrome. If you’ve not read Ruth’s post in full, you should go and do that next.)

Child Photographers

Taking a photo of our kids isn’t too hard: their fascination with screens means you just have to switch to “selfie mode” and they lock-on to the camera like some kind of narcissist homing pigeon. Failing that, it’s easy enough to distract them with something that gets them to stay still for a few seconds and not just come out as a blur.

Dan with the kids and his bike, on the way to school.
“On the school run” probably isn’t a typical excuse for a selfie, but the light was good.

But compared to the generation that came before us, we have it really easy. When I was younger than our youngest is , I was obsessed with pressing buttons. So pronounced was my fascination that we had countless photos, as a child, of my face pressed so close to the lens that it’s impossible for the camera to focus, because I’d rushed over at the last second to try to be the one to push the shutter release button. I guess I just wanted to “help”?

Monoshcome photo of Dan, circa 1982, poiting towards the camera.
Oh wait… is there something on that camera I can press?

In theory, exploiting this enthusiasm should have worked out well: my parents figured that if they just put me behind the camera, I could be persuaded to take a good picture of others. Unfortunately, I’d already fixated on another aspect of the photography experience: the photographer’s stance.

When people were taking picture of me, I’d clearly noticed that, in order to bring themselves down to my height (which was especially important given that I’d imminently try to be as close to the photographer as possible!) I’d usually see people crouching to take photos. And I must have internalised this, because I started doing it too.

Dan's mum and dad, with the top halves of their heads cut-off by the poor framing of the picture.
Another fantastic photo by young Dan: this one shows around 80% of my mum’s face and around 100% of my dad’s manspreading.

Unfortunately, because I was shorter than most of my subjects, this resulted in some terrible framing, for example slicing off the tops of their heads or worse. And because this was a pre-digital age, there was no way to be sure exactly how badly I’d mucked-up the shot until days or weeks later when the film would be developed.

 

Dan's dad crouches next to a bus in a somewhat lopsided-photo.
I imagine that my dad hoped to see more of whatever bus that is, in this photo, but he’s probably just grateful that I didn’t crop off any parts of his body this time.

In an effort to counteract this framing issue, my dad (who was always keen for his young assistant to snap pictures of him alongside whatever article of public transport history he was most-interested in that day) at some point started crouching himself in photos. Presumably it proved easier to just duck when I did rather than to try to persuade me not to crouch in the first place.

As you look forward in time through these old family photos, though, you can spot the moment at which I learned to use a viewfinder, because people’s heads start to feature close to the middle of pictures.

Dan's dad on a train station.
This is a “transitional period” photo, evidenced by the face that my dad is clearly thinking about whether or not he needs to crouch.

Unfortunately, because I was still shorter than my subjects (especially if I was also crouching!), framing photos such that the subject’s face was in the middle of the frame resulted in a lot of sky in the pictures. Also, as you’ve doubtless seem above, I was completely incapable of levelling the horizon.

Extremely blurred close-up photo of Dan's face.
This is the oldest photo I can find that was independently taken by our youngest child, then aged 3. I’m the subject, and I’m too close to the lens, blurred because I’m in motion, and clearly on my way to try to “help” the photographer. Our ages might as well be reversed.

I’d like to think I’ve gotten better since, but based on the photo above… maybe the problem has been me, all along!

Say… “Cheese?”

For lunch today I taste-tested five different plant-based vegan “cheeses” from Honestly Tasty. Let’s see if they’re any good.

Prefer video?

This blog post is available as a video (here or on YouTube), for those who like that sort of thing. The content’s slightly different, but you do get to see my face when I eat the one that doesn’t agree with me.

Background

I’ve been vegetarian or mostly-vegetarian to some degree or another for a little over ten years (for those who have trouble keeping up: I currently eat meat only on weekends, and not including beef or lamb), principally for the environmental benefits of a reduced-meat lifestyle. But if I’m really committed to reducing the environmental impact of my diet, the next “big” thing I still consume is dairy products.

My milk consumption is very low nowadays, but – like many people who might aspire towards dropping dairy – it’s quitting cheese that poses the biggest challenge. I’m not even the biggest fan of cheese, and I don’t know how I’d do without it: there’s just, it seems, no satisfactory substitute.

It’s possible, though, that my thinking on this is outdated. Especially in recent years, we’re getting better and better at making convincing (or, at least, tasty!) plant-based substitutes to animal based foods. And so, inspired by a conversation with some friends, I thought I’d try a handful of new-generation plant-based cheeses and see how I got on. I ordered a variety pack from Honestly Tasty (who’ll give you 20% off your first order if you subscribe your favourite throwaway email address to their newsletter) and gave it a go.

Bree

Dan eats some Bree.
It’s supposed to taste like Brie, I guess, but it’s not convincing. The texture of the rind is surprisingly good, but the inside is somewhat homogeneous and flat. They’ve tried to use mustard powder to provide Brie’s pepperiness and acetic acid for its subtle sourness, but it feels like there might be too much of the former (or perhaps I’m just a little oversensitive to mustard) and too little of the latter. It’s okay, but I wouldn’t buy it again.

Ched Spread

Dan eats Ched Spread.
This was surprisingly flavoursome and really quite enjoyable. It spreads with about the consistency of pâté and has a sharp tang that really stands out. You wouldn’t mistake it for cheese, but you might mistake it for a cheese spread: there’s a real “cheddary” flavour buried in there.

Blue

Dan eats 'Blue' Veganzola.
This is supposed to be modelled after Gorgonzola, and it might as well be because I don’t like either it or the cheese it’s based on. I might loathe Blue slightly less than most blue cheeses, but that doesn’t mean I’d willingly subject myself to this again in a hurry. It’s matured with real Penicillium Roqueforti, apparently, along with seaweed, and it tastes like both of these things are true. So yeah: I hated this one, but you shouldn’t take that as a condemnation of its quality as a cheese substitute because I’d still rather eat it than the cheese that it’s based on. Try for yourself, I guess.

Herbi

Dan eating Herbi.
This was probably my favourite of the bunch. It’s reminiscent of garlic & herb Boursin, and feels like somebody in the kitchen where they cooked it up said to themselves, “how about we do the Ched Spread, but with less onion and a whole load of herbs mixed-through”. It seems that it must be easier to make convincingly-cheesy soft cheeses than hard cheeses, but I’m not complaining: this would be great on toast.

Shamembert

Dan serves a Shamembert.
If you’d served me this and told me it was a baked Camembert… I wouldn’t be fooled. But I wouldn’t be disappointed either. It moves a lot like Camembert and it tastes… somewhat like it. But whether or not that’s “enough” for you, it’s perfectly delicious and I’d be more than happy to eat it or serve it to others.

In summary…

Honestly Tasty’s Ched Spread, Herbi, and Shamembert are perfectly acceptable (vegan!) substitutes for cheese. Even where they don’t accurately reflect the cheese they attempt to model, they’re still pretty good if you take them on their own merits: instead of comparing them to their counterparts, consider each as if it were a cheese spread or soft cheese in its own right and enjoy accordingly. I’d buy them again.

Their Bree failed to capture the essence of a good ripe Brie and its flavour profile wasn’t for me something to enjoy outside of its attempts at emulation. And their “Veganzola” Blue cheese… was pretty grim, but then that’s what I think of Gorgonzola too, so maybe it’s perfect and I just haven’t the palate for it.

How WordPress and Tumblr are keeping the internet weird

This article is a repost promoting content originally published elsewhere. See more things Dan's reposted.

[Nilay:] It is fashionable to run around saying the web is dead and that apps shape the world, but in my mind, the web’s pretty healthy for at least two things: news and shopping.

[Matt:] I think that’s your bubble, if I’m totally honest. That’s what’s cool about the web: We can live in a bubble and that can seem like the whole thing. One thing I would explicitly try to do in 2022 is make the web weirder.

The Verge interviewed Matt Mullenweg, and – as both an Automattician and a fan of the Web as a place for fun and weirdness – I really appreciated the direction the interview went in. I maintain that open web standards and platforms (as opposed to closed social media silos) are inspirational and innovative.

Emilie Reed‘s Anything a Maze lives on itch.io, and (outside of selfhosting) that’s clearly the best place for it: you couldn’t tell that story the same way on Medium; even less-so on Facebook or Twitter.

Dan Q found GC98HTF Walk by the Firehouse #2.0

This checkin to GC98HTF Walk by the Firehouse #2.0 reflects a geocaching.com log entry. See more of Dan's cache logs.

The geokid asked to go find a cache this morning while his big sister went off to a playdate. We opted to tackle this one, which I’d failed to find a long while ago when it was missing. This time we had no such difficulty, and the geokid put his hands right on it! Nice, TFTC.

Five year old boy on a footpath with two thumbs up.
Victory pose!
Map of 51.77655,-1.3859

Nginx Caching for Passenger Applications

Suppose you’re running an application on a Passenger + Nginx powered server and you want to add caching.

Perhaps your application has a dynamic, public endpoint but the contents don’t change super-frequently or it isn’t critically-important that the user always gets up-to-the-second accuracy, and you’d like to improve performance with microcaching. How would you do that?

Where you’re at

Diagram showing the Internet connecting to an Nginx+Passenger webserver, connecting to an application written for Ruby, Python, or NodeJS.
Not pictured: the rest of the Internet.

Your configuration might look something like this:

1
2
3
4
5
6
7
server {
  # listen, server_name, ssl, logging etc. directives go here
  # ...

  root               /your/application;
  passenger_enabled  on;
}

What you’re looking for is proxy_cache and its sister directives, but you can’t just insert them here because while Passenger does act act like an upstream proxy (with parallels like e.g. passenger_pass_header which mirrors the behaviour of proxy_pass_header), it doesn’t provide any of the functions you need to implement proxy caching of non-static files.

Where you need to be

Instead, what you need to to is define a second server, mount Passenger in that, and then proxy to that second server. E.g.:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Set up a cache
proxy_cache_path /tmp/cache/my-app-cache keys_zone=MyAppCache:10m levels=1:2 inactive=600s max_size=100m;

# Define the actual webserver that listens for Internet traffic:
server {
  # listen, server_name, ssl, logging etc. directives go here
  # ...

  # You can configure different rules by location etc., but here's a simple microcache:
  location / {
    proxy_pass http://127.0.0.1:4863; # Proxy all traffic to the application server defined below
    proxy_cache           MyAppCache; # Use the cache defined above
    proxy_cache_valid     200 3s;     # Treat HTTP 200 responses as valid; cache them for 3 seconds
    proxy_cache_use_stale updating;   # (Optional) send outdated response while background-updating cache
    proxy_cache_lock      on;         # (Optional) only allow one process to update cache at once
  }
}

# (Local-only) application server on an arbitrary port number to act as the upstream proxy:
server {
  listen 127.0.0.1:4863;

  root               /your/application;
  passenger_enabled  on;
}

The two key changes are:

  • Passenger moves to a second server block, localhost-only, on an arbitrary port number (doesn’t need HTTPS, of course, but if your application detects/”expects” HTTPS you might need to tweak your headers).
  • Your main server block proxies to the second as its upstream, and you can add whatever caching directives you like.

Obviously you’ll need to be smarter if you host a mixture of public and private content (e.g. send Vary: headers from your application) and if you want different cache durations on different addresses or types of content, but there are already great guides to help with that. I only wrote this post because I spent some time searching for (nonexistent!) passenger_cache_ etc. rules and wanted to save the next person from the same trouble!

Dan Q couldn’t find GC6FD5Y Cumnor Minions – Bob

This checkin to GC6FD5Y Cumnor Minions - Bob reflects a geocaching.com log entry. See more of Dan's cache logs.

0/2 for the geokids and I this morning. Hunted a long while on and around the obvious place, later reassured by the hint, but eventually expanded our search based on recent logs (which suggest the hint is wrong). Interrupted by a suspicious local we decided to make an excuse to leave. Hint, possibly coordinates, maybe more needs looking at by CO.

Map of 51.73425,-1.341117

Printing Maps from Dungeondraft

I really love Dungeondraft, an RPG battle map generator. It’s got great compatibility with online platforms like Foundry VTT and Roll20, but if you’re looking to make maps for tabletop play, there’s a few tips I can share:

Screenshot showing Dungeondraft being used to edit a circular tower. The Export window is visible.
Tabletop players can’t zoom in and will appreciate you printing with good contrast.

Planning and designing

Dungeondraft has (or can be extended with) features to support light levels and shadow-casting obstructions, openable doors and windows, line-of sight etc… great to have when you’re building for Internet-enabled tabletops, but pointless when you’re planning to print out your map! Instead:

  • Think about scale: I’m printing to A4 sheets and using inch-size squares, so every 11 x 8 squares equates to one sheet of paper. Knowing this, I can multiply-up to a whole number of sheets of paper and this informs my decisions about how to best make use of the maps (and what will and won’t fit on my dining table!).
  • Focus on legibility: Your printer probably won’t have the same kind of resolution as your screen, and your players can’t “zoom in” to get details. Play with the grid styles (under Map Settings) to find what works best for you, and try not to clash with your floor patterns. If you’re printing in monochrome, use the “Printer-Friendly” camera filter (also under Map Settings, or in the Export Options dialog) to convert to gorgeous line-art. Make sure critical elements have sufficient contrast that they’ll stand out when printed or your players might walk right over that chest, campfire, or bookshelf.
  • Think about exposure: You don’t get digital “fog of war” on the tabletop! Think about how you’re going to reveal the map to your players: plan to print in multiple sections to put together, jigsaw style, or have card to “cover” bits of the map. Think about how the tool can help you here: e.g. if you’ve got multiple buildings the players can explore, use a higher “level” or roof layer to put roofs on your buildings, then print the relevant parts of that level separately: now you’ve got a thematic cover-up that you can remove to show the insides of the building. Go the other way around for secret doors: print the empty wall on your main map (so players can’t infer the location of the secret door by the inclusion of a cover-up) and the secret door/passage on the overlay, so you can stick it onto the map when they find it.
Monochrome map showing a crane tower and attached dwelling.
If you’re printing in black and white, line art can be a gorgeous look.

Printing it out

There’s no “print” option in Dungeondraft, so – especially if your map spans multiple “pages” – you’ll need a multi-step process to printing it out. With a little practice, it’s not too hard or time-consuming, though:

Screenshot showing a cavern map in Gimp, with the Export Image dialog open and PDF selected as the output format.
Gimp makes light work of converting a PNG into a PDF.

Export your map (level by level) from Dungeondraft as PNG files. The default settings are fine, but pay attention to the “Overlay level” setting if you’re using smart or complex cover-ups as described above.

To easily spread your map across multiple pages, you’ll need to convert it to a PDF. I’m using Gimp to do this. Simply open the PNG in Gimp, make any post-processing/last minute changes that you couldn’t manage in Dungeondraft, then click File > Export As… and change the filename to have a .pdf extension. You could print directly from Gimp, but in my experience PDF reader software does a much better job at multi-page printing.

Foxit print dialog showing a preview of a map printed across 6 sheets of A4 paper.
Check the print preview before you click the button!

Open your PDF in an appropriate reader application with good print management. I’m using Foxit, which is… okay? Print it, selecting “tile large pages” to tell it to print across multiple sheets. Assuming you’ve produced a map an appropriate size for your printer’s margins, your preview should be perfect. If not, you can get away with reducing the zoom level by up to a percent or two without causing trouble for your miniatures. If you’d like the page breaks to occur at specific places (for exposure/reveal reasons), go back to Gimp and pad one side of the image by increasing the canvas size.

Check the level of “overlap” specified: I like to keep mine low and use the print margins as the overlapping part of my maps when I tape them together, but you’ll want to see how your printer behaves and adapt accordingly.

Multiple sheets of A4 paper joined with a slight overlap by long strips of sticky tape.
The overlap provides stability, rigidity, and an explanation as to exactly what that character tripped over when they rolled a critical fail on a DEX check.

If you’re sticking together multiple pages to make a single large map, trim off the bottom and right margins of each page: if you printed with cut marks, this is easy enough even without a guillotine. Then tape them together on the underside, taking care to line-up the features on the map (it’s not just your players who’ll appreciate a good, visible grid: it’s useful when lining-up your printouts to stick, too!).

I keep my maps rolled-up in a box. If you do this too, just be ready with some paperweights to keep the edges from curling when you unfurl them across your gaming table. Or cut into separate rooms and mount to stiff card for that “jigsaw” effect! Whatever works best for you!

Miniatures on a cave map, with the D&D Player's Handbook acting as a paperweight.
Any hefty tome, e.g. the 5e Player’s Handbook, can act as a paperweight.

The Revenge of the Hot Water Bottle

This article is a repost promoting content originally published elsewhere. See more things Dan's reposted.

Imagine a personal heating system that works indoors as well as outdoors, can be taken anywhere, requires little energy, and is independent of any infrastructure. It exists – and is hundreds of years old.

A hot water bottle is a sealable container filled with hot water, often enclosed in a textile cover, which is directly placed against a part of the body for thermal comfort. The hot water bottle is still a common household item in some places – such as the UK and Japan – but it is largely forgotten or disregarded in most of the industrialised world. If people know of it, they usually associate it with pain relief rather than thermal comfort, or they consider its use an outdated practice for the poor and the elderly.

Imagine my surprise to discover that not only are hot water bottles confined almost-entirely to the UK and Japan (more-strictly, I suppose the article should say “the British Isles”; friends in Ireland tell me that they’re popular there too), but that they’re so distinctly confined to these isles that English speakers elsewhere in the world need this article to explain to them what a hot water bottle is and why they’d want one!

I’m a fan of hot water bottles; I’ll sometimes take one – or even two, during a cold snap – to bed. But reading this article feels like reading a guide for aliens living on Earth: explaining everyday things as if you’d never come across them before.