Programmers: How Not To Write An Error Message

Filed Under SteveG's Posts

A friend called me to say that he could not play one of the YouTube videos on my blog.  It would play for a few seconds and then he would get a message “An error occurred”.  Along with the error message there were all sorts of suggestions as to what he could do to fix the error, but none of them worked.

I had him repeat to me the exact words of the message.  Googling youtube an error occurred was enough to find the problem.  I found the web page The dreaded “an error occurred” message shows on *every* YouTube video.

Eventually, it turned out that my friend did not have any speakers nor headphone connected to his computer, and that was the problem.  This was mentioned in the thread about the error. I realized that if the YouTube message had said something like “An error occurred, I could not find the sound device,” he could have solved his problem himself without any need to call me.

This leads me to one of the prime principles that I held to as a programmer.  If you are  going to write an error message about an error that has been detected, you owe it to  the user to tell him or her exactly what was the error that you detected.

Maybe the YouTube folks thought that they were being nice by telling you what things you might try in order to fix the unidentified error.  The trouble is that no programmer can imagine all the things that might go wrong, nor all the reasons for them to go wrong.  If you tell the user exactly what it was you detected, then the user may know what he or she did to cause the error.  Or the user might consult with someone who would understand the details of the error as described in the message.

When my friend told me that he had no speakers or headphones, my natural question was “Why would you do that?”  He explained why he used headphones and not speakers and that he was just testing to see if he could watch the video before he plugged in his headphones.  It was certainly a reasonable explanation, but not something I would have ever imagined.  Which brings me to another oft heard response from other programmers  when I insisted on good error messages and also allowing people to do things that you would never imagine them wanting to do.  I would hear the old dreaded question, “Well, why would anybody want to do that?”  My answer was “I have no idea, but what harm does it  do if you to let them do it?”  I had found over the years that customers could find amazing things to do with your program that you never dreamed of.

The error message issue is related to the question of “Well, why would anybody want to do that?”   The related question is “What would anybody do with this information if I gave it to  them?”.  The answer is similar.  “I don’t know what they might do, but why not tell them anyway?  Would it kill you?”

Nebraska School Faces Heat on Facebook for Bullying Message

Filed Under SteveG's Posts

The Las Vegas Guardian has the story Nebraska School Faces Heat on Facebook for Bullying Message.

9 rules for handling bullies

I was incensed when I read this story yesterday.  What kind of message does the principal of the school send when she writes comments such as “Would we keep our friends if we tattled on them?” and “It’s the person who retaliates or responds, who actually starts the fight” and “No one likes a sore loser”?

I can see giving advice on how to stand-up to a bully, but blaming the victim is exactly the wrong attitude.  Standing up to a bully may be reasonable advice to someone who can do it.  However, for someone who is not capable of doing it, making that person feel inadequate is only to double the pain.  It leaves the victim feeling alone and unprotected by the very people who should be responsible for protecting him or her.

In fact, a victim might be better able to stand-up to the bully if he or she knew that the adults in the world would also stand-up for the victim if the situation were to get out of hand.

You can tell how well a person has internalized this stupid message by their reactions to criminal behavior as adults.  Look at the Whitey Bulger case in Boston.  Some adults are more incensed that Bulger might have been an informant for the FBI than they are incensed by the murders he committed and the terrorism that he used in Boston.  The way that the FBI protected their informant may also be a reflection of internalizing the stupid message.  The FBI seemed more concerned about their informant than they were about the victims.  Although it may just have been a case of plain old corruption in the FBI.

This idea that it is abhorrent to be a snitch is something that needs to be stamped out. If the principal of the school in Nebraska cannot show that she has learned how seriously wrong her attitude is (not just that the wording is wrong), then she ought to be fired.

“We Are Not Beginning a New Cold War, We are Well into It”: Stephen Cohen on Russia-Ukraine Crisis

Filed Under SteveG's Posts

Democracy Now has the interview “We Are Not Beginning a New Cold War, We are Well into It”: Stephen Cohen on Russia-Ukraine Crisis.

STEPHEN COHEN: Well, I think you’ve emphasized the absolute flaw in at least the American—because I don’t follow the European press that closely—the American media and political narrative. As a historian, I would say that this conflict began 300 years ago, but we can’t do that. As a contemporary observer, it certainly began in November 2013 when the European Union issued an ultimatum, really, to the then-president, elected president, of Ukraine, Viktor Yanukovych, that “Sign an agreement with us, but you can’t have one with Russia, too.” In my mind, that precipitated this crisis, because why give a country that has been profoundly divided for centuries, and certainly in recent decades, an ultimatum—an elected president: “Choose, and divide your country further”? So when we say today Putin initiated this chaos, this danger of war, this confrontation, the answer is, no, that narrative is wrong from the beginning. It was triggered by the European Union’s unwise ultimatum.

