Thomas Denney

Dekalog

A good simple idea well executed. In 1989 Krzysztof Kieślowski directed Dekalog, a series of ten films for each of the Ten Commandments. The characters are residents of the same Warsaw apartment block. Each story only features 2 or 3 characters confronting moral issues themed loosely around each commandment.

In the hands of a weaker director and writer — Krzysztof Piesiewicz co-wrote the series — each commandment may have been taken more literally. My naïve expectation when I first approached the series was that it each episode’s commandment would be obvious. I couldn’t name all ten commandments before watching the series, and the dilemmas of each film often overlapped several commandments. Importantly neither writer imposed their own views onto the characters: the audience is left free to judge the characters, their actions, and their decisions themselves. What might we do in the same situation? Would we ever get into that situation? How would we resolve it?

In some episodes the connection is obvious: I doubt anyone would miss “thou shalt not commit adultery” in Dekalog: Six or “thou shalt not cover thy neighbour’s wife” from Dekalog: Nine.

Artur Barciś appears as a silent, angelic character in most of the episodes, offering glaring warnings to characters as they are on the precipice of breaking a commandment.

However, most are more subtle: in Dekalog: Five a young man is tried for his murder of a taxi driver (“thou shalt not kill”), but much of the story is presented from the perspective of his lawyer, who is increasingly horrified by the death sentence his client receives. This is the only film where Kieślowski takes a political stance and embeds his own view into the story: the state shalt not kill either.

With the exception of Dekalog: Ten (“thou shalt not covet”), a dark comedy, each film’s tone is serious. Ten features two brothers dealing with their father’s death, his stamp collection, and the (slightly absurd) intersection of philatelists and organised crime. It serves as light relief after a series of heavy films.

Most of the moral issues are interpersonal and affect only the characters in the film. Piesiewicz’s influence is more apparent when the moral issues begin to overlap with the law; he was a practicing lawyer at the time and later a member of the Polish senate. Some of his writing is based on cases he experienced. For instance, in Dekalog: Seven a young woman attempts to “steal” her biological daughter, the consequence of an earlier affair with a teacher, from her parents, who have adopted her as their own. The “ownership” of her daughter is ambiguous, but the law is both crystalline and insufficient to resolve the situation. Piesiewicz worked on a similar case through his legal practice.

Kieślowski repeated the idea of a series themed around united values with the Three Colours trilogy. The films are based on the French revolutionary values of liberty, equality, and fraternity; their titles take are named for the French tricolore. Three Colours is a better series, and refines Dekalog’s ideas — there’s plenty of repetition of themes, actors, and music between the two. Three Colours: Red, the conclusion of the trilogy, is Kieślowski’s best work.

Dekalog marked the beginning of Kieślowski’s international success — he and his work had been perceived as too distinctly Polish and insular — and Three Colours benefitted from it as a growing crowd of actors wanted to work with him.

I’m surprised there haven’t been later attempts to theme a series in Kieślowski’s fashion, especially given that he took the same thematic approach twice. The Commandments’ themes of murder, theft, and adultery lend themselves easily to drama. When the US celebrates it’s 250th birthday in 5 years time another series could follow Three Colours and examine how the constitutional amendments of the Bill of Rights affect the lives of Americans today. I suspect an appetite for Easter eggs in a more modern version would overlap the characters and plots of each film more: many of Dekalog’s characters appear in 2 of the films, but usually the appearance is unspoken in the second.

However, Kieślowski’s vision has stood the test of time. The series is not overtly religious: Dekalog: One prominently features a church and explicitly deals with faith and belief, but this is an exception rather than the rule. Its success lies in the universality of its themes and the stories could easily work in just about any setting at any time. Indeed, several of the films have been remade for other markets. That said, they do not need to be: the original Polish versions hold up, with excellent acting, scores, writing, and cinematography.

Theses

Although I graduated two years ago, I’d previously never made my bachelor’s or master’s theses public, although the code has always been available. I’ve not touched either project since, but the theses both provide missing context.

  • MicroJIT: A JIT compiler for the BBC micro:bit (2018; thesis; code). The micro:bit features a low-powered Cortex M0 processor. At the time the primary programming model for the micro:bit was to transfer a binary over USB and reboot the device. My approach instead allowed new programs, encoded in a stack machine-based bytecode format, to be transferred over serial and JIT-compiled to ARM assembly on device.

  • Stannel and Statick: A parallel embedded processor and a concurrent concatenative programming language (2019; thesis; code). Stannel was a low-powered processor that I design to run on Lattice Semiconductor’s FPGAs, modelled loosely on the Transputers of the 1980s. It was complemented by a custom assembly language and assembler.

    Statick, a concatenative language with dependent, affine types, was arguably the more innovative part of the project. It’s concurrency primitives were based on CSP, but used the type system to restrict and prove operations on them. For instance, a channel could be restricted at compile time to “must use N times,” and the compiler would then statically prove it’s used received and sent on N times before the program terminates (the compiler itself doesn’t prove the program won’t deadlock, but eliminates the need to manage the memory associated with the channel).

    The thesis won the “Microsoft Prize for best Computer Science Project” the year I graduated.

