More Drone Attacks in Russia

Published at 07:53 on 31 May 2023

The Russians call it “terrorism,” of course. And, guess what? They are right! By pretty much any measure, such things are terrorism.

They are also totally to be expected in a wartime situation. During World War II, there were routine acts of terrorism in the belligerent nations. Often, their enemy nations were involved in some fashion.

War is unpredictable. Always has been, probably always will be. Putin was supremely foolish to believe that something as high risk (and as much a stretch strategically) as attempting to invade and subjugate all of Ukraine would go smoothly, according to plan, and expose the Russian heartland to only minimal risk.

So far as this undermining support for the war in Russia, probably not, sorry. Hitler thought the Blitz would do that to the United Kingdom, and it had precisely the opposite effect, despite imposing much more hardship and danger on the British public than the few insignificant pinpricks that we have seen so far against Russia. Putin’s line has after all long been that this whole “special military operation” is about Russia’s security, and now that Russia is getting attacked well inside its borders, this whole “we are fighting because our security is in danger” line now has more traction.

What it will do is boost morale inside Ukraine even more. It is always good news when a war goes far worse for one’s enemy than that enemy ever believed possible.

But yes, it’s all quite ugly. News flash: war itself is ugly. Don’t like the ugliness of war? Don’t start one! If you have started one, stop it! Putin could totally kneecap Ukraine’s causus belli by negotiating a ceasefire and withdrawing back across Russia’s internationally recognized borders.

Until that happens, however, as Garrison Keillor once quipped: “If you didn’t want to go to St. Cloud, then why did you get on that train?”

Turkish Elections

Published at 21:50 on 30 May 2023

The guy the West wanted to win, Kılıçdaroğlu, lost. Erdoğan, Turkey’s longstanding president with an authoritarian streak, won yet another term in office.

But here’s the thing. Kılıçdaroğlu sounded positively Trump-like in his non-concession “concession” speech, going on as he did about how the election had been stolen from him. And his anti-refugee stance (he promised to summarily expel all refugees from the country) also comes across as more than a little bit Trump-like.

In other words, it really doesn’t look like the narrative in the Western media of a brave liberal democrat challenging an evil entrenched authoritarian is all that accurate. Maybe if the opposition hadn’t chosen such an obviously flawed figure as their standard-bearer, they would have fared better?

Java Annoyances

Published at 07:22 on 29 May 2023

When Java first came out in the 1990’s, I gave it a try, then turned away from it. My reason was not the core language itself but its standard library, which impressed me as something of a poorly-organized and overcomplex mess.

Decades later, and with some professional coding experience in that language ecosystem under my belt, and that is still basically my takeaway conclusion. The worst that can be said about the core language is that it’s a bit dated (understandable, as the the design is now decades old). But the overall pattern of the standard class library being awkward has extended to the language ecosystem as a whole.

Just about every third-party library for Java tends to be a special combination of big, awkward, and given that size and ponderousness surprisingly feature deficient. Take the Jackson JSON library for instance. Its current release totals just shy of 800 classes (yes, 800, I am not making this up). Yet when I tried to do something as simple and basic as generate pretty-printed output (nicely indented and formatted, with all keys in JSON objects sorted alphabetically), I couldn’t do it out of the box. (There is an ORDER_MAP_ENTRIES_BY_KEYS option, but it fails to act as advertised in all — in fact, in most — cases.) I had to write helper methods to get my output formatted as desired.

And this was after blowing most of a day poring over documentation and trying experiment after experiment attempting to get my output correct. The configuration settings in Jackson are split up amongst at least three classes, and of course the documentation for one configuration class does not mention the others. It is left as an exercise for the programmer to discover the others.

Contrast with Python, which has a simple JSON serializer and deserializer built-in to the language’s core library. (Jackson is a third-party library, because in Java you must use a third-party library if you want to read or write JSON; the standard Java library lacks JSON support. This, despite the standard Java library being much larger in terms of number of classes than Python’s library.) And there is no hunting the documentation in Python: right out there in the documentation for the json module (one module, one class, one HTML page of documentation to read, that’s it) the indent and sort_keys options to json.dump are described. And the options work as advertised in all cases! What takes over a day to code in Java can be accomplished in under a minute in Python.

Yes, Jackson can do deserialization into objects, with schema checking, and the built-in Python library cannot. That’s nice, dear. The basic functionality of being able to generate pretty-printed output out of the box seems to be missing. It’s like driving a luxury car with heated seats and a fancy entertainment system but no factory headlights or taillights, so you must add those if you want to drive it after dark.

And I run into this sort of thing over and over and over again. In the Java world, I am literally always encountering this or that use of some giant, cumbersome, poorly-documented third-party package, that compels me to waste multiple hours understanding it. Or, in most cases, just partially understanding it and still making a huge number of educated guesses about it. And because those packages also tend to be surprisingly limited in functionality, one either has to pull in more huge, cumbersome, weak libraries to make up the deficiency, or add more lines and complexity to the code base.

It all ends up sending the cognitive complexity of understanding what a Java program does into another whole universe of mental difficulty.

It’s a real shame, because as I said the core Java language really isn’t too bad at all. And the core Java runtime environment is, by any objective measure, great: garbage-collected, platform-independent, with full support for preemptive multi-threading, and with a portable graphical user interface that (with a little programmer effort) manages to replicate the native look and feel on all three of Windows, Macintosh, and Linux.

But oh, those library antipatterns. They do so much to take away from the overall experience.

And We’re Back

Published at 17:06 on 22 May 2023

Ubuntu Linux package manager badly botched a routine upgrade and hosed my database. Thankfully I take routine backups. It just was a matter of time until I could perform the necessary restore.