Kotlin Looks Nice, But…

Published at 18:54 on 17 July 2019

I’m planning on developing an Android app, and to that end I recently downloaded Android Studio. I notice it offers a second option for the programming language of a project, in addition to the expected Java: something called Kotlin.

That prompted me to take a closer look at this language. I’ve worked about halfway through the Kotlin Koans tutorial for the language, and I must say that so far I am quite impressed.

The world needs a more modern alternative to Java. Once I was hoping that C# could serve in this regard, but alas:

  • It falls victim to bigotry (anything that got its start at Microsoft is going to be sneered at in the open source/Unix/Linux world, no matter its merits, no matter that there’s an excellent open-source implementation of it).
  • It runs in its own environment, not the JVM, meaning that switching from Java to C# implies burning bridges. You can’t easily cut over by developing new modules in C# that interoperate with legacy Java ones.

I looked at Scala, which seemed to offer real promise. Then I experimented with it and ran into Scala’s complexity. I was eternally doing battle with the type system, which seemed to frustrate my every attempt to use the language’s powerful features in clever ways.

When I looked at other people’s Scala code for ideas, I was often perplexed, because it was shot through with special features I had not learned yet. Beyond a certain point, it becomes impossible to remember a language’s core feature set. When that happens, readability of code will suffer, because developers will tend to drift apart from each other, each opting to use their own personal idiosyncratic subset of the language’s features.

There is a real cost to programming language complexity, and it is clear to me that Scala is well past the point of diminishing returns when it comes to feature set size.

That brings us back to the subject of this post. Kotlin really seems to be “Scala done right,” addressing the worst of Java’s deficiencies without falling victim to excessive complexity.

Android was Kotlin’s foot in the door, because many Android devices run truly ancient versions of the JVM, versions so old that many of the newer features in Java (without which the language becomes truly dated and obsolete) are absent. The Kotlin compiler can target those old JVM byte codes, allowing one to use modern features even on legacy platforms.

So I’m going to give Kotlin a whirl on my Android app. I will let you know what my impressions of the language are after I’ve had some practice actually coding something meaningful in it.

The pity is that once one does things other than Android software development in Kotlin, the rough edges in its ecosystem quickly become all too apparent. Just out of curiosity I’ve been playing with the Ktor server-side framework. The documentation ranges from flat-out obsolete (and thus incorrect) to simply nonexistent. The result is that even simple things take hours of tedious experimentation to determine how to do.

I’m hoping that Android development goes better, but unless those rough edges get smoothed out, and soon, Kotlin may well end up being stereotyped as an Android-only thing.

About AOC

Published at 09:15 on 16 July 2019

She actually is a serious politician.
She’s not the caricature the right (even the anti-Trump right) attempts to paint her as. If you read her Twitter feed, it’s full of realizations that she is just one member among many and thus has to make allies and work across the aisle. Her recent testimony about Trump’s concentration camps was brilliant in how it employed appeals to patriotism in the service of abhorring the conditions there. That’s the sort of stuff that’s needed to appeal to the so-called center (which as I’ve written really isn’t a committed center at all).
She’s not perfect, but then again, nobody is.
Sure, she stupidly let herself get sucked into a nasty public feud with other Democrats. Insisting on single-payer as the only way to make health care more equitable is needlessly (and foolishly) statist. She sometimes gets so preoccupied with doubling down on identity politics that class politics gets temporarily neglected. News flash: she’s human, and all humans have their faults.
Voices like hers have been sorely missing from Congress for almost my entire adult life.
About the only comparable one is Bernie Sanders. He’s been saying the right sort of things for decades but until he ran for president he was this obscure senator from a tiny New England state that nobody paid much attention to. AOC managed by some miracle to walk in to the Capitol building with a big bully pulpit. Voices for actual (albeit still moderate) leftist ideas have until recently been almost totally excluded from the Establishment discourse: the acceptable spectrum ran from unashamedly conservative to milquetoast center-left. AOC has helped change that.
It’s not just that she’s a leftist, it that until very recently, she was working-class.
This one is huge. Sanders, despite being an overall positive influence, has been a public servant (with a cushy salary and benefits) for decades. AOC, until recently, was living many of the struggles the majority of everyday people must cope with. Those memories are still fresh in her mind, and inform what she says. This has caused a much-needed leak to develop in the reality-distortion bubble on Capitol Hill.
Other Democrats will have to be primaried.
Sorry, centrists, this is just the way it is. The Democrats are a big tent party. Given the significant ideological diversity within it, voters deserve the right to a choice within those ideologies. Being primaried isn’t an “attack;” it’s an aspect of living in an open society. Rejecting competitive primaries (as the Democratic party leadership is attempting to do) is a pro-authoritarian attitude that must itself be rejected. Of course, fair’s fair: the centrists will respond by primarying the likes of AOC. Expect it.
She is a brilliant propagandist.
Take her recent use of the term “concentration camps” as an example. It promoted howls of outrage from the right (and even many in the center). But while the outrage was being howled, even the howlers were repeating the term “concentration camps.” She had suckered them into repeating her talking point, and they weren’t even aware of it!
Yes, she is youthful and inexperienced.
And most of her colleagues are, to be blunt, aged, jaded, sell-outs. She’s a sorely needed counterpoint to them.