In my previous post Investigation Finds Former Ukraine President Not Responsible For Sniper Attack on Protestors, I admitted to the possibility that the speaker was going overboard in his analysis. What I have been reading since then, and this interview seems to strengthen the case that the previous speaker was far from alone in his analysis.

Your assessment as to who is giving you the straight poop and who is just giving you poop, depends somewhat on which media you trust. However, there are certain things you can assess for yourself.

STEPHEN COHEN: You left out one thing that he said which I consider to be unwise and possibly reckless. He went on to say that Russia wouldn’t go to war with us because our conventional weapons are superior. That is an exceedingly provocative thing to say. And he seems to be unaware, President Obama, that Russian military doctrine says that when confronted by overwhelming conventional forces, we can use nuclear weapons. They mean tactical nuclear weapons. I don’t think any informed president, his handlers, would have permitted him to make such a statement. In fact, depending on how far you want to take this conversation about the Obama administration, I don’t recall in my lifetime, in confrontations with Russia, an administration—I speak now of the president and his secretary of state—who seem in their public statements to be so misinformed, even uninformed, both about Ukraine and Russia.

In my own judgment, I think that a lot of the statements from Obama are extremely reckless.  Earlier I heard Obama dismisses Russia as ‘regional power’ acting out of weakness.  Why would you go out of your way to tweak the nose of your adversary who has major economic powers over Europe because of the amount of energy that Russia supplies to Europe?  I don’t need anybody to point out to me that such talk is reckless.

It wouldn’t surprise me if I have to headline a post in the next few days, “Obama has gone completely bonkers”. He is rapidly going in that direction. Who will save us?

It’s a Scandal

Filed Under SteveG's Posts

The Daily Kos has published the cartoon It’s a Scandal.

Caroon: It'a a Scandal

Now you understand why Lois Lerner has contempt of Congress. That contempt is well earned.

Turn That (Deficit) Frown Upside Down

Filed Under SteveG's Posts

New Economic Perspectives has a wonderful video of the lecture Turn That Frown Upside Down by Professor Stephanie Kelton.  New Economic Perspectives has also posted the slides that go with the lecture.  It’s not essential, but you might appreciate the lecture more if you print the slides before you watch the video.  The video is pretty good about showing the slides if you watch it on a big enough screen. (The audio, well not quite so good. The coughers have a better microphone than Kelton does.)

As I added the word to the title of this blog, so that it would make the subject of the article more obvious, it came to me in a flash how appropriate the title is. See if you can find the point in the lecture where she turns the frown upside down.

Her presentation is so clear and obvious that you can hardly fail to get the point. The only thing that might interfere with your understanding of what she is saying might be that little voice in your head sputtering “This can’t possibly be right, can it?” If you can suppress that little voice for 45 minutes, you will instead see that “This can’t possibly be wrong.”

Actually, there is another thing that could interfere with your understanding. She explicitly tells you the things that she is not saying that your preconceived notions might have you believing that she did say. If you are constantly jumping to the conclusion that you heard what she did not say, then this will interfere with your understanding what she is actually saying.

If you suffer either of these blockages, you might have to listen to the lecture again to actually hear what is being said.

To her explanation of idle factories, I always like to add “What part of no freakin customers do you not understand?”

Ukraine, Through the US Looking Glass

Filed Under SteveG's Posts

Consortium News has the story Ukraine, Through the US Looking Glass.

Whose Propaganda?

However, on the Times’ front page on Wednesday was a bizarre story by David M. Herszenhorn accusing the Russian government of engaging in a propaganda war by making many of the same points that you could find – albeit without the useful context about Parubiy’s neo-Nazi background – in the same newspaper.

In the article entitled “Russia Is Quick To Bend Truth About Ukraine,” Herszenhorn mocked Russian Prime Minister Dmitri Medvedev for making a Facebook posting that “was bleak and full of dread,” including noting that “blood has been spilled in Ukraine again” and adding that “the threat of civil war looms.”

