Archive for March, 2010

Mar 22 2010

A Good Plan, Today and Tomorrow

Published by saalon under Voting

The health care reform bill that passed the House of Representatives last night has taken a lot of fire, largely over things unrelated to the actual policy it enacts.  Now that it’s passed, the papers are doing legitimate policy analysis on what the bill does, not on the process that led to its passage.

What was clear to be before passage is now even clearer: This is a very good bill, if one with a lot of room for improvement.  People’s lives will be made better because of this bill, starting almost immediately (well, six months from now).  The New York Times has a great chart on it that’s worth looking over.  So does the L.A. Times and the Washington Post.

No responses yet

Mar 22 2010

Morse Code Translator in Ruby

Published by saalon under Coding

I got a challenge from my friend Kim to solve a programming problem they give new hire candidates.  Basically, the problem is to build something that takes a string of Morse code and returns all possible translations for it.  I did my solution in Ruby.  This is pretty much a first pass,  so comments are appreciated.  This is, I think, the first time I’ve ever solved a problem with recursion when I wasn’t specifically told “use recursion” for an assignment.


def morse_code()
  morse = {'a' => '.-',
              'b' => '-...',
              'c' => '-.-.',
              'd' =>'-..',
              'e' => '.',
              'f' => '..-.',
              'g' => '--.',
              'h' => '....',
              'i' => '..',
              'j' => '.---',
              'k' => '-.-',
              'l' => '.-..',
              'm' => '--',
              'n' => '-.',
              'o' => '---',
              'p' => '.--.',
              'q' => '--.-',
              'r' => '.-.',
              's' => '...',
              't' => '-',
              'u' => '..-',
              'v' => '...-',
              'w' => '.--',
              'x' => '-..-',
              'y' => '-.--',
              'z' => '--..'}

  # This is a hack; I reversed the hash when I typed it and didn't want to retype
  # just for a proof of concept
  morse.invert
end

def read_morse_code(input, morse)

  # Initialize some arrays
  code_matches = Array.new
  matches = Array.new
  translation_list = Array.new

  # If we've been passed a nil input, it's at the end of the search.
  # Return an empty array
  if input.nil?
    return translation_list  << ''
  end

  # Collect any matches with the morse code at the start of the string
  # and delete the nils; the collect block returns nil values when there's no match
  code_matches = morse.collect {|code, letter| input.match('^' + Regexp.escape(code))}
  code_matches.delete(nil)

  code_matches.each do |code_match|
    temp_input = String.new(input)

    if temp_input == code_match.to_s
      translation_list << morse[code_match.to_s]
    else
      matches = read_morse_code(temp_input.gsub!(Regexp.new('^' + Regexp.escape(code_match.to_s)), ''), morse)
      # Stick each match into the translation_list
      matches.each do |match|
        translation_list << morse[code_match.to_s] + match
      end
    end

  end

  # Remove any nil matches and return what we've got
  translation_list.delete(nil)
  return translation_list

end

# Grab the morse_code hash
morse = morse_code
translations = read_morse_code(String.new(ARGV[0]), morse)

translations.each do |translation|
  puts translation
end

No responses yet

Mar 21 2010

My Letter to Jason Altmire

Published by saalon under Voting

Dear Rep. Altmire,

I am deeply disappointed in your vote on health care reform tonight. If there was ever a reason to have a Democrat in office in your district, it was this vote. At this point, I see no reason to support your campaign in any way come the fall.

I am not one of your constituents, but I worked to get you elected nonetheless. As I did in 2008, I was planning on working for your campaign again. No longer. I am loathe to see a Republican in office where we once had a Democrat, but better a Republican than a Democrat who votes like a Republican.

This was the most important vote in my lifetime, and you were against me.

Now I am sorry to have to say that I am against you.

Sincerely,

Eric Sipple

3 responses so far

Mar 19 2010

A Tale of Two Batmans

Published by saalon under Watching

Digging through the library’s graphic novel shelves, I came across two well regarded Batman stories I’d never gotten around to reading: The Killing Joke and The Long Halloween, both of which were cited as inspirations to the film The Dark Knight.  Reading them back to back, it’s interesting how that film merges a major plot thread from each story into its script.  The Joker’s plot in The Killing Joke is not unlike his games in the film,  just as the film adapted The Long Halloween‘s origin of Two Face mixed with a noir mob story.

