This Is Mostly Crap

Published at 22:02 on 1 June 2023

This is how a member of the center-right might want to see Florida politics, because it lets him play pin the blame on the liberals, but it really doesn’t explain what happened very well.

The Florida Democrats already tried the hardcore centrist strategy. In 2022, in fact. And we all know how well that worked out. Charlie Crist, their candidate for governor, had previously served as the Republican governor of Florida.

The Florida Democrats fail, not because they tack to the right or to the left, but simply because they are grossly incompetent as an organization.

I have told this story before, and I will now tell it again: I have done some volunteer work for the Florida Democrats. It entailed making get-out-the-vote calls. They gave me a spiel to use which had been invalidated by recent news stories. I contacted them for an updated spiel. They had none. I had to spend the first thirty minutes of my shift coming up with a spiel on my own. This is just about the absolute last thing you want your volunteers to do. You want to put out a unified, coherent message!

And it gets worse. The list they gave me was out of date as well. I called people who had already voted early or absentee. I called people exasperated because they had requested to be on the do not call list, some of them multiple times. This is very basic stuff. If someone tells you to stop calling them, you honor their request. You do not want to piss people off by continuing to call them!

Florida could be a competitive swing state today, as it once was not too long ago, were only the Florida Democrats capable of campaigning their way out of a wet paper bag.

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.

Unix, the Alarm System Call, and Power Management

Published at 20:37 on 25 April 2023

And by “Unix” I include Unix-like operating systems like Linux and MacOS. In fact, my experience is limited to Linux and MacOS in this regard, but I would be surprised if the various BSD and System V Unix systems out there with automatic power management differ much.

I have a simple alarm clock/reminder script I wrote in Python. The heart of it was the following logic:

def sleep_until(then):
    delta = then - time.time()
    if delta > 0.0:
        return True
    return False

Now, the time.sleep call in Python is implemented as a call to sleep in the C standard library, which in turn is implemented as via the alarm system call. All of these accept an offset in seconds, which in the former case specifies the amount of time to sleep, and in the latter the amount of time before an alarm signal is delivered to the process.

The logic above is simplicity itself, yet from time to time my reminders would come in late! Eventually, I linked it to those times when the system suspended itself due to lack of activity for a while; and my alerts were late by an amount that corresponded with the time the system was suspended. Apparently, when Unix and Unix-like systems suspend themselves, time as specified to alarm ceases to pass; that system call only counts seconds that transpire when the system is awake.

The cure is to break up the sleeping into chunks, and to repeatedly check the system clock:

MAX_SLEEP = 60.0
def sleep_until(then):
    delta = then - time.time()
    if delta <= 0.0:
        return False
    while delta > 0.0:
        time.sleep(min(MAX_SLEEP, delta))
        delta = then - time.time()
    return True

At least, this seems to work. I implemented the change yesterday and alerts that spanned times when my computer was asleep got raised at the correct time. It’s a little ugly to replace a blocking with busy-waiting like this, but although the above logic busy-waits, it still spends most of its time blocked.

Note that this seems to affect other programs as well. In fact, one of my motives for writing this script was the frequent failure of the Gnome clock app to issue alarms at the proper time.

Note also that this assumes the computer will be in an awake state at the time the alert is scheduled. If the computer goes to sleep and stays asleep, it will issue no alerts during the time it is asleep. Remedying this state of affairs requires privileged system calls that one must be careful making. I decided that the safety of having a nonprivileged program was worth the slight chance of a missed alert; in my case, the problem almost always happens as a result of a system suspending itself on lunch break, with the alert time being while I am at my desk in the afternoon.

Halide Review

Published at 07:04 on 24 April 2023

It’s six weeks since I spent the money and decide to give Halide a whirl. It actually exceeds expectations. The manual focus feature it offers is still not as good as a traditional viewfinder and focus ring, but together with the focus peaking feature it’s pretty darn good. All of the close-ups in this gallery were taken with Halide.

iPhone plus Halide has basically become my camera of choice when I do not want to take (or simply do not have) my micro four-thirds outfit with me. It’s definitely a more capable close-up photography tool than a standard compact digicam.

Where the Rust Language Makes Sense

Published at 19:48 on 19 April 2023