The Times article continued, “He [Medvedev] pleaded with Ukrainians to decide their own future ‘without usurpers, nationalists and bandits, without tanks or armored vehicles – and without secret visits by the C.I.A. director.’ And so began another day of bluster and hyperbole, of the misinformation, exaggerations, conspiracy theories, overheated rhetoric and, occasionally, outright lies about the political crisis in Ukraine that have emanated from the highest echelons of the Kremlin and reverberated on state-controlled Russian television, hour after hour, day after day, week after week.”

This argumentative “news” story spilled from the front page to the top half of an inside page, but Herszenhorn never managed to mention that there was nothing false in what Medvedev said. Indeed, it was the much-maligned Russian press that first reported the secret visit of CIA Director John Brennan to Kiev.

Though the White House has since confirmed that report, Herszenhorn cites Medvedev’s reference to it in the context of “misinformation” and “conspiracy theories.” Nowhere in the long article does the Times inform its readers that, yes, the CIA director did make a secret visit to Ukraine last weekend. Presumably, that reality has now disappeared into the great memory hole along with the on-ground reporting from Feb. 22 about the key role of the neo-Nazi militias.

The neo-Nazis themselves have pretty much disappeared from Official Washington’s narrative, which now usually recounts the coup as simply a case of months of protests followed by Yanukovych’s decision to flee. Only occasionally, often buried deep in news articles with the context removed, can you find admissions of how the neo-Nazis spearheaded the coup.

Of course, you never know who you can trust to report anything, if indeed there is anyone you can trust. However, it is that accusations like the one in this article against The New York Times have been proven to be true in the past.

It makes me think I may have been right in my opinion of The New York Times story in my previous post Investigation Finds Former Ukraine President Not Responsible For Sniper Attack on Protestors.

Investigation Finds Former Ukraine President Not Responsible For Sniper Attack on Protestors

Filed Under SteveG's Posts

This is the story I woke up to today.

The Real News Network has the interview Investigation Finds Former Ukraine President Not Responsible For Sniper Attack on Protestors .

HUDSON: The big news is all about the Ukraine. And it’s about the events that happened in the shootings on February 20. Late last week, the German television program ARD Monitor, which is sort of their version of 60 Minutes here, had an investigative report of the shootings in Maidan, and what they found out is that contrary to what President Obama is saying, contrary to what the U.S. authorities are saying, that the shooting was done by the U.S.-backed Svoboda Party and the protesters themselves, the snipers and the bullets all came from the Hotel Ukrayina, which was the center of where the protests were going, and the snipers on the hotel were shooting not only at the demonstrators, but also were shooting at their own–at the police and the demonstrators to try to create chaos. They’ve spoken to the doctors, who said that all of the bullets and all of the wounded people came from the same set of guns. They’ve talked to reporters who were embedded with the demonstrators, the anti-Russian forces, and they all say yes. All the witnesses are in agreement: the shots came from the Hotel Ukrayina. The hotel was completely under the control of the protesters, and it was the government that did it.

So what happened was that after the coup d’état, what they call the new provisional government put a member of the Svoboda Party, the right-wing terrorist party, in charge of the investigation. And the relatives of the victims who were shot are saying that the government is refusing to show them the autopsies, they’re refusing to share the information with their doctors, they’re cold-shouldering them, and that what is happening is a coverup. It’s very much like the film Z about the Greek colonels trying to blame the murder of the leader on the protesters, rather than on themselves.

Now, the real question that the German data has is: why, if all of this is front-page news in Germany, front-page news in Russia–the Russian TV have been showing their footage, showing the sniping–why would President Obama directly lie to the American people? This is the equivalent of Bush’s weapons of mass destruction. Why would Obama say the Russians are doing the shooting in the Ukraine that’s justified all of this anti-Russian furor? And why wouldn’t he say the people that we have been backing with $5 billion for the last five or ten years, our own people, are doing the shooting, we are telling them to doing the shooting, we are behind them, and we’re the ones who are the separatists?

What has happened is that the Western Ukraine, the U.S. part, are the separatists trying to break up the Ukraine, in keeping, pretty much, with what Brzezinski advised in his book some years ago when he said breaking Ukraine off from Russia would be the equivalent of blocking any Russian potential military power.

Now, the only American who’s spoken up against this was, last Friday, very quickly, President Carter. And Jimmy Carter said in an interview with Salon he’s very worried. He says, quote, “The rest of the world, almost unanimously, looks at America as the No. 1 warmonger. That we revert to armed conflict almost at the drop of a hat–and quite often it’s not only desired by the leaders of our country, but it’s also supported by the people of America.”

