Saturday, June 25, 2011

Cumin and Chili Con Carne

Cumin plant and seeds
from Wikipedia
A friend of mine is allergic to cumin and recently claimed that cumin is a recent American ("Tex-Mex") addition to chili con carne. Further, he claimed that most chili did not contain cumin. I had to look into this, because I know food history can be confusing at best, and this was likely not the whole story. After some investigation, I found out a lot about chili powder, chili con carne and Texas culinary history that I didn't now. Here's the highlights:

So, Chili Con Carne doesn't always have cumin listed as an ingredient, but this is misleading.

Friday, June 24, 2011

Evolution: False dichotomy

I just suffered the pain of watching a YouTube video that featured the Miss USA contenstants responding to the question, "should evolution be taught in schools?" Sad does not begin to cover it, but of course it's unfair to expect these women to be able to speak cogently on every topic... they're not running for political office or the dean of a college. There are some central themes, though, that everyone should understand, and I find myself wondering why they're still so hard for people to grasp.

(embedded video first, then my take, below)




Thursday, June 16, 2011

Hardest Trivia Questions Ever: Part 3

The third in our series (Part1 and Part 2 are still available) aims for quality over quantity. I'm hand editing all of these now. If you haven't read the others, each question is formulated based on an entry from the "Did you know" section of Wikipedia.

Q: ____ of the 10th Parachute Battalion was awarded a posthumous Victoria Cross for his actions during the Battle of Arnhem?
A: Captain Lionel Queripel

Q: Rogier van der Weyden's painting (c. 1435, pictured) may contain a self-portrait of the artist as Saint Luke, displaying his affinity with the patron saint of the arts?
A: Saint Luke Drawing the Virgin

Q: anti-communist activist ____ pledged to shave his well-known Solzhenitsyn beard if Moldova united with Romania?
A: Gheorghe Briceag

Q: Iñigo Ed. Regalado wrote the novel ____ in 1921 when adultery was a sensitive topic in Philippine literature?
A: May Pagsinta'y Walang Puso



Q: the ____ (pictured) is the tallest dam in Austria?
A: Kölnbrein Dam

Q: ____ was given a diamond ring as reward for being Bonnie Prince Charlie's food taster?
A: Samuel Ward

Q: Saint John Sea Dogs defenceman ____ continued to play for the ice hockey team even after they fired his father as head coach?
A: Nathan Beaulieu

Q: many Buddhist temples in Japan have a hidden ____?
A: roof

Q: the Sultan of Johor's Oxford-educated wife, ____, earned her degree in Chinese studies and advocates the use of English in Malaysia?
A: Raja Zarith Sofia

Q: Temple Owls men's basketball player ____ has been called "Pepe Sanchez with a jump shot"?
A: Juan Fernandez

Q: ____ served the longest term as mayor of Albania's capital Tirana in the pre-WWII era?
A: Ismail Ndroqi


Q: blues legend ____ made his broadcast debut playing live gospel music on WGRM in Greenwood, Mississippi?
A: B.B. King

Q: the Hymn to Enlil is part of a sequence of Sumerian scribal training scripts called the ____?
A: Decad

Q: the 1562 Danish-Russian Treaty of ____ has been called a milestone in European history?
A: Mozhaysk

Q: ____ was appointed as vice president candidate for the Ricardo Alfonsín ticket for the 2011 Argentine general election?
A: Javier González Fraga

Q: Emily and Anne Brontë's ____ was an early form of science fiction?
A: Gondal

Q: ____ earned a PhD in Belarusian literature before becoming the vice president of the International Federation for Human Rights?
A: Ales Bialatski


Q: in Bach's cantata for Pentecost Monday, ____, a verse from the meeting of Jesus and Nicodemus (pictured) is paraphrased in a unique duet, illustrating the theme exaltation?
A: Erhöhtes Fleisch und Blut, BWV 173

Q: the Californian commune ____ was founded using money from both entertainment industry executives and from an LSD deal?
A: Black Bear Ranch

Monday, June 13, 2011

Android roadbumps

