This would be cool for an office

April 28th, 2009

Lots of places for books…

Remembering Michael Hedges

April 19th, 2009

It’s been over a decade since Michael Hedges was killed in a automobile accident. I’m still sad that he’s gone.

Icy Hot

April 19th, 2009

The common wisdom is that the ice at the poles is retreating faster than an Iraqi armored division. Yet strangely enough, maybe it’s not.
Antarctic ice is growing, not melting away

Put that in your computer model and process it.

Heresy is Hot

March 28th, 2009

I’ve written a few times before about what I see as irresponsible science–consensus science–around global warming. I think the backlash against global warming is…er…warming up.

Here’s a post from Slashdot about Freman Dyson opposing the “lousy science” behind much of what is being promulgated today.

The Slashdot article links to a NT Times article. It’s long but well worth the time. (I wish Oliver Sacks would say nice things about my brain!)

Programmer/Text Editors for Mac OS X

March 25th, 2009

I spend much of my day inside various text editors hacking away at the various projects that work demands of me. A good editor can make the difference between getting the job done quickly and languishing in a copy-paste-edit-repeat nightmare.

I’d like to offer you a list of editors that I use with a small comment about each one. I’ll follow up with some brief product reviews pointing out what I like and don’t like about each one.

Here’s the list:

  • BBEdit - The grandaddy of Mac editors.
  • TextWrangler - The grandson of BBEdit. Lags behind in features but makes up for it in price: free
  • TextMate - an editor with amazingly powerful tricks up it’s sleeve.
  • Coda - all in one web-site oriented editor. My PHP-coding coworkers love this program.
  • Espresso - a new editor. Part of the MacHeist bundle. I have not tried it yet, but it looks promising. From the same folks who do CSSEdit. Web-site oriented like Coda.
  • Affrus - a Perl-oriented editor that includes a GUI interface to Perl’s deubgger. If you do any work in perl, Affrus is a must. It’s saved me countless hours by letting me debug down into the Perl libraries to find errors that don’t get reported up correctly.
  • CSSEdit - a CSS editor. Listen, someday you will ahve to break down and create/edit a CSS file. CSSEdit makes that experience much less painful.

Reviews to follow.

Can you believe this is free software?

March 18th, 2009

Apache Directory Studio

This is a nice piece of software. If you do any LDAP work it’s worth the time to download and try out. I don’t have to boot windows to use LDAPBrowser anymore!

Whew.

March 8th, 2009

I have had a busy week. As soon as I have assimilated it all, I will write about it.

Ruby Code to Pull XML Elements and Attributes from a XML Document

March 3rd, 2009

Here’s a question posted to a mailing list that I follow:

I just want to go through the xml and return the names of all the elements as well as the names of their attributes. It seems that most of the time, people know the name of the tag they’re looking for, and they want to get the inner html or the value of one of its attributes.

Is there a method in Hpricot or REXML that enables you to just get a list of all the tag names and attributes?

Here’s my solution:

#!/usr/local/bin/ruby

require 'rubygems'
require 'hpricot'

doc = Hpricot(open("x.xml"))

elements = Array.new
attributes = Array.new

doc.search("//*").each do |e|
       if e.class == Hpricot::Elem
               elements << e.name
               e.attributes.each do |a|
                       attributes << a[0]
               end
       end
end

puts "Elements:"
puts elements.join("\n")

puts

puts "Attributes:"
puts attributes.join("\n")

It’s ugly, but it gives you an array of elements and attributes. You could run sort and unique on the arrays if you wanted to get a stripped down list.

LOLCats versus Activism

March 1st, 2009

Here’s an interesting article about the commingling of content on Web 2.0 sites and how that impacts activism and censorship:

The Cute Cat Theory Talk at ETech

February 28th, 2009

I don’t know if I’ve posted this here before, but it’s worth posting again. Here’s the most impressive flash animation I’ve ever seen:

Low Morale’s Creep.