Now, the next day in The Financial Times they did an interview with Singapore’s prime minister, Lee. And the prime minister, Lee, said, I think you–to the Financial Times interviewer, “I think you should have thought of that before encouraging the demonstrators on the Maidan.” I think some people–meaning the U.S.–didn’t think through all the consequences. Can you take responsibility for the consequences? And when it comes to grief, will you be there? You can’t be there, since you have so many other interests to protect.

Many of the comments on this story are vehemently protesting what Michael Hudson, a Distinguished Research Professor of Economics at the University of Missouri, Kansas City, is saying.

I have not been following the news closely in the last 24 hours. The headlines I did see seemed to indicate that we had come to some sort of agreement with Russia and the Ukraine.

I was led to this story by an item in Naked Capitalism Ukraine: Is Obama Channeling Cheney?

I will probably have to do some researching to see if there is any corroboration of this interview. If Jimmy Carter really did say what Hudson claims, then it is going to be harder to disbelieve this report.

The New York Times article Pro-Russia Militant Leader Balks at Terms of Ukraine Pact talks about the agreement between the US and Russia signed yesterday. This report is in The New York Times, so I am not sure how much credibility it has. It has a history of bending the news to suit what fits the neocons preconceived notions.

Philip Pilkington: Misdirection – Galbraith on Thomas Piketty’s New Book on Capital

Filed Under SteveG's Posts

I just got word that Thomas Piketty will be speaking at Harvard Bookstore tomorrow. I vaguely recalled seeing his name in a headline I had seen.

Naked Capitalism has the post Philip Pilkington: Misdirection – Galbraith on Thomas Piketty’s New Book on Capital.

Galbraith also makes clear that Piketty’s policy proposals — mostly dealing with higher taxes on the rich — are probably not fit for purpose in a globalised, financialised economy. Rather Galbraith asks us to consider alternative approaches.

If the heart of the problem is a rate of return on private assets that is too high, the better solution is to lower that rate of return. How? Raise minimum wages! That lowers the return on capital that relies on low-wage labor. Support unions! Tax corporate profits and personal capital gains, including dividends! Lower the interest rate actually required of businesses! Do this by creating new public and cooperative lenders to replace today’s zombie mega-banks. And if one is concerned about the monopoly rights granted by law and trade agreements to Big Pharma, Big Media, lawyers, doctors, and so forth, there is always the possibility (as Dean Baker reminds us) of introducing more competition.

As mentioned in the article, Galbraith’s critique Kapital for the Twenty-First Century? is in Dissent Magazine. There is an excellent discussion on the difference between productive wealth creation and non-productive wealth creation.  The taxes that would fix the problem with the non-productive wealth creation might hinder the productive wealth creation. Hence, Galbraith’s suggestions above.  Worth the price of admission of reading his critique.

Perhaps it would be worth it to go to the talk and throw this criticism at him.

Steve Grossman For Governor

Filed Under SteveG's Posts

I have been tending toward supporting Steve Grossman who is a candidate for Governor of Massachusetts.

I have heard a remark about someone being dead set against him because as a former head of AIPAC, he has a very bigoted view of Arabs. Anyone who has read many of the things that I have posted about Israel and Palestinians would know that I am one Jew that would take a very dim view of this purported attitude of Grossman. In fact, I take such a dim view of such attitudes, that many of my relatives have unfriended me on Facebook. How’s that for my bona fides?

So, I thought that I really ought to do some research on Steve Grossman to see if these accusations are warranted. Below is the result of my research. Let me cut to the chase. I have not found any evidence that would support the allegation. In fact quite the opposite. After doing this research, I am a much stronger supporter of Steve Grossman than I was when I started. I am grateful that the disparaging remarks about Steve Grossman encouraged me to do this research.

Google search steve Grossman for governor Palestinian

MA-Gov 2014 is on: Senator Dan Wolf blasts Treasurer Steve Grossman.  There is nothing in the article itself about Grossman and Arabs, but there are some comments that allude to the topic. For technical reasons, I can only include them here as an image. Click on the image to see a larger version.

Comments from the Wolf Blasts Grossman article

Steve Grossman, ex-AIPAC chair, running for Mass. governor from JTA – Global Jewish News Source.

He served as chairman of the American Israel Public Affairs Committee
from 1992 to 1997.

In Mass. governor’s race packed with Jewish candidates, much talk of repairing the world

