The Arctic Outflow Event Is Over
Not really a surprise, as such things seldom tend to last much longer than a week, anyhow. It only took a few days of temperatures above freezing both night and day to dispatch the snow that fell.
What was a surprise was how it ended: mild air started invading Wednesday night, but very slowly. Still, by the wee hours of the morning temperatures had climbed well into the forties Fahrenheit. Then, the surprise: the arctic air reasserted itself. The slush refroze. The cold weather then lasted for two more days before the inevitable happened.
A Surprise Job Opportunity
Someone wants to interview me for a local tech job. The interview process is somewhat unusual and plays to one of my strengths (teaching people). But there’s also a host of potential mismatches between myself and the employer. Time will tell on this one.
GUI Programming Is a Real PITA
I always knew it was; that’s why I’ve not done much of it up to this point. But boy, is it slow and tedious. It literally takes days of reading documentation and slow experimentation to accomplish the simplest things.
Part of the issue is that what I’m trying to do is somewhat unusual: I’m displaying multiple text panes within a scrollable area, using an area that is dynamically created and updated. Most programs don’t dynamically generate windows (with varying numbers of components) in their GUI’s, and virtually all programs just put a single text pane inside a scrollable region, and they want that pane to automatically grow to be as large as the whole region.
And this is with the Java Swing library, which is well-known, stable, and well-documented. I couldn’t imagine how painful the process would be in the sketchily-documented, ever-changing native Apple GUI libraries. Thankfully, the unusual part of the application is now basically complete; what remains is much more conventional GUI programming.
Today’s high was 19˚F. In Seattle that would break a record. Here in Bellingham, it’s definitely much colder than normal, but the record is still significantly colder. We’re close to the mouth of the Fraser Canyon, and if the interior of British Columbia fills up with frigid air, it can spill through that canyon and hit us without having to pass over any salt water to moderate it.
The arrival of the arctic front was dramatic. My building shuddered as a sudden gust of northeasterly wind hit it. The falling snow changed from sloppy and wet to dry and powdery. Within a half-hour, any wet pavement surfaces that had not been treated had flash-frozen.
Tonight it is snowing and 14˚F. That’s cold enough to experience something rare on the West Coast: snow that squeaks when you walk on it. That’s a fairly common occurrence in a continental climate, but I never once experienced it in Seattle. Here, the cold snaps really are a taste of what winter is like in a continental climate.
But only a taste. Within about 24 hours, the wind will shift. When that happens, the arctic air will depart as quickly as it arrived. The ocean is right here, ready to supply mild air the moment the wind resumes its normal westerly to southwesterly direction. The departure of the cold snap will be as abrupt as its arrival was.
And that’s the way I want things to be. The past few days have been fun because they have been a departure from the norm. Were they the norm, these conditions would become tiresome and unpleasant. Winter would mean not a green thing in sight, and spring would mean waiting seemingly forever for all the snow that accumulated in winter to melt, and all the while it melted it would get increasingly dirty and drab.
The answer is “maybe, but it doesn’t really matter that much.”
As far as the first part of the answer goes, social media is full of people reposting old tweets where Trump accuses Obama of wanting to go to war against Iran for purposes of winning the 2012 elections. Given that Trump is nothing if not an immature, thin-skinned, gaslighter who projects his own faults on others, it is therefore a distinct possibility. Even Max Boot, a conservative who is normally extremely averse to such notions being suggested about U.S. militarism, retweeted a cartoon alleging this very thing.
Or it could just be Trump’s famous impulsiveness leading him to make a rash decision. Trump is as much an exemplar of that sort of behavior as he is of gaslighting, after all. After the U.S. “embassy”* there was attacked, all the mentions of “Benghazi” could well have provoked him into wanting to demonstrate that he’s not as weak as he believes Obama was.
Ultimately, however, it really doesn’t matter very much. Whether Trump blunders into a war he deliberately chose as part of a re-election strategy, or a war he never consciously chose as a result of a knee-jerk reaction, the consequences of a war with Iran would be equally tragic regardless of the cause.
* I put “embassy” in quotes because it’s not an embassy in the commonly-understood meaning of the term (a building in a national capitol that houses another nation’s diplomatic offices). It’s a military base over 100 acres in size and containing multiple buildings and other facilities.
Let’s dispense with humanitarian concerns and just talk about cold, hard, military strategy here.
It doesn’t matter that Trump commands what is clearly the world’s most powerful military. Well, that does matter, but it won’t matter from the point of winning any war against Iran: despite its military strength, the USA would clearly lose. This a function of a number of factors:
- Iran’s size and capability. Iran has 80 million people and one of the most capable militaries in the region. That’s way more people than Iraq has. Unlike Iraq on the eve of the US invasion, Iran hasn’t been weakened by decades of crippling sanctions. (And the USA came closer than many realize to losing the war in Iraq.)
- Distance, motivation, and local knowledge. Any war would be fought primarily in Iran. The USA would have to badly extend itself with long supply lines. Iran’s forces would be right there. In the USA, it would be a war fought half a world away, for questionable purposes, by an unpopular leader, and with significant domestic opposition. In Iran, it would be fought right there, for national survival. The Iranians would know their local terrain far better than the USA does.
- Goal asymmetry. In order to win, the USA must defeat and conquer Iran. In order for Iran to win, it must prevent the USA from defeating and conquering it; it is not necessary for Iran to defeat and conquer the USA in order to win.
It would be far harder for the USA to subdue and conquer Iran than it was for the British to subdue and conquer their 13 rebellious colonies in North America, and we all know how that attempt on Britain’s part went.
Why? They ram a document tree down your throat, that’s why. So you’re stuck writing code that:
- Consumes more memory, since you must load the entire document in memory at once, and
- Makes modifying the content tricky, since traversing a document tree you are modifying is a potential minefield. (The alternative is to create an entire new document tree from the old one, which doubles the already sometimes obscene memory footprint.), and
- Consumes more processor time, because multiple tree traversals are typically necessary.
Slow, bloated, error-prone: In a word, document trees just plain suck. Yes, sometimes they are necessary. That just means they should be a necessary alternative. They should never be the only way you can parse HTML.
Yet, with all too many HTML parsers, they are the only way. And that’s why so many HTML parsers suck.
Today, Boeing announced that they will “temporarily” stop production of the 737 Max.
Note that I put “temporarily” in quotes. I predicted last April that the only lasting fix for the 737 Max will involve the scrap aluminum recycling industry, and I am sticking by that prediction. It may take an ill-considered recertification of that aircraft, followed by the loss of more lives, to seal its fate, however.
The Root Cause
The root cause of the problem is that there’s a (relatively) new feature in image files from digital cameras which not all software supports. So an image can look just fine when you preview it (because that program supports the feature), yet when you upload it to the Web, suddenly it appears sideways (because many web browsers don’t)!
Modern cameras contain sensors that tell their on-board computers which way the camera is being held. When it captures an image, the camera records which way it was oriented (portrait or landscape) in the resulting file, but it always writes the image data itself in landscape (larger dimension horizontal) format.
It is considered the responsibility of any program that displays images to read the orientation information and use it to display the image properly, by rotating things if needed. Unfortunately, many web browsers in particular don’t read the orientation information; they simply assume that the horizontal dimension will always be horizontal (because, prior to the new feature, it was).
The workaround is to rotate the file if needed, so that the horizontal dimension of the image data is always the dimension that should display horizontally.
To do this, I use the free image-manipulation program GIMP. It can read the orientation information, and if it encounters a portrait-mode file, will always ask on reading it if it should be automatically rotated. Always answer no to this question! (This automatic rotation is the feature you want to get the image to display properly with without, after all.)
The result will, of course, be a file that displays sideways. Use the rotation options under the Image… Transform menu to fix the orientation. Then use File… Export As to re-save the result as a new file. The result will be a file that always displays correctly.
I may be wrong (and I hope I am), but I see absolutely no evidence that Labour will prevail in the coming general election in the UK. The polls show that Labour has lost ground compared to how they polled prior to the previous election.
Yes, the pollsters botched the prediction of that one, and badly. It is, however, reasonable to assume that they have learned from their mistakes and adjusted their techniques. Remember, Labour is polling slightly worse than in the previous election, and Labour still lost that previous election. (The surprise in 2017 was that Labour barely lost an election that it was expected to lose by a landslide.)
All in all, it really doesn’t look like Jeremy Corbyn will manage to pull a rabbit out of his hat this time.
Not much to report recently save the somewhat frustrating experience I had on Thanksgiving. I was visiting some old friends in Seattle, and one of them, who works as a hydrologist, was having no end of trouble analyzing a batch of huge data files. The root of her troubles was that the software she was using was attempting to load the entire file in memory before operating on it.
That was highly frustrating for me to observe, because:
- All indications are that it was probably unnecessary to load the entire file into memory (i.e. it was possible to process it on a record-by-record basis).
- If so, I could easily correct the above problem.
- That their lack of computer expertise is causing this one project to be adversely impacted indicates that it’s unlikely to be the only such project; odds are this is merely the tip of an iceberg.
- I don’t work there, therefore I am not allowed to address such problems.
- I’ve been unable to convince anyone who does work there and who has the authority to hire me (either as a contractor, or as an employee) to so much as meet with me.
Mind you, the original ouster of Evo Morales was a popular uprising, not a coup. The problem is, what’s happened since then is sounding more and more coup-like with each passing day. Particularly this (source here):
The IACHR decried as “grave” a decree from the Anez government exempting the armed forces from criminal responsibility as they preserve public order.
The rights group, an autonomous arm of the Organization of American States, said the effect of the decree could be to “stimulate violent repression.”
Just like I can think of no plausible excuse for Morales (or anyone else) to cling to power for term after term, I can think of no plausible excuse for a government placing parts of itself above the law when it comes to committing acts of violence against the people.
In fact, it’s even harder to think of any excuse for the latter. Clinging to power is merely the sort of egoism on the part of a leader that smooths the way to becoming a tyrant in the future. Giving the military a blank check to kill and maim basically is tyranny.