Situated Software

Attention Conservation Notice: Sometimes I write about tech.


There’s a concept I’ve been using recently that I find quite helpful as a descriptive tool, which is the notion of software being situated.

Software which is situated is software which is highly specific to some particular context – e.g. a single person, a single task or category of task, a single computer. It is non-reusable outside of that context, and as a result it is able to make very in depth (and usually implicit) assumptions about reality.

This isn’t a binary. All software has a context, so no software is truly unsituated, but that context can be more or less specific. The question is not whether software is situated, but where and how strongly it is situated.

There are a number of interesting ways that software can be situated.

Hypothesis is not especially situated software (libraries tend not to be), but Hypothesis’s build system is very situated despite being designed to run on a variety of different computers and CI systems – it is adapted to a very specific task (running Hypothesis build tasks).

Another situated codebase I work on is the code that powers my notebook. This code is what Simon Tatham calls SymbiosisWare. Code that is part of the extended self rather than a distinct project in its own right (although jml has recently adapted the code for his own use. It’s important to remember that even situated software can be reused, it just requires adaptation to the new environment). In this case the context to which it is situated is that of a single person.

Another piece of situated software is the code that exists to manage experiments I run on my workstation, Szalinski. Szalinski is a bit of a beast of a machine and I use it to run experiments on test-case reduction, so there is a lot of code that is very specific to it and its storage environment. This code is mostly written so that it could be run on another machine with broadly similar configuration, but we’d almost certainly find a huge wealth of baked in assumptions by making it do so.

A fourth category of situated software is most software companies’ internal code (except the code for software that they’re actually shipping to end users, if there is any): Generally a lot of the individual applications are not that situated, because you’ve generalised them enough to make them run in dev, staging, and production, but there’s still a large ecosystem of glue and deployment code that is highly situated to a specific environment that is only found within the company.

Note that the same code base can contain a variety of code that is situated to a greater or lesser degree. Your junk drawer module is probably full of highly situated code even if the project it supports is not especially situated, and many highly situated codebases will contain nice well factored code that you could easily extract out into its own reusable library if you wanted to.

“Situated” is not a negative term. I like all three of the situated codebases I work on. The great thing about situated code is that it’s easy to create, and because you don’t have a huge range of use cases to consider it is also often very easy to modify. This can make it worthwhile to create highly situated code in cases where less situated code would be too high cost.

It’s not a positive term either. Situating software absolutely has its downsides.

The first is the nature of situation – if you have a highly specific context outside of which the code is not useful, then the code is not useful outside of that highly specific context! The Hypothesis build system is great. We keep thinking about turning it into a generic tool, but honestly that sounds exhausting so we never do. As a result Hypothesis’s build has some great functionality that nobody else gets to benefit from.

The second is that situated software can be difficult to get started with as a newcomer. It gains much of its power from being embedded in a particular context, but that context is often implicit to some large degree, which means that as a newcomer you essentially have to reverse engineer it. In the same way that you have to be embedded in the context to use the situated code, you have to be embedded in the context to even understand the situated code, and that comes with a certain amount of up front work. I’ve been seeing this in the context of getting some students up to scratch on Hypothesis internals – there’s a lot of highly situated code in the insides of the fuzzer, with all sorts of non-obvious baked in assumptions.

Despite not giving a way to describe the quality of the code, I still find it a very useful descriptive tool, partly because it lets you name and observe certain trade offs that might not otherwise be obvious.

In particular, knowing that situated code exists and is valid is important because it gives you permission to write situated code! There are many circumstances in which this is a useful thing to do and I think we resist doing it because it feels like we’d be writing bad code.

But code is only good or bad in context, and I think many of the things we would dismiss as bad practice are only bad in the context of reusability. Much of the code we feel guilty about, we shouldn’t, because it’s actually perfectly acceptable code, it’s just highly situated.

This entry was posted in Uncategorized on by .

Nonspecifically Neurodivergent

Epistemic status: Seems legit.

Hermeneutical Status: I think this is useful? It’s useful to me and other people seem to think it’s useful to them.


Here’s a joke for you: Suppose you take subclinical manifestations of about six different recognised conditions and disorders and mix them together, what do you get?

Speaking from personal experience, what you get is very annoyed.

I’ve started using the term “nonspecifically neurodivergent” to describe myself recently. Other people have been saying that the term also resonates with them, so I thought it would be useful to write it up in order to make it more broadly available.

What does it mean to be nonspecifically neurodivergent? Well, roughly the feeling I’m trying to capture here is normal people are really weird.