When it comes to Batman, my favorite graphic novel is, hands down, The Dark Knight Returns.  Besides being one of the best told Batman stories, it nails a version of the character that balances the many, turbulent pieces much better than anything else.  In film, it’s The Dark Knight, both because it’s an incredible piece of cinema and because, like Frank Miller’s work with the character, it just gets everything right.

Alan Moore’s The Killing Joke is regarded as one of the best – if not the best- Joker story in print.  Though at this point, it feels like everything that Alan Moore writes getting regarded as the best thing in print, so set your expectations somewhere near realistic.  For a short novel – I read it over a single lunch hour – it managed to paint a portrait of the Joker that’s stuck around ever since.  You can feel the Joker of The Killing Joke lurking in much of the really great Batman work that’s come since, and that’s because Moore’s Joker is a terrifying, distinct brand of psychopath.  If there’s something you like about the Joker in The Animated Series, The Dark Knight or any modern Batman comic, it probably gasped its first breath here.

The basic hook is perfect: The Joker believes that all that separates a good, sane man from a madman like himself is one bad day.  That’s it.  A single bad day is all that separates us from madness.  To prove it, he targets one of Gotham’s best men: Commissioner Jim Gordon.  He shoots and paralyzes Barbara Gordon (an event that would stay a part of Batman continuity), kidnaps Jim and subjects him to tortures both physical and psychological.  It’s ending is also a classic.  I don’t want to spoil the final joke that the Joker shares with Batman, but it’s memorable.

Yet for all of that, it’s not a classic graphic novel.  A lot of what makes it great is the impact it had.  But as a story, it’s lacking.  Compare Joker’s attempt to break Gordon with the far more horrifying escalation of terror and violence in The Dark Knight‘s version of the theme.  In The Dark Knight, you reach a point where you honestly believe the Joker might be right, that he might show Gotham that they’re all as sick and twisted as he is.  In The Killing Joke that never feels like a threat, since other than shooting Barbara the best the Joker’s got left is dressing Gordon up like an S&M slave and showing him naked pictures of his daughter.  A couple of weeks of that might smash him, but a day?  C’mon, now.

It also makes the odd choice of giving the Joker an origin.  This is probably not a good idea in any case, but when your origin is the least interesting part of the book, it’s become a liability.  The Dark Knight‘s play with the idea of his history being “multiple choice”, as the Joker says, is far more effective. Do you want to know how I got these scars?

The Long Halloween is technically a sequel to Frank Miller’s Batman: Year One, which I have not read.  Nothing in the book refers directly back to it, though, so there’s no danger in picking this up first.  I need to get to Year One soon, though.  More Frank Miller Batman.  w00t.

Written by Jeph Loeb with art by Tim Sale, The Long Halloween is a sprawling tale of the fall of Gotham’s old school mobs and the rise of the freakshow that is Batman’s rogue’s gallery.  More than anything in the book, I liked that The Long Halloween showed how Batman’s presence might be changing the city without just saying, over and over again, “Hey, do you think these people are showing up because you did?”  There’s a distinct moment of transition near the end of the book that nails the change so well that perhaps people should consider the point made and move on.

It’s also the story of how Two Face came to be, and though there are shades of the Harvey Dent we see in The Dark Knight, this version of Two Face’s origin is as lacking in punch as the Joker’s plan was in The Killing Joke.  It works, I guess, and it plays some important notes that make you question if Dent has problems well before his face is scarred, but something about the break that sends him over the edge doesn’t have the impact I wanted.  It just doesn’t compare to to the horrifying trial the Joker puts him through with his fiancee in The Dark Knight.

Like The Killing Joke, this novel has a lot of great ideas and texture but misses something in the execution for me.  With The Killing Joke it was the thin plot.  In The Long Halloween, I think it’s the actual character writing.  Especially the dialog.  It’s not bad, but there are enough times when Batman’s morose narration seems overdone to break the illusion.  It’s a good version of Batman, but not a great one.

What is great is the use of Batman’s mob villains, Carmine Falcone and Salvatore Moroni.  I have to image a lot of what they did in this bled into Chris Nolan’s films, though to be fair I don’t know how much of this was set up in Year One.  Frank Miller may deserve more of the credit than Loeb, but nonetheless The Long Halloween uses more run of the mill organized crime very, very well.  It also sets up the Harvey/Gordon/Batman on the roof promising to take down the mob motif that worked so well in the film, and it works here almost as well.  It also has a great version of the Batman/Catwoman and Bruce/Selina relationship insanity, which it uses as character texture and not a brute force plot device.

