Trump apologists are lying to you

Prominent Republicans, whether they’re Trump supporters, apologists, or announced candidates for the Republican nomination are speaking out against Tuesday’s indictment of former President Trump. In doing so, they’re deliberately missing the point, trying to couch it as a First Amendment issue, or saying things like, “If Trump is guilty of incitement for the Jan 6 riot, then Schumer and Sanders should be held accountable for incidents, too.” See, for example, Scott Walker’s comments. Or Marco Rubio’s tweet:

“Apparently it is now a crime to make statements challenging election results if a prosecutor decides those statements aren’t true.

“So when should we expect indictments of the democrat politicians who falsely claimed Russia hacked the 2016 election?”

I have two points to make.

First, not one of the four charges in the indictment has anything to do with incitement to riot or violence of any kind. The argument made by Scott Walker and others of his ilk is a red herring. Whether Trump, Schumer, or Sanders is guilty of incitement or similar is a separate issue that should not be conflated with the subject of this indictment.

Second, this is not a First Amendment issue. Item 3 in the introduction to the indictment (the second page) says:

“The Defendant had a right, like every American, to speak publicly about the election and even to claim, falsely, that there had been outcome-determinative fraud during the election and that he had won. He was also entitled to formally challenge the results of the election through lawful and appropriate means, such as by seeking recounts or audits of the popular vote in states or filing lawsuits challenging ballots and procedures. Indeed, in many cases, the Defendant did pursue these methods of contesting the election results. His efforts to change the outcome in any state through recounts, audits, or legal challenges were uniformly unsuccessful.”

If you read the indictment (and if you’re forming an opinion on it without first reading it, how can you have any confidence that your opinion is at all realistic?), you’ll see that the charges are for conspiracy, obstructing and impeding an official proceeding, and interfering with citizens’ right to vote and to have their votes counted. Specifically:

Count 1: From on or about November 14, 2020, through on or about January 20, 2021, in the District of Columbia and elsewhere, the Defendant, DONALD J. TRUMP, did knowingly combine, conspire, confederate, and agree with co-conspirators, known and unknown to the Grand Jury, to defraud the United States by using dishonesty, fraud, and deceit to impair, obstruct, and defeat the lawful federal government function by which the results of the presidential election are collected, counted, and certified by the federal government.

Count 2: From on or about November 14, 2020, through on or about January 7, 2021, in the District of Columbia and elsewhere, the Defendant, DONALD J. TRUMP, did knowingly combine, conspire, confederate, and agree with co-conspirators, known and unknown to the Grand Jury, to corruptly obstruct and impede an official proceeding, that is, the certification of the electoral vote, in violation of Title 18, United States Code, Section 1512(c)(2)

Count 3: From on or about November 14, 2020, through on or about January 7, 2021, in the District of Columbia and elsewhere, the Defendant, DONALD J. TRUMP, attempted to, and did, corruptly obstruct and impede an official proceeding, that is, the certification of the electoral vote.

Count 4: From on or about November 14, 2020, through on or about January 20, 2021, in the District of Columbia and elsewhere, the Defendant, DONALD J . TRUMP, did knowingly combine, conspire, confederate, and agree with co-conspirators, known and unknown to the Grand Jury, to injure, oppress, threaten, and intimidate one or more persons in the free exercise and enjoyment of a right and privilege secured to them by the Constitution and laws of the United States—that is, the right to vote, and to have one’s vote counted.

The indictment clearly lays out evidence of those conspiracies, detailing how the defendant was instrumental in organizing and putting in place an illegal scheme to create fraudulent electors in an attempt to change the election result in his favor. An election that he knew, as shown by his own words, that he had lost. This indictment is not about the President lying. No, this indictment is about the President’s participation in a conspiracy to overthrow the U.S. government using lies, false accusations, and intimidation to enlist others and justify his illegal actions.

The key point here is that the President of the United States attempted to seize power for himself after losing an election that he knew full well was free and fair. Anybody who calls himself a patriot, who believes in the rule of law and the principles on which this country was founded, should be demanding that he stand trial and, if convicted, be imprisoned. Donald Trump, in his attempt to retain power after losing the election, acted like any other thug ruler in history. He does not deserve your, or anybody’s, support.

