As someone who has As someone who has fromfrom timetime toto
Over time, I’ve recorded a few videos on programming topics, most recently on the Over time, I’ve recorded a few videos on programming topics, most recently on the ComputerphileComputerphile channel. For example, one on channel. For example, one on implementing a programming languageimplementing a programming language was released last week; another on was released last week; another on implementing an HTTP serverimplementing an HTTP server came out earlier this year; and you can... came out earlier this year; and you can...
I’ve just released I’ve just released pizauth-1.0.6pizauth-1.0.6 which introduces one notable new feature: support for HTTPS redirects. New features sound good, but what does this actually mean? My experience is that the way OAuth2 works is sufficiently counter-intuitive that people often struggle to make sense of what it’s doing. which introduces one notable new feature: support for HTTPS redirects. New features sound good, but what does this actually mean? My experience is that the way OAuth2 works is sufficiently counter-intuitive that people often struggle to make sense of what it’s doing. Here’s a very quick, simplified, summary of what OAuth2, and pizauth do Here’s a very quick, simplified, summary of what OAuth2, and pizauth do [1][1]. OAuth2 lets you.... OAuth2 lets you...
What happens if you listen to 60 seconds of your favourite radio station / audiobook and then 60 seconds of a random non-professional podcast? The former will be pleasant to listen to, with good intelligibility — it’s easy to understand everything the speakers say. The latter, however, are often somewhat unpleasant to listen to and have poor intelligibility. To add insult to injury, different episodes of the same podcast will often vary in quality and volume. Fortunately, it...
Recent posts Blog archive Following “What Factors Explain the Nature of Software?”, a number of people have asked me: “aren’t the circular specification problem and the observer effect the same thing?” I take the blame for not making this clearer previously. In this...
I sometimes find myself asked to give advice on how organisations should go about creating software, but often my advice doesn’t gel with those who sought it. Sometimes that’s because only one answer was ever considered acceptable; sometimes I am ignorant of important wider context and my answer is unworthy of consideration. But, most often, I...
Unix daemons are programs which run in the background, performing tasks on our behalf indefinitely. Daemons are somewhat mysterious, easily overlooked, programs of a kind few of us have experience in writing.Unix daemons are programs which run in the background, performing tasks on our behalf indefinitely. Daemons are somewhat mysterious, easily overlooked, programs of a kind few of us have experience in writing. In this post I’m going to describe some of the things I’ve learnt in the course of writing and maintaining 3 daemons (In this post I’m going to describe some of the things I’ve learnt in the course of writing and maintaining 3 daemons (extsmailextsmail, , snaresnare, and..., and...
A few days ago Thorsten Ball wrote a post exhorting Unix users to A few days ago Thorsten Ball wrote a post exhorting Unix users to optimise their shell’s startup timeoptimise their shell’s startup time. It’s excellent advice and well worth following.. It’s excellent advice and well worth following. The Unix shell has two major use cases: as an interactive prompt (what we often call “the command line”); and as a “scripting” The Unix shell has two major use cases: as an interactive prompt (what we often call “the command line”); and as a “scripting” [1][1] or “non-interactive command” language. We normally pick one shell (bash, fish, zsh,... or “non-interactive command” language. We normally pick one shell (bash, fish, zsh,...
Like many people, I spend a lot of time reading. Since there is much more that I could read than there is time for, I have to make choices about what I should read. In this short post I’m going to outline what my reading choices have become and why. My aim isn’t to suggest that anyone else should make the same choices – indeed, they’re intensely personal – but, rather, that thinking about such choices is worthwhile.Like many people, I spend a lot of time reading. Since there is much more that I could read than there is time for, I have to make choices about what I should read. In this short post I’m going to outline what my reading choices have become and why. My aim isn’t to suggest that anyone else should make the same choices – indeed, they’re intensely personal – but, rather, that thinking about such choices is worthwhile. Unlike many people, these days I intentionally read very...Unlike many people, these days I intentionally read very...
On Sunday I tried using On Sunday I tried using hkhk, but it wasn’t working. That surprised me, because hk is a very simple program that allows one to set temporary hotkeys — and a program I use many times a day. Here’s a toy example of hk:, but it wasn’t working. That surprised me, because hk is a very simple program that allows one to set temporary hotkeys — and a program I use many times a day. Here’s a toy example of hk: hkhk Ctrl+Shift+F8 echo Hello Ctrl+Shift+F8 echo Hello hk waits until Ctrl+Shift+F8 is pressed — when it is, hk executes the command (which prints “hello”) and then exits.hk waits until Ctrl+Shift+F8 is pressed — when it is, hk executes the command (which prints “hello”) and then exits. I use hk in...I use hk in...
[there was a] lumberjack who said that if his life depended upon his ability to cut down a tree in five minutes he would spend three minutes sharpening his axe.[there was a] lumberjack who said that if his life depended upon his ability to cut down a tree in five minutes he would spend three minutes sharpening his axe. Often ascribed, Often ascribed, though inaccuratelythough inaccurately, to Abraham Lincoln, this aphorism neatly captures the idea that, in order to efficiently reach a direct goal we sometimes need to spend time on improving indirect factors such..., to Abraham Lincoln, this aphorism neatly captures the idea that, in order to efficiently reach a direct goal we sometimes need to spend time on improving indirect factors such...
Premature optimisation might be the root of all evil, but overdue optimisation is the root of all frustration. No matter how fast hardware becomes, we find it easy to write programs which run too slow. Often this is not immediately apparent. Users can go for years without considering a program’s performance to be an issue before it suddenly becomes so — often in the space of a single working day.Premature optimisation might be the root of all evil, but overdue optimisation is the root of all frustration. No matter how fast hardware becomes, we find it easy to write programs which run too slow. Often this is not immediately apparent. Users can go for years without considering a program’s performance to be an issue before it suddenly becomes so — often in the space of a single working day. I have devoted more of my life to optimisation than I care to think about, and...I have devoted more of my life to optimisation than I care to think about, and...
Despite a distinct lack of talent, and occasionally long hiatuses, I’ve enjoyed learning to play the electric guitar as an adult. One of the many variables in the feel and sound of a guitar is its strings, but the major manufacturers’ offerings all seemed rather similar to me. I eventually settled on D’Addario’s EXL offerings, mostly so that I didn’t have to think about it again.Despite a distinct lack of talent, and occasionally long hiatuses, I’ve enjoyed learning to play the electric guitar as an adult. One of the many variables in the feel and sound of a guitar is its strings, but the major manufacturers’ offerings all seemed rather similar to me. I eventually settled on D’Addario’s EXL offerings, mostly so that I didn’t have to think about it again. Last year, needing to buy a new batch of strings, I idly looked around to see what is now...Last year, needing to buy a new batch of strings, I idly looked around to see what is now...
CHERI is a set of things (adapted CPUs, adapted operating systems, adapted libraries) that, collectively, aim to stop software bugs becoming security flaws. If you’d like to know more, I gave some of my thinking on CHERI in CHERI is a set of things (adapted CPUs, adapted operating systems, adapted libraries) that, collectively, aim to stop software bugs becoming security flaws. If you’d like to know more, I gave some of my thinking on CHERI in Two Stories for “What is CHERI?”Two Stories for “What is CHERI?”.. In this post I’m going to flesh out an observation I made in that post, which is that some software needs thoughtful...In this post I’m going to flesh out an observation I made in that post, which is that some software needs thoughtful...
Late last year on my blog I published “Late last year on my blog I published “How Might Generative AI Change Programming?How Might Generative AI Change Programming?”. Although I’m slightly biased, I’m still comfortable with that post’s high-level message. However, there is one important aspect that I think I failed to bring out as explicitly as I should have: different communities’ programmers will be affected in different ways.”. Although I’m slightly biased, I’m still comfortable with that post’s high-level message. However, there is one important aspect that I think I failed to bring out as explicitly as I should have: different communities’ programmers will be affected in different ways. One reason I made...One reason I made...
Recent postsRecent posts Blog archiveBlog archive In In pizauth: dump and restorepizauth: dump and restore I said: I said: However, there was one feature I couldn’t find a good design for: persisting state to disk. This missing feature had been nagging away at me (and a small, though growing, number of other people) for quite a...However, there was one feature I couldn’t find a good design for: persisting state to disk. This missing feature had been nagging away at me (and a small, though growing, number of other people) for quite a...
Recent postsRecent posts Blog archiveBlog archive One of my in-built quirks – present, I’m told, from a very young age – is spotting patterns. Whenever I see X, I also see Y; there are 3 As for every B; if this happens, then that is more likely to happen afterwards; and so on. It’s not something I do particularly consciously, and few of my observations even reach the lofty heights of banal. Fortunately,...One of my in-built quirks – present, I’m told, from a very young age – is spotting patterns. Whenever I see X, I also see Y; there are 3 As for every B; if this happens, then that is more likely to happen afterwards; and so on. It’s not something I do particularly consciously, and few of my observations even reach the lofty heights of banal. Fortunately,...
Some readers might have heard of Some readers might have heard of CHERICHERI. Of those who’ve heard of it, most have probably got the rough idea that it’s a “more secure” CPU — but, after that, I find that most people start to get rather confused when they try and nail down “what is CHERI?”.. Of those who’ve heard of it, most have probably got the rough idea that it’s a “more secure” CPU — but, after that, I find that most people start to get rather confused when they try and nail down “what is CHERI?”. Having grappled with this myself, and having helped others grapple it, I think that the major reason is that the high-level story...Having grappled with this myself, and having helped others grapple it, I think that the major reason is that the high-level story...
In my previous post, I mentioned in a In my previous post, I mentioned in a footnotefootnote an interview I had done with the late Eelco Visser in 2008. The an interview I had done with the late Eelco Visser in 2008. The audio is available hereaudio is available here, but there isn’t a transcript available. That’s a pity, because, as far as I know, Eelco didn’t do another interview..., but there isn’t a transcript available. That’s a pity, because, as far as I know, Eelco didn’t do another interview...
“lex and yacc” are two terms that are used together so often that they can seem indivisible. “lex and yacc” are two terms that are used together so often that they can seem indivisible. lexlex takes a string as input and divides it up into lexemes (roughly speaking “words”) and takes a string as input and divides it up into lexemes (roughly speaking “words”) and yaccyacc takes a sequence of lexemes and parses them. Since some parsing approaches such as recursive descent parsing unify these phases, why do takes a sequence of lexemes and parses them. Since some parsing approaches such as recursive descent parsing unify these phases, why do lexlex and and yaccyacc split them apart? split them apart? Running exampleRunning example Let’s start with a simple language, which...Let’s start with a simple language, which...
A couple of months ago our washing machine produced a considerable quantity of smoke when I opened its door, which I interpreted as a suggestion that a replacement was needed. After rummaging around the internet for advice, a couple of days later a new A couple of months ago our washing machine produced a considerable quantity of smoke when I opened its door, which I interpreted as a suggestion that a replacement was needed. After rummaging around the internet for advice, a couple of days later a new MieleMiele washing machine took its place in our home. washing machine took its place in our home. As well as boggling my mind at how much better the new machine was than the cheap machine it replaced, I was pleased to discover...As well as boggling my mind at how much better the new machine was than the cheap machine it replaced, I was pleased to discover...
I’ve just released I’ve just released pizauth-1.0.6pizauth-1.0.6 which introduces one notable feature: support for HTTPS redirects. which introduces one notable feature: support for HTTPS redirects. NewerNewer 2023-04-03 10:00 2023-04-03 10:00 OlderOlder If you’d... If you’d...
Reading the thought-provoking “Reading the thought-provoking “Patterns & AbstractionsPatterns & Abstractions” post reminded me of a long-held opinion I have about programming language design: we have a tendency to keep adding features to a language until it becomes so big ” post reminded me of a long-held opinion I have about programming language design: we have a tendency to keep adding features to a language until it becomes so big [1][1] that its sheer size makes it difficult to use reliably. Since most of us spend most of our time programming in one language, it can be difficult to see a... that its sheer size makes it difficult to use reliably. Since most of us spend most of our time programming in one language, it can be difficult to see a...
Daniel Lemire’s recent post “Daniel Lemire’s recent post “runtime asserts are not freeruntime asserts are not free” looks at the run-time cost of ” looks at the run-time cost of assertassert statements in C and shows that a simple statements in C and shows that a simple assertassert in a frequently executed loop can cause significant overhead. in a frequently executed loop can cause significant overhead. My own opinion on assertions has shifted over the years, from “I don’t see the point” to “use them sparingly” to “use them as much as possible”. That...My own opinion on assertions has shifted over the years, from “I don’t see the point” to “use them sparingly” to “use them as much as possible”. That...
Modern societies function in large part thanks to our ability to use as much electricity as we want, when we want it. As renewable energy (solar, wind) plays a greater part in the electricity generation mix, our opportunities to use “cleaner” energy increase, but renewables are also fickle — sometimes the wind doesn’t blow, and the sun doesn’t shine. Today in the UK, for example, the weather is overcast and still: solar and wind aren’t going to generate much power. In such cases, the...Modern societies function in large part thanks to our ability to use as much electricity as we want, when we want it. As renewable energy (solar, wind) plays a greater part in the electricity generation mix, our opportunities to use “cleaner” energy increase, but renewables are also fickle — sometimes the wind doesn’t blow, and the sun doesn’t shine. Today in the UK, for example, the weather is overcast and still: solar and wind aren’t going to generate much power. In such cases, the...
In In Compiled and Interpreted Languages: Two Ways of Saying TomatoCompiled and Interpreted Languages: Two Ways of Saying Tomato I used this little example to show that we can observe differences in how CPython and PyPy execute code: I used this little example to show that we can observe differences in how CPython and PyPy execute code: $$ cat diffs.py cat diffs.py printprint(str(0) (str(0) isis str(0)) str(0)) $$ python3... python3...