Thanks to some tight editing to get them under the 10,000 word limit, both theses came to exactly 9,989 words.

With two years since removed, I’m able to reflect on these projects a little more critically. MicroJIT wasn’t innovative as a JIT, and beyond function inlining, bounds check elimination, tail call optimisation, and register allocation it didn’t do much beyond basic assembly (although packing all that onto the micro:bit was a challenge). However, it built a solid grounding in ARM assembly and exposed me to a little more compiler implementation than we’d done as part of our courses.

I’m more proud of Statick (the programming language) than Stannel (the processor). Statick is a fun blend of ideas from a whole host of programming languages (Occam, Haskell, Rust, Forth, Cat, Kitten). Nobody should be writing large programs in it, but it serves as a pleasant proof that it’s possible to build a (quirky) programming language with these ideas assembled into it.

Stannel was my first foray into an intermediate-sized project in Verilog. There’s a lot that I’d do differently now, and would’ve done differently given a bit more time (make it register based, not stack based, fix the memory controller, deepen the pipeline). Regardless, working on Statick and Stannel was a pretty good set up for hacking on compilers for large, parallel architectures (which just so happens to be my day job now).

Most of my peers’ projects tended to be more theoretical, so I was glad I had the chance to marry a little bit of theory and practice (mostly thanks to Alex Rogers, my supervisor).

I’d argue combinatorial projects (like my master’s) are a good approach for most CS students. There’s a tendency at many universities for bachelor’s theses to take the form of “I implemented algorithm X in programming language Y and found Z”, but often X is just from one of their supervisor’s papers, Y is whatever the learned the previous year, and Z isn’t too surprising.1 Turning X into a set forcibly exposes students to a wider set of ideas, and may ensure they’re building something genuinely new. By going off the beaten track they’ll learn a little more too. It’d reduce the duplication amongst submitted theses and better mirror the reality of modern research.


  1. Sadly, Y is usually Java. My own bachelor’s thesis fits this box too.↩︎

Visiting the EU

For the last year international travel has been all but impossible. Travel anywhere, for that matter: I last left London 9 months ago. I’ve missed exploring. Adventure. I haven’t been to the EU since the UK left last year, but the pandemic couldn’t stop me visiting the EU

I start the day early. The streets in St John’s Wood are empty — it’s a bank holiday in the UK — and Regent’s Park is too. Here I notice the first problem of the day. Although the sky is grey and unthreatening, the wind is my concern. It’s stripping the trees of their blossom. Pollen is soon in my face and catching on my clothes. I took an antihistamine before I set off; I hope it’ll be enough to see me through.

I reach the Latvian Embassy first and immediately deviate from the route I planned (it would’ve been number 3). The idea and the route for this run emerged months ago. I put it off: I knew that jogging to every EU embassy in London would be close to a half marathon. 27 stops, with navigation between them, was going to take its toll too.

From Latvia I make quick progress: Croatia, Poland, and Sweden are all in north Marylebone. I also stop at Switzerland, because even though it’s not a member state, I still miss it.

Mayfair and Marylebone are built on a grid around squares created by wealthy landowners in the Georgian era. Navigation is easy and it takes me no effort to find Italy in Grovesnor Square. I often jog around this corner of the West End. Malta and Cyprus aren’t far. I jog around St James’s Park to Slovenia.

Lithuania is on Vauxhaul Bridge Road. Not counting my warm-up jog I’ve already covered 10km but I’ve not even covered half the embassies. The road is the busiest yet and the pollution is getting to me.

Ireland is round the back of Buckingham Palace. I hit my stride as a few streets in Belgravia get me to Ireland, Belgium, Romania, Luxembourg, Portugal, Austria, Germany, Spain, Norway (bonus), and Hungary.

In Belgravia a grammar emerges. Each EU embassy flies the EU’s flag and the country’s own flag too (except for Ireland with flag poles but no flags today). The embassies are deceptively large: I discover entrances around street corner that reveal the site must occupy more houses than the front entrance alone. If cars are parked out front, they’re uniformly black and German. Some embassies — or ambassadors themselves, perhaps — opt for short personalised number plates. It’s a nice touch.