Initial thoughts on Trump indictment #3

I spent a large part of the day reading the latest indictment of Donald Trump, this one for his role in the fake electors scheme following the 2020 election, and then letting it marinate in my brain for a while. These are initial thoughts, subject to revision after another reading and more cogitation.

Donald Trump, while President of the United States, used his band of paid intimidators (Elite Strike Force Legal Team) in an attempt to convince or coerce ordinary citizens, state officials, state legislators, federal government officials, and even the Vice President of the United States to fraudulently overturn the results of an election. An election result that, by his own admission, he knew was legitimate. In almost every case, those whom he attempted to enlist in his fraudulent scheme refused, often incurring the President’s wrath. The President fired some and publicly called out others, resulting in many of them receiving death threats and other abuse from Trump’s supporters.

I find it quite interesting that the indictment focuses almost exclusively on Trump’s words: opinions he expressed. You can expect sympathetic individuals to latch onto that and make a big deal of it, especially in light of Monday’s court ruling that, read broadly, essentially says that the President’s words, even if they’re knowingly false statements intended to deceive, are protected by Presidential immunity. But the ruling does not assert blanket immunity. Judge Erdos, who issued the ruling, said:

Other legal proceedings may examine the propriety of his statements and actions while he was the President and whether, as the plaintiffs in this and other cases contend, it was this conduct which served as the actual threat to our democracy. But this case is not the proper place to do so. Here, Trump is entitled to Presidential immunity.

In my opinion, Jack Smith would not have issued the indictment on Tuesday if all he had was Donald Trump’s words. The almost complete absence in the indictment of evidence showing or even hinting at Trump explicitly directing his subordinates or hired thugs to break the law is a red herring. I suspect Jack Smith is holding that back for now and will dribble it out as necessary. I think if he didn’t have clear evidence of Donald Trump breaking the law or directing others to break the law, he would not have released this indictment.

In my mind, there are two separate issues here. The key issue, of course, and the only one relevant to the legal proceedings is whether Donald Trump broke the law. That’s something we won’t know until trial. The second issue, and the one that’s more important in my mind, is whether Donald Trump’s statements and behavior described in the indictment are true. A trial could very well reveal that, as the indictment alleges, Trump knowingly lied in order to retain his office. And yet the jury could find him not guilty of committing a crime.

Imagine that were to happen. Would people still support him? Despite knowing that Donald Trump is, as I have maintained, a liar, cheat, grifter, con man, etc. who consistently made false statements about non-existent election irregularities, made knowingly false accusations of misconduct against innocent Americans, tried to convince his subordinates and personal staff to fraudulently overturn an election result, ultimately culminating in a riot on January 6, 2021 by those who believed his lies. All while standing behind his alleged “immunity,” knowing that if his scheme failed, somebody else would take the fall for it.

I think every American, even those who would support Trump, should read that indictment and subject their beliefs to some serious consideration. I find it inconceivable that the breadth of evidence revealed in that indictment could be fabricated, that every witness who testified could be convinced to lie under oath. I hope that any honest thinking person, regardless of how dedicated they are to the fraud that is Donald J. Trump, would come away with some serious questions about the former president. Regardless of your political beliefs, is that really the kind of person you want at the head of our government?

Re-thinking the retry

(Originally posted October 30, 2018)

A common pattern used when communicating with external services is to retry a call that fails. Stripped of bells and whistles, the typical retry loop looks like this:

    result = makeServiceCall(parameters)
    numRetries = 0
    while !result.success && numRetries < MAX_RETRIES
        // insert delay before retry
        ++numRetries
        result = makeServiceCall(parameters)
    end while

    if (!result.success)
        // Raise error. 

We can quibble about the specific implementation, but the general idea is the same: make multiple attempts to get a success response from the service, inserting a delay between calls. The delay can be a fixed amount of time, an exponential fallback with jitter, etc., and you can include all kinds of other logic to improve things, but it all boils down to essentially the same thing.

Under normal circumstances, of course, service calls don’t fail, and this logic works very well. But if the service call failure rate increases, some very bad things can happen.

