I've been going deep into the guts of Git lately, and I have to say it's really beautiful. Not the code necessarily, but the purity of the design, the primitives on which the system is built. Everything follows so simply from just a few initial concepts. You have a content-addressable object store which stores files, or trees of files, or commits which point to trees and other commits. Because everything is based on the hash of its contents, each commit forms a Merkle tree that uniquely identifies everything, from the commit itself to the commits before it to the trees and files themselves. Gorgeous.
To me that is the absolute essence of great code, to find a minimal set of concepts with maximal conceptual power. You can really feel the difference between a system that has been built on elegant foundations and one that's just compromise upon compromise trying to make up for an irredeemable core. Good primitives are often so pure and powerful that they extend beyond code and end up more like philosophical tools. A content-addressable store is the idea of referring to things by a description of what they are, rather than an arbitrary label. Git's way of representing history is the idea that you can get rid of time entirely, and just define the past as the set of things that must have happened for the present to be like it is now.
It's extraordinarily satisfying when you learn a new primitive that opens up a whole new class of follow-on ideas. Even more satisfying is when you are struggling to find the right set of primitives to build something powerful on, and then everything suddenly clicks into place.
But the most satisfying of all – I assume – is discovering a brand new primitive. Something that nobody's thought of before. Relatively few people have found ideas that powerful, but it must really be something to unearth a whole new way of thinking, like peering into the universe itself.
I've recently been doing a disproportionate amount of typing commands into Linux machines, and it got me thinking about the way that so much advice in the Linux community looks like "here, just copy paste these series of commands", or "download and run this arbitrary shell script". Heck, even the official NodeJS distribution has a just-run-this-shell-script.
But, at the same time, it's kind of hard to argue with results. You often do need to just run a lot of commands in a sequence and, well, that's what a shell script is for. Maybe the answer isn't to shy away from it, but dive in head-first and make a more sophisticated workflow around running arbitrary shell scripts. I'm thinking something a bit similar to IPython notebooks, where the text is interleaved with code and you can run the commands one at a time and verify their output. It'd be a kind of literate approach to shell.
Maybe you could even combine it with a transactional shell to confirm that each command did what you expect. It'd be strange to get to a place where shell scripts could be considered user-friendly, but I can't think of a good reason why not.
It can be quite difficult to explain the modern internet to people who haven't spent much time with it. Not even just in terms of how it works or how to do specific things, but more fundamental questions like "why are you doing any of this?" You start to sound a bit nonsensical trying to explain the intricacies of whether to favourite or retweet, or whether someone is a friend friend or a Facebook friend, or what "seen @ 5pm" with no reply until 6pm means.
The point is that the complexity of the technology itself is dwarfed by the complexity of the relationships we build around it. You could produce an acceptable clone of the functionality of most popular websites without much difficulty, but to clone their community is effectively impossible. I suppose it's no surprise that community has become so important to our technology; even as apes we built and lived within intricate social structures. What we see now is just that the setting for those structures has gone from plantain picking to agriculture to industrialisation to... whatever this is.
But putting aside communities, it's also interesting to consider how technology has shaped the kinds of relationships we have on an individual level. The rise of broadcast media has made it much easier to have very asymmetric relationships, like between a celebrity and an audience member. Of course, we've always had celebrities, but the big difference is that the asymmetry used to be obvious; nobody thought they were Liszt's best friend just because they saw him play piano. Broadcasting makes it possible to hide that asymmetry and make a one-sided relationship feel two-sided.
I was once told that the difficult thing about television is that you have to have the voice and body language of someone very close to the audience, but the volume and eye contact of someone much further away. The goal is to create the feeling of intimacy without actual intimacy. If you can do that, you can save your intimately non-intimate recording once and distribute it to thousands of people, each of whom can feel a connection with you even though you have no idea who they are.
And that only gets us as far as TV and radio, nearly a hundred years ago! Now we have systems that let you share your diary with the world, broadcast text messages back and forth, publish your activities and movements, record off-the-cuff video, or even stream yourself live. There are so many ways to speak the language of intimacy online that in many ways it's a better environment than offline. But with the crucial distinction that this online intimacy is designed to scale, to be packaged and distributed. And there's no requirement it be reciprocal.
I'm not saying this is necessarily a bad thing, but I think it does require a rethinking of how we understand our relationships. If I watch someone talk about their life every day and I form a connection, am I forming it with that person? Or with the version of them I have constructed to fit my needs, like a character in a book? And if, so, where does this imaginary intimacy lie on the spectrum from quirky imaginary friend to Nicolas Cage body pillow?
On the other hand, maybe we should be prepared to accept a kind of abstracted intimacy: I form a relationship with a group, and the members of that group form a relationship with me. Neither the group nor me in this scenario are strictly capable of reciprocating a relationship; one is a collective with no single identity, and the other is a kind of ur-person, reconstituted from various snippets of public information but incapable of volition. So maybe we each form a half-relationship with someone who doesn't really exist, and that's still okay.
Whatever the case, this is only one example of the weirdness that's being left in the wake of all our new relationship technology. The future's going to be an interesting place.
I have to say I'm pretty chuffed about this one. In a way it's a followup to Chip from the other week, but this one took a fair bit more wrangling to get to behave like I wanted. I really like the outcome though.
The way it works is that the Game of Life is overlaid on a larger grid of audio regions, making an equal temperament scale with octaves on the y axis and octave divisions on the x axis. The more cells that are alive in a given audio region, the louder it gets relative to the others. The regions are also marked with colour for extra pretty.
You can scale up the grid and the audio regions to pretty large sizes, but I didn't find many settings that worked as well as these. 12-tone is traditional western music, but you get a lot of dissonance when there's too much going on. The 5-tone is apparently very similar to Gamelan music, though I suspect an actual gamelan musician might have something to say about that.
It's no secret that we're getting better at being humanity. Average life expectancy is increasing, global poverty is decreasing, people are more educated, and our science and technology are making us more powerful and more capable as a civilisation year after year. It's funny to think that as recently as a hundred and fifty years ago, the germ theory of disease was still considered a fringe crackpot theory, and anaesthesia was a party trick rather than a surgical tool.
But today a surgeon working without asepsis or anaesthesia would be considered a dangerous maniac, and quickly be imprisoned. Similarly, our advancing views on the harm of corporal punishment for children has made it illegal in many countries where it once was common practice. In these cases and others, the driver of our morality is our capability. Before we knew about bacteria, how could we fault a doctor for having dirty hands? Before we knew about the dangerous consequences of physical punishment of children, what basis would there be for making it illegal?
I believe that, in a similar vein, there are many commonplace things today that are products of ignorance or a lack of capability to do better. The difficult thing is knowing which ones, but I'd like to hazard a couple of guesses. The first big one is psychology. Our understanding of brains and minds is so primitive today that it's hard to stop finding things that will seem barbaric and negligent in another hundred and fifty years, from our attitudes towards and treatments of mental illness to our casual ignorance of the influences and exploitation of cognitive biases. How can we have a morality of memetics when most people don't even know what it is?
The second, perhaps closer to home, is the construction of software. There was a time when physical construction was more like alchemy than science. You would put up a structure, sometimes it would stay up, sometimes it would fall down. Over time certain patterns became apparent and super amazing 10X master builders appeared who could more-or-less intuitively navigate those patterns, though it was still not entirely clear why their buildings didn't fall down. Today, we have architects who are expected to follow certain principles. If they don't, the building falls down and they are responsible, because they should have known better.
It's not clear at exactly what point we will be able to say that we should have known better with software development. Firms that produce software are already considered liable if their software hurts someone, but software developers under employment are not yet liable if they write bad code. And I'm not sure they can be yet. Who among us is so sure of the right way to write software that we would be willing to encode those ideas in law?
I long for the day when a software developer's signature means as much as a doctor's or an architect's; after all, our bad decisions can already cause similar amounts of harm. But to get there we need to be better, and we're not better enough yet.