Thursday, March 1, 2018


“Ya know, as a musician sometimes you have to give up some stuff so you can do other stuff.”

“Why? Because you're playing solo? What if you had a band? Or just... some time and an eight-track recorder?”

“And a well of talent both broad and deep, and the ability to hold complexity in your mind, and to organize your thoughts so you don't have to hold all that complexity in there at once.”

“Sure, why not?”

“Some people have these things. It's not their own limitations they're up against, it's those of the audience. The audience doesn't get to listen as a band. We may talk about collective listening experiences, and sometimes there's something to them, but they aren't going to make people better at handling complexity in a consistent and sustained way. You can't get 'em in a groove and lead 'em off the beaten path at the same time.”

“I don't know... that sounds more like a bad metaphor than a real limitation.”

“I'm not saying you can't alternate between the two, just not at the same time.”

“Meh, still don't buy it. You can listen to music, dance along, turn your head in surprise and delight, and keep dancing.”

“Speak for yourself. Have you seen me dance?”

“Uh... no?”

“There's a reason for that.”

Saturday, November 18, 2017


“Dude, quit messing with that fire hydrant, there's a cop like right there!”

“Alright, man, chill.”

“What?!? Seriously, stop messing with it, we're gonna miss the start of the game!”

“Man, fire hydrants are yellow.”


“This is green.”


“It's a municipal beer tap.”


“This is what you get for not following local politics.”


“So I just gotta... oh, crap, did I leave my hose adapter at that block party?”


“Yeah, it was funny, I just ran into it on my way home —”

“— That's not funny, dude, you should have stopped, someone could have died.”

“Ha, ha, I have this guy's phone number but I can't remember his name. Awk-ward! He was obsessed with Sound Transit. Not super for it or against it or anything, just obsessed.”

“Yeah, that's what you get for following local politics.”

“So I guess I have to text this guy but not say his name.”

“Maybe distract him with a question about mass transit governance.”

“Ugh, anyway, I'll worry about that later, we're gonna miss the start of the game.”

“So what sort of beer comes out of these things anyway?”

“They're currently rotating through some sours.”

“I guess they had to find some place for all that sour beer when 2015 ended two years ago.”

“Uh, sours are still a thing.”

“OK, sure, so the proper joke would have been, ‘What do you get when you put literally any beer in an underground tank and wait for some weirdo to come along with a beer hose?’”

“People don't talk about them like they've discovered something new anymore, which, let's be honest, by 2015 would have been shamefully late for any set of yuppies outside tech, but yeah, they're on track to blow up in the mainstream in 2018.”


“So, uh, remember that when your parents call you sloppy drunk from their vacation to Kansas City, Kansas next summer at four in the afternoon and ask if they have sour beers in Seattle, because you're somehow the coolest person they know.”

“I mean, my parents are teetotalers, but you're still the worst.”

“If you don't like sours there's a special election in March. It's the municipal beer tap selection... what color to paint the Space Needle... and the primary for City Council position ten or something.”

“Why does everything have to be the worst?”

Wednesday, July 12, 2017

Why my blog posts are disappearing!

I am “archiving” (effectively deleting) all posts on this blog before some arbitrary time, maybe 2014 or so, except ones I happen to know are linked from other places. If there's something you're looking for (there probably isn't, none of this is exactly noteworthy) ask me and I'll make it visible (if I like you).

Monday, July 3, 2017

Europe Retrospective: Luxembourg

I have flown across the Atlantic six times (three times each way). Five of the six have been on the Delta flight between Seattle and Amsterdam. As of the start of this trip I had never been in Amsterdam outside the airport, which put Amsterdam, for me, in a category with Las Vegas, Phoenix, Salt Lake City, and Dallas. I would get a little time in Amsterdam later, but on the way in I was just connecting through to Luxembourg.

In Luxembourg my main purpose was visiting John and Victoria, and resting up for the marathon. I had a fun visit with them, shopping around for grills and outdoor furniture, cooking and eating, hanging out and reading in parks, etc. I didn't do as much sightseeing as I hoped due to catching a cold, but did make it out to Trier, which is just spectacular for having such a collection of historic buildings in such a compact area.

A model of the remnants of Trier's fortifications, in front of the fortifications.

The fortifications from the other side.

Various angles of the stunning main square of Trier.

A baroque palace joined to an older church — certainly a political statement, perhaps not so different from some of today's regarding the provenance and justification of great accumulated wealth. Not the sort I'm inclined to agree with.

Ruins of Trier's Roman baths.

Trier's Roman amphitheatre.

This would have to be a Gothic church, but I don't recall which exactly.

The marathon was a bust; between a fever I was still fighting off, very hot temperatures persisting through the race start, and being stuck out in the sun with no water for almost two hours before the start, I really had no chance to make the whole distance. I dropped off my goal pace about 10 kilometers in and dropped out completely before the halfway mark. At least I got to run some later parts of the course on easy runs other days. I felt like a cheater going in for the massage and spa treatment in Mondorf the day after not running a marathon (thanks, Dad!), but experiencing a sauna for the first time was worth the guilt. John ran as part of a marathon relay team, and he finished his leg, so he earned his massage and saunas properly. On the way we passed by Schengen, where the famous European open-borders agreement was worked out!

On my last day in Luxembourg John took me on a tour of Luxembourg's “Valley of the Seven Castles”. This is one of these Seattle-Luxembourg connections. People sometimes say Seattle was built on seven hills (an analogy to Rome), but however you count the hills you always wind up with more or less than seven, never seven exactly. I think the Valley of the Seven Castles is similar, though I could be wrong (I don't know Luxembourgish castles nearly as well as Seattle hills).

