Python

Clint Eastwood won the LAUGHTER contest

I’m not sure what this says about the audiences at US national party conventions, but among a sample of 16 speeches, Clint Eastwood’s was the one that elicited the most laughter (Rand Paul’s got most applause). Among the presidential candidates, Obama won the applause contest, while being about equally funny as Romney.

For the second lesson of Alberto Cairo’s online data visualisation course, we were asked to comment on and perhaps redesign this convention word count tool created by the NYT. I wouldn’t be able to do such a cool interactive thing myself (I got stuck in the jQuery part of Codeyear), so I decided to focus on differences between individual speeches instead.

First I needed the transcripts – preferably from one single source to make sure the transcription had been done in a uniform way. As far as I could find, Fox News has the largest collection of transcripts online. As a result, Republican speakers are overrepresented in my sample, but that’s ok because the key Democratic speakers are included as well.

I wrote a script to do the word count (I’m sure this could be done in a more elegant way). One problem with my script was that html-code got included in the total word count. I thought I could correct this by subtracting 1,000 from each word count, but this didn’t work so well, so I had to make some corrections.

This assignment was a bit of a rush job so I hope I didn’t make any stupid mistakes.

Programmeren op de iPhone?

Computercode is de language du jour, las ik in de NYT. Iedereen wil leren programmeren en er zijn zelfs iPhone apps voor. Nou vind ik de iPhone handig voor heel veel dingen, maar ik vraag me ernstig af of programmeren (foutloos tekst intypen met veel leestekens) daar ook bij hoort. Dat neemt natuurlijk niet weg dat ik wel nieuwsgierig ben naar wat die apps dan kunnen.

Er blijken inderdaad allerlei apps te bestaan. Het meest intrigerend is deze waarmee je Pythonprogramma’s kan uitvoeren (althans, print "Hallo wereld" werkt). Er zitten ook oefeningen bij (denk ik) maar die zijn in het Chinees. Let ook op de decoratieve achtergrond.

Praktischer is deze app waarmee je quizvragen kan beantwoorden over wat stukjes Pythoncode doen. Leuk tijdverdrijf als je op de trein staat te wachten, heb je toch het gevoel dat je wat nuttigs doet. Maar ik denk dat ik me voorlopig nog maar even op JavaScript moet concentreren.

Summary: 

The NYT called computer code the language du jour, there are even iPhone apps to learn programming. I found one that looks cool but is half in Chinese, and a quizz to test your knowledge of Python. But I think I should focus on JavaScript for now.

Pages