Denmark is my favourite. The building, which also houses the Icelandic embassy, starkly contrasts with just about everything else on Sloane Street. Almost all other Belgravia embassies are white houses with pillared porches. Its size surprises me: Denmark has a population of less than 6 million. Other larger countries have much smaller embassies.

I jog past Harrods. Influencers pose for identikit photos all along the street. I’m guilty too, I think to myself: I’ve been taking poorly framed selfies in front of flags all morning.

By the time I reach France I’m flagging. I keep my eyes peeled for a Pret, or anywhere that could serve up a snack. To my slight surprise the bank holiday has kept them closed. I catch my reflection in a shop window: my posture is poor.

I run out of podcasts to listen to; my mind wonders. Many of the embassies are closed, either due to the bank holiday or London’s lockdown measures. Some hadn’t opened in months, according to signs outside. As I document my journey, CCTV cameras outside the embassies do too. Who is watching this? Hidden deep in the embassy are there security officers? Spies?

I jog north through Kensington to Estonia, Bulgaria, and the Netherlands. A Dutch guard notices me, but he’s disinterested. I navigate to Greece through Holland Park using my phone and the printed maps I have with me. The embassy is at the top of the hill. I’m not happy, but I am forgiving: I’m close to the end now.

Surprisingly, it’s not until the Czech Republic that anyone asks me what I’m up to. I explain to the guard, he’s bemused. He’s wearing a white mask with a Czech crest. He tells me there are more embassies in Notting Hill. I know, I tell him. I know.

I finish at Slovakia. For obvious-in-retrospect reasons it shares a building with the Czech Republic.

I’m exhausted. I still have 5km to jog home but I stop twice to grab snacks. A gingerbread man from the Starbucks at Marble Arch gives me a sugar rush but leaves a strong ginger aftertaste in my throat.

Over the morning I ran just over 30KM, 20 of which were between the embassies. My Apple Watch reports that I’ve completed my move ring 720%. I wonder if I needn’t move for the rest of the week.

The morning made for a curious and tiring adventure. This wasn’t really an exploration of Europe at all, just west London. I jogged down streets I’ve never come across before, and perhaps never will again. At times I knew precisely where I was. At times I was lost. I learned a little but saw a lot. As travel restrictions, perhaps I’ll see much more. Perhaps.

New Year's nudges

It is a truth universally acknowledged that New Year’s resolutions do not work. Each year as January rolls around we set ourselves noble goals to exercise more, lose weight, eat more healthily, smoke less, or sleep more. Yet 88% of these resolutions are doomed to fail.

As much as our intentions may be good, New Year’s resolutions mostly fail through poor goal setting: all of the above are much to vague for a start. Plenty has already been written in favour of using SMART goals but I think we should approach resolutions differently.

The above study found that about half the participants even expected their resolutions to fail. That’s pretty poor, but falls well within our cultural experience of New Year’s resolutions: often our resolutions are just something we come up with off the cuff at a New Year’s Eve party or around the water cooler in early January.1 We might stick with them for a few days, but beyond that there’s not much hope.

Instead, let’s find goals that are easy to implement, and that if implemented are likely to succeed. Most traditional New Year’s resolutions seek to maximise the effect of their change, without taking into account its probability of succeeding. If we instead seek to maximise the expected outcome of the change, we can look at maximising the probability of success. In loose Bayesian terms we might write:

P(success) = P(succcess | implementation) * P(implementation)
E(change)  = effect of change * P(success)

If we’re looking for easy, small changes then nudge theory can serve us well: nudges are changes that alter behaviour in a predictable way, but must be cheap, easy to implement, and not forbid other choices. Sounds perfect! Most nudge literature is written for “choice architects” designing for other people’s decision making, but we can readily apply many of the techniques to ourselves.

Good defaults are essential to nudging: if we automatically fall down “the right path” then we’re maximising P(success | implementation) because we don’t need to do anything differently once we’ve implemented the change. By making the change easy, we maximise P(implementation).

A classic example from nudge theory finds that moving healthy snacks, such as fruit, to eye level and making unhealthier snacks less accessible increases healthy snack sales.2 If we’d like to be healthier then eating more fruit is a good start. Here we can take advantage of behavioural shifts from the last year: many of us now buy groceries online rather than in store, and most supermarket sites allow you to create a “default basket” for essentials. Adding more fruit to this, and then placing it where you’d usually put snacks, could be an easy way to get started.

