Looks Like Many Centrists Get It

Published at 22:52 on 15 June 2023

I worried earlier about the threat of petulant centrists helping elect Trump in 2024. Now, this is still a worry (No Labels is still around, after all), but it seems that many other centrists are being realistic about things and appreciate how truly dangerous No Labels really is. Take the canonical centrist Democrat group Third Way, for example. Fully three of the four articles currently featured above the fold on their main page are about the dangers of No Labels.

Which, to reiterate, is definitely good news, but then again No Labels is still around, which is not-so-good news.

And Now, Federal Charges

Published at 20:17 on 8 June 2023

Time to reiterate a few points I made earlier in the wake of the New York indictment:

  • This is still not one of the two most serious things Trump did, crimes that strike at the heart of political democracy, and which therefore are the most critical things to indict Trump over. Yes, mishandling so many classified documents (willingly and deliberately, and then trying to cover it up) is more serious than trying to cover up some hush money payments to a porn star. But it is still not as serious as attempting to tamper with vote counting in Georgia or inciting a fascist putsch at the Capitol, not by a long shot.
  • The pending indictment breaks another precedent. An ex-president will soon be indicted over Federal charges. This proves that the Department of Justice is not pulling levers behind the scenes to protect Trump. Well, not quite: I am sure they are still pulling levers behind the scenes, but not enough to completely protect Trump.
  • They would, in other words, have indicted anyone other than an ex-president far sooner, over far less convincing evidence.
  • Moreover, the broken precedents makes it more likely that another indictment over what happened on 6 January 2021 will come eventually.

What this all means is that when it comes to a trial, they are highly likely to convict, because they have already done Trump the favor of being double super sure that the case against him is ironclad.

And then what? Most likely, house arrest. Sorry, Nice Liberals: the system is not very likely to lock up someone that powerful in a normal prison. Plus, house arrest neatly solves the problem of Secret Service protection, to which all ex-presidents are entitled under the law. It will probably become part of their mission to supervise the conditions of his house arrest, perhaps in conjunction with Federal marshals.

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:
        time.sleep(delta)
        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.