An entire Federal government full of AOC’s would be a disaster. That’s irrelevant, because such a thing will never exist. A government with a few dozen more AOC’s in it (given present circumstances, about as many as could plausibly be wished for) would be vastly less reality-distorted than the government we have now.

In fact, even the four “Squad” members we currently have, have already helped shift the public debate in useful ways: even centrist Democrats who reject her health care and global warming policy ideas are admitting we need to do far better on both than we currently are.

And Un-Scratch That

Published at 19:57 on 7 July 2019

The deal that fell through is on again. Late Friday morning, I received a call that the offer that beat me out had collapsed and the property was back on the market. So I made a last-minute trip north to inspect it in person. It looked as good as it seemed online, so I told my agent to prepare an offer.

Then, since I was most of the way to Boston Bar, I decided to take my friends who have a summer home there up on the standing invitation to visit them, since it was going to take a few days to prepare all the paperwork needed in making a contingent offer anyhow.

It’s all been signed, so now comes the waiting. There’s still a frightfully large number of ways this all could fall through:

  1. The seller accepts someone else’s offer (not out of the picture, given how quickly that place attracted the first offer).
  2. The seller does some random flaky thing (also not out of the picture, given how the seller jumped on a quickie offer so soon instead of doing the more typical thing of waiting for multiple offers to come in, if one offer comes in surprisingly fast).
  3. My current place either fails to sell, or fails to get an offer for enough money to afford the place in Bellingham (also a possibility, given how slow interest has been in it so far).

On Iran Violating the Deal

Published at 19:46 on 7 July 2019

First, let’s establish a baseline truth: Iran is ruled by a repressive government that would be better off gone.

That said, just what would one expect Iran, or any other country for that matter, to do when:

  • It signs a binding multi-party agreement, then
  • One of the parties tears up the agreement, and
  • Not only that, that same party then behaves in a way that sabotages all the other parties’ ability to honor the agreement.

Really, now: given all that, to expect Iran to keep honoring its side of the deal, just to be nice, is the mother of all unrealistic expectations. Of course Iran decided that since the agreement was torn up, it didn’t matter anymore. In related news, water is wet and the Pope is Roman Catholic.

Well, Scratch That

Published at 16:50 on 3 July 2019

An interesting condo was listed for sale on Monday. I immediately contacted my agent up there and requested we do a walk-through via Skype. That happened today, and it still looked interesting enough that I made plans to see it myself the next business day (i.e. Friday).

And now we learn that it has sold already. So be it. I’m unwilling to buy anything sight unseen, particularly after that experience with the mold-infested unit that looked so nice in pictures. Plus while the location was beautiful (on a dead-end street adjacent to a greenbelt), both the street network leading there and the complex itself were bicycle-hostile.

Exactly how hostile was a matter of question, and part of my due diligence on Friday was to ride around on my bike and get some feel for how bad the trip downtown would actually have been. I’m still planning on doing that, simply in case anything else in that area comes up for sale (there’s lots of condos in that part of town).

Ah, well, the search continues.

Odds are Turning in Harris’ Favor

Published at 09:20 on 3 July 2019

So, while I thought Biden didn’t do too badly, it seems that Harris ate his lunch to the point where she has gone up quite a bit in the polls at Biden’s expense. Sanders is looking more and more like an also-ran with each passing day. It all gives me decidedly mixed feelings.

I’m just as happy to see Biden’s fortunes fall, since I believe he would be a disastrous candidate against Trump. The Democrats already tried running one triangulating centrist against Trump; why repeat that failed strategy?

I’m not so happy to see it happen at the hands of Harris. She’s very much an authoritarian in the mold of Trump, just for different ends. If you don’t believe me, check out her position on gun control. She vows to unilaterally take executive action if Congress doesn’t act according to her will.