I’d check both books out, flaws and all, though.  They’re strong Batman stories and they set up a lot of things other stories recycle mercilessly.  But then I’d probably watch The Dark Knight again, because dude, it’s awesome.

No responses yet

Mar 17 2010

Pray!

Published by saalon under Coding

Code comment of the day:

// for better or worse, if we have a main image, but no homepage icon, then
// set the homepage icon to point to the main image …. and pray!

No responses yet

Mar 11 2010

Mulan

Published by saalon under Watching

Minority opinion time.  Mulan is a really good movie.  You know, the Disney one set in China about the girl who pretends to be a boy to keep her disabled father from having to be killed or dishonored when he receives a conscription notice? It gets ignored, I think, because it came out around the same time Disney animation started actively working to destroy itself.  It came out in between Hercules and Tarzan, so I can’t blame people who wrote it off along with all of its peers.

Unlike so many of the other Disney films of the late 90′s and early 2000′s, Mulan‘s got an actual plot and characters with personality.  It has a legit villain in Miguel Ferrer’s yellow-eyed Hun badass, mostly non-annoying side characters and some of Disney’s best design work.  Yes,  it’s also the one where Eddie Murphy is a dragon named Mu Shu, but watch how well that character works despite how out of place it is.  Mu Shu should sink the film, but he comes out as kind of likable.  The same can be said of the songs, which are not particularly great but don’t feel perfunctory like the ones in Hercules.

Mulan herself is perhaps Disney’s strongest female character in their entire filmography.  When she struggles to fight with the men, it’s less because she’s a woman than that she’s never done anything like this before in her life.  By the end of the film, she’s fighting with and outsmarting Hun warlords and saving the empire without a boyfriend coming to her rescue.  In Mulan, the heroine rescues the hero.  Even though Mulan kinda sorta becomes a princess at the end of the film like every Disney heroine, she earns it by saving the Empire, not by marrying a prince.  She comes home not with a dress but a sword as a trophy of her victory.  Mulan kicks ass.

Mulan is the film I wish Disney made every time up to bat.  It has character development, a great story without the pathetic emotional manipulation Disney tends to trade in and the thing by which I’ve always judged a great Disney film against the rest: a fantastic climax.  Look at, say, Hercules, which isn’t a horrible film by any measure. But look at how it ends:  The Titans beat up everyone, then Hercules gets a power-up that lets him easily slay them.  Mulan ends with a well paced action scene, ending with Mulan decisively beating a stronger opponent not through luck, but cunning.

Mulan should be on the list of great Disney films, but I fear it’s too far off the beaten path to get recognized.  For all people’s complaining about Disney movies having too many princesses and not enough role models, I see an awful lot of frilly lace and not that many Chinese swords.

One response so far

Mar 10 2010

Minor Struggles

Published by saalon under Creating

Been thinking more about my utter lack of motivation to write lately, and it hit me that I haven’t been entirely honest with myself.  I mean, I’m a lazy ass.  That’s just truth.  That’s just not all of it.

There’s a thing that I keep pretending like I can get away with not doing, though, and I’m about at that point where I need to stop pretending.  It kind of sucks.  But it’s something every single writer who talks about the work says they had to do.

I need to start saying no to friends and stay the hell home and write.  I need to say no to hanging out, no to getting drinks, no to anything that means I don’t get something out onto paper.  All my talk of needing to buckle down is kind of shit, because when you get down to it, there’s always a friend I haven’t given enough time to that I should go grab a beer with.  Drawing a line at this point is cutting something off that I don’t want cut, or at least that I feel guilty about cutting.  It’s easy to put down a Playstation controller.  It won’t get hurt when you tell it that Dragon Age can wait for a bit.

I don’t mean saying no to obligations, like, “Hey, I can’t help you with your fundraiser,” I mean saying no to friends. Saying your faux-career that hasn’t paid you a cent is more important than their emotional needs.  It makes me feel like a shit just thinking about it.

I don’t know where to draw the line on this one. I just know that right now it’s in the wrong place.

2 responses so far

Mar 09 2010

Mighty Mighty Boskone

Published by saalon under Watching

Sue me for the pun later.  First, let me tell you about Lensman.

I’ve been on this run of serial fiction lately, picking up collections of stuff that originally came out in Astounding Science Fiction or The Magazine of Science Fiction and Fantasy.  I started with the original run of Elric stories, if for no other reason than that Amazon gave the Kindle edition away for free.  Something about the raw rush of energy really hit me, even through the dripping-with-emo aura of Moorcock’s albino hero.  It was something fantasy had not been to me in a long time: a really, really good time.

