Monday, November 28, 2016

Bug Hunt

Is this going to be a stand-up fight, sir, or another bug hunt?

PFC Hudson, Aliens
If the bugs are seven feet tall, then a bug hunt is a stand-up fight.

Thirteen days. That's how long it took me to hunt and kill this one. A WPF GUI on top of a .NET wrapper on top of a C++ wrapper for CLIPS.

After overhauling the internal representation of the primitive data types in CLIPS, successfully passing the regression tests, and successfully upgrading the CLIPSJNI demo examples, I thought upgrading the .NET examples would be fairly straightforward. But two of the examples were periodically crashing.

So I went back through past revisions trying to find the point at which the code stopped working. I finally got to the point where the removal of a single unused slot from a struct caused the crashing behavior. Not good at all since this was now likely a corruption issue.

As I delved further into the issue, it became clear that this was a problem related to both running CLIPS in an embedded mode and the CLIPS garbage collection routines. Debugging the issue in Visual Studio was also a huge PITA for a variety of issues, so when I reached the point at which it was clear that the issue was unrelated to the WPF and .NET code, I created a C++ example that produced the same behavior running with MacOS.

That was day thirteen. Once I had the program in Xcode, that's when the magic happened thanks to these diagnostic tools:



With the Address Sanitizer enabled, I was able to immediately determine where the initial issue started and based on thirteen days of scouring the code, quickly implement a fix for it with a half dozen lines of code. So thanks to the fellow who originally told me about these Xcode diagnostic tools. It looks like there's some similar functionality for Visual Studio, just not as easy to use as checking a box.

Wednesday, November 9, 2016

Don't Blame Me, I Voted for Kodos

I held my nose yesterday and voted for Clinton as the lesser of two evils. I can't say that I'm disappointed she lost. A tepid Clinton victory with Republican congressional control probably would have been the worst possible outcome. Another four years of gridlock with Trump and his followers claiming how much better things would have been with a different president.

And that's why Trump may also have lost last night. Now he's got to deliver.

Friday, October 14, 2016

Orange Trash

Donald Trump. The only republican nominee in modern history who couldn't easily defeat Hillary Clinton.

Thursday, September 29, 2016

Throwing Your Vote Away

From Bloomberg Politics:
President Barack Obama warned in a radio interview on Wednesday that Americans who vote for Libertarian Gary Johnson or Green Party candidate Jill Stein in November risk putting Donald Trump into the White House, as he sought to blunt momentum for third-party candidates.
“If you don’t vote, that’s a vote for Trump,” Obama said in an interview on the Steve Harvey Morning Show. “If you vote for a third-party candidate who’s got no chance to win, that’s a vote for Trump.”
Sorry, but both major parties made the decision to nominate highly polarizing candidates. If you don't want to drive voters to third party candidates, you need to nominate candidates with broader appeal to the general electorate. It's hypocritical to make a principled vote in the primary for the candidate who reflects your views and then expect someone else to make a pragmatic vote in the general election because of your poor choice.

Wednesday, September 7, 2016

Hannibal Lecter vs. Michael Corleone Presidential Debate

LECTER: Rather than focusing on my culinary tastes, we should be focusing on my opponent's mob ties.

CORLEONE: Rather than focusing on my business practices, we should be focusing on my opponent's cannibalism.