The goal here is not to describe any particular aspect of how our brains work, but instead the shared experience of whether you get to reliably assume other people’s brains work like your own.

Roughly what I wanted is a term that would capture how I feel in the following two conversations patterns:

Neurotypical: *tells amusing story about themselves, a bartender, and a goat*

Me: Hmm. I see, I see. There’s one bit I didn’t understand… could you back up to the thing where you assumed that all of their minds worked exactly like yours and that didn’t stress you out in any way?

NT: Huh? Which bit was that?

Me: Literally all of it.

vs

More or less any neurodivergent person: *describes some aspect of their lived experience that most people would find deeply strange*

Me: Hmm. I do not necessarily share this experience but yes that seems like a sensible model of how brains work. Good. Carry on.

I can describe specific ways in which my brain is weird (Objection: my brain isn’t weird, normal people’s brains are weird! Counter-objection: Unfortunately weird is a consensus term and I’m outvoted), but often the most salient part of my experience not the specifics, but instead the fact it’s weird at all: it works in ways that require a high degree of effort to relate to the experience of people around me, in both directions.

One of the nice things about realising this as a pattern is that it makes a lot of sense out of who is and isn’t an easy person for me to have conversations with. If the other party does not have this experience then not only do I have to carry the load of translation, the very fact that I am doing that will be counted as a mark against me. If we both know that translation is required, it just becomes part of how we talk to each other and that’s fine.

To some extent this is just an aspect of the experience of neurodivergence, but I think “nonspecifically” adds something to it, which is that I feel much more comfortable self-describing as “nonspecifically neurodivergent” than I do “neurodivergent”. It captures two important aspects for me:

  1. I do not have, and probably am never going to bother to acquire, anything in the way of a formal diagnosis. It’s possible I don’t even clear any of the thresholds that would be required for such.
  2. What is important in this particular context is the aggregate effect more than any specific manifestation.

I don’t know if this is a particularly good term to be using, but it’s been helping me, and other people I’ve talked to about it seem to instantly get it and also find it helpful, so until something better comes along I’m probably going to keep using it.

This entry was posted in Uncategorized on by .

FAQ: How do you read so many books?

I’ve had a number of people comment on my slightly ridiculous rate of book consumption recently (you may have noticed if you follow the notebook blog that I read multiple nonfiction books per week), and ask how I do it.

Well, it’s very simple (which is not the same as easy):

  1. I read very fast.
  2. I spend a lot of time reading.
  3. I only read good books.

Much of this happened somewhat organically, so I can’t necessarily offer great advice on how to do the same, but I’ll try to share some things that have worked for me.

Read Very Fast

This may seem obvious. Yes, the secret to reading a lot is to be fast at reading, that is true for all the obvious reasons. The less obvious way that this is helpful is that it makes reading cheap – you can experiment around it, you can use it to test things, and you have a fast feedback loop.

The first one I can’t offer that much advice on. I just read this way, it happened naturally.

Some friends built The Reading Gym for testing your reading speed and learning to improve it. I don’t know how well it works – when I tried it it broke because it didn’t expect an initial test result of more than 900 words per minute.

I’ve heard good things about Break Through Rapid Reading, but not strongly enough or from people I know well enough that this is anything more than a “Here’s a thing you can try if you want” suggestion.

A trick that it occurs to me might work well is to learn to do reading where you’re not actually trying to read the text, only asking questions about it – start with some written material and a question you want to answer about it, and try to answer that question in less time than it would take you to read the whole thing. You could ask semantic questions (who is mentioned in this article?) or even purely syntactic ones (find all occurrences of this word in this article). 

The reason I suggest this is that this sort of nonlinear scanning reading seems to be the main key to how I speed read, and I believe is how people do it in general. It also has the nice property of being a single skill that you can focus on in isolation.

The main advice I’d be willing to definitively offer here is that whatever your reading speed is, make sure you have a good estimate of it and how that plays out in practice. Being able to predict how long a book will take you to read is very helpful.

Spend a lot of time reading

Also fairly obvious I think. If you read more then you will read more.

There are a couple of things I have found help with getting myself to do this:

  1. Physical books over ebooks. I like physical books, and they create more of a pressure on me to read them. I try to make sure I am carrying at least one, sometimes two, physical books with me at all times.
  2. Squeeze reading in between other things, e.g. I get in a good hour or two of reading per day from commuting.
  3. Try to use reading as a default downtime activity, in preference to other things like watching TV, checking Twitter, etc.
  4. The trick of putting the bookmark at the beginning of the next chapter that I mentioned in Local Goal Setting is good for keeping me reading without getting side tracked.
  5. Making a conscious effort to return to a book if I ever put it down mid chapter.