These are from a little old ruin near Käerch.

This one, near Septfontaines, was a little tricky to get to. It looks like it's been inhabited recently, with what appears to be a modern driveway on part of the grounds!

The castle at Ansembourg features an impressive garden.

Hollenfels' castle has a hostel next to it!

This castle in Vianden can be visited, but was closed when we showed up.

In addition to all these castles we got a peek at the current Grand-Ducal palace. John knew we were in the area and managed to find the closest accessible vantage by driving around. As when I first moved to Seattle and spent several weeks going on runs trying to find Kerry Park, looking at a map would have been cheating. The Dimonds take fair-play seriously... I think we were raised to appreciate a good challenge. Anyhow, Luxembourg is a nice place to visit if you have good hosts, and I had the best! Next stop, Prague!

Tuesday, June 20, 2017

The bottle says, “SPF 50,” but we have to take into account that France is a Metric country. SPF, of course, is a unit-less number. Metric unit-less scalar numbers are worth roughly 1.4 times their Imperial counterparts. Now you might be tempted to cube this number to get the conversion factor because sunscreen is a liquid, three-dimensional. But, in fact, the number refers to the light absorption properties of the skin. The skin's surface-area is a two-dimensional quantity (measured in square-meters or square-feet), but its exposure of light is measured per-unit of area, so the conversion factor is the inverse-square of 1.4, which is a little more than a half. So this sunscreen is about SPF 25, by American standards.

If you think that's bad, it gets much more confusing in Britain, which is mostly on the Metric system except for grumpy old people and in matters of alcohol. Grumpy old people don't buy a lot of sunscreen, but if you've had a couple pints (which are of course different from American pints), you might have to take this into consideration. In this case there may be a distinction based on the length of the foot of the reigning monarch. In the 19th Century, as Dickens writes in A Tale of Two Cities, the King of England had a square jaw, so the ratio of his foot size to the standard foot was introduced squared. This was a serious inconvenience when buying sunscreen in these days, when people really had a whole lot else to worry about. The resulting epidemic of sunburn precipitated the tragic plot of Dickens' great novel, which is remembered as a rallying cry in the movement to adopt the Metric system in Britain. Ironically, when this finally happened, sunscreen applied while drunk retained this annoying conversion. Fortunately the monarch from then through today, Elizabeth II, has more of a round jaw, so though her feet are shorter than a foot, they just round up to a foot and the conversion is moot. So Americans and Europeans alike can consider SPF numbers in Britain exactly as they're accustomed to in their own countries.

But if you're from Australia you have to turn the bottle upside-down before reading.

Monday, June 5, 2017

The Thing(s) with Bitcoin

Alright, The Guardian! Y'all were just at Paralelní Polis in Prague! I was, too! They really will sell you coffee for Bitcoins, and only for Bitcoins!

And you got a Bitcoin wallet on a card and started scanning a QR code, printed therein, on machines in order to buy stuff! In the same room as people that walk around in facemasks in response to the combination of ubiquitous surveillance and various improvements in computing bandwidth (including, but not limited to, facial-recognition), which could otherwise allow them to be tracked literally everywhere! That's a bit ironic: ubiquitous surveillance is related to one of the reasons a Bitcoin wallet-card is not such a great idea. So here's a counterpoint to the Guardian piece: why Bitcoin isn't going to directly replace the Koruna (or Euro, or any of the various Dollars)... ever.

