Use React.memo() wisely

Use React.memo() wisely by Dmitri Pavlutin is the article which finally made React.memo() click for me.

(Thanks for sharing, Remy.)

An encounter

We were out riding our bikes in the local forest the other day. I took a wrong turning and was cursing because it meant missing a particularly fun section of trail.

But then we came around a corner, and there was a very large and beautiful black bear wandering down the track ahead of us.

I stopped in a hurry, and Andrea, confused, pulled up alongside me. “Bear! Bear!” I said, gesticulating wildly, which had entirely the wrong effect – Andrea got all excited and wanted to go and give him a hug. The bear paused and looked over his shoulder at us. We shouted “Hello Bear!”

He turned, gave us a long hard stare, nodded, then carried on up the track and off into the trees.

These encounters aren’t that unusual around here, although they happen quite a lot less often than they used to.

This is my jam

Another one from Orkidea. When I’m singing this tune in my head I “hear” the Perfect Motion lyrics laid upon Simple Minds’ Theme for Great Cities.

This is my jam

BOS Deville air spring rattle

My venerable old BOS Deville was rattling, and it felt harsh (like it ramped up far too quickly). I pushed down on the fork and it went “clunk”, and then again as I let it return. It wasn’t the sort of crown/stanchion interface creak I’ve heard on other forks – more of a clunk coming from inside the air spring side.

I searched the web. There’s no service manual floating around. Very few people have posted videos or service notes for this exact model of fork. I found various promising forum posts, but none of them answered my question. Others had what appeared to be the same issue, but (perhaps predictably) no solution to it.

I pored over pictures of the dismantled fork, trying to figure it out. I ended up trying to make head or tail of a video in Russian showing a complete disassembly of the fork. That proved to be the key to the mystery.

When I took the top-cap off the air spring, there was a beautifully machined metal part which looks a bit like a trumpet. It sitting on it’s own, at the bottom of the air chamber. It’s supposed to be attached to the top cap. I’d never noticed it when servicing the fork before – perhaps because it was still attached where it should be. And to be honest, I was far more interested in sorting out the other side of the fork – where nearly all of the oil goes.

So I fished it out (probably the hardest part), re-greased it, and re-connected it to the top cap. Put it back together, pumped it up, and went for a ride.

The rattling stopped and they’re back to feeling nice again. Almost too plush, but I can work on that.

This is my jam

Grimes – 4ÆM.

On learning to XC skate ski

We’re learning to cross country ski – the Skate discipline in particular. It’s hard, exhausting but very satisfying when it goes right. At this point, descending is absolutely terrifying. Here’s some little things which have helped me so far. Mostly they’re for me to refer back to.

You don’t push off the ski behind you, so much as transfer all your weight in the direction you want the forward ski to travel. This might be the most important thing. Point your whole body – hips, shoulders, head – in that direction.

Use poles to aid forward motion. I find it helps to angle them to point in the direction of the forward ski.

Try to keep the forward ski completely flat on the snow. That way it’ll glide better. As soon as you’re on an edge, you’re limiting your glide.

Try to keep the glide going when you’re climbing. On steeper pitches, pushing the forward ski “out” seems to help.

Slushy snow is really tricky – especially when your poles go straight through it, or you sink on every “push”. It’s easier to stop on the descents though!

Most of the time you can ignore the ruts left by other skis and grooming equipment (except for the classic tracks – don’t vandalise them if you can help it). Nine times out of ten, your ski won’t catch in them – and if it does you just do another “skate” and it won’t be in there any more.

Keep an eye on the sides of the track. If the front of your ski goes into the bank it’ll stick and you’ll probably fall flat on your face.

It’s not as cold as you think. You almost certainly don’t need that down jacket. This is really hard work and you’ll be sweating buckets in negative temperatures.

Just like biking, look where you’re going, not where you are. Don’t look at the front of your skis. No, seriously, keep your eyes up!

That said, bad posture seems to help. Keep your weight in the direction of travel. Going out the back door hurts, and it’s hard to get up again!

Rather than taking massive strides from one ski to the other, make smaller, more subtle movements. Like you’re walking (strolling).

I know descending is hard when there’s no real edges to push against. Relax, you big control freak. Don’t panic. Look where you want to go. Keep the knees apart. Weight the outside ski to steer – right to go left, and vice-versa.

Gravity

Metrik‘s Gravity has a real classic Pendulum feel to it. The first time I heard it (on Hospital Podcast #402) I honestly thought it was sung by Rob Swire.