Of course the real things that allow me to spend a lot of time reading are:

  1. I have tolerably good mental and physical health, or at least it’s all bad in ways that don’t stop me processing information.
  2. I have no dependents.
  3. I don’t have a real job and can spend days where I wouldn’t otherwise be very productive due to illness, bad sleep, etc. reading instead and catch up the time later.

I can’t really offer advice on how to replicate that experience.

Only read good books

This section is the one where I probably have the most useful advice, as it’s instrumental in how I’ve gone from reading about one non-fiction book a month to reading about three per week.

The number of books available to you read is vastly greater than your capacity to read them, even if you read fast and extensively. I recommend solving this by not reading the very large percentage of those books that are bad and otherwise not worth your time.

Saying I only read good books is a bit disingenuous. It feels true, but it requires rather specific interpretations of the words “good” and “read”. A more accurate explanation would be that I am engaged in a constant process of evaluation of whether a book is still worth my time, and if it is not then I stop reading it.

I use roughly the following evaluation criteria:

  1. Am I going to get something valuable out of reading (or continuing to read) this book? Useful insight, enjoyment, and having a book you would recommend to others are all examples of something valuable here.
  2. How much effort is finishing this book likely to be?

If the effort is greater than the reward, it’s time to stop reading, and it’s probably time to get rid of the book (see the next section).

This sometimes involves a bit of “pregaming” reading where I’m not exactly reading it but I read some of it (say the introduction) and maybe flip through the book a bit. Useful questions to ask at this point are whether it’s well written and whether there’s something in it that you’re looking forward to.

It’s also worth doing a page count. Long books are higher effort, so require a higher standard of proof of value.

I use roughly the following rules of thumb:

  • If the book is under a hundred pages I’m probably just going to read it. I can do that in two hours, no problem. I can always stop if I hate it.
  • If the book is between one and two hundred pages it’s worth spending a bit of time determining if it’s worthwhile, especially if it’s not that well written.
  • If the book is more than three hundred pages I am very unlikely to read it if it’s badly written. If it’s well written then I hold it to a higher standard of value but am still willing to read it.
  • If the book is more than five hundred pages then I basically want someone signing a promise in blood that it’s worth my time to read it.

Note that four hundred pages is not an especially long book. It could be argued that two hundred pages is an unusually short book, and one hundred pages is a very slim volume indeed.

There is a very simple reason for this discrepancy: Most people writing books are full of themselves and do not respect your time as a reader. Granted that some long books are long because of the amount they pack in, but generally speaking I find that you need to be doing a lot with your book to justify even three hundred pages, and you should probably be doing less with it.

(Note that I do not count reference books and other books that are not intended to be read cover to cover in this).

 In terms of judging value, the following questions I think are useful to ask:

  1. Am I enjoying this book? It can still be worth reading if the answer is no, but if the answer is yes then by all means keep reading it.
  2. Who would I recommend this book to? If the answer is “nobody” then it’s probably not that useful.
  3. How will my life change as a result of reading this book?
  4. What new thing will I understand as a result of reading this book?

Answering these questions can help you understand the value you’re getting out of the book, and from there you can decide whether it’s worth the effort.

Some good rules of thumb on the process:

  1. You should be able to determine within five minutes if it’s worth reading the first fifty or so pages.
  2. You should know within a chapter or two (say 50ish pages) if it’s worth reading the rest of the book.
  3. If you get through the first half of the book and you don’t feel your time has been well spent so far, it’s unlikely to be worth reading the rest of the book.

If a book fails to clear these thresholds, stop reading it.

As well as resulting in reading better books, I find this process helps a lot with the other two. A good book is much easier to spend a lot of time on than a bad one. If the book is not engaging you, you will find it very easy to remember other things you could be doing instead. It’s also easier to read quickly – if it is poorly written then you will struggle and read it more slowly as a result.

The important thing to remember with this part of the process is that you have no obligation to read a book. If a book is failing to be interesting or useful, why are you still reading it? There are better books you could be reading instead.

This entry was posted in Uncategorized on by .

Reaching into the Whirlwind

This is a metaphor I use to understand some things about myself. Maybe it will help you understand something about yourself too. If so, use it with my blessing. If not, maybe it will help you understand some things about me.

Caveat: This was quite emotional to write. It may be quite emotional to read, I don’t know. I didn’t feel up to rereading it.