Bitcoin's security is rather unforgiving as regards personal security. A Bitcoin wallet-card has two QR codes (in case you don't know, a QR code is essentially a 2-D barcode) on it, each of which is used to access your wallet. One gives the necessary information for anyone (with the right software and an Internet connection) to give you Bitcoins. The other gives the necessary information for anyone to take your Bitcoins. Obviously, to buy a coffee you need to show the side that lets anyone take your Bitcoins. So you'd better trust your café! On the surface this is no worse than swiping a debit card. But there's a key difference: the ability to charge people's debit (and credit) cards is gated by payment networks that can revoke the access of scammers. Not so much with Bitcoin: the software is open-source. In order to counter fraud, institutions basically similar to the credit-card payment networks would have to form within the Bitcoin ecosystem. Anyway, once the Bitcoins are taken there's probably no way to get them back... except possibly by involving the old fuddy-duddy legal system (i.e. by convincing the state to pursue a case against your adversary, backed by the physical force of the police), in which case you're not much of a crypto-anarchist, are you? Also, the state, knowing that one of the major reasons to use crypto-currency over state-backed currency is avoiding regulations and taxes, may not be so eager to help you out.

Of course, in the age of ubiquitous surveillance, anyone operating a camera that sees your QR code could instantly empty your account! This is the ironic part of the juxtaposition of wallet-cards and facemasks; people are worried about tracking via facial recognition — QR codes are much easier to recognize and read than faces! They were literally designed to be easy for computers to recognize and read! I severely doubt that the people wearing facemasks walk around with wallet-cards, at least not ones representing wallets with any real value in them.