Per this, I think Rust makes the most sense for things you would have otherwise written in C or C++. It is a more modern, relatively low-level, language than either of these two (and is much cleaner than C++, which was an attempt to add all sorts of extra features onto C, and which suffered as a result of having to be a proper superset of that earlier language).

If you were not going to write it in C/C++, in other words if computing resource limitations are not a constraining factor, then writing it in Rust just doesn’t make sense. Use some other programming language with automatic garbage collection, so you don’t have to worry so much about memory management.

Which means, that for other than embedded systems, it is generally stupid to use Rust from the ground up. Use a higher-level language like Python. If the higher-level language proves too slow or too memory-inefficient, do some profiling, find the weak links in the chain, and rewrite those in Rust instead of rewriting them in C/C++. There’s already libraries out there to facilitate doing the latter.

And that is why I can’t feel much love for Rust: because I am right now not running up against any resource constraints that make Python, Java, or Kotlin impractical.

Trump’s Ace in the Hole

Published at 21:46 on 3 April 2023

Trump has far better chances of winning in 2024 than some informed observers seem to think.

It all rests on what the group No Labels does. They have been rightly castigated as being mostly a benefit to Trump, and boy could they ever.

You see, despite how the media loves to fawn over them as the rational and reasonable ones, centrists have a really seamy and dare I say even militant underside. They know what they want, they want it really bad, and they will act on those wants, even to the ultimate detriment of their preferences.

It is exactly the same criticism often made of the Left, but it applies to centrists even more. Those of us on the left are at least constantly being lectured to about the dangers of refusing to compromise. But the same chattering classes that never tire of sermonizing the Left tend to see the Center as intrinsically “responsible.”

Witness what happened to Humphrey in 1968 (lost votes on the left) and McGovern in 1972 (lost votes in the center). There’s no shortage of voices blaming Humphrey’s lost on voters to the left sitting it out. By contrast, when it comes to McGovern those same voices… blame left/liberal voters for having selected McGovern in the first place! In other words: if you don’t support our preferred candidate, it’s all your fault, and if we don’t support your preferred candidate, it’s also all your fault.

Many centrists are so beset with feelings of entitlement, and so coddled and pandered to by the media, that they are largely shielded from being confronted with the downsides of their own political behavior. And many of them to this day have trouble seeing their hypocrisy.

It is in this light that the seriousness of a threat by a centrist No Labels candidate can fully be seen.

To the above you can add that Republicans tend to be more extreme and inflexible in general, meaning it will be much easier for a centrist to peel votes away from the Democrats. No Labels itself is aware of this; here is one of their initial projection maps showing how they hoped to win. Note how most of the states they think they can flip went for Biden in the last election:

They probably won’t do that well, of course. All it would take is them failing to flip Texas and Florida and boom! Second Trump term.

Why the Indictment Matters… and Why It Does Not

Published at 08:45 on 31 March 2023

It matters because it breaks the precedent that presidents and ex-presidents are above the law.

It does not matter because of the seriousness of the charges. The particular charges of the indictment are still not known, but all sources claim they have to do with a fraudulent payment of hush money to keep Stormy Daniels silent about an affair she had five or more years ago now. An affair is really not a major political scandal (despite how much Republicans wish it was when Clinton was caught having one).

But the precedent is now broken. That having been done so, it becomes more likely that indictments might be filed over inciting the January 6th putsch and/or the attempted corrupting of the vote tabulating process in Georgia. Both of those, by contrast, are truly serious charges; they relate to acts that are direct attacks on democracy.

If other, more serious charges are not fired, it will be as Judge Luttig has said: a great disservice to democracy and to the rule of law.

And there is still a lot of moral rot in the system. I may have been wrong about Trump not being indicted for anything, but I am not wrong about that general observation. That there still is, is evidenced by a more serious indictment being a sufficiently unsure thing that Luttig is openly worrying that it might not happen. Luttig is a lifelong conservative. It is not personally convenient for him to come to the conclusions he has. It is much more convenient for a conservative to conclude that our existing institutions, representing the wisdom of tested experience, are functioning relatively well.

And Luttig is hardly the only conservative running around saying how alarming Trumpism is. There are enough of them, in fact, that a special term has arisen to refer to such individuals: never-Trump conservatives. It has long been a key insight of mine that when there is a significant group of individuals asserting something they are ideologically inconvenienced by, that something is almost certainly a relevant political fact that should be paid serious attention to.