May Contain Blueberries

the sometimes journal of Jeremy Beker

At the gym this morning, I was talking with Terry and we were discussing our mutual love for IFTTT, a great tool for automating actions on the internet. Specifically we were talking about ways to get videos we are interested in watching into our Pocket feeds. I am a big fan of Wil Wheaton’s TableTop web series (and you should be too). But, rather than having to check YouTube for new episodes or get some sort of email notifications, I just wanted new episodes to be inserted into my Pocket feed whenever they came out so I could see them on my computer, iPad, or iPhone.

The first step is rather cumbersome, but everything after that is easy. I am going to assume that you already have a Pocket and IFTTT accounts and you have linked your Pocket account to IFTTT.

Go to the Youtube playlist you want, like the TableTop one.**4F80C7D2DC8D9B6C**

Now, take the part I have highlighted above (the playlist ID, 4F80C7D2DC8D9B6C) and insert it into this URL:**4F80C7D2DC8D9B6C**

(I do not get credit for this, I found it on Elliott Bledsoe’s website: How to - Subscribe to a YouTube playlist using RSS)

Step 2: Create a new rule in IFTTT


Create a new rule in IFTTT using the RSS channel with the URL you created in Step 1. The Action will be to add a new item to Pocket with the URL of “EntryURL.” You can see my TableTop rule here: Save new TableTop episodes to Pocket

That’s it!

Unrelated to the recent events showing that our data on the internet is even less secure than many thought, I’ve developed a certain fascination with having VPN connections available for my mobile devices. Most articles that discuss using mobile devices stress the importance of not doing sensitive (or any) work while on public WiFi networks. The ability of other to sniff your data is just too easy. As a result, I have configured my devices to connect to my home server which runs Strongswan so that all my traffic gets tunneled to my house before exiting onto the internet. (And yes, I know that my ISP has full access to the data once it leaves my home, but there is no general solution to avoiding that.)

I am by no means an expert at setting up VPNs, but I have gotten my setup down pretty well. But one frustration was that my OS (Fedora) did not have any facility to include information that Strongswan generated about connections in the system log files in my daily Logwatch reports. All I ended up with was a huge collections of lines like this:

charon: 05[IKE] IKE_SA vpn-ikev2[306] established between 
   A.B.C.D[C=US, O=Confusticate, CN=bree]...
   W.X.Y.Z[C=US, O=Confusticate, CN=Thinkpad]
charon: 05[IKE] CHILD_SA vpn-ikev2{296} established with 
   SPIs c7b686bf_i cc98f0a4_o and TS ::/0 === 2001:340:e496:6::/64
charon: 15[IKE] CHILD_SA vpn-ikev2{296} established with 
   SPIs c2f5678a_i cc8fbed8_o and TS ::/0 === 2001:340:e496:6::/64
charon: 04[IKE] closing CHILD_SA vpn-ikev2{296} with 
   SPIs c78fe56bf_i (26135 bytes) cc53191a4_o (48092 bytes) and 
   TS ::/0 === 2001:340:e496:6::/64

So after looking at those for a few months I finally wrote my own scripts for Logwatch to get me some prettier output:

--------------------- Strongswan Begin ------------------------
IKE_SA Connections Initiated:
      A.B.C.D 10 Time(s)
   Main Mode IKE_SA:
      A.B.C.E 2 Time(s)

IKE_SA Connections:
      A.B.C.D[C=US, O=Confusticate, CN=bree]...[C=US, O=Confusticate, CN=Thinkpad]
         Established 10 Time(s)
         Destroyed 10 Time(s)

CHILD_SA Connections:
   vpn-ikev2: ::/0 === 2001:340:e496:6::/64
         Established 38 Time(s)
         Destroyed 38 Time(s)
         Data In 1.113M
         Data Out 3.015M

---------------------- Strongswan End -------------------------