Imagine a critical service for which you have a contract (a service level agreement, or SLA) that guarantees an average 10 ms response time for up to 1,000 transactions per second (TPS). Remember, though, that this is a shared service. There are many other clients who have similar contracts: 10 ms response time for X TPS. Your application calls that service perhaps 900 times per second, on average. There will be brief periods when your call rate will exceed 1,000 TPS, but that’s okay because the service is scaled to handle large amounts of traffic from many clients. Say the service can guarantee that 10 ms response time for a total of 1,000,000 TPS from all of its clients, combined. Short-term bursts of excess traffic from a few clients aren’t a problem.

Even if calls to the service exceed 1,000,000 TPS, the likely result at first will be increased response time: perhaps latency increases by 50% with a sustained traffic increase of 10%, and doubles when traffic is 20% above the configured maximum. The specific breaking point differs for every service, but in general latency increases non-linearly with the call rate.

Clients, of course, won’t wait forever for a response. They typically configure a timeout (often two or three times the SLA), and consider the call a failure if it takes longer than that. Not a problem with this retry logic: just delay a bit and try again.

As I said above, this kind of thing works fine under normal conditions. But in a large system, lots of things can go wrong.

Imagine what would happen if the service starts getting 1,500,000 requests per second: a sustained 50% increase in traffic. Or one of the service’s dependencies can’t meet its SLA. Or network congestion increases the error rate. Whatever the cause, the service’s failure rate increases, or latency increases beyond the timeout value set by clients. Whatever the cause of the service’s distress, your application blindly responds by sending another request. So if your MAX_RETRIES value is two, then you’ve effectively tripled the number of calls you make to the service.

The last thing a service under distress needs is more requests. Even if your application is not experiencing increased traffic, your retries still have a negative effect on the service.

Some argue that services should protect themselves from such traffic storms. And many do. But that protection isn’t free. There comes a point when the service is spending so much time telling clients to go away that it can’t spend any time clearing its queue. Not that clearing the queue is much help. Even after the initial problem is fixed, the service is swamped with requests from all those clients who keep blindly retrying. It’s a positive feedback loop that won’t clear until the clients stop calling.

The retry loop above might improve your application’s reliability in normal operation. I say “might” because most applications I’ve encountered don’t actually track the number of retries, so they have no idea if the retry logic even works. I’ve seen the following in production code:

  1. A retry loop that always made the maximum number of retries, even if the initial call succeeded.
  2. Retry logic that never retried. That code was in production for two years before anybody realized there was a problem. Why? Because the service had never failed before.
  3. Retry logic that actually did the retries but then returned the result of the first call.
  4. Infinite retry. When a non-critical service went down one day, the entire site became inoperable.

As bad as it is that many programmers apparently don’t test their retry logic, even fewer monitor it. In all the applications I’ve seen with retry logic, only a handful can tell me how effective it is. If you want to know whether your retry logic is working, you have to log:

  • The number of initial calls to the service.
  • The number of initial call failures.
  • The total number of calls to the service (including retries).
  • The number of call successes (including success after retry).

From those numbers, you can determine the effectiveness of the retry logic. In my experience, the percentage of initial call failures to any service under normal operation is less than 1%, and retry succeeds in fewer than 50% of those cases. When a service is under distress and the initial failure percentage gets above about 10%, retry is almost never successful. The reason, I think, is that whatever condition caused the outage hasn’t cleared before the last retry: service outages last longer than clients are willing to wait.

For the majority of applications I’ve encountered, retry is rarely worth the effort it takes to design, implement, debug, test, and monitor. Under normal circumstances it’s almost irrelevant, maybe making the difference between 99% and 99.5% success rate. In unusual circumstances, it increases the load on the underlying service, and almost never results in a successful call. It’s a small win where it doesn’t matter, and a huge liability when it does matter.

If you have existing retry logic in your code, I encourage you to monitor its effectiveness. If, like me, you discover that it rarely provides benefit, I suggest you remove it.

If you’re considering adding retry logic to your code, be sure to consider the potential consequences. And add the monitoring up front.

Rock Me Baby, ’til My Feet Come Off

