As someone who took actual law courses, I can only share your sentiment. Briefly,
- that xkcd is (as usual) pretty spot-on
- the most ancient piece of "law" that we have is Hammurabi's (~3200 BC but don't quote me on that), and it's translated to "code". In a weird turn of linguistics, I guess modern incarnation of "code" as a concept (i.e. computer programs) is a very specific subset of "ordering reality", applying "norms", defining "systems". But we should not confuse the two, there's a reason we write law in human languages and code in computer languages and the two have proven quite unable / unsuited to reach the other's purpose.
- a very active domain of lawmaking activity is "harmonization" (as called in the EU), the idea of making different law systems interoperate better with others (e.g. between States within a federation, countries in a Union, internationally altogether). The benefits (in litigation, cost) are enormous, and it's a massive undertaking for that sector. This is the kind of domain optimization I'm thinking about, where computing as a means can help humans better perform the job by orders of magnitude. Think e.g. tackling complex comparative graphs, effect/impact, etc.
> Many programming based approaches to the law treat it more like a codification of exactly how a person should behave in every situation, and precise penalties should they violate strict protocol.
Indeed, a chilling hell that hopefully we'll never be foolish enough to implement. But you know, I know, that the mere existence of the concept means someone, somewhere, sometime will do it. Note also that, in a "positive" way — e.g. to define a meritocracy in a private environment like a company or club — it's been proven viable (the case of Dalio is probably the most famous, but you could argue most corporations are/become such programmatic systems).
- The whole notion of "blockchain as law", "code = contract" is, AFAIK (I read a lot about that in recent years), idealistic. Wishful thinking. It is no more no less "law" or "contract" than your run-of-the-mill compliance-motivated feature. It's born of the will to define a new space from scratch, to 'evade' current systems — physical and digital: banking, surveillance, etc. I don't wish to state about the intent, but the constitutional view is quite clear: such a departure from the accepted "norm" is secession or revolution, and the only way to change that is to become the norm and thus define itself as legal. It does not matter if it's a 1776 paper or a 2019 state of the art technology, the concept of legality remains. TL;DR: everything is/becomes illegal from the standpoint of preserving the existing regime / order / norms; in effect no new regime is ever "legal" under the ancient: you effectively revoke the old, then create a new one.
I'm not sure how versed in public/state legal matters and the history of these things most blockchain proponents are when they believe creating a new legal domain is in any way different or easier because you write it in Java instead of English.
The business angle is more legit, literally so when it conforms to "good practice" (regulations etc.); however self-defeating it might seem to the idealistic "new law / regime" proponents.
Short story, all the talk about evolving law with/using blockchain technology is fluff. It's like saying "internet" or "social networks" will solve "social" altogether. Confusing pipes for content.