I have attached the scripts and configuration files to the end of this post. There are a few configuration files and the script itself; the tar file is laid out just like they need to be placed in your Logwatch configuration directories (mine are in /etc/logwatch). I have only tested this on my system (a Fedora system) so your mileage may vary. I am happy to get any reactions or ideas (ideas with patches are even better).

Download: logwatch-strongswan-0.0.1.tgz

Update: Uploaded code to GitHub.

So, the July jobs report came out. I was curious as to how the different news agencies were covering it. Amazing the different spin they put on it. Can you match the quote to the news outlet?

Economy’s job engine revved up in July

U.S. Added 163,000 Jobs in July; Jobless Rate Ticked Up

Jobless rate jumps as economy adds only 163,000 jobs

July jobs report: Hiring picks up, but unemployment rises

Are they even talking about the same facts? #1 is MSNBC, #2 is the NYTimes, #3 is Fox, and #4 is CNN. CNN and the NYTimes take a balanced approach, Fox and MSNBC are loopy.


In the aftermath of the events in Aurora, Colorado the old arguments about gun control are starting to bubble to the surface again. How this is even an argument baffles me. I work under the assumption that everyone, extremists from both sides of the spectrum, agree that people getting killed is a bad thing. The anti-gun control arguments seem to follow two themes:

  1. Guns make people safer
  2. The 2nd Amendment says individuals can have guns

Let’s quickly examine each. Gun control opponents are proud of the fact that the United States has some of the least restrictive gun control laws and the highest gun ownership in the developed world. Sadly, the United States also has a nearly 15 times higher gun death rate too. According to research done by Politifact Virginia (Rep. Jim Moran says U.S. gun homicide rate 20 times higher than other western nations), comparing the United States to 23 other developed countries with median incomes over $12,276, the United States gun deaths were 3 per 100,000 people. The other 22 combined? 0.2 per 100,000 people. How this can show anything other than less guns equals less gun deaths is beyond me.

If we look at a striking example, let’s investigate Japan, a country with arguably the most restrictive gun control laws (for the tech geeks out there, the US could be said to be default-allow, Japan is default-deny). Using data from 2008 (A Land Without Guns), we, in the United States, had more gun deaths in the last 8 hours than Japan had in the whole year. The whole year!

A followup argument is usually: “If someone wants to kill you, they will find a way.” I don’t buy that. Frankly, killing someone with a gun is comparatively easy than using any other easily accessible weapon (knife, bat, tire iron, etc.) And killing a lot of people with those other weapons is very hard to do. Don’t even bring up bombs and other methods to kill people. Making an effective bomb is hard. Much harder than buying a gun. And just go and try to but bomb-making supplies and see how fast the FBI is knocking on your door.

But if we accept the premise that “people will find a way to kill?” What does the data tell us (UN data linked from: Global homicide: murder rates around the world). Using the same countries from the gun stats above, how does the US stack up in overall homicide rates? We win again! 5.9 homicides per 100,000 people. Next highest? Finland with 2.8 per 100,000. Average among the other 22? 1.5 per 100,000.

Guns don’t make people safer. The facts don’t support this. Anecdotes, sure; facts, no.

How about the Constitutional argument? Let’s start with the text:

A well regulated militia being necessary to the security of a free state, the right of the people to keep and bear arms shall not be infringed.

A bit more murky. The Supreme Court has upheld the individual right to gun ownership (District of Columbia v. Heller) but also held that the right is not unlimited and can be restricted. Justice Scalia states “We therefore read Miller to say only that the Second Amendment does not protect those weapons not typically possessed by law-abiding citizens for lawful purposes…” The Court has left open the possibility that regulation of “non-typical” weapons is reasonable.

I hope that the various groups will finally start coming together and developing common sense restrictions that might help bring the United States more in line with the rest of the developed world. I don’t want to spend my time in movies as I did this past Sunday tracking everyone who walked into or out of the theater.

Related Articles worth reading:

  • Jason Alexander’s essay on the Aurora massacre

