Friday, September 26, 2008

Debating the Debate


For those of you ready to have this election decided it came as a dissapointment that nobody royally screwed themselves tonight on national television. McCain kept his temper. Obama showed some foreign policy muscle. Most people are calling this debate a draw. How boring! The only salvation for the night was the fiesta where I watched the debate. They served up enchiladas and a very posh Obama cake. Mmmm. Hope is delicious!

Here is some interesting analysis I overheard at the fiesta:
  • McCain has no new foreign policy ideas. In fact he is quick to attack anyone questioning the foreign policy status quo. Yet these old ideas he is so dogmatic about have pulled us into several wars and conflicts every decade and made our country into a global bully. What is so good about that?
  • McCain's campaign uses fear to appeal to voters. Fear Obama because he is too liberal. Fear Obama because he is too different. This is the same nonsense the Bush administration used to stay in power. The same nonsense they used to walk all over the constitution.
  • On a positive note, at least both candidates could form a coherent sentence this year. That is more than we can say about the Bush years.

Monday, September 22, 2008

Software For Lazy Screencasters


Our ancestors had it rough. When they wanted to change the channel on the TV they had to use their legs to walk over, then their hand to change the channel. Progress gave us the remote control and now I can just use the tip of my finger to change the channel. When they wanted pizza they had to know what to do with flour, yeast, water, cheese, etc. then they had to make it from scratch. Progress gave us the frozen pizza and now the only question is "Is is delivery or is it DiGiorno?" Screencasting used to be something that involved buying and installing software. Fortunately somebody has come along and gotten rid of those two steps. The new lazy way is called Screencast-O-Matic and it is insanely easy. Best of all it is free. Check it out! Wanna see an example of a screencast made this way? Here is one of me writing this blog entry.

Saturday, September 20, 2008

ActiveRecord Goodies


There are 3 things in the goody basket tonight:
  1. Multiple belongs_to and has_many Associations: Say you have a Game object. It makes sense to have two instances of a Player object associated with it. One player is the winner, one is the loser. Do you know how to model that relationship in active record? Here is a fantastic blog post that gives a nice explanation on how to do it. If you want another example take a look at my code which does the same thing.
  2. Logging the sql ActiveRecord generates: In rails it is obvious how to make this happen. If you are using ActiveRecord standalone you can do this:
    ActiveRecord::Base.logger = Logger.new(STDOUT)
  3. Deciphering how ActiveRecord pluralizes: Sometimes I have trouble figuring out what ActiveRecord will compute the plural of a noun to be. This application shows you what ActiveRecord is thinking.

John McCain Hates Rails

Old man McCain hates Rails! I've got the quote right here:
"Weyrich knows that Senator McCain, throughout his career, has been very anti-rails"
Here is the source of that quotation. They seem to have misspelled Weirich's Name, but let's not dwell on details. What this means is that come November the Ruby community must rise up and protect our beloved web framework against McCain and the forces of evil! DHH and Obama are pretty tight. They both got their starts as community organizers in Chicago, which means it is a safe bet that a vote for Obama is a Vote for Rails! McCain's animosity towards Ruby probably stems from frustration; McCain's own language, 'straighttalk', a pidgin dialect of smalltalk, has turned out to be vaporware.

Tuesday, September 16, 2008

Feet Hurting? Try Shoes.

From Cuberick
The path to a working GUI application is often strewn with broken Chihuly sculptures and jagged discarded fish tank coral. This is where shoes, _why's tiny windowing toolkit, comes in. Last September I gave a presentation on shoes to the chicago ruby user group. Since then it has come a long way! Here are some of the awesome new features that have come along.
The most important thing about shoes is how damn easy it is. You can write a useful application in just a few lines of easy to understand code! For proof of that check this out:


#Source code borrowed from this useful article here
Shoes.app do
button( 'play' ){ @v.play }
button( 'pause' ){ @v.pause }
button( 'stop' ){ @v.stop }
@v = video "superbad.divx", :width => "100%"
end


Here is a screenshot of that in action:

See? No Chihuly sculptures in there, and no jagged discarded fish tank coral. I recently knocked together a simple shoes app for score keeping score at a local video game tournament. It tries for a funky retro look. Put on your safari helmet and head over here to see it. Real live shoes code in the wild!

Wednesday, September 10, 2008

Presidential Dungeons and Dragons

In internet terms the Presidential election is just a year long flamewar. It ends in November when we all go into little curtained stalls and choose the troll we like best. The troll who gets the most votes is made President and gets to be the most powerfull troll in the world for 4 years.

Following the election news closely is like reading YouTube comments. If you haven't been paying attention, here is a blow by blow I whipped up, YouTube style:


Wouldn't it be great if, instead of this vacuous circus, we had something substantial to base our decisions on? Let's get a good dungeon master and let the candidates role play the presidency on television. It would be like the debates, but useful. Seeing a candidate face problems and make decisions would give tremendous insight into how they would serve as president. C'mon, admit it, we all want to see McCain and Obama's character sheets and watching those guys stay up all night, rolling a 12d, launching cruise missles and vetoing bills? Priceless.



Digg!

Monday, September 1, 2008

Movers and Shakers, Dreamers of Dreams


Here is a factoid for all you smarty pants. If you've ever used the term "movers and shakers" than you have quoted Arthur O'Shaughnessy's Ode from his book Music and Moonlight (1874). Another famous reference to the poem comes from the screenplay Charlie and the Chocolate Factory when Willy Wonka Sets Veruca Salt straight about the Snozberries. I never knew Wonka was quoting!
We are the music makers,
And we are the dreamers of dreams,
Wandering by lone sea-breakers,
And sitting by desolate streams;—
World-losers and world-forsakers, 5
On whom the pale moon gleams:
Yet we are the movers and shakers
Of the world for ever, it seems.
Here is the poem in its entirety.