I want you to imagine something. If you’re one of those strange people who can picture things in your head, maybe visualise some of this. If you’re a normal person like me (i.e. someone with aphantasia, a tiny fraction of the population), let it stand as a story.

I have a show room. It has many interesting and useful things in it. Some are a bit strange, but there is so much and so much variety that most people can find something in it that they like, and everyone is impressed by the quantity. Sure, much of it is not of especially high quality, but some of it is rather good, and either way there is so much of it. It impresses.

Standing in the showroom, you may think highly of me. And objectively you’re right: By any normal standard I produce a ridiculous amount. Good job, David. You’re a success.

Leading from the showroom is a door. It goes to the workshop. The workshop is full of tools. Disorganised, for sure, but can find things in it, and that’s what matters.

There are no half-finished projects in the workshop, just tools.

A further door leads out of the workshop. It goes to the store room. When I want raw materials to work on something, that’s where I have to go.

The store room is where I keep the whirlwind.

Yes, I know, a store room is supposed to have shelves and drawers and suchlike. Maybe some of them are poorly organised, maybe there’s a pile of miscellaneous junk, but mostly the stuff is just sitting there.

Maybe yours is like that. Mine has a whirlwind. It lives there.

So what happens when I want to work on something? Well, that’s when I reach into the whirlwind.

(Do not do this with a real whirlwind. You will die.)

Something hits my hand. I grab on, I try to pull it out. What have I got?

A recipe idea? I’m not anywhere near the kitchen! I don’t know what to do with this! I let it go, the whirlwind takes it. I cast around for another thing. PhD, I’m supposed to be working on my PhD today. I hunt the whirlwind, looking for anything computer science shaped.

Sometimes I find something I like and discover it is… larger than expected. I pull, and pull, but the whirlwind is strong, and I tire. Eventually I give in and the whirlwind takes it. Maybe a piece breaks off in my hands. Can I do something with this? Lets see.

After my battle with the whirlwind, perhaps I’m holding some materials I can use. Perhaps instead today was not a good day, and I am left empty handed and exhausted. There will be another day, with luck a better one, but on this day the whirlwind has defeated me.

Suppose instead that it was a good day, and I have something I can work with. Maybe it’s the computer science I was looking for, maybe it’s the beginnings of an overly emotional metaphor for my state of mind that is going to make me cry multiple times while finishing it off. Who knows? Not me.

I take it back to the workshop and try to turn it into something I can put in the show room. Often this works. I have a lot of tools in the workshop, they give me a line of attack on most problems the whirlwind hands me. I have pulled many things from the whirlwind before, and by now I know how to work with them.

But sometimes it takes too long, or the starting point turns out not to lead anywhere interesting, or I need raw materials that I don’t have to finish it off. I stop working on it, the wind picks up, the door blasts open. The project I was working on is gone. The whirlwind has it now.

Sometimes this happens even when I am diligent, and the whirlwind snatches the project from my very hands.

Maybe I’ll see it again one day, but probably not.

Sometimes I hand projects to other people. They bring them with them to the workshop, we work on them together, and then when the day’s work is done, the project leaves with them, to stay in their own normal, sensible, store room with shelves and boxes, where it will be safe from the whirlwind until we can start again.

Sometimes when I’m working on my own and a project really matters, I try to anchor it, tie it down. Maybe this works. Sometimes it does.

But whirlwinds are strong. They can lift houses.

Sometimes I find that the tools I have are inadequate to the task at hand, and I build new tools. Maybe I even manage to finish the project that the tool was for. Either way, the tools stay in the workshop, to be brought to bear on future projects. The whirlwind doesn’t want tools. I don’t know why.

Sometimes I have to dismantle what the whirlwind gave me before I can use it. It’s too large, or complex, or has weird squiggly bits that aren’t what I need. Maybe in doing so I find something useful in there that I can turn into a piece for the showroom. However it goes, the discarded parts go back in the whirlwind, perhaps for future use.

Sometimes I take a project out of the showroom, to attempt to improve upon it. Maybe I’ll succeed before the whirlwind snatches it from my hands. Most likely not.

If we’re lucky and the project is one of the digital or intellectual, thus ephemeral and copyable, things that I normally work on, it goes back to the showroom unchanged. If not, oh well, the whirlwind has it now.

I like the showroom. It’s a record of accomplishments, that which I have wrested from the whirlwind and made my own. Even the mediocre and the bad are trophies of battles won.

When I am in the showroom, I can see myself as others do – I have created.