In 142 days I will be getting married. While it happens to be that my choice of a partner is a woman, I am not marrying Tiffany because she is a woman. There are approximately 3.375 billion woman out there that I am not marrying. I am marrying Tiffany because I love her and want to spend my life with her as an individual. The fact that my choice is a woman is due to a particular set of genetic settings, nothing more.

Last night when I saw the announcement that 59% of North Carolina voters approved a state constitutional amendment which withholds the same right I have to choose the person I love to marry from a subset of their neighbors, brothers, sisters, and friends, I felt a host of emotions. Anger, disgust, dismay, shame, guilt.

Everyone should be clear on what is happening here. A majority of citizens is telling a minority of citizens that their love is worth less than theirs. It is that simple. It is not “protecting marriage;” no one has shown that any damage will occur to heterosexual marriage if homosexual marriage is allowed. No one is suggesting we ban divorce. It is not “for the children;” no one is suggesting infertile couples can’t marry. It is pure, unadulterated bigotry and discrimination. And it is disgusting.

I support gay marriage rights. I will be renewing my ACLU membership today. I suggest you find an organization that supports equal rights for everyone and support it too.


From a phishing message I got in my email today:

Hi gothmog,
You have blocked your Facebook account. You can reopen your account at any moment by logging into Facebook using your old login email address and password. After that you will be able to exploit the site as usual.
Kind regards,
The Facebook Team

Seems more likely that they will be the ones exploiting my account, not me.

7 out of 10 Americans believe the health care law is unconstitutional.


7 out of 10 Americans believe the health care law is unconstitutional.

This quote was in an article on Morning Edition as I was driving in to work this morning. The first thing that came to my mind when I heard this was “are 7 out of 10 Americans remotely qualified to say if a law is unconstitutional?” Could 7 out of 10 Americans name the relevant sections of the Constitution which are being used to argue this case? (Interstate Commerce and Congress’ Taxing Authority to name some of the main ones.) I am quite certainly more versed on Constitutionality than the average bear, I have read quite a bit about the Court in general, I have listened to the Oral Arguments in the case, and I don’t think I am qualified to answer the question of the Constitutionality of that or any other law.

In the same article, they also said:

7 out of 10 Americans are opposed to the individual mandate.

Ok, there we go, that is a polling question I can understand and support the data on. It is a question where the people answering it have the basis to share their feelings.

I don’t understand how a news or polling organization can reasonably ask a question for which the people answering the question are unqualified to even understand the topic on which the question is based?

8 out of 10 Americans believe that the Clique Problem can be shown to be NP Complete by reducing it to Boolean Satisfiability Problem.

People would laugh at any survey that shared this “fact.” (Or at least I would hope they would.) It isn’t that the assertion isn’t correct (it is), it is just that it is a question that is meaningless to 99% of people out there. This is not meant to be an insult to 99% of people, just that we should not be presenting statistics on questions that people have no reasonable basis for knowing the answer.

Please stick to questions on polls where people have a reasonably good chance of being able to be informed. It is probably impolite to say, but if you are not informed about a topic, your opinion really does not make much sense, because you have no basis to form an opinion.

[caption id=”” align=”alignright” width=”320” caption=”Traffic on the GSP by Ted Kerwin”][/caption]

In my very occasional series of posts where I give ideas for PhD thesis topics (see the all time hit the students are fighting over, Fractal dimension as measurement of quality) I give you another path to your doctorate. That is if you are in the Operations Research field. Sorry biologists.

I am sure we all have wondered at the situation where you are driving along the interstate and then all of a sudden there is a traffic buildup. You expect that there must be an accident or some event that is causing it, but then, just like it started, it suddenly clears up with no evidence of why it was there. A number of years ago, I remember coming across an article that showed that congestion behaved like a wave (where the height of the wave is the density of the cars). These waves can move through the stream of traffic and long outlive the original cause of their creation. I can’t find the original article, but there has been quite a lot of reasearch in the area. See Density waves in traffic flow for an example.