Steve Grossman, the state treasurer and a past chairman of the
Democratic National Committee, quotes from Isaiah in describing his
ambition to close the gap between rich and poor.

“I received my Jewish heritage, my background, in being that person
who can be a repairer of the breach between those who are well-to-do
and those who lack the things people aspire to,” he said in an

Other Jewish candidates according to the article are Dan Wolf, Evan Falchuk, Don Berwick,

Grossman, 67, takes pride in his role reconciling AIPAC to the
Israeli-Palestinian peace negotiations launched under Israeli Prime
Minister Yitzhak Rabin in the early 1990s.

“Rabin’s exact words were, ‘AIPAC is the most important American
Jewish organization and I need your help,’ ” Grossman recalls of his
1993 meeting with the late Israeli leader.

Grossman immediately convened a phone conference with the AIPAC
board, and it became the first U.S. Jewish group to endorse the

“That was probably as meaningful a conversation I’ve had with any
leader,” Grossman said. “I felt I was participating in a small way in
Jewish history.”

The Boston Phoenix March 16 – 23, 2000 article Is Grossman our next governor? This article was the final straw in my research.  There is so much other positive info in the article than what I have excerpted below, that I have become convinced that my choice of Steve Grossman is absolutely the right choice.

Not everyone is so enthusiastic, of course. To critics such as Lou
DiNatale, the director of state and local policy at UMass Boston’s
McCormack Institute, Grossman is a fundraiser, a rich Newton
businessman, a vanity candidate, a dilettante. “Grossman is the
functional equivalent of a Democratic Steve Forbes,” DiNatale says. “He
inherited a company from his family. His credentials are simply those
of being a fundraiser.”

But a closer look at Grossman reveals a
long-time activist committed to the ideals of grassroots politics — a
family commitment that goes all the way back to his grandfather.
The war had personal as well as political consequences for
Grossman. At Harvard he signed an anti-war petition, despite the
warnings of career-conscious classmates who said it would harm his
chances to get a job. Later, he accelerated his business-school program
and joined the US Army Reserves, which fulfilled his military
obligations. That’s where he met Edward Markey, a young man from
Malden. “We were always talking about politics,” Markey remembers.
When Markey announced that he was running for a congressional seat in
1976, Grossman called to offer his family’s support.
During the campaigns of 1992, Grossman acted as a one-man
Democratic truth squad, trailing Governor Weld and his fellow
Republicans as they traversed Massachusetts campaigning for GOP
candidates. And after Paul Tsongas dropped out of the presidential
race, Grossman threw his support to Bill Clinton, whom he had met when
he briefed Clinton on Mideast policy before a speech that the
then-governor of Arkansas made to AIPAC in 1989. By the time Clinton
was inaugurated, Grossman was chairman of AIPAC, and his ties to the
president would serve him well in that capacity. When Grossman met with
Prime Minister Yitzhak Rabin in Jerusalem the very day the news broke
that the Israelis and the Palestinians had secretly been negotiating in
Oslo, Rabin told Grossman the peace deal could not move forward unless
he had the support of the American Jewish community. Toward that end,
Grossman worked with President Clinton to sell the deal and deliver
American backing.

By 1997, Grossman had left AIPAC and was
preparing to take a break from communal work, but his involvement in
party affairs was about to intensify. The fundraising scandals
surrounding the DNC were coming to a head. The party found itself
$20 million in debt, and donors were reluctant to contribute more
money. At this dark moment, Michael Whouley recommended Grossman to
Vice-President Gore for the chairmanship.

I have provided links to all my sources.  You should read them yourself, and you should do your own research.

Mark Twain said
“It ain’t what you don’t know that gets you into trouble. It’s what you know for sure that just ain’t so.”

So please be careful about what you know for sure about Steve Grossman. I will continue to keep my eyes and ears open so that I can be sure, too.

Official Sturbridge Annual Town Election Results

Filed Under SteveG's Posts

I just received the Official Sturbridge Annual Town Election Results by email.

Here are the Annual Town Election Results translated to a form you can actually read. This file is also readable as an MS Excel spreadsheet.

I don’t know if the embedding below will be more or less easy for you to read than the whole file in the link above. Take your pick. It might be easier to download the above file to your computer if you wish to save it.

In your browser you can use the controls or shortcut key to shrink this down so that you might be able to see it easily on this page. On Windows machines the shortcut is Ctrl– (Control minus). To get your browser window back to normal size the shortcut on Windows is Ctrl-0 (control zero).