Sergey Mikhanov  

Metaphors of software (February 18, 2017)

There is one ridiculously inadequate metaphor of programming, as explained to non-programmers: Programming is just like snapping together some Lego blocks. This one must be familiar to everyone in the world today. It is inconceivable, but sometimes even executives in software companies believe in it. Anyways, a “new” metaphor was making rounds on the internet lately: the metaphor of software development like dealing with transplant organs. Euch.

It’s easy to see why this one is inadequate too. It implies that we know the function of the software that we’re “implanting”. As if nobody ever used software components not in the way its original author envisaged simply because they didn’t know it wasn’t its purpose. There wasn’t (thanks God) yet a surgeon implanting a heart and thinking it actually should function as a liver, but it’s totally normal to see a software developer using a queue as a persistence layer — or vice versa.

What’s even worse, organ transplant metaphor lacks a very important quality: it ignores the context of the world of which software system is inevitably only a small part. A heart is still a heart in 1987, 2007 and 2027. The same software module can either be immensely useful, or painfully useless, depending on the day and age it’s used in.

So I have a better metaphor. Or rather I have seen a better metaphor in the lectures of Alan Key: software components are like proteins in the living organism. Not cells, one level lower, proteins. Like software, proteins are complex, and we need several levels of abstraction to deal with them: both physics and chemistry, as well as physical chemistry and chemical physics need to be applied. Those abstractions are also “leaky”: things that are known in one of these disciplines are routinely not what they appear when considered in a context of another. Proteins interact with each other and their environment according to some grand plan only in an ideal isolated world, like the world of a biological cell. In short, there are several reasons to believe that this metaphor may be a useful one.

Does it help us writing better software? It does, but not in a direct way: it instead helps to see how primitive is what we’ve built so far, and how far we can go. If we’re making parallels with biology, our software is not even at the level of cells, leave alone tissues, organs, organ systems or organisms, and probably will not reach those levels if we stick to our current methods of software development. What’s the way to advance there? I don’t know and not sure anyone in our industry knows it yet.

Ceramics (February 14, 2017)

I started going to pottery classes around August last year. Taking Christmas break in consideration, this means I’m now five months in; my home now has three ceramic pieces it didn’t had before. Finishing a single piece of thrown ceramics turned out to be a long process — not because anything you need to do takes particularly long time, but because almost every step involve waiting after you’ve finished with the active part of it.

First part of making a ceramic vessel we all know: it’s the throwing itself. It does look very similar to what Patrick Swayze and Demi Moore were doing in the Ghost movie.

Ghost

I don’t find throwing too hard, except for when I want to make something that’s not the same size as my palms. Any piece that is the size of my palms will be shaped into an aesthetically pleasing object almost by itself, such is the magic of the center symmetry.

Once you’ve done with throwing, the internals of your object are finished — but not the externals. Finishing them involves turning a slightly dried up and hardened piece and cutting some excess material off it. It looks like this and it does generate lots of funky shavings.

Shavings

After this stage, the shape of your piece is complete, but it cannot hold water — it will dissolve if exposed to it — and will cleave into pieces if dropped. So you need to fire it in the kiln for the first time. This is the bisque firing stage, after which your object for the first time becomes true ceramics: it now contains the silica crystals that give it its colour, texture, water holding qualities, its unique feel and hardness.

The last step is glazing, which I won’t even try describing here: it’s a whole craft in itself. If stars align properly, you’ll be rewarded with a finished piece: here’s the very first one I brought home, in green and brown multi-layer glaze, with a mint dragee from Fortnum & Mason in it.


I normally don’t keep pieces that turned into something I don’t like in the process of their creation. My friend told me that I’m making myself a disservice: this way, I’ll know the least about the final, glazing stage. But at least I’m sure that each object I finish is the best I can do at that moment. Let’s see how much better they will get with time.

On the beauty of foreign language prose (January 7, 2017)

Reading long form in a foreign language is always difficult. I was withdrawing myself throughout all of 2016 from doing this — in my usual “provocative” manner, I was telling people who were willing to listen, that I don’t read fiction in English any more, only in my native Russian. The quoted reasons for the withdrawal were pretty simple: when dealing with fiction written in any of the two foreign languages I can speak and read, I can’t tell good prose from bad. Translation happening in my mind nullified any literary merit that a novel can hold. Every time I was trying again to put myself through a fiction book in English, I was fighting hard the desire to throw it against the wall.

But around a month ago, I began re-reading Pynchon’s “The Crying of Lot 49″, for which I had a Russian-translated copy. I first read it in 2002, liked it a lot back then, but never came back to this book — until recently. I took it from the bookshelf and standing, without even walking away from the shelf, read a first translated chapter.

What a terrible text it was. Participle clauses, climbing onto each other, like monkeys on the rock. Clearly, my literary tastes changed in fourteen years. But look, Pynchon is expected to receive a Nobel Prize in Literature every year now — this book can’t be so bad, I thought. So I immediately went on and bought an English-language copy: it’s just 160 pages, how difficult can this be?

The Crying of Lot 49

I finished it today. I know that some languages differ structurally from others; this means, you can’t keep the same order of sentence parts when doing translation between them. It looks like this issue hits Russian translation of “Lot 49″ the hardest: the same participle clauses flow smoothly in English, evoking quick, vivid glances into different parts of the author’s universe as we proceed through just one sentence. Having the capacity to trigger some sophisticated imagery is what we love literature for, after all.