This morning’s drive into work posed another question in a related light. As I pulled up to the light at the entrance to 199, I had a James City County Police officer in front of me. As we entered the highway, there were not nearly enough cars to prevent free flowing traffic, but we instead stayed all bunched up. Unlike non-law enforcement vehicles, which people are happy to move around and pass to spread out on the road, a police car introduces certain mental restrictions which prevent people from behaving how they naturally would. We are uncomfortable passing a police officer or driving very much faster at all even if we are past the point in the road where the police car is located. This results in a “blob” of traffic that is all stuck together that would not exist otherwise.

So, my topic for a budding Operations Research student is this. How do you model a traffic scenario where certain vehicles introduce more stringent constraints on the vehicles around them that are not purely limited to their physical place on the road?

Go on, you can thank me later.

Update: There is a good comment thread starting over at Hacker News here talking about how this could be used in traffic management. Interesting.

[caption id=”” align=”alignright” width=”240” caption=”William from the MET”][/caption]

I love museums. From a very young age my parents brought me to museums and I have very fond (if vague) memories of visiting the Peabody Museum of Natural History staring up at huge dinosaur skeletons. Being close enough to New York, I was really luck to have the American Museum of Natural History, the Bronx Zoo, the Metropolitan Museum of Art, the Museum of Modern Art to name just a few. I remember my awe and fascination with all things dinosaurs, the ancient temple rebuilt inside the MET, mummies, medieval arms and armory. I credit much of my personal curiosity about the world and science to being exposed to museums as a child.

The adventure didn’t stop as a I grew up. Moving to Virginia and Williamsburg in specific gave me access to a whole new range of museums; heck, I live almost inside one of the largest living museums in the United States, Colonial Williamsburg. Being 3 hours away from the wonders that are all the Smithsonian museums is a blessing.

Most recently Tiffany and I got to visit the Isabella Stewart Gardner Museum in Boston with our friends Doug and Elif. A strange museum filled with wonders from all over the world captured as a moment in time through the will of the owner which prevents the museum from changing the layout or contents of the museum.

However, while going through the Gardner museum I thought “This couldn’t be constructed today.” There is no way the world would allow a single individual to collect these artifacts into one place. I realized that many if not most of the museums that I love and would never want to give up could not exist if not through the theft and pillaging of countries all around the world during the 20th century. The modern application of scientific rigor and cultural sensitivity and ownership to the historical record of countries around the world is absolutely the right way to do things. Stealing artifacts from other (usually poorer) countries to be displayed in the museums of the rich countries is really bad karma. Taking artifacts out of their historical environment destroys much of the value that can be gathered from the historical context. (See the recent controversy over the show American Diggers.)

But I am finding it hard to square the love I have for the classic museums of my childhood which are clearly full of items that have been removed from their places of origins in “less than ideal” circumstances with the great experiences I associate with those museums. I remember going through a section of the American Museum of Natural History full of Chinese artifacts and looking at the placards showing they had all been added to the museum in the 1920’s knowing that they had almost certainly been smuggled out of their home countries.

I have confidence modern scientists can bridge this divide but I hope that the modern designers of museums can maintain the atmosphere of wonder that an 8 year old kid can get from seeing such a broad array of artifacts from all over the world without having to travel all over the world to see them.

Louis Menand’s article, Live and Learn - why we have college is great and you should read the whole article, but I wanted to point out one paragraph that struck me as a defender of the liberal arts education.

The most interesting finding is that students majoring in liberal-arts fields-sciences, social sciences, and arts and humanities-do better on the C.L.A., and show greater improvement, than students majoring in non-liberal-arts fields such as business, education and social work, communications, engineering and computer science, and health. There are a number of explanations. Liberal-arts students are more likely to take courses with substantial amounts of reading and writing; they are more likely to attend selective colleges, and institutional selectivity correlates positively with learning; and they are better prepared academically for college, which makes them more likely to improve. The students who score the lowest and improve the least are the business majors.

That last sentence is particularly scary to me as these are the people who in theory, are being trained to run the companies I work for.