As some of my readers know, I'm writing Android apps. It's been slow. The Java learning curve is actually fairly steep (at least as compared with high level languages I've been working in like Perl, Python and so forth). Just to give you a taste of what you have to look forward to if you want to do some Android development, here's what I've been fighting with today.

First, I had a really silly problem. I had a list and I'd defined a callback called onItemSelect for it. I set a breakpoint in this method and ran the app under the emulator. Click. Click. Click... nothing. I kept going over the code and trying to figure out how this could happen. Click. Nothing. Damn!

So then I was just messing around in the emulator and accidentally hit the scroll wheel. Bang! My callback is invoked! After scratching my head for a second, I had a brain storm. I checked to see if there was an onItemClick callback, and indeed there is! What onItemSelect does is apparently handle selecting, but not clicking on an item. What I'm not sure of is how you could manage to select an item without clicking on it outside of the emulator... honestly, I can't figure out of this is even useful. Maybe if you used the D-pad to navigate a list...

Then, I was trying to write a class that handles a download for me. It needed to take two parameters that represent callbacks. Now, Java is kind of neurotic about insisting that there's no such thing as a function, so when you want to do something that's clearly functional like passing around a callback, you have to do it in terms of an object oriented behavior like sub-classing. I can't begin to explain how horribly wasteful this is in terms of coding and efficiency, but let's just get past that. Here's what I tried to write:

Class file A.java:

import B;
class A {
  public void registerCallbacks() {
    B.new(new B.OkCallback() {
      @Override
      public void callback(String result) {
        // do stuff with result
      }
    },
    new B.FailCallback() {
      @Override
      public void callback(String message) {
        // deal with failure represented by message
      }
    }).execute();
  }

And in B:

  class B {
    public void execute() {
      // do stuff
    }
    public abstract class OkCallback {
      public abstract void callback(String);
    }
    public abstract class FailedCallback {
      public abstract void callback(String);
    }

Ignoring the obvious duplication (since it wasn't that simple in my real code), there's only one error, but it's a really hard thing to find if you're new to Java: "static" is required on the definition of both abstract classes. I'm not entirely sure why you would ever define a non-static, abstract, nested class, but I guess there's some application for declaring child classes... still, it seems like this kind of runaway syntax is just absurd. To give you an example, let's look at a hybrid functional/OO language like python:

  from B import B


  def handleResult(result):
    # do something with result
  def handleFailure(message):
    # do something with failure message
  class A(object):
    def registerCallbacks(self):
      B.registerCallbacks(handleResult, handleFailure).execute()

Python file B.py:

  class B(object):
    def execute():
      # do stuff...

Notice that, not only is the code simpler, but the extra layers of object-creation, subclassing and all of that noise are gone from the call stack. You pass a function to B and it invokes it when needed, with the appropriate parameters.

Even in Perl, functions can be passed as subroutine references and invoked by the caller. In C and C++, function pointers aren't the same thing at all, but for simple callbacks, they work well enough.

Java is fundamentally flawed in this way, and I'm hoping that they crank out a version 8 or whatever, wherein they finally give up and allow real functional programming.

Saturday, June 11, 2011

Tracy Morgan's Rant

In case you're not aware, here's what happened: Tracy Morgan did a standup routine where he said some ugly things about homosexuals in Tennessee. His comments included referring to homosexuals as God's "mistakes" and saying that he'd stab his son if he came out of the closet.

So, now the Intertubes are abuzz with pro- and anti-Tracy Morgan rants. The ones that seem to be gaining the most traction are from Roland S. Martin, a CNN analyst, who supported Morgan; and then there's Wanda Sykes, a fellow African-American comedian who is also a lesbian, and disagreed strongly with Martin, engaging him in an informal debate on twitter.

A few points before I weigh in:

  • Lots of folks want to talk about Morgan's right to say what he likes. This is kind of absurd. Whether you feel he should or should not have included the material in his routine, it's pretty clear that there are lines we don't cross without consequences. I don't think anyone seriously thinks Morgan doesn't have the right to say these things, but many believe that the public should be outraged by them.
  • Martin's defense has some interesting rabbit holes in it. He uses Carlin as a defense, since Carlin had a routine about the word, "nigger." A worse comparison could not possibly be drawn, of course. Carlin was a wordsmith of the highest order whose satire changed the way a nation viewed their own language. Morgan isn't satirizing the gay and lesbian community, he's being crude and insensitive because it might get a laugh.
I imagine that it's pretty clear what I think of Morgan's comments. What might not be so clear is why I'm posting this in his defense. Morgan is a comedian. I happen to think he's not a very good one, but that's not relevant. A comedian's job is to push us right up to the edge of what we're willing to accept in a social context, make us uncomfortable and then play with our sense of balance. Morgan shoved his audience over the edge, and that was a mistake. He apologized for making that mistake. It's a professional hazard, but if he doesn't make the mistake again, it's in the gay and lesbian community's best interest to demonstrate restraint and graciousness in this situation.

I would like Morgan to say something about the impact his comments might have on young men and women who are closeted. His words may well have hurt them more than he can imagine, and issuing a heartfelt apology to them would go a long way. Hell, if he really wanted to turn this around, now might be a great time for him to do his own "It Gets Better" video...

So, while I think Martin's evaluation of the situation was poorly thought out, and while I do agree with those that called for (and got) his apology, I'm not sure why people are going overboard, here. Morgan isn't a politician or a reporter, he's a comedian. That doesn't get him out of having to apologize when he crosses the line, but I think it affords him an easier acceptance of that apology.

Wednesday, June 8, 2011

Film rating and review in the US and UK

I've been listening to Mark Kermode's film reviews for a few years now, and one of the things that I find really fascinating is the British perspective on ratings and review of films. In the U.S. the MPAA has a relatively secretive process by which films are reviewed, and that process has come under fire for decades now as being too lax in many areas and overly restrictive in others. I never really thought there was much wrong with the MPAA until I saw how the British system worked. Now I wonder how we became so entrenched with what is clearly a second-rate system.

Here's how their system works: The British Board of Film Classification (BBFC) is an independent organization which represents the film industry, somewhat like the MPAA. However, they publish general details of the selection criteria and general makeup of their "examiners" staff and have an extensive library of reviews which go into extreme detail on each of their decisions. Parents who want to determine if a film is suitable for a child can easily scan these detailed descriptions and come to their own conclusions based on their own values. This also gives the average moviegoer and citizen the opportunity to see how a film was judged and what criteria are being used to assign ratings. If a film receives a restrictive rating that moviegoers think was incorrect, they can provide detailed feedback to the BBFC, responding point-by-point to the ruling. Another interesting difference between the MPAA and the BBFC is that the MPAA is a film industry lobby and engages in a number of anti-piracy efforts. They are supported by their industry members. The BBFC, on the other hand, is a ratings board only, and are supported by the fees they charge to review films which are based on running time (and thus the amount of their time spent watching the film).

Let's look at an example. If I go to the MPAA's Web site, and select "Find a Film Rating" I'm sent to "FilmRatings.com" a Web site which the MPAA runs, which says the following about linking to their site, "You may not link to any portion of the Site from any other web site without first obtaining the specific written permission of the MPAA, which permission may be withheld in the MPAA's sole and absolute discretion." You can find that on the site's terms of use page. The site is entirely Shockwave Flash, and does not allow the selection or copying of text. If you search for "Thor" you see several titles, including the recent "Thor (2011)" which has next to it, "Rated PG-13 for sequences of intense sci-fi action and violence." That's it. There's no other details on the review process. If you click on the title, you're taken to the IMDB, a commercial site run by Amazon.com which lists the film-makers and sometimes lists plot details, but more often than not, these details are not focused on potentially objectionable content and may be blank until a film is officially released or longer.

By contrast, the BBFC has a plain old, standard HTML page which has no linking restrictions and which allows copy-and-paste just like any other normal Web page. They have an entry for Thor 3D and Thor 2D. I selected Thor 3D. At first, you are only given a simple, "Contains moderate fantasy violence" but there is a link with a disclaimer that tells you that clicking the link will show the full review with potential spoilers for the film. That extended review, which I include here only for comparison, and with any spoilers edited out, is as follows:

THOR is a fantasy action film based on the Marvel Comics superhero. Thor is a powerful but arrogant warrior and heir to the throne of Asgard. However, his reckless actions spoiler and he is spoiler. This gives spoiler, an opportunity to spoiler. The film was classified '12A' for moderate fantasy violence.


The BBFC's Guidelines at '12A'/'12' state 'Moderate violence is allowed but should not dwell on detail. There should be no emphasis on injuries or blood, but occasional gory moments may be permitted if justified by the context'. The film includes several scenes of moderate violence, including kicks, punches, and a couple of headbutts. However, the violence is generally fantastical in nature and most commonly involves either superheros or non-human characters (eg the spoiler). The only fight scene of note that is set in the real world occurs when spoiler. The blows delivered are quite heavy, featuring crunchy sound effects, but there is no discernible blood or injury detail. Sight of impacts is hidden and the action is extremely rapid, with the emphasis firmly on Thor's attempts to spoiler. Earlier in the film, there is a fight scene between spoiler, during which spoiler is stabbed spoiler. The end of the spoiler, which is covered in blood, emerges from spoiler's back, after which spoiler is carried off by spoiler. However, spoiler recovers quickly and this brief moment of bloody detail occurs within a clearly fantastical context. The film has a generally light-hearted tone throughout and this helps to diminish the impact of the violence.


THOR also includes scenes of moderate threat. Spoiler are potentially scary and intimidating. However, the threatening sequences, which are neither frequent nor sustained, are broken up by other material, including comic interludes. The film also contains some very mild language, including the terms 'dumbass', 'God' and 'hell'.

From that, I could imagine many parents deciding that they thought the film was unacceptable for their children, while many others would decide the exact opposite. The point is that they would have that choice.

In a perfect world, I'd like to see the MPAA bring BBFC-style transparency to their process and provide:
  • A stand-alone group which is funded by fees charged to review films
  • Hiring guidelines for reviewers and other staff
  • Demographic and industry background information about reviewers (in general terms, not per-reviewer)
  • A freely quotable list of their reviews with a reasonable terms of use policy
  • Complete details of reviews that allow parents and others to make their own decisions
I don't think any of that is pie-in-the-sky thinking, and if the MPAA can't manage to make such changes, then perhaps it's time to pass the torch to a less industry-insider-controlled body.

It's not a ratings board's job to come up with decisions that everyone will agree with. That's impossible. Instead, it should be their job to provide the public with enough information on which to make an informed decision about what constitutes appropriate entertainment for themselves and those for whom they are responsible. The BBFC may have its faults, but it does essentially that. The MPAA does not.

References: