Archive for June 17th, 2008

Just finished watching No Country for Old Men.  I haven’t seen enough of the Coen brothers’ work to judge whether this was as much of a departure as it seemed — I’ve seen Raising Arizona, O Brother Where Art Thou?, and Fargo.  Of the three, it reminded me most of Fargo, being as dark as it was; but the Southwestern scenery and people reminded me of Raising Arizona.

One thing I like about the Coen brothers is the quirky characters.  They have something odd about them all; some subtly, some not so much.  Javier Bardem’s character Anton Chigurh was chilling.  It’s like he didn’t feel anything.  There were several times when he did things I didn’t expect — at least at that exact moment — which I love (predictable movies are boring movies).

Tommy Lee Jones was understated, which was a blessing.  Woody Harrelson is annoying in everything he does, and I mean everything.  Josh Brolin was very believable, and I did not expect how things turned out for any of the three main male leads.  Another pleasant surprise, to not be surprised.

And WOW, I could not believe that Carla Jean was Kelly Macdonald - Diane from Trainspotting - with that West Texas accent!  There was not a trace of the Glaswegian accent.  I was thinking that it looked a lot like her, but that couldn’t be her, but boy was I wrong.  Yet another unexpected nugget.

I was definitely engrossed.  I was not sure I’d like it, but I did.  Three stars.

Comments No Comments »

I was looking at some of the core language enhancements being considered for JDK 7.  Some of them look pretty good, others, meh.  Here are a few of the ones I’m looking forward to:

Constructor Inference for Generics

Using generics, your currently have to type both sides of an assignment when doing a constructor:

Map<String, List<String>> anagrams = new HashMap<String, List<String>>();

Being considered is the ability to omit the types and infer them, such as:

Map<String, List<String>> anagrams = new HashMap<>();

which would be equivalent to the first line.  I like this - improves readability, loses nothing but typing.

Relational operators for Enums

Currently, the only relational operators that you can use for constants in an Enum are == and !=.  Since all enums implicitly implement Comparable, theres no good reason why you should not be able to use <, >, <= and >= on enums.  As it stands now, you need to explicitly invoke compareTo().

Switches on Strings

Sure would be nice if instead of if-else if-else constructs to branch on string values, you could do

switch(someString) {
   case CONST_1:
      return true;
   case CONST_2:
      return false;
   default:
      throw new IllegalArgumentException("Bad value: " + s);
}

Comments No Comments »