Detecting Russian letters with regex

How to identify Russian letters in a string? The short answer is: [А-Яа-яЁё] but depending on your regex flavor, [\p{Cyrillic}] might work. What in the word does this regex mean? It’s just like [A-Za-z] with a twist. The Ёё at the end adds support for ё (“yo”) which is in the Latin group of characters.

See this question on Stack Overflow.

Scalia and the secret society

It was recently reported in the Washington Post that the late Supreme Court Associate Justice Antonin Scalia had ties to a secret society of hunters called the International Order of St. Hubertus and that several of the guests at the Texas ranch where Scalia died were members of this group.

Surely I’m not the only one that finds this a bit weird. A secret society of hunters? I don’t know the first thing about hunting but from I’ve seen, the only thing secret about hunting is sneaking up on an animal so you can kill it.

No. My guess is that the hunting story is a cover. I’m no conspiracy theorist but I’ll bet the real story is closer to the secret society in Kubrik’s “Eyes Wide Shut”.

Scalia and the secret society

The password is “Fidelio”.

Mak-kimchi 막김치

Years ago, my wife and I stayed overnight in Seoul on the way home from New Zealand. An amazing array of types of kimchi accompanied breakfast the following morning; and from then on, I was hooked on this Korean staple. For the last few years, I’ve gradually honed my kimchi-making skills. For simplicity, I tend to make mak-kimchi which means “roughly made kimchi.” In traditional kimchi, who cabbages are fermented intact (though usually split in half to permit the salt and later, spices to enter between the leaves.) However, getting the cabbages properly salted it very tricky and often neglected. So instead of making the more traditional kimchi, I’ve specialized in mak-kimchi. The main difference is in the way that the cabbages are handled. In this case, the cabbages are slided into approximately bite-sized pieces then salted, wilted, rinsed, mixed with the spices and allowed to ferment.

Automate hexo blogging tasks with Grunt

In my never-ending journey to find the optimal blogging platform, I wandered into the hexo camp. Among its many attributes is speed. Compared to Octopress, site generation is very fast. However, deployment has been tricky. Since I host my blogs from an Amazon S3 bucket, I tried to use the aws deployer commonly used with hexo; but I could never get it to install properly on OS X 10.11. So I wrote my own deployer that essentially just runs an AppleScript that handles the synchronization task. It is very slow. So I’m always on the lookout for faster deployment schemes. It looks like a Grunt-based system is the ticket.

Kimchi and hypertension

Given my obsession with kimchi, I sometimes wonder whether the salt in kimchi promotes hypertension. The good news seems to be that it doesn’t.

In a retrospective recall study^[Consumption of kimchi, a salt fermented vegetable, is not associated with hypertension prevalence, Song, Hong Ji et al., Journal of Ethnic Foods , Volume 1 , Issue 1 , 8 - 12] of over 20,000 Korean adults, there was no association between kimchi consumption and the prevalence of hypertension.

Privacy vs. security: Just this once.

In the showdown between Apple and the FBI over an iPhone belonging to one of the San Bernardino attackers, some would argue that the company should acquiesce to the government’s request that it create a “backdoor” into the device allowing it to bypass the built-in strong encryption. Here’s what people who make this argument are missing: the law doesn’t work that way.

The government filed a motion in the U.S. District Court asking the court to direct assist law enforcement in bypassing the security features of the device. Magistrate Judge Sheri Pym approved the government’s request and ordered Apple to comply. The FBI and others argue that this is a one-off instance of bypassing security. But it is not.

On the lack of association between taxes, GDP and happiness

During a February 6, 2016 debate, U.S. presidential aspirant Donald Trump claimed that: “Right now we’re the highest taxed country in the world.”

Well, living in a country with much higher tax rates, I can tell you that his statement is patently false.^[Maybe he’s referring to the corporate tax rate which is quite high; but even that is irrelevant to the fact that all sorts of deductions and exclusions on the U.S. corporate tax return put the U.S. effective tax rate much lower than that of most counties.]

Trump meets computational linguistics

Trump orating

“I actually called her, and she never mentioned my name. You know, I - when I sold - oh, did I get a call from one of the Environmental Protection Agency, they couldn’t find it because it comes out in big globs, right, and you say to yourself, ‘How does that help us?’”

Trump is one of the most amusing orators in the history of presidential politics in the the U.S. But I wondered what would happen I took the text of a few of his speeches and fed it into a algorithm that uses Markov chains to shake things up a bit.

Stop Facebook tracking

network

Although I understand Facebook’s business model and I (basically) understand how money is made on the internet, I have no compunction about blocking ads, trackers, beacons and all manner of scripts. The current system creates layers upon layers of networks that exist to track one’s activities on the internet and market products and services more specifically. The problem is that unless I take specific action, I don’t get to choose what I reveal to companies that want to track me. Some have argued that using services like Facebook constitutes an implied contract between you - the user, and the internet application provider. It’s a ridiculous argument because I could make a similar argument that my use of their service implies a contract not to track.

Leaving something and taking something away.

Trump

“Every person passing through this life will unknowingly leave something and take something away. Most of this “something” cannot be seen or heard or numbered or scientifically detected or counted. It’s what we leave in the minds of other people and what they leave in ours. Memory. The census doesn’t count it. Nothing counts without it.” - Robert Fulghum All I Really Need to Know I Learned in Kindergarten