Alternatively, we may have the goal of saving more money. Many banking apps now offer a feature that will “round up” transactions to the nearest pound or dollar, placing the remainder in a savings account. The initial set-up effort takes seconds, and the probability of success given implementation is certain. You’ll save a modest amount of money, but it’s certainly better than nothing.

I’ve recently attempted to sleep better. My sleep was often disrupted by a bright street light, so I installed better black-out curtains. This took less than an hour of DIY (easy to implement) and I draw the curtains each night anyway (default behaviour). It’s already paying dividends.

As we all face another stressful, draining year in a global pandemic, I think it’s high time we abandon over-ambitious resolutions: let’s find small, easy nudges that may actually improve our lives.


  1. Or in 2020-21, on Zoom.↩︎

  2. The other “classic” example is that adding stickers of a fly to urinals improves aim; there are even companies selling stickers for this purpose.↩︎

London, Christmas 2020

Regent Street
Regent Street
Regent's Park
Regent’s Park
The Mall
The Mall
Piccadilly Circus
Piccadilly Circus

For a long time I’ve had walking around and photographing a desserted central London on Christmas Day on my bucket list. Ordinarily the city would be bustling with tourists, workers, and shoppers every day of the year, but inevitably this year was an exception. Instead whenever I’ve gone for walks or runs around Westminster I’ve been confronted with vast empty spaces.

Pictures of desserted cities around the world became a theme of the pandemic. At its outset I hoped they wouldn’t. However, on Christmas Day I walked around the West End and took the above. There were a few others with a similar idea, and around Oxford Circus and Trafalgar Square there were still plenty of people — although I suspect like me they were locals, not tourists.

London Warming

London Warming
A view of the City of London from the north-east at Primrose Hill. With clear skies, temperatures reached the mid-thirties for much of the last few days. Made with Nikon D3400, ISO 100, ƒ/5.6, 1/2500s.

Notes on the Ikea Fullfölja

Ikea Fullfölja

I’m always pleasantly surprised when I come across cheap paper that survives fountain pens: you tend to see the nasty effects of feathering and bleeding. However, Ikea’s Fullfölja notebook line — which cost less than $2 — handle the task well.

I saw only a little bleeding (the paper is only 80gsm) but no feathering. For a such a low cost notebook I can’t complain, although I wouldn’t choose to write in this full time. The cover is reportedly “durable card” although I found it took little effort to scratch it.

Paper has long been one of Sweden’s primary exports, so Ikea’s success here is perhaps inevitable, although this notebook is made in China.

The Fullfölja is available on Ikea’s website (UK; US) or in store in their Marketplace.

The French Economist Thomas Piketty

Thomas Piketty’s work on income inequality is much cited and discussed; he is considered one of the most influential living economists. I’ve seen his name crop up a lot recently, especially in articles about the economy after coronavirus. However, there’s just one problem: journalists can’t seem to resist mentioning that he’s the “French economist Thomas Piketty”.

The fact that Piketty is French doesn’t particularly matter to most articles that introduce him this way: granted some of his work focused on the French economy and most of his books and articles were published in French before English translations, but this rarely affects the context.

Even Piketty's own publisher couldn't resist the phrase in a review on the back cover of Capital in the Twenty-First Century.
Even Piketty’s own publisher couldn’t resist the phrase in a review in a review on the back cover of Capital in the Twenty First-Century.

For a while I had a hunch that Piketty was introduced more frequently by his nationality than other economists, so I collected data on the matter. Using a list of the “15 most influential living economists” from The Economist in 2014, I used Google search result counts for the exact phrase “Nationality economist Person” to determine overall ratios.1 I have also included Adam Smith, Keynes, and Marx for reference.

Economist Nationality Total With Nationality Ratio
Robert Shiller American 567,000 12,300 2.17%
Thomas Piketty French 2,080,000 37,500 1.80%
John Maynard Keynes British 2,470,000 43,400 1.76%
Jeffrey Sachs American 1,040,000 8,420 0.81%
Laurence Kotlikoff American 58,400 442 0.76%
Kenneth Rogoff American 552,000 3,170 0.57%
Alan Blinder American 167,000 694 0.42%
Martin Feldstein2 American 370,000 833 0.23%
Joseph Stiglitz American 1,720,000 3,560 0.21%
Paul Krugnman American 3,340,000 4,460 0.13%
Karl Marx3 German 20,500,000 22,980 0.11%
Adam Smith Scottish 17,200,000 15,500 0.09%
Larry Summers American 1,400,000 907 0.06%
Daniel Kahneman4 Israeli-American 3,200,000 879 0.03%
Justin Wolfers American 222,000 4 0.00%
Simon Johnson British-American 592,000 3 0.00%
Jonathan Gruber American 244,000 1 0.00%
Ernst Fehr Austrian-Swiss 148,000 0 0.00%