I even like the workshop. It is a place where I accomplish things, where I build and learn. It’s where I keep the tools – the weapons in my war against the whirlwind. The workshop is a battle ground, but it’s one that I have fortified.

But most of the time, I’m not in the showroom or the workshop, I’m back here in the storeroom, searching for what I need, reaching into the whirlwind.

This entry was posted in Uncategorized on by .

Local Goal Setting

Epistemic Status: Works on my machine.

Attention Conservation Notice: Based on my highly scientific and totally reliable informal poll on twitter, there is a 70% chance that you know this already. However you may still find the framing useful.


How long can you hold your breath for? Try it. Take a deep breath, close your eyes, hold your nose, and maintain a silent count. Start a stop watch in parallel if you don’t trust your count.

If you want, repeat this a couple of times so you get a good sense of the range of numbers – chances are your second try will be better than your first and then it will quickly stabilise.

Now try the following: When you get to the point where you think you really can’t go any longer, ask yourself “Can I maintain just another count of five?”. If you think “Absolutely not”, stop of course. Please don’t suffocate yourself on my account (not that you actually can this way). However if you find yourself thinking that maybe you could do another 5, try it. See what happens.

And then when you’ve completed that count of five, do it again.

If you can’t do a count of 5, can you at least reach the nearest multiple of five in your count? It seems a shame to stop at 57, right? Might as well aim for the minute.

Of course, once you’re at the minute mark, I bet you could at least do a couple more seconds…

Did your numbers go up? I bet they did.

In case you’re curious, my current easily attainable best is about 70 seconds, but I’m out of shape and practice at the moment. My lifetime best is a bit over two minutes (I don’t remember the exact numbers. It might have been as high as 2:30 but I don’t think so). This is good but not amazing.

With that as grounding, want to try again and see if you can beat me?

I find this sort of local goal setting works really well for me. Instead of asking how hard you have to try for, or how long you need to go go on for, always just set the current goal just out of reach, to somewhere that feels attainable from where you currently are.

Then, when you attain it, try moving the goal posts.

I also do this with running (when I run, which is less often than it should be) – when I desperately want to stop and catch my breath, I ask myself if I can make it another 30 seconds. If the answer is no, can I do another 10 seconds? Or at least make it to a whole number of minutes?

By stringing yourself along this way, often you can move the goal post a surprising number of times before you finally cry uncle and stop.

The two basic questions that build up this trick are:

  1. Do I have to stop now or could I do a tiny bit more?
  2. It would be emotionally unsatisfying to stop on a weird number like this, can I make it to a whole number? (where you pick the unit to be the largest one that currently feels attainable – don’t try to hold your breath to a whole number of minutes if you’re currently at 65 seconds, but maybe see if you can make 70 seconds?)

The great thing about the combination of the two questions is that it’s often easy to achieve small improvements even when large ones feel impossible, and then completionism and the desire for nice neat numbers means you have a more emotionally satisfying goal that has been moved into the future.

You made it to a minute, great! Can you do another couple of seconds? Oh, now it’s at a weird number. Wouldn’t it be more satisfying if you could make it to 70? No? Well, OK, 65 then. You’re at 65, surely a couple seconds more is achievable… well you’re almost at 70, it would be a shame to stop here, wouldn’t it?

One area where this works really well is attention. I think this is a lot of why the pomodoro technique works so well – concentrating for 40 minutes feels (and is!) much more achievable than concentrating for a whole day, so when your mind starts wandering you can anchor yourself back to the fact that you have this achievable goal.

A recent application of this technique that I’ve been finding very valuable is a simple way to read more without getting distracted: Stick your bookmark (yes this only works with physical books, but physical books are good. Hynek pointed out on Twitter that you can use the pages/time remaining feature on your ereader similarly, but I find the physical bookmark somehow works a lot better for me) in the chapter marker for the next chapter. You don’t have to finish the chapter, but look there are only a couple more pages, it seems a shame to stop here, right?

And once you get to the end of the chapter, you could probably read a few more pages, couldn’t you? Move the bookmark to the next chapter. Doesn’t mean you’re going to read all the way there, but you know it’s as convenient a place to leave the bookmark while you’re reading as any…

Brains are really easy to fool. The best part is that as the owner of this particular brain you can fool it while simultaneously knowing that you are fooling it and it works anyway. It’s ridiculous that this is true but it is entirely true.

I think people don’t spend enough time tinkering with the things that work with their brain and finding tricks that work for them – they assume they can or can’t do something, or that the only way to do more of something is to force yourself to do it, and miss a lot of low hanging fruit like this as a result.

This entry was posted in Uncategorized on by .