Very early in our relationship, Debra and I got silly one night and were making fun of country music. I don’t know what prompted it but at some point I came up with a song title: “Rock Me Baby, ’til My Feet Come Off.” We couldn’t stop laughing. I know, it was one of those, “you had to be there” moments.

That was 30 years ago and I still think that somebody should come up with lyrics. It could be a hit!

I’ve been poking at Microsoft’s Bing Chat (powered by ChatGPT) and Google’s Bard recently, so I thought I’d see what they can do with that title. My prompt to each one was ‘write lyrics for a country song called “Rock Me Baby, ’til My Feet Come Off“.

Bing Chat

Here’s a country song called “Rock Me Baby, ’til My Feet Come Off”:

Verse 1: I’ve been working all day long My feet are tired and my back is sore I need someone to take me home And rock me baby, ’til my feet come off

Chorus: Rock me baby, ’til my feet come off Hold me tight and never let me go Rock me baby, ’til my feet come off And I’ll love you more than you’ll ever know

Verse 2: I’ve been waiting for this moment To hold you close and feel your love I need someone to take me home And rock me baby, ’til my feet come off

Chorus: Rock me baby, ’til my feet come off Hold me tight and never let me go Rock me baby, ’til my feet come off And I’ll love you more than you’ll ever know

Bridge: I don’t need no fancy things Just your love is all I need So come on baby, take my hand And rock me baby, ’til my feet come off

Chorus: Rock me baby, ’til my feet come off Hold me tight and never let me go Rock me baby, ’til my feet come off And I’ll love you more than you’ll ever know

Outro: Rock me baby, ’til my feet come off Rock me baby, ’til my feet come off.

Google Bard


(Verse 1) Rock me baby, ’til my feet come off
I’m so tired, I can’t stand no more
I’ve been working all day, and I’m beat
Just rock me baby, and make me feel complete

(Chorus) Rock me baby, ’til my feet come off
I’m so tired, I can’t sleep at night
I just lay there and toss and turn
And dream of being rocked in your arms

(Verse 2) Rock me baby, ’til my troubles are gone
I’m so worried, I can’t catch my breath
I’ve got a lot on my mind, and I don’t know what to do
Just rock me baby, and make all my troubles new

(Chorus) Rock me baby, ’til my feet come off
I’m so tired, I can’t sleep at night
I just lay there and toss and turn
And dream of being rocked in your arms

(Bridge) Rock me baby, ’til I can’t feel my bones
I’m so worn out, I’m just about gone
But I know that if you rock me long enough
I’ll be all better, and I’ll be able to go on

(Chorus) Rock me baby, ’til my feet come off
I’m so tired, I can’t sleep at night
I just lay there and toss and turn
And dream of being rocked in your arms

(Outro) Rock me baby, ’til the morning light
I’m so tired, I can’t see the night
Just rock me baby, and make me feel all right
I’ll be your baby, and you’ll be my knight

Well of course they’re terrible. But then, it’s country music.

I don’t think music writers have anything to worry about quite yet . . .

No, AI won’t take your job

I can’t tell how serious writers and actors are about their concerns with AI. They’re asking for some unspecified safeguards on the use of AI, or regulations, or something. In general, some language to assure them that their jobs will not be taken over by “AI.”

I think it’s ridiculous, but perhaps I’m attributing to the writers and actors things that have been overblown by the media or by the general public’s hysterical reaction to anything that somebody calls “AI.” Or algorithms in general. As far as all too many people are concerned, any “algorithm” is automatically evil and out to do us harm.

I base my ridicule on three things. First, people have been protesting new technology since the dawn of new technology. Two hundred years ago, the original Luddites destroyed equipment in textile mills in protest of automation, but they weren’t the first to protest automation. Strangely enough, the machines didn’t put them out of work. And yet protests against automation were common throughout the industrial revolution and continue to this day. Computers, for example, were going to put armies of clerical workers out of a job. But now, 70 years into the computer revolution, there are more clerical jobs than ever. There are cases in which automation has made certain jobs irrelevant, but it doesn’t happen overnight. And there continues to be need of the replaced skill for some time.