That, frankly, is the last thing we need. It it flies — and, thanks to precedents already set by Trump and his predecessors, it just might — it will successfully establish an even firmer precedent in favor of an even more imperial presidency.

A precedent which, no doubt, would be used sooner than anyone thinks by a fascist president whose ruthlessness makes Trump look like a harmless fuzzball, much like Trump makes Dubya look by comparison today.

Sadly, Harris is probably the Democrat with the best chance of winning. Biden’s always been weak when campaigning on the national stage, and this pattern is starting to exhibit itself yet again. Warren is smart and experienced, but just doesn’t impress me as having a winning personality (like it or not, personality matters). Sanders is weak with African-Americans (something that’s undeserved, but life is unfair) and the Democratic establishment (something that’s totally understandable, given how he is not one of them). Buttigieg is simply too young and inexperienced (if he ran for Senate and served for four years, he could be a formidable candidate in 2024). And that leaves the Senator from California.

And she has a good chance of winning against Trump. Apparently, she unnerves The Donald so much that he has been incapable of thinking of a cute, derogatory nickname for her. She’s already shown her skill at eviscerating her opponent against Biden, and doubtless could turn that same skill against Trump.

This beats the pants off Trump serving for four more years, but it also means we’re not going to get out of this authoritarian mess quickly or easily. It will probably be necessary to support the right’s efforts to undermine presidential authority if she wins; do this right, and presidential authority could be semi-permanently scaled back. (As much as I would like it to be permanent, the same processes that created the imperial presidency would inexorably tend to re-create it.)

The silver lining to this dark cloud is that it probably will be easy to do the above if Harris wins: Trump has appointed dozens upon dozens of right-leaning judges, who will find the temptation to use their power to undermine a Democrat irresistible (the courts are political and always have been). And once court precedents start getting set, they are difficult to undo. While the damage to the imperial presidency won’t be permanent it should at least prove somewhat lasting.

Do They Know What They Are Getting Into?

Published at 08:57 on 2 July 2019

That’s the question I have after seeing that this condo just went pending within a week of it hitting the market.

You see, I happened to be in Bellingham doing some house-shopping on the day it hit the market. Initially, I was excited, as it seemed to have most of what I was looking for: a location that was both quiet and central, plus no upstairs neighbors.

Then I toured it and the disappointment hit. Or, should I say, the musty smell hit my nostrils: there was a distinct moldy odor as soon as I walked in the door. That was after noticing the shabby condition of the exterior siding. The truth was immediately clear: the HOA had deferred exterior maintenance to the point that enough water had leaked in and fungi were now busy at work in the building.

Needless to say, I took a hard pass on that one.

It had an open house the past weekend. One wonders if any of the typical backhanded realtor tricks were employed: baking cookies in the oven, opening all the doors and windows, etc. In other words, anything to disguise the telltale mustiness. Or maybe my allergies have simply made my ability to detect mold more acute than the norm. Or perhaps a slumlord snapped it up and plans to use it as a low-end rental.

Who knows? The important thing is, I didn’t get stuck with it.

Whining about Trump and Baby Kim

Published at 16:04 on 30 June 2019

It mostly misses the point. Yes, he’s not getting much in return for legitimizing one of the world’s worst (if not the world’s worst) dictators. Consider the alternative with Trump: it would be war. And considering that North Korea has nukes, the consequences of that would be truly horrific.

So, while the whole escapade is pretty much everything its detractors say, it’s still the best possible outcome one logically could expect, given who occupies the office of the presidency.

The Clown Show, er, Debates

Published at 08:16 on 28 June 2019

First, it was hard to keep all the candidates straight (insert joke about one of them not being straight in the first place). There were twenty of them, fercrissakes. Twenty.

Second, Biden did better than I expected. A huge part of that was this:

That’s right: Biden actually talked about Trump less than Sanders did. He seems to be realizing that it’s not enough to be the Not Trump candidate; you have to offer positive reasons to vote for you.

Third, Elizabeth Warren continued to come off as unelectable. Yes, she has a plan for just about everything. It’s not her plans so much as her style; like it or not, logic plays second fiddle to emotion when it comes to winning elections. I wish it weren’t that way, too, but sadly that’s the way it is.

Fourth, Buttigieg came across as having the most smooth and carefully-chosen answers. If he weren’t so young and inexperienced, he’d be a shoo-in. Alas, he is so young and inexperienced.

It all leaves me feeling somewhat pessimistic, until I realize that, like it or not, Biden is in the lead and doesn’t seem to be doing the awful job I feared he might.