Archive for May, 2008

May 20 2008

I Can’t Do Nothing Anymore: The Nonviolent Peaceforce

Published by Robert Fischer under To Be Categorized

I regularly pick up podcasts that take on wildly different viewpoints, because I regularly find that if you look at people fighting on opposite sides of nominally the same issue, you discover they they’re actually fighting different battles. The best example of this is evolutionary biologists and Creationists, who are arguing about wildly different things — the evolutionary biologists are presenting the conclusive science of evolution, while the Creationists are reacting to “social Darwinism” and their perception of encroaching secularism.

On this basis, I picked up Berkley’s PACS courses: 164A: Introduction to Nonviolence and 164B: Nonviolence Today. I figured that you wouldn’t get more extreme than a nonviolence class taught at Berkley. Turns out I was right, but what I didn’t realize is that there’s an extremist hanging out inside of me, just waiting to get out.

The astounding thing is how effective nonviolent campaigns can be. The Martin Luther King, Jr. and the civil rights campaign here in the United States is such a well-trod example that it is hard to react to it. However, the example of Gandhi was so new to me that it really shocked my paradigm, and his thinking changed the way I thought.

If you think about it, Gandhi managed to drive the English out of India, but in such a way that the English didn’t begrudge the Indians their independence. That’s surreal when you consider the international violence necessary for the American independence from England. And Gandhi’s practical yet spiritually-based approach to the entire problem of conflict really resonates with my own Christian faith in a beneficent and personal Creator God who made humanity in His likeness. So there’s a definite theological/psychological affinity that I have for the cause of peace. That affinity really jarred my complacency: I had resigned myself to the Kingdom of God being something that was necessarily externally imposed at some indefinite point in the future, but here’s Gandhi and MLK, Jr. leading organizations that demonstrate that peace really can be reached through nonviolence.

More practically, the whole enterprise of war in America seems to have devolved more into political nonsense and overreaction than to any real concept of the country’s defense, and the idea that we’re outlaying insane proportions of our budget for politically-motivated military campaigns really infuriates the small-government conservative in me, particularly when there are proven-effective nonviolent means to resolve conflicts that are more cost-effective in the long run.

So, I’ve joined the Minneapolis chapter of the Nonviolent Peaceforce. It’s an impressive organization with significant successes (watch this blog for more on that), and I’d like to see its mission continued and spread. After the marches I’ve done, and the letters I’ve written, and the votes I’ve cast, this is the first time that I’ve really felt hopeful about accomplishing something in the cause of peace.

Popularity: 2% [?]

3 responses so far

May 14 2008

Okay, Grails, That Was Cute: Taglibs

Published by Robert Fischer under To Be Categorized

So, a while back I was impressed by Rails routing. It was a nice little surprise which came out of left field to impress me: I love it when frameworks do that.

Grails just had its time — taglibs. Now, because of the pain of JSP tag libraries, I’ve avoided anything that sounded anything like UI taglibs. But, I was starting to repeat myself in views, and in such a way that partials seemed a bit hokey. This is where custom tags come in.

So, I sucked it up and checked out Grails taglibs. The limited documentation on the page scared the crap out of me, because I assumed I was going to get stuck and there’d be no help.

Turned out I didn’t need any. Nice.

The code that repeated looked like this:

            <g:if test="${data.otherDobs}">
                <g:link action="otherDobs" id="${id}">
                    Other Date(s) of Birth
                </g:link>
            </g:if>
            <g:else>&nbsp;</g:else>

The argument to “test”, the “action”, the “id”, and the text to display all varied.

After the taglib, it looks like this:

            <g:moreData test="${data.otherDobs}"
                    action="otherDobs" id="${id}">
                    Other Date(s) of Birth
            </g:moreData>

The taglib was just:

class MyAppTagLib {
  def moreData = { attr, body ->
    if(attr['test']) {
      out << link([action: attr['action'], id: attr['id']], { body() })
    } else {
      out << '&nbsp;'
    }
  }
}

Cute. For bonus points, I could have passed all the attrs except for ‘test’ down into link, but I decided against doing that right now. All the magic was freaking me out.

Popularity: 2% [?]

4 responses so far

May 14 2008

My Story on “In the Loop”

Published by Robert Fischer under To Be Categorized

I got up at the last Story Slam that In the Loop did. If you’re interested in hearing it, check out the MP3 here (mirrored here).

I got bounced to the bonus reel, which shows the quality of the people they had show up. If you want to hear more of this stuff, check out the “In the Loop” podcast for the prime cut. You probably also want to check out the “In the Loop” blog (fed to Twitter here).

Popularity: 1% [?]

No responses yet

May 12 2008

Ruby + XML: A Serious Question That Only Sounds Facetious

Published by Robert Fischer under To Be Categorized

How does anyone actually do XML parsing in Ruby? I’m talking about real XML parsing with namespaces, entities, XML encoded text nodes — the whole 9 yards. I don’t need XPath: I’m willing to walk the tree a la Groovy’s XMLSlurper. But I need something that doesn’t suck.

I’ve been trying to do some simple XML parsing: read in an XML, extract some data elements (including namespaces that are declared), and then take one particular node and store all the child nodes in a CLOB (a.k.a. “text”) database field.

REXML has been a nightmare. It just barely works for parsing. Its XPath, while nominally supported, is getting me all kinds of weird results. It’s never clear if it’s resolving entities or XML encoding or not. The pretty printer will wrap in the middle of an XML encoded entity. The deprecated #write method completely fails. And, best of all, the formatters ship with ruby 1.8.6 patchlevel 111 for darwin, but not ruby 1.8.6 patchlevel 36 for x86_64-linux. And the website is down, so I can’t pull down the code manually.

The alternatives I’ve looked at haven’t been awesome. LibXML-ruby is experimental, requires nonportable library installations, and has the libxml interface that we know and hate. Hpricot half-supports XML, and doesn’t support namespaces.

Quite frankly, XML parsing is one of those things that needs to be a solved problem before any language can be considered ready for the real world. As far as I can tell, Ruby fails at this point.

I know that it’s the open source world, and I should quit my bitchin’ and write up my own XML parser which doesn’t suck. There are two problems with this — 1) I’m not an XML expert, I don’t want to be an XML expert, and so if I were to write something, it’d take me a very long, very unhappy time and probably be wrong in nonobvious ways; 2) in the same amount of time, I could probably rewrite my application in Groovy/Grails, where XML parsing is easy. This amount of time, though, is a lot more than I want to spend. So if I flushed the time I’ve spent building my application down the toilet because something as common as XML parsing is broke in Ruby, I’m going to be really unhappy.

So someone please, please, please correct me by pointing out a great and glorious and easy-to-use XML library in Ruby.

Popularity: 5% [?]

22 responses so far

May 11 2008

Digg Away

Published by Robert Fischer under To Be Categorized

I’ve implemented WP Super Cache, because WP Cache just wasn’t cutting it. It’s actually caching pages, and provides all kinds of other high-traffic support. So hopefully we’ll survive our next Digging/Reditting/Slashdotting/whatever.

Popularity: 2% [?]

No responses yet

« Prev - Next »

Green Web Hosting! This site hosted by DreamHost.