So I wanted more, naturally.  I considered Conan, but Brennen suggested something else: “Doc” E. E. Smith’s Lensman books.  Sure, I thought, why not? I have a severe Science Fiction deficit in my reader-ography, so why not start with the grandaddy of space opera?  I always thought the title Lensman sounded a bit goofy, but it wasn’t like that was a fair criticism of anything after I just finished four novellas about an albino with a soul stealing sword called Stormbringer.

I decided to start with Galactic Patrol, which isn’t exactly the first story in the series, but is the first with its central character, Kimball Kinnison, and covers his first battle with the Boskone pirates.  I wasn’t sure if it was even going to hit me, so rather than try and read the whole series straight through and end up potentially bored, I did something I usually don’t and started in the middle.  I’m glad I did.  Galactic Patrol is just a great, great time.  It’s filled with strange planets, bizarre creatures and insane space battles.  There are spy-beams and projectors and screens and all kinds of other pseudo-scientific things on display, most of which barely makes sense at first but eventually becomes part of the rhythm of the language.  Spy beams flicked out.  Screens gave off rainbow color under the force of the projectors.  Wacky stuff.  Fun.

If you liked Star Wars and can give some really clunky 1930′s dialogue a pass, I think you’d have to work not to have fun reading Galactic Patrol.

Now I’m onto the first book of The Chronicles of Amber, Nine Princes in Amber.  After that, I’ve got both Grey Lensman, the next book in Smith’s series, and The Savage Tales of Solomon Kane by Robert E. Howard.  Solomon Kane just got made into what’s supposedly a pretty awesome film, so before it hits in the U.S. I thought I should read some of the original stories of Howard’s Puritan demon hunter.  I mean, really; Puritan demon hunter.  That’s almost all you have to know.

One response so far

Mar 03 2010

Movie Education – February Update

Published by saalon under Watching

Light month due to the Olympics.  In fact, everything on this list I watched on Sunday night, so they got in just under the wire.

Fletch

Thanks to Community, I’ve had a hankering to go back and check out old Chevy Chase stuff.  You know, from the days before he stopped being funny and started being banned by the Geneva Convention as an instrument of torture.  Fletch popped up on watch instantly and it seemed like as good a place to start as any.  Maybe it’s because of where Chase was in his career as I was growing up, but I expected one of those Buffoon-Who-Lucks-Into-Success plots that I hate.  I was pleasantly surprised to see that the main character of Fletch was clever, imaginative and witty.  If Chase had played more characters like this and less like Clark Griswold, he might not have needed Community to resurrect his career.  Also, this film was written by the guy who did the original The In-Laws, so you know it’s going to be funny.

Un Chien Andalou

Yeah, we’ve all at least heard of one shot of this movie.  You know the one, where the guy grabs the woman’s head and slits open her eyeball.  This is that film.  Salvadore Dali and Luis Bunuel partnered to create what is probably the single most famous piece of surrealist film (and one of the most famous surrealist works ever).  It’s only fifteen minutes long, and I doubt it could have gone on much longer without wearing out its welcome.  There is nearly no plot to speak of, though the film does center around two characters whose relationships as portrayed makes a weird sort of emotional sense.  There are a number of classic shots – apart from the eye slicing, there’s also a creepy bit with ants crawling out of a hole in a guy’s hand, and a sequence where he rubs a woman’s clothed breast, which then becomes unclothed, then becomes her butt – but the real impact comes from seeing how intricately it’s all strung together.  This is probably seen as a film school kind of thing to watch, but anyone who enjoys film at all should see what the medium can be like if it’s pried out of its typical narrative structure.

Excalibur

A lot of fantasy films came out around the time I was born, and I managed to see very few of them until I grew up.  I think the things that come out when you’re alive but too young to understand are the most awkward to pick up later, though I don’t know why.  We see older films and we see new films, but something about the familiarity of a film that you vaguely remember coming out but didn’t actually see breeds disinterest.  Excalibur gets a lot of praise as one of the few really good fantasy films, but after seeing it I cannot for the life of me see why.  It’s essentially a boring CliffsNotes version of the Arthurian legend, except when it veers off into straight out goofiness.  Over and over again I wondered if the director realized how open he had made himself to Monty Python and the Holy Grail jokes with his too-serious, overblown take on King Arthur.  When Mordred shows up in gold armor with nipples, it was clear nothing could save the movie.  This one hurt to watch.

No responses yet