Shiller, Piketty, and Keynes are clear outliers. The dominance of Americans both in the list and in the field perhaps suggests that economists are considered American by default by most journalists (and perhaps readers too). Nevertheless, the bottom half of the list comprises those of dual and other nationality. The inclusion of a more international pool of economists might reveal a different trend, although we would expect significantly fewer references to them.

Next, I restricted my search to references to these economists on The Economist’s own website. This ought to reduce false positives in the data too, as references to these names are more likely to be to the economists rather than other individuals of the same name. I suspected that The Economist was particularly prone to this trend.

Economist Nationality Total Economist mentions With Nationality Ratio
Thomas Piketty French 2,530 125 4.94%
John Maynard Keynes British 2,970 3 0.10%
Adam Smith Scottish 5,200 4 0.08%
Paul Krugnman American 3,900 1 0.03%
Karl Marx German 4,050 1 0.02%
Larry Summers American 2,580 0 0.00%
Robert Shiller American 1,430 0 0.00%
Daniel Kahneman Israeli-American 1,150 0 0.00%
Joseph Stiglitz American 1,030 0 0.00%
Jeffrey Sachs American 892 0 0.00%
Kenneth Rogoff American 888 0 0.00%
Simon Johnson British-American 859 0 0.00%
Martin Feldstein American 764 0 0.00%
Alan Blinder American 585 0 0.00%
Justin Wolfers American 567 0 0.00%
Jonathan Gruber American 209 0 0.00%
Laurence Kotlikoff American 95 0 0.00%
Ernst Fehr Austrian-Swiss 4 0 0.00%

Amongst Economist articles Piketty is an even more extreme outlier. I’ve found no evidence in The Economist Style Guide that the publication requires the use of nationality or profession when introducing individuals, and the data show this is true of other economists. In conclusion, I’ve absolutely no idea why the newspaper so frequently introduces him as the “French economist Thomas Piketty”, but they certainly refer to his nationality and occupation a great deal more than they do of his peers.


  1. This list was criticised on publication (not least by The Economist itself a few days later) for including no women and being overly academic.↩︎

  2. Died after the list was written.↩︎

  3. Totals include the professions economist and philosopher.↩︎

  4. Totals include the professions economist and psychologist.↩︎

MUJI Stationery

MUJI, the minimalist “no-brand” Japanese retail store, sells an excellent collection of stationery. Usually after removing any stickers or packaging from their products there is no branding left. However, I’d argue that their products are branded in the sense that they are distinctly recognisable, particularly by their quality. MUJI stationery is not the cheap, prototypical “no-brand” stationery that you might purchase from a supermarket, for example.

MUJI fountain pen and notebook
MUJI fountain pen and notebook

I don’t have too much to say about the MUJI fountain pen. Unusually for a sub-$20/£20 pen it has an all-aluminium body. The design is simple, but looks a lot better than similarly priced pens. The nib is a Schmidt fine, and its fine. It writes fine. It flexes fine. It looks fine. I prefer Bock nibs, but I’ve no major complaints about the Schmidt nib. The pen can take an international converter or cartridge, although I only had luck fitting some international converters into mine (I suspect it might have a manufacturing defect as the nib sometimes wobbles a little).

However, my main experience of MUJI pens is not with the fountain pen, but with their gel pens. Today, MUJI sell round polycarbonate gel pens in a wide variety of colours and point sizes. Conveniently, you can buy them in bulk and purchase refills too. For an inexpensive gel pen, they write smoothly and you can buy them with very thin line widths.

MUJI hexagonal gel pen
MUJI hexagonal gel pen

My favourite MUJI pen is no longer sold as far as I can tell. At least as recently as 2018, MUJI sold hexagonal polycarbonate gel pens. I’ve owned dozens of them, and they were popular amongst my friends and family: to solve a lifetime of pen purchases, one friend even bought all the refills in stock in a San Franciscan MUJI.

By the summer of 2019 I couldn’t find them anywhere: I checked MUJI stores across cities and continents. They’re absent from MUJI’s website (although a picture on the fountain pen page clearly still shows one).

MUJI hexagonal gel pen

Although the current round pens carry a similar refill and write just as well, I’m still a little sentimental for the hexagonal pens. I alternated between fountain pens and these MUJI pens for most of the mathematics I wrote at university: their narrower line width was useful for drawing out intricate symbols next to prose.

For the time being I’ve got plenty of the pens and their refills kicking around, but I’d love to know the story of their disappearance.

Westminster Bridge

Westminster Bridge