And what about all that “nullification” of the foreign words’ beauty in my head? Pretty simple — just read good books.

Why you should never put “London” and “culture” together in a sentence (November 27, 2016)

I normally restrain from posting my gripes about current affairs or politics publicly, but why not try once? I’ll write about culture — and money! — in different countries. This will be a start of my series If You Think London’s Culture is Vibrant You Haven’t Been to Any Other Major City in the World.

Bolshoi Theatre | Alexey Vikhrov | CC BY 3.0

This is the main building of the Bolshoi Theatre in Moscow. If you have a look at the headlines in The Guardian, you’ll learn that Russia is run by an autocrat, the corruption is rampant, the economy is stagnating, the best minds are fleeing. The country is not even in top 10 largest economies worldwide! Yes, yes. Nevertheless, in 2005 Bolshoi Theatre in Moscow closes for renovation, the largest in scope it has ever had, with a plan to reopen in 2008. Here’s what it looked like back then.

Bolshoi Theatre Restoration | Superchilum | CC BY-SA 3.0

Come 2008, then Minister of Culture announces that it would be impossible to complete the works on time and provided everyone with a new estimate of finishing in 2010-2011. What follows in the years after is a story of several embezzlement scandals, incessant rotation of people responsible for the restoration works, and budget overruns. In late 2010, nevertheless, the theatre’s first hall becomes open for the public, with its building still being completely wrapped in scaffolding, and a year later, in October 2011, Bolshoi reopens completely. Official figures for the final costs are in the region of $700 mil, some sources quote estimates up to $1.1 bil.

Was it expensive? Sure. Did a significant part of that money landed in wrong hands? Absolutely. Nevertheless, Moscow now has a renewed Bolshoi for everyone to enjoy.

How about some stories from Europe? Hamburg — in 2007 works have started on top of the older port warehouses for the Elbphilharmonie building, a new seat of the Philharmoniker Hamburg orchestra.

Elbphilharmonie | Dietmar Rabich | CC-BY-SA 4.0

In 2007 it was expected to finish the building in 2010, in 2010 the date moved to 2012, and the building was finally unveiled in October 2016. It costs between $800—850 mil, which is even more impressive given that Hamburg is not a large city by any measure and is not a nation’s capital. The Elbphilharmonie will be opened for performances in early 2017, ten years after the construction has started, and Hamburgers will have access to another world-class classical music venue.

Copenhagen — in the former docks area on top of the Holmen group of islands, a new opera house is built between 2001 and 2005.

Operaen | Julian Herzog | CC-BY-AT 4.0

The building is completely funded by a family behind the Mærsk shipping company, but — here’s the catch — is completely tax-deductible for Mærsk, which means it was the Danish government who paid for it. The price was in the $500 mil area, and don’t forget that Danish economy is not even in top 25 worldwide.

Now let’s move back to the UK, a fifth economy in the world. How sad and different is the state of affairs that we see here! From 2000, there were zero new development in the cultural sphere in the country’s largest city. A noticeable blip of that period is the 2001 relocation of the British Library into its own building which allowed British Museum to open its Great Court. Here it is, the pinnacle of sixteen years of British public architecture.

Great Court | David Iliff | CC-BY-SA 3.0

The Shakespeare’s Globe theatre, the only original conception in this field, was completed in 1997, almost twenty years ago. Tate Modern was opened in 2000, in the pre-existing building. Southbank Centre, which some may call a home for the most cutting-edge art in London, was built in the 1950s.

Now how about the UK government adopting “let’s build more cultural venues” instead of “let’s build more affordable housing to house drug addicts” mantra?

Later update

This post caused a lot of feedback from my readers. A typical complaint from die-hard Londoners was that I’m putting too much weight on what they call “investment in culture”. They invited me to look deeper into the actual events happening on the London cultural scene, as opposed (in their view) to the real estate development.

That’s a fair comment. Some of the best cultural events in London are truly great, and I can’t even imagine myself seeing them all. The thing is that investment in culture signals a certain worldview. When I praise Vienna for having not one, but two classical movie establishments (Filmmuseum that has its own screening space, and Filmarchiv that uses Kinokulturhaus to show its films), it’s not because I ever hope to see everything they have to offer. It’s because having places like this is what makes us members of a human race. And London sometimes works really hard to make Londoners forget they are.

Couple of good videos I watched lately — 3 (November 20, 2016)

Category Theory for the Working Hacker. Philip Wadler, one of the most important computer scientists in existence, a person who is extremely well known within Haskell community, and a (falsely attributed) author of the quote “A monad is just a monoid in the category of endofunctors, what’s the issue?” explains what is that that we all, as practicing programmers, need to know about category theory, while nicely illustrating his talk with slides full of handwritten code.

I personally think that category theory is a very promising direction to consider when finding ways to build very large software systems from modules. My intuition about it is that on a meta-language level it offers a very useful parardigm, which is absolutely comparable in expressive power with the “code as data” paradigm of Lisp, or “code as expression” paradigm of APL-derived languages. I’ll try to elaborate on that in one of the future posts, but you can watch the video straight away.

The Secret Life of SIM Cards. This is a video on security, which is normally not the topic I deal with, but this talk is particularly fascinating because it talks about “an OS within an OS within an OS” — a software running on a SIM card, which interacts with the baseband (another specialized operating system), which, in turn, interacts with the main operating system of the phone.