One apparent way around this (I just thought of this off the top of my head, so either people are already doing it or it's wrong) is to keep your savings in one wallet, with no associated card, and transfer small amounts of money to a “holding” wallet to make routine transactions. All the modes of operation I can think of would require consumers to have mobile phones with good Internet connections in order to buy anything. But then... you'd better trust the people writing these apps! Generally I don't think people are very good at figuring out what or whom to trust, and with scams being very simple to do and hard to protect against, scammers will absolutely savage the less techno-literate for years.

The next big thing I have against Bitcoin is that crypto-currency is, economically, a new form of precious-metal-based currency, and hardly anyone thinks that's a good idea anymore. There is a finite amount of Bitcoins, which is determined by hard math. Well, there's also a (practically) finite amount of gold (on Earth, in the short-term), which is determined by hard geology. The gold standard, as a basis for practical currency, was terrible. When gold appears set to appreciate in value, as when there isn't much new gold being mined but the economy is growing, people hoard it instead of investing or loaning it out. An economy where there's no better investment than holding cash is an economy in trouble. Well, Bitcoin has certainly appreciated (exemplified by the article's cited prices for coffee), and if it has any prospects as a real currency it will only appreciate more!

Of course, humanity has plenty of experience with currencies backed by geology, so we've been there before. And there's a response: try a different metal. The Free Silver movement wasn't successful, but other currency changes have been. The institutions you'd need to convince to switch to a different crypto-currency are more diffuse than governments and have different interests. And, of course, people have traded different metals, pressed directly into coins, before (names like “dollar”, “dime”, and “pound” originated with silver coins; “crown”, like the Czech Koruna, originated with gold coins). But then people ended up relying on governments to set standards. Of course, people didn't want to have to figure out which shops accepted gold, silver, or copper, but they were also bad at detecting counterfeit money, and governments were in the position to scare counterfeiters with threats of heavy punishment.

And this places a lot of power in the hands of governments, which can use it for bad things. Today some people claim that the Czech government is, under the influence of big business (and politicians with direct big-business interests), implementing regulations aimed at excessively burdening small businesses to benefit larger ones. I don't know enough to evaluate the claim, but if these regulations are onerous enough, they may exceed the difficulties of stepping outside mainstream payment systems. Therefore the possibility of everyday Bitcoin use, even if only by knowledgeable and motivated people, could act as a check on certain kinds of government overreach.

The other opportunity for Bitcoin, in some sense, is by analogy the Linux story. I didn't come up with this, I heard it on the radio somewhere. The “year of Linux on the Desktop” never really came, not as its advocates envisioned, but as the importance of “The Desktop” has receded, Linux has taken over servers and mobile devices. Similarly, Bitcoin is backed by some cool software that might be very important, in finance and elsewhere, in the near future, even if everyday Bitcoin use never takes off much. But, as with the rise of Linux, it may largely occur under the control of big businesses (including startups that become behemoths) and governments, not anarchist hackers. If this happens, it may bring about some changes to the cultures of these institutions, but I'd guess only minor, adaptive changes, not fundamental ones. That is, I don't think we're headed for the freewheeling world of Snow Crash.

Friday, May 19, 2017

Slytherin Software Engineering: Checked Exceptions, Java 8 Streams, and you!

There's nothing quite so Slytherin in software as functional programming. A functional program is not a heroic quest to impose order on the chaos of memory, but the evaluation of elegant mathematical and logical expressions, over data structures that can never change, with no side-effects. Is all as it ever was? Yes. Our machines are not as perfect as our ideas, but we use compilers to keep the (vaguely dirty) world of processors, instructions, and memory separate from our timeless forms. Additionally there's a bit of the esoteric: pure functional programming disallows the most basic elements of the imperative style that most people learn first, data structures like arrays and control-flow ideas like iteration. This lends itself to uniform syntax with meaning differentiated by position and hierarchy, not ugly flat structures with wide varieties of (plucky?) characters. This is serious Slytherin stuff, right here.

Alas, sometimes even a Slytherin must code in Java. Java's endemic flaw is that it never has enough features; in this it is infinitely preferable to, say, C++, which always has too many! The consequence of this flaw is that we must write lots of redundancies. A redundancy is a statement that offers no possibility for expression, but that we must write anyway. This is drudgery, mere toil, not befitting our high nature! Java has long supported some functional idioms and even anonymous classes, but using them was an exercise in managing redundant boilerplate. Java 7 helped clear some Generics-related boilerplate, but Java 8's compact lambda expressions and Streams API finally made functional expressions look good on the page.

There's just one problem: what if your lambda expression calls some function that throws a checked exception? Streams methods won't accept such a lambda! This sort of problem predates Java's lambdas and Streams, but now that functional idioms are good-looking enough to use it's a problem worth re-examining. So let's consider the possibilities.

You could handle the exception. Yeah, right. In your nice, pithy lambda? What are you, a Hufflepuff? You didn't throw that exception, it's not your responsibility. Let someone else handle it.

You could catch it, wrap it in RuntimeException, and throw that. You'd do that with a higher-order function, obviously. The downside to this is that by wrapping the checked exception you obscure its true nature to callers. That's a red flag right there (we obviously prefer green ones). Another core Slytherin value this violates is reciprocity. You had to deal with the annoyance of a checked exception and it's your right to propagate this annoyance up the call stack. But to force the caller to check arbitrary levels of getCause() and try to guess the intentions of the various wrapping layers? I'm not going to lecture you about fairness or the social contract, but think of the possible consequences: your caller could denounce your method for being imprecise. You don't want that reputation. It's just this fear that makes us civilized; do heed it.

You could wrap the exception to get it through the Streams expression, then catch it outside and unwrap it for the caller. For this you need a more specific type than RuntimeException, one that is only used for this purpose — if you wouldn't make your caller guess at the meaning of a caught RuntimeException you certainly shouldn't have to do it. This is the Golden Rule of Entitlement shared by all Slytherins, in case you were already developing a habit of skipping class by Kindergarten. So you declare such a type along with your function-wrapper and take care to use it consistently. But now your aesthetic is starting to slip. I once had such code reviewed by a Ravenclaw that commented, “That's an awful lot of control-flow just to avoid a for loop.” I could only sulk, “And an awful lot of type-names just to avoid a builder,” and take my laptop and cognac into the stairwell to rewrite the whole module, newly enlightened to the futility of striving for beauty, for unity of expression and purpose. Never have your code reviewed by a Ravenclaw.

It turns out that the best way, for a Slytherin, was invented in 2009. Do the sneakyThrow. Like it just by the sound of the name? I thought you might. You still have to wrap your lambda expression, but you don't need an extra try-catch block around the Streams expression, and the exception that comes out is exactly the type that was thrown. All you did was abuse Generics so you could make an unchecked cast and deliberately make that cast incorrectly to an unchecked type1 to fool the complier's static exception-type checks — the ends justify the means. Now you can put a (correct) throws declaration on your method, tie it up in a nice little bow, and laugh as the compiler warns you about it: how naïve it is, how little it knows of the dark arts.

You could also leave the throws declaration off and lift the burden of checked-exception handling from your caller. This could have real consequences: there are exception-handling schemes out there that rely on the methods they invoke to honor their declarations. Some Slytherins would say that the weakness of those that trust in the honor of others is their own fault, that we should not be blamed for doing what we must. I mean, it's just code, so do whatever, but don't be a douchebag about stuff that really matters, OK?

1 Two different meanings of “unchecked” in one sentence... oh, dear...