Second, the idea of artificial intelligence replacing a journalist, screenwriter, actor, programmer, or any other skilled human is laughable. As I’ve mentioned before, ChatGPT (which I think is what has gotten everybody up in arms) and similar tools are just mimics: they rearrange words in a blender and spit them out semi-randomly, following rules that dictate the form, but with no regard to substance. And that’s just regurgitating stuff that’s already known. Attempts at AI creativity–having the computer create something novel–are comically terrible. The idea of a generative AI replacing a human writer just isn’t realistic. Certainly not within my lifetime, and likely not within the lifetime of anybody born today.

Third, if somebody does develop an AI that can produce objectively better news stories, movie scripts, novels, acting performances, computer programs, etc. than a human, then more power to them! As long as I’m informed or entertained, I don’t particularly care who or what created the article or the performance. We all benefit from better expression of ideas, and those whose skills are better performed by artificial intelligence will either find something else to do that is not yet AI-dominated, or will be able to peddle their skills in a smaller and often more lucrative market. For certain, any actor who’s pushed out of the big studios by this future fanciful AI will have plenty of opportunity in smaller studios that can’t afford or don’t want to use AI technologies.

Yes, there is some justifiable concern that studios will use currently available techniques, and new techniques going forward, to unscrupulously manipulate an actor’s voice, image, or performance to say things that the actor never intended or agreed to. We’ve all seen those agreements that allow the companies to use our likeness in any way, shape, or form, in perpetuity. Those types of clauses should have been eliminated from contracts decades ago, and I support those who are trying to address that situation now. But beyond that, the fears about AI replacing skilled workers, especially skilled creatives, are unfounded.

Credit scoring is a scam

I do a quick check of my credit score approximately on a monthly basis. I’m not sure exactly why I do that, considering that I’m comfortable financially, my life is pretty much the same it’s been for some time, and I don’t foresee any major changes.

I have one credit card, and a five year auto loan that has about a year and a half left. That is the extent of my outstanding credit. My monthly purchases on the credit card fall within a very narrow range and I pay it off every month. The auto loan is current and I’ve never been late with a payment.

Given the above, one would expect my credit score to remain the same, with a few minor fluctuations on a month-to-month basis depending on how much I charge on my credit card. And it does, mostly. But in the last month my credit score dropped 32 points (almost 4%), and I have no idea why. There have been no recent inquiries, no new accounts, no missed or late payments, and the outstanding credit card balance is within the normal range of what I charge on a monthly basis. In short, nothing has changed.

At least, nothing on my side of the equation has changed. Whether something has changed in the way the Vantage credit score is computed is an open question. It’s an open question because only the people computing the credit score know how it works. We’re being graded on hidden criteria. The scoring system is proprietary. Most of us who are affected by it have no way of knowing how our scores are computed or how our individual financial decisions will affect that score. And yet, credit score is a huge determining factor in one’s ability to get a good rate on a house or car loan–or to obtain a loan at all.

Sure, we know some general rules: don’t have “too much” available credit or use “too much” of it. Don’t have “too many” inquiries or open “too many” new accounts. But be sure to have “enough” available credit and be sure to use “the right percentage” of it to show that you know how to handle the responsibility. And be sure to have a first mortgage because that shows your ability and willingness to handle long-term credit commitments.

You paid off your home mortgage? Shame on you! We’re gonna subtract points because “you don’t have enough experience with a first mortgage.” That’s right, paying that 30-year loan off in 20 years is a bad thing.

There are general guidelines (Vantage, for example, says that I should have at least $50,000 in available credit and using up to 10% of it is “Excellent”, which is ridiculous), but there’s no hard detail that says exactly what the grading criteria are and how they interact. As far as consumers are concerned, a bunch of numbers go into a black box and the MagicScore™ comes out. We don’t get to know how it all works, and apparently we’re not even told if the innards change and suddenly we’re being graded completely differently.

In a just world, we’d at least know how the score used to decide whether we get a loan, and at what rate, is computed. I realize that credit score isn’t the only determining factor, but it can be a deal killer (i.e. everything else looks good, but the MagicScore™ is off).

