Categories
General

Trusting your future self

Trusting your future self:

– You don’t need to solve all your problems right now by yourself.
– There’s another copy of you – tomorrow’s you – waiting in the future to help.
– Actually, in this week alone, there’s another six “future you”s all waiting to help out.
– They’re going to know everything you do, plus more.
– “Tomorrow’s you” has a whole extra day to sort stuff out in.

So, “today’s you” can relax a bit. Instead of taking the whole world on your shoulders today, trust your future self.

(Okay, I haven’t turned into a self-help guru overnight. But this mind-hack has been really useful to me. I’ve told a few other people about it and got positive feedback, so I decided to write it down. Normal planning-to-take-over-the-world stuff will resume shortly).

Categories
Programming

Callstacks of the future

I read a blog entry recently (but can’t find the reference now, sorry) which changed my view about callstacks. Now, these are pretty fundamental things and I’ve been aware of them for nearly twenty years. So this was a pretty remarkable change.

In my head, a callstack was a record of history. When I drop into the debugger, I look at the callstack to see “where I’ve been”.

That’s wrong. The callstack isn’t a record of history. It’s a record of the future. It tells you where your computation is going to go next. The “return addresses” on the stack are where computation will continue from in the future.

Now, it’s easy to see why my misconception has continued for so long. There’s usually not much difference between the two views. Most of the time in a C-like language, you get called from some point in a function and then (later) you resume again from just after that point. So is it really worth worrying about such a tiny different?

Yes it is, because it gets your mind ready to understand concepts such as tail-call optimization and continuations much more easily. In the “future” view of callstacks, tailcall optimization becomes obvious. If we don’t need an activation record in the future, we don’t need it on the stack. Similarly, continuations make much more sense.

It’s a pretty small change in metaphor. I haven’t magically learned anything new because of it. But several bits of my knowledge now fit together in a much more satisfying way because of this switch. Whoever wrote that original blog article, thank you! 🙂

UPDATE: Rar, finally found the original blog article. Dave Herman was the man with the wisdom. 🙂

Categories
General

MusicForMonkeys

It’s been a week since the Bongo Club gig. It was great – the venue was lovely, there were loads of people there (140 or so) and I had lots of fun.

Photos: PROXY by James, TINY MONKEY (mostly) by DomC, and 8MWTD by various.

There was lots of fun onstage. Thomas got his headstock tangled up in the mic stand whilst engaging ROCK MODE during the intro to slasherflick. I didn’t notice. I thought he’d just decided to mix things up a bit and improv a new line because, despite having a mic stand attached to his guitar, he didn’t miss a note. Keef’s straight-from-the-heart “I just wanted to say: that was one of the most awesome things I’ve ever done” was brilliant. And I was pretty pleased that we managed to pull off the “introduce the band” thing considering I only told the other guys about it a few minutes before we went on. 🙂

Our set: Only wrote, Mort, Roll over funky bluez thing, Welcome to Paradise, Days like these, Fox, Sardines, Slasherflick, Tigershaped,