Kevin Marsh

Toward a more Republic Democracy

The House of Representatives (and to a lesser extent, the Senate) were established out of the desire for the nation to be led by the people; realizing that not everyone could travel to the capital on a regular basis and voice their opinions.

So the founding fathers setup a republic, where citizens vote once a year for representatives that share the same ideals as them. Which is usually (poorly) determined by party affiliation.

However, how do we know that who we elect are actually voting in our favor? And, more importantly, how do our elected representatives know how their constituents would vote?

As a web developer, I am always looking for ways in which the web can be used to improve our lives. Here is one such way:

  • A list of upcoming issues before the House could be put on the Representative's website;
  • constituents could log in and cast a vote for each issue as if they were before the House themselves;
  • a Representative could log in and see a tally of the votes so far for each issue. They would then take this to Congress, armed with the opinions of their constituents.

This also makes election time much easier. Rather than listening to party-incited backbiting and dirt-digging, you would know that you differ on, for example, 89% of the issues in the previous term and, in this case, it might be time to vote for a candidate whose opinions are more aligned with yours.

Because after all, shouldn't a government "of the people, by the people, and for the people" include more of the peoples' opinions?

Dotfiles

I'm proud to announce the grand opening of Dotfiles!

From the site's homepage:

dotfiles.org is a place to upload, share, and synchronize your dotfiles.

If you don't know what a dotfile is, you probably don't need it. And if you don't know, learn up!

It's my first app written in Camping, which has been a trip I'm confident to say I hope I'll take again.

Mephisto

It's official, this blog is now running Mephisto!

There a few bugs and things missing, which'll get cleaned up in due time.

Also, feeds have now been moved to FeedBurner:

http://feeds.feedburner.com/kevinmarsh

Update (or subscribe!) today!

Tab-completion for Ruby Cheat Sheets

Add this to your .bashrc or .bash_profile file:

complete -W "$(cheat sheets | egrep '^ ' | awk {'print $1'})" cheat

Bracket accessors for your Rails models

Here's an interesting hack. Tag this on the end of enviroment.rb:

module ActiveRecord
  class Base
    def self.[](id)
      self.find(id)
    end
  end
end

Now you can do fun things like:

>> Person[1]
=> #<Person:0x23c7a00 @attributes={"name"=>"Alice", "id"=>"1"}>
>> Person[1].name
=> "Alice"

Which is equivalent to:

>> Person.find(1)
=> #<Person:0x23c7a00 @attributes={"name"=>"Alice", "id"=>"1"}>
>> Person.find(1).name
=> "Alice"

...but far cooler.

In other news, I really need to upgrade to Mephisto-just as soon as they add XML-RPC support.