I’ve long held that credit scoring, as currently practiced in the United States, is essentially arbitrary. Incidents like my score’s recent drop, with no indication of why it dropped, strengthens that perception. The companies that market the scoring systems (Vantage is a joint effort of the three major credit bureaus, FICO is a product of the Fair Isaac Corporation) and the financial institutions that use them, seem to have absolutely no desire or incentive to tell us how the scoring works. And consumers have nowhere else to go: buy into the credit score scam or go visit Guido.

Good riddance to rubbish writing

In Gen Z never learned cursive. The effects of this are more widespread than you think (which references an October 2022 Atlantic article, Gen Z Never Learned To Read Cursive), the author describes the potential effects of discontinuing cursive writing instruction. In truth, the first article mentioned just expands a bit on one or two of the points made in the Atlantic article.

A note before I continue. Cursive is actually any form of connected writing. What most Americans refer to as “cursive” is the Palmer Method script that was introduced in the early 20th century, that most of us learned to fear and loathe, and many of us (myself included) can’t write legibly today. In the text below, I use “cursive” to mean that Palmer Method and its variants.

The Palmer Method, by the way, is a refinement of the Spencerian Method of writing that was introduced in the 1840s. Both are teaching a method of writing that’s optimized for 17th century pens. A primary consideration is keeping the pen on the paper because every time the pen was lifted and then placed back onto the paper, the ink tended to blot. These methods go to sometimes absurd lengths to keep the pen on the paper, even when doing so is less than optimum. The introduction of the inexpensive mass-produced ball point pen eliminated the ink blotting problem and thus the necessity to always keep the pen on the paper. But the script lives on.

The big complaint about no longer teaching cursive is that “the past is presented to us indirectly.” That is, because historical documents are written in script that students aren’t taught to read and write, they have to depend on transcription if they want to read the documents. There’s also some complaint that kids won’t be able to read letters from grandma.

And it’s true: without instruction and practice, cursive writing is difficult or impossible to read. Fortunately, it takes about a week to learn how to read it. Maybe a bit of practice after that, but if a child knows how to read block printing, learning to read the cursive script that’s been the mainstay of elementary writing instruction for a century is very easy.

In addition, the cursive script that’s been taught since the early 1900s isn’t even the same script that was used in our founding documents. The Declaration of Independence, perhaps the most oft-cited historical document cited in this argument, was written in Round hand, a script that originated in England in the 17th century. Learning to read modern cursive writing certainly helps in reading that document, but it still requires a bit more puzzling out.

Point is, the important historical documents all have been rendered in a typewritten font. There’s little or nothing to be gained for most people in reading the originals. There’s the incredibly weak argument that scholars will have to be taught cursive like they’re taught Elizabethan, Medieval, or ancient Cuneiform script. My response is, “duh.” Digging deeply into the past requires specialized skills. The ability to read cursive today is just a little bit more important than knowing how to hitch a horse to a buggy.

The “past is presented indirectly” argument for learning cursive writing just doesn’t fly. It’s as relevant to day-to-day life as the idiotic argument that those who can’t drive a car with manual transmission are somehow not “real” drivers. Ranks right up there with the, “when I was a boy, we had to trudge through three feet of snow, in the dark, uphill both ways to use the bathroom” stories we laugh about.

To be fair, there are benefits of learning cursive. First, it’s much faster than block printing, and there is that ability to read letters from grandma. It helps in developing fine motor skills, and studies show that students with dyslexia find learning cursive helps with the decoding process. However, people with dysgraphia are hindered by being forced to write in cursive.

Although I haven’t had to depend on my ability to write in cursive for at least 40 years, I do agree that many people must be able to write legibly and more quickly than they can with just block printing. But we should be teaching kids a different method. There are other connected writing systems that are easier to learn, faster, and easier to write legibly than the antiquated loopy Palmer Method that was designed 100 years ago for writing with a quill pen: a technology that was obsolete before the Palmer Method was introduced. (The ball point pen was invented in the 1880s.) For example, Getty-Dubay Italic, introduced in 1976, is much easier to read and write, and doesn’t require the loops and other forms that were necessary in older scripts to prevent the ink from blotting. There are other, similar, writing styles that are optimized for today’s writing instruments.

