Archive for the ‘Uncategorized’ Category

Self Organizing Communities

Tuesday, May 5th, 2009

One of the things that I find fascinating about the Internet is how it makes it easier for groups to form organically. I was thinking about this because of a reaction to the GoGaRuCo pr0n presentation ridiculousness. The group I am thinking of is RailsBridge. Which started as a response to the need to do something positive in reaction to all the recent negativity in and about the rails community.

It has only been a few days, but already they have a mailing list, a website, an IRC channel and are looking for people interested in helping them file as a non-profit. Also, there are also spin off projects, like RubyChallenge.

I personally think this is an awesome idea. And represents the best that the Internet as a social media can offer–enabling people to get together to help out others.

Sprinkle and Passenger Stack

Tuesday, April 21st, 2009

I started using sprinkle with the passenger-stack recently. So far, it has been easy to get started with and fairly intuitive. I chose it rather than puppet or some of the other declarative server configuration DSL because it doesn’t need to install anything extra on the server to work.

This is great for the kinds of things I have been working on, because they are fairly small, and don’t need many servers.
I think if I were managing more things, I might choose puppet, because the overhead would be justified.

One of the things I like about sprinkle, is the DSL is pretty straight forward, eg the package definition for passenger looks like this:

package :passenger, :provides => :appserver do
  description 'Phusion Passenger (mod_rails)'
  version '2.1.3'
  gem 'passenger' do
    post :install, 'echo -en "\n\n\n\n" | sudo passenger-install-apache2-module'
 
    # Create the passenger conf file
    post :install, 'mkdir -p /etc/apache2/extras'
    post :install, 'touch /etc/apache2/extras/passenger.conf'
    post :install, 'echo "Include /etc/apache2/extras/passenger.conf"|sudo tee -a /etc/apache2/apache2.conf'
 
    [%Q(LoadModule passenger_module /usr/local/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-#{version}/ext/apache2/mod_passenger.so),
    %Q(PassengerRoot /usr/local/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-#{version}),
    %q(PassengerRuby /usr/local/bin/ruby),
    %q(RailsEnv production)].each do |line|
      post :install, "echo '#{line}' |sudo tee -a /etc/apache2/extras/passenger.conf"
    end
 
    # Restart apache to note changes
    post :install, '/etc/init.d/apache2 restart'
  end

I had some problems, like the version of passenger in the passenger-stack master branch on github is a point release behind the phusion’s, which is annoying because when passenger updates itself to 2.2.0, the configs are not updated and apache tells you it can’t find the mod_passenger.so file.

Also, it puts the passenger config in a slightly unusual place(/etc/apache/extras), for an apache module, as well as appending stuff to /etc/apache2/apache2.conf. This prevents it from idempotency, because if you run it twice, it will add additional lines to the config files. So, in the vein of scratching my own itch and what have you–you know, that open source thing–I rewrote it.

package :passenger, :provides => :appserver do
  description 'Phusion Passenger (mod_rails)'
  version '2.2.0'
  gem 'passenger' do
    post :install, 'echo -en "\n\n\n\n" | sudo passenger-install-apache2-module'
 
    # Create the passenger conf file
    loading = %Q(LoadModule passenger_module /usr/local/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-#{version}/ext/apache2/mod_passenger.so)
    conf = %Q(PassengerRoot /usr/local/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-#{version}
PassengerRuby /usr/local/bin/ruby
RailsEnv production)
 
    post :install, "echo '#{conf}' >> /etc/apache2/mods-available/passenger.conf"
    post :install, "echo '#{loading}' >> /etc/apache2/mods-available/passenger.load"
    post :install, 'a2enmod passenger'
    # Restart apache to note changes
    post :install, '/etc/init.d/apache2 restart'
  end
 
  verify do
    has_file "/etc/apache2/mods-enabled/passenger.load"
    has_file "/usr/local/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-#{version}/ext/apache2/mod_passenger.so"
    has_directory "/usr/local/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-#{version}"
  end
 
  requires :apache, :apache2_prefork_dev, :ruby_enterprise
end

Now, it takes advantage of the debian convention of keeping module loading and configuration files go in /etc/apache2/mods-available that are symlinked into /etc/apache2/mods-enabled by the a2enmod utility. This is immediately obviously awesome to anyone who has contemplated the horror of trying to parse the apache main config to see if the stuff they want to add is already there and needs updating.

I also added some verifiers so that it won’t rerun if there were no errors. Pretty cool, no?

What I am Reading

Sunday, April 19th, 2009

I have this bad habit of reading books concurrently. Partly, it is because I like to graze on books. Sometimes a technical stuff is too heavy, sometimes even space opera is too much…maybe not.

  • Ruby in Practice I have written a bit about this already
  • Programming ErlangI started this, got side tracked and have started reading it again.
  • Godel Escher Bach Just awesome
  • Misspent youth Peter F. Hamilton is my favorite space opera writer. This isn’t space opera though it deals with many of the same things his space operas do. 70 year old man receives rejuvenation treatment->20 and the weirdness that ensues.
  • Ender in Exile Not as good as I would like so far, but I am giving it more time.

Quake Live is a wonderful…

Friday, April 17th, 2009

..way to get my fps fix.

I rock-ish

Also,
funny pictures
moar funny pictures

Moo Revealed

Tuesday, April 14th, 2009

I got some Moo cards a while back. I was trying to have them for mwrc, but alas I ordered them too late. Anyway, here they are:

moo

TED, Inspiration, Etc

Monday, April 13th, 2009

When I was in Japan, I was introduced to TED by one of my professors( he does presentationzen). Since then I have gone to their website every now and and again to watch the amazing and inspiring talks they have. One of the reasons I think TED is so great is that it puts a big emphasis on really good presentations. It probably also has an amazing back channel, hallway atmosphere–whatever. I was going to say something about how it costs a lot to attend, but after reading some of the registration info, I saw that it is more complicated than that. You need to apply to even attend the conference.

So, the presentations are awesome.

My Senior year of my CS degree, I would spend my lunches in the ACM room, watching TED talks and occasionally taking naps. I often stayed up too late and was tired in the middle of the day. A tradition I am still continuing as you would know by looking at the times I post on my blog.

And now for something moderately related.

I have been interested in the effect of mobile communications on social interaction for a while now, so I found this funny, especially since I am interested in getting a smarter phone than my current.

Spring

Sunday, April 12th, 2009

Daffodils

Books w00t

Saturday, April 11th, 2009

A few days ago I took stock and realized I was in the middle more than 4 technical books at the same time. So I went to the library and picked up some pulp. This happened to me before, though that time I was in an airport with my brains feeling squishy after two days of conference with only the GEB to comfort me.

Then I bought The Yiddish Policemen’s Union, which in my opinion deserved its long bestseller status. Speculative fiction rocks.

In a similar vein, I am reading another alternate universe mystery novel, though there are goblins and vampires in this one. It’s called Stalking the Vampire and has so far proved to be exactly the sort of book I need. It pokes fun at noir style, while having suitably ridiculous mythical situations.

I attended a stats course today. It took all day. Ugh. Now my brain is reeling abit. Which makes Stalking the Vampire a good choice, even though my hard copy of Ruby in Practice has arrived.

Ah, can’t think anymore. Pinky and the Brain is on.

Up Too Early

Friday, April 10th, 2009

beartooth highway morning

Mostly I am talking about today, but I was then too.

Taxes

Friday, April 10th, 2009

Gah

But less of a hassle than I expected.

I also got some laundry done.

w00t.