Whether those newer methods carry with them the benefits of developing fine motor skills and assistance to dyslexic students is an open question. I think it likely. I also suspect that it would have less of a negative impact on those with dysgraphia because the letter forms are so similar to the printed letter forms. As for letters from grandma, that’s becoming irrelevant, too. At 62, I’m older than a lot of grandmas and I’ll tell you from experience that a lot of them write cursive as well and as often as I do: illegibly and almost never. Letters from grandma that are written in cursive will pretty much cease to exist in my lifetime.

It’s true that trying to write those modern scripts using a 17th century quill pen would be as disastrous as taking a horse and buggy on an Interstate highway. Sometimes you have to discard old things and embrace the unquestionable benefits of new technology. Unless you like having to check for black widow spiders after trudging through the snow to the outhouse.

Translation difficulties

I get it: translation is hard. Heck, I’m a reasonably bright native English speaker and often have difficulty translating my own thoughts into understandable English.

This is a message that was posted in a woodcarving group:

“Hello, I am writing a message to help my father. And I see myself. Only on the American or Canadian woodcarving site and no response. It’s just for the books. And politeness. It’s when it’s repetitive that it’s not funny. But you how many millions to be connected. I find that very embarrassing. Administrators must take their jobs seriously. I have already reported them, I pass the imfermire contest as if I was going to sew up a person at any time, have a nice day everyone.”

The author’s native language is, I think, Italian. Or perhaps French. I suspect not an English speaker, although it’s possible that his grasp of English is better than my grasp of his native language. I cannot tell if the message is the result of automatic translation, or if the author did the translation himself with the help of a Italian-to-English dictionary. Either way, I cannot make any sense of it.

Which is weird. I’ve seen bad translations before. But usually I can get the gist of a message that’s been automatically translated: a “hook” that gives me a broad idea, and from there puzzle out a few details. For example, the word “imfermire” in the above text looked promising. It looks like a misspelling of the Italian word “infermiere,” meaning “nurse.” The best I can guess is that the author is having trouble getting some woodcarving books for his father. Not sure where the nurse comes in.

The author’s responses to comments provide no useful information. Which isn’t too much of a surprise. I imagine he has to translate the question, then write and translate a response. The combined errors inherent in that process aren’t conducive to understanding. Automatic translation software is especially bad at round-tripping because errors accumulate very quickly.

Can the technology that powers the new crop of generative AIs be put to good use in the automatic translation space? I imagine feeding an Italian-to-English translation to a tool that can leverage its knowledge of translation errors and spit out a short and meaningful summary. Is such a tool within our grasp?

Ask an AI: whittling or wood carving?

A friend of mine asked a generative AI (Nova: Powered by ChatGPT & GPT 3.5 Turbo) about the difference between whittling and wood carving. This is the response she got:

Wood carving and whittling have been practised for thousands of years, dating back to ancient civilizations such as the Egyptians and Greeks. The early humans used wood carving to make various objects like weapons, tools, utensils, and figurines.

It is believed that the practice of carving wood began as an extension of the use of stone tools, as people realized that wood was a more versatile material than stone. Over time, wood carving became a widely practiced art form, with artisans developing diverse styles and techniques.

Whittling, on the other hand, is a type of wood carving that involves using a knife to remove a small amount of wood from a larger piece. It is believed to have originated in Europe during the Middle Ages, where it was primarily used to make simple household objects like wooden spoons, bowls, and cups.

Whittling gained popularity in the United States during the 18th and 19th centuries, when it became a popular hobby for colonists and pioneers. Today, wood carving and whittling remain popular artistic expressions, and practitioners continue to develop new styles, techniques, and forms.

This reminds me of something a not-very-bright fourth grader would turn in after consulting the encyclopedia and visiting the local branch library. Bad paraphrasing of randomly selected factual (or maybe not) statements strung together into paragraphs that are tenuously cohesive and sometimes self-contradictory. With a little fluff thrown in to show that it really was the student’s work. The student would receive a “C” for such work if the teacher were especially kind and impressed with the diligent research, good spelling (although there’s that curious use of “practised” rather than “practiced”), and penmanship.

That said, the article does answer the question: whittling is a type of wood carving. The rest of the article is mostly gibberish, sprinkled as it is with unsupported factual statements, uninformed speculation, and known falsehoods. But whittling really is a type of wood carving.

Exactly what constitutes whittling is an open question. Merriam-Webster defines “whittle” as a transitive verb:

1a. to pare or cut off chips from the surface of (wood) with a knife
1b. to shape or form by so paring or cutting
2.  to reduce, remove, or destroy gradually as if by cutting off bits with a knife

By that definition, whittling is wood carving done with a knife. If you are carving wood with a knife, you are whittling. According to the dictionary. But that definition is not universally accepted. If you ask five wood carvers the difference, you’re going to get at least five answers. In my experience, most of those answers are of the “I know it when I see it” variety. Some say that it has to do with the level of planning involved. But everybody’s line is set differently. To some, anything more complex than a sharpened stick is “carving.” To others, anything carved from a stick found on the ground is “whittling.” Some put a time limit on it. Others base their judgement on the quality or purpose of the final product. My primitive carved knives and forks might be “whittling,” for example, but my friend’s beautifully carved and decorated (all using just a knife) replica dagger is a “carving.”

I like the dictionary definition. All the other definitions implicitly and sometimes not so implicitly make value judgements that amount to “whittling is just passing time, whereas carving is creating something of value.”

In any case, I’d be interested to know if anybody would find the AI-generated response to be anything other than gibberish. Elementary and secondary educators should be exposing students to this type of answer and pointing out the obvious flaws (unsupported and contradictory statements, wandering paragraphs, etc.) so that students can learn to spot them. It’ll be a while (decades, at least) before these generative AIs can write a freshman term paper that would get past an instructor who’s paying attention. It’s probably a good idea to be able to spot AI-generated content so you don’t make the mistake of depending on it.

A fun little puzzle

I ran across this puzzle about 10 years ago. Although it didn’t take me long to come up with the optimum solution, I find the puzzle interesting because it just might be a good interview question for programmers at different levels of experience.

The puzzle:

Given an unsorted array of distinct integers, arrange them such that a1 < a2 > a3 < a4 > a5 < a6 ... So, for example, given the array [9,6,3,1,4,8], one valid arrangement would be [6,9,1,8,3,4]

The obvious solution is to sort the numbers and then interleave them. Put the smallest number at a1, the largest at a2, second smallest at a3, etc. Sorted, our sample array is [1,3,4,6,8,9]. If we interleave the numbers as I describe, the result is [1,9,3,8,4,6]. It’s easy enough to check if that’s right: just replace the commas with alternating < and >: [1<9>3<8>4<6].

Any programmer fresh out of school should be able to come up with that solution and code it, and tell me that the complexity is O(n log n) because of the sort. If a junior programmer supplied that solution to the problem, I’d be satisfied.

But there is an O(n) solution that I’d expect an intermediate or senior engineer to discover if prompted. That is, if they told me the solution was to sort and interleave, I’d ask them if they could think of a solution with lower expected running time.

Given any three successive numbers in the array, there are four possible relationships:

  1. a < b < c
  2. a < b > c
  3. a > b < c
  4. a > b > c

The relationship we desire is (2).

In case (1), the first condition is already met (a < b), and we can swap b and c to give us a < c > b.

In case (2) both conditions are met so we don’t have to do anything.

In case (3), we swap a and b to give us b < a ? c. But we already know that b < c, so if we have to swap a and c to meet the second condition, the first condition is still met.

In case (4), we know that a > c, so if we swap a and b to meet the first condition, the second condition is still met.

Now, add a fourth number to the sequence. You have a < b > c ? d. If it turns out that c < d then there’s nothing to do. If c > d then we have to swap them. But that doesn’t mess up the previous condition because if b > c > d then by definition b > d.

You use similar logic to add the fifth number. You have a < b > c < d ? e. If d > e then there’s nothing to do. If d < e then by definition c < e, so swapping d and e doesn’t invalidate anything that comes before.

That understanding leads to this pseudocode that makes a single pass through the array, swapping adjacent values as required:

for i = 0 to n-2
    if i is even
        if (a[i] > a[i+1])
            swap(a[i], a[i+1])
        end if
    else // i is odd
        if (a[i] < a[i+1])
            swap(a[i], a[i+1])
    end

I find that very elegant.