All I Need

Radiohead's latest album In Rainbows is one of my favorite albums in recent years. It's packed full of reverb and new-age remnants that bring about a state of both angst and euphoria. This dichotomy of expression gets me every time.

Currently, my favorite track on the album is #5 called All I Need. Below are the lyrics and a few of my favorite videos put to the music. Enjoy.

I am the next act waiting in the wings
I am an animal trapped in your hot car
I am all of the days that you choose to ignore
You are all I need
You are all I need
I am in the middle of your picture
Lying in the reeds

I am a moth who just wants to share your light
I'm just an insect trying to get out of the night
I only stick with you because there are no others

You are all I need
You are all I need
I am in the middle of your picture
Lying in the reeds

S'all wrong
S'all right
S'all wrong
S'all right
S'all right
S'alright

Mash-up with Microcosmos

Scotch Mist Version

Official MTV Video Release

Merb Talk Published as Podcast

A couple of months ago I gave a presentation at SD Ruby on the Ruby web-framework called Merb. The talk has now been published to the SD Ruby Podcast. Take a look at the video here:

Introducing Shadow, a Rails Plugin

Over the past few months, Patrick Crowley and I have been working on the complete rewrite of the popular Cinema Treasures community website. With the overall goal of bringing more social functions to the site, we needed a way to track changes the community makes to Theaters and related information. In essence, we needed "activity feed" functionality akin to Facebook and other social networks.

While it is relatively straightforward to store changes (versioning) of a particular model, it is less trivial to track what changed in each version and who changed it. This could technically be considered "auditing", but that's not a very exciting name. I decided to go with the name Shadow, alluding to capturing and storing the shadow of a record at any given state (including its associations).

For visual reference, the figure below shows how you might use Shadow to generate user activity feeds:

Example User Activity Feed

The model code to achieve the above functionality (in this case showing the User activity for a Project with Milestones), could be:


class Project < ActiveRecord::Base
  has_many :milestones

  shadow :attributes => [:address, :description], :associations => :milestones, :attach => :user
end

The shadow code is currently hosted at Github and is a Rails Plugin. I have plans to convert this into a Merb-compatible RubyGem as well. For more information on using Shadow and the current TODOs respectively, see shadow and TODO.

Also, if you are running Edge Rails, it is possible to install this plugin with the following command:


$ ./script/plugin install git://github.com/TheBreeze/shadow.git

Otherwise, you'll need to run the following command (remember to change to your Rails app root):


  $ cd /path/to/your/rails/app
  $ git clone --depth 1 git://github.com/TheBreeze/shadow.git "./vendor/plugins/shadow/"; rm -rf ./vendor/plugins/shadow/.git

Getting to know Ruby: Core Classes

This evening I've been hanging out in #ruby-lang helping people out and just chatting about some more advanced Ruby topics. I decided to jump on the console and play around with some Ruby internals. If you're a programmer and are curious about Ruby but aren't sure where to start, this is the perfect article for you.

First and foremost, you'll need to have Ruby installed on your machine. Doing this is pretty straightforward, click here for help. Once you have it installed, you'll get a nice little utility called IRB which stands for Interactive Ruby. To start it up, open a console window and type:


$ irb

You'll be presented with the signature ">>" command prompt. To make sure everything is working, go ahead and do a "Hello, World" like so:


>> puts "Hello, World!"

If you get the following output, you're ready to go:


Hello, World!
=> nil

A good resource to bookmark is the RDoc Documentation for Core Classes. Now is a good time to open this up in a browser. Once that is open, go back to IRB and enter the following line of code:


>> Object.constants.select { |c| Object.const_get(c).is_a?(Class) }.sort

Let's break that line down a bit. Since Object is the root namespace/class in Ruby, the constants class method will return all the modules and classes defined within Object. Since that returns an array of constants (it is actually an array of strings for each constant), we'll want to slim down the list to only those that are classes. The const_get class method returns the constant and the is_a? class method tells whether or not a given constant descends from a given class. Then we sort that list. Returned should be the 65 or so core classes that make up the Ruby language, see below:


=> ["ArgumentError", "Array", "Bignum", "Binding", "Class", "ConditionVariable", "Continuation", "Data", "Dir", 
"EOFError", "Exception", "FalseClass", "File", "Fixnum", "Float", "FloatDomainError", "Hash", "IO", "IOError", 
"IndexError", "Integer", "Interrupt", "LoadError", "LocalJumpError", "MatchData", "MatchingData", "Method", "Module", 
"Mutex", "NameError", "NilClass", "NoMemoryError", "NoMethodError", "NotImplementedError", "Numeric", "Object", 
"Proc", "Queue", "Range", "RangeError", "Regexp", "RegexpError", "RubyLex", "RuntimeError", "SLex", "ScriptError", 
"SecurityError", "SignalException", "SizedQueue", "StandardError", "String", "Struct", "Symbol", "SyntaxError", 
"SystemCallError", "SystemExit", "SystemStackError", "Thread", "ThreadError", "ThreadGroup", "Time", "TrueClass", 
"TypeError", "UnboundMethod", "ZeroDivisionError"]

If you really want to get to know Ruby internals, just go through that list and refer to the documentation I mentioned before. Since that is simply a list of alphabetized class names, some classes will be far more complex than others. Feel free to skip those that are unclear.

Also, if you want the same documentation from the website locally, you can use the RI utility as follows (for the Array documentation):


$ ri Array

Have fun!

Jury Duty: Voir dire

In my previous post, I mentioned a process by which the court determines biases an individual may have in relation to charges in a case. I also mentioned that I wouldn't be surprised if courts didn't use this process 50 or 80 years ago. After a bit of research, I found no evidence to back my claim, so it stands as merely my own postulate.

What I did find was sentiment similar to my own.

"In the United States the process of voir dire is often much more in depth than in other countries and its practical implementation is somewhat controversial because of this. The amount of privacy that the potential jurors are afforded when asked questions raises the issue of the definition of "impartial jury". Some people question if the intensive questioning of potential jurors looks not just for inherent bias but for a potential to be emotionally swayed. On the other hand, proponents argue that this method gives both sides more confidence in the verdict." [1]

Looks like I'm not the only one who sees some controversy in this process.

Notes:

  1. Wikipedia - Jury selection (Voir dire)

Jury Duty: Jury Selection (Pre-trial Reflection)

Jury duty is one of those rare instances in life when a random group of complete strangers are forced to sit together in the same room and talk about their personal lives. The process by which jurors are selected (jury selection) is what I imagine an A.A. meeting might be like, except that half the people don't even drink. This makes for a fair share of awkward moments.

It is not my intention to talk in any way about the trial or about individuals in my jury panel. Rather, due to its surreal nature, jury duty is worth talking about in generalities.

This has been my first experience with the whole process, which might explain my curiosity, but there are a few things that have really stood out. For instance, it feels like to select a jury, there almost needs to be another impartial jury, weighing in on merits of the former. They ask highly personal questions about a broad range of topics including work life, family life, and any known biases pertaining to the charges.

My concern with the process is only the fact that selecting a jury can take in excess of an entire day. The judicial branch of our government seems nearly as inefficient as the other branches. Correct me if I'm wrong, but I'm willing to bet that 50 or 80 years ago, we didn't have such a complex jury selection process.

Why would I bet this? Well, if you put 12 people in a room (no matter how "fit for the job" they are believed to be), they are going to disagree and argue about things, but in the end it's their job to make a collective decision. The fact that a Judge (just a person) ultimately decides whether a juror (just a person) is fit to discuss, argue, and ultimately make a decision seems to blatantly undermine the whole point of the process.

Setanta San Diego Gaelic Football and Surf Club

Found this news report on the club website:

First Day of Gaelic Football

I've just returned from my first Gaelic Football skill training session and this game (besides pickups) feels very natural. The ball is quite a bit heavier than a soccer ball and there is a lot of catching involved so my hands (mostly the pinkies) are sort of non-responsive. Whenever i go for the 'a' or ';' keys, it takes an extra bit of determination to get the key pressed.

The club I'm part of here in San Diego is called Setanta and can be found at http://www.setantasandiegogfc.com/. For any of you San Diego readers, if you're interested in joining the team, there is still time, we'll be having another skill training session on Saturday, May 10, 2008 at 2:00PM. This will be held at 750 Nautilus St, La Jolla, CA 92037, see map below:

For more general Gaelic Football information, see the videos below:

Part 1 / 3

Part 2 / 3

Part 3 / 3

Sláinte!

It's Only Just Begun

This video below should speak for itself.

Paying taxes with a loan... Wait, what?

So I'm doing a bit of banking online and I see the above ad. It seems that we have a fundamentally flawed tax system if banks are offering loans (and profiting from the interest) to pay the government. At the very least I think the IRS should offer some sort of payment plan if a persons taxes are that high.

Any thoughts?

Google App Engine: Giving away your soul

Last week Google launched a new product called Google App Engine. The premise is simple: let Google handle the server setup (including your application stack), maintenance, and scaling. It also means you have to use Google as your data store.

As with all things, there are always bigger fish in the sea. Google is dead-set on being the biggest. It's one thing to use Google products for personal use such as e-mail, documents, and widgets but quite another to store your companies' data in their proprietary data store.

Internet companies generally derive their value in one way: their data. For every user your app (running on Google App Engine) attracts, Google also gains a user. This is why Google chose to have a top-level User type in their data store. At the very least Google should be paying you, because your Application is providing them with more users.

By giving away the one thing that makes your application valuable, you are in essence giving away your soul.

American Reflections: Dreams

When I moved from my home state almost three years ago, I felt like I had everything figured out. In my own naivety, I believed that to see my dreams come true, all I needed was to slowly work at my ideas until they became the visions in my head. Still today I believe in this ideology to a certain extent, but I've learned that success and innocence are frequently at odds with one another.

The "American Dream" is not as simple as working hard and playing by the rules.

This past weekend a friend was talking about how in many countries around the world, it is normal and sometimes even expected for young people to leave their home countries (before entering the workforce) and travel for months on end. The idea behind this tradition is simple: when you leave your comfort zone and must adapt to new cultures and customs, it is more likely for you to gain a sense of compassion and understanding. This no doubt enriches you as a person and gives you an extra edge when returning to the workforce.

In contrast, young Americans by-and-large do not travel once they've completed their education. Instead they enter the workforce directly and may not travel overseas until their world-view is firmly planted, if ever. As a result of this, we've become a nation of dispassionate and widely apathetic individuals.

Remaining passionate and driven in the midst of mass conformity can at times be highly indemnifying and at others an immense burden. Can compassion only be gained through experience, or does my understanding of the principle give me something of a consolation? Perhaps it's time to travel abroad.

Septagon

The up-and-coming hip hop group Septagon from Bozeman, MT has released their first album. This album holds special significance for me, because the members are my buddies from college. I couldn't be more excited and proud of them.

Check out the album here: http://www.sep7agon.com/?q=node/4

Cheers!

San Diego Web Standards Group

Some colleagues of mine here in San Diego have put together a new user group targeted at Web Standards. I think this is a great opportunity for anyone looking to meet some new people and learn a lot. It's pretty short notice, but if you stumble upon this post before the meeting, you should definitely check it out!

Information about the first meeting can be found at http://sdwebstandards.org/. I'll be heading down to the meeting. Hope to see you there!

jordanfowler.com, now with Merb!

Welcome to my new site, which I hope will be the last major re-factoring I'll do for a long time. This site now runs on Merb 0.9.1 and is much faster than when it was on Rails.

On the previous site, I had full page caching happening, and it was the only way to get the site to run on a VPS with not a lot of RAM. There is currently no caching happening anywhere in this site. So, the moral of the story: if you don't have a ton of RAM to work with and you want a snappy site, check out Merb!

Merb: A Memo

You may or may not have heard about the lightweight Ruby web framework Merb http://merbivore.com/. Merb stands for Mongrel + Erb, but it's a whole lot more than the name might imply. I've been using it over the past few weeks to build a file upload app which will coincide with the main application built in Rails.

It's worth asking what the main distinctions are between the frameworks and why you might want to use one over the other. Whereas Rails is the framework that has lowered the barrier to entry for many people, Merb brings performance and purity to a clever but sometimes obfuscated world. If you're an MVC buff like me, you'll appreciate the attention given in making each of the parts (Model, View, and Controller) independent and therefore replaceable. A great example of this can be found in the choices of supported ORM (Object Relational Mapping) libraries; something Rails doesn't offer out of the box. Merb also provides you with a straightforward way to use any template engine you'd like, very similar to Rails' implementation.

Unlike Rails, Merb is thread-safe. To illustrate the difference, imagine a one-way road with a single lane (a process). In a non thread-safe environment, cars can only travel down the road single-file, one after the other (each car being a thread). Having a thread-safe environment simply means that our road can handle more than one lane and allow cars to travel alongside one another (share process resources simultaneously). In practical terms, this means a single Mongrel instance can handle multiple file uploads simultaneously.

Merb is truer to Ruby than it is to making sure web development doesn't hurt. I'm not saying building an application with Merb is painful, but you will need a bit more Ruby prowess than Rails demands. Tradeoffs are a fact of life, so in many cases learning more Ruby and using Merb can mean far better performance.

Using the right tool for the right job is important. I highly recommend checking out Merb and using it when applicable.

Jordan Fowler

Sorry for the downtime

[UPDATE] All of the items listed below are done and this site is now better than it has ever been!

Dear Readers,

I'm terribly sorry for the downtime my blog has experienced. This was solely due to the fact that comment spam had literally taken over my site. The software that runs this blog is my own creation and is not entirely robust.

Over the next few weeks, I will be completely re-writing this blog engine. It will also provide me with an opportunity to add some much needed features. Here are the changes I will be making:

  • Implement CAPTCHA system to circumvent the comment spamming issues;
  • Syndication (will publish an ATOM or RSS feed or both);
  • Updated layout to more prominently display your comments as more of a discussion.

If there are any features you'd like to see implemented, please feel free to comment below. Hopefully we can get a nice conversation going. Thanks a lot for reading!

Sincerely,

Jordan Fowler

First Experience with Guerilla Tactics

Today marks the day I have truly become a revolutionary. At precisely 3:45 PM on November 6th, 2007, I placed a large placard at one of the busiest Interstate onramps in downtown San Diego; traffic gets heavy around 4:00 PM. The experience was heart pounding and adrenaline inducing.

It just goes to show how fearful we have become, when we no longer feel free to express ourselves. This is truly at the core of this revolution: taking back our personal freedoms.

An elderly gentleman by the name of Joel was walking by with his bike as I attempted to tie up the placard to the fence. I was having a bit of trouble doing this alone, so I asked him if he wouldn't mind holding the sign while I tied it.

"What does it say?" he asked, hesitantly.
"It is a political sign for the presidential candidate Ron Paul."
"Is he a democrat?", he asked curiously.
"No, he's a republican, but a true conservative."
"I see, well I was planning to vote for Hillary but you sure seem to believe in this [Ron Paul's] message," said Joel.
"I certainly do. Maybe you should check him out!" I said while finishing the last knot.

This experience really made me aware of how many people simply vote because of the candidates' visibility. I truly believe this is in no way coincidental. But I also believe that when someone sees another person who truly believes in something, it is more powerful than all the money in the world.

There's no doubt in my mind that Joel will go home and at least listen to his message. Many people are like lost sheep, they want the truth but sometimes they need a gentle nudge to see it.

Planxty - Little Musgrave

We (and Ron Paul) win, CNBC loses

An article from rawstory.com, which you can find here shows how we've clearly won this battle. Check out the video below:

Remember to register as a Republican to vote in the primaries, it's Dr. Paul's only chance! Click here to find out how. Go Ron Paul 2008!!

CNBC hates Ron Paul

Remember reading George Orwell's 1984 in high school? I do, but it never really scared me until I experienced censorship first-hand. So here's what happened...

October 9th, 2007

CNBC sponsors and televises the "Your Money Your Vote" Republican Debate. After the debate, they post an online poll to determine who won. The word gets out and thousands of Ron Paul supporters start casting votes.

Allen Wastler, Managing Editor, CNBC.com writes here, "The numbers grew ... 7,000-plus votes after a couple of hours ... and Ron Paul was at 75%." What did they decide to do? They shut down the poll!

Well, that is simply the wrong move to make when you've got (75% of 7,000) 5,250 Ron Paul supporters coming at you in a couple of hours. And here's why...

October 10th, 2007

According to Wastler from the same article linked above, "The next day, our email basket was flooded with Ron Paul support messages. And the computer logs showed the poll had been hit with traffic from Ron Paul chat sites. I learned other Internet polls that night had been hit in similar fashion. Congratulations. You folks are obviously well-organized and feel strongly about your candidate and I can't help but admire that."

October 11th, 2007

This is when Wastler actually writes the letter from above. So, today, I begin my own correspondence with CNBC. Here is my first letter:

Dear CNBC, I watched the Republican Debate the other night and found the questions you asked Ron Paul to be degrading and absurd. This man is the frontrunner on most issues and it seemed as though you only gave him a small window to respond to questions which seemed to insult the breadth of his knowledge on many of the issues. You've done a great disservice to the people of this nation by not giving this man a fair window. Furthermore, once you realize that he's won the debate, you pull the poll off the internet. What is the deal here? I am one of many Ron Paul supporters here in San Diego and all of us are irate. As a software engineer, I will tell you 1) it's highly unlikely that people are hacking your polls, and 2) if it is true, then you need to hire some better programmers. Get your act together. Or am I being naive and you really are corrupt? Sincerely, Jordan Fowler

October 12th, 2007

After the initial automated response, I received the following from CNBC:

Dear CNBC Viewer, Thank you for your note to the CNBC Customer Care Team. Below please find a a recently published message related to this issue. Click on the link below to access it. http://www.cnbc.com/id/21257762 Thanks again for visiting CNBC.com. We have already forwarded your feedback to the appropriate team. If this message did not provide you with the information you requested, please respond to this message with as much additional information as possible. We will do our best to respond to you within 24 hours. Regards, Vinay Anand CNBC Customer Care

Good deal, looks like I might be talking to a human. He references the correct article (we're literally on the same page). I respond with the following:

Dear CNBC, Yes, that link is what I'm pissed off about. For instance, in the letter, Mr. Wastler states: "When a well-organized and committed "few" can throw the results of a system meant to reflect the sentiments of "the many," I get a little worried. I'd take it down again." Essentially what Wastler is saying is that his decision (the "few" in the most literal sense) is more important than a public outcry (75% of 7,000 is 5,250 is "the many" when compared to a single person). If your polls are not scientific and you're unhappy with the results, then make them scientific! Furthermore, please tell me what the purpose of the poll was. Is it truly your job to judge who can vote in the poll and who cannot? Just think about that for a minute, then tell me how that ISN'T censorship. You have a unique responsibility to be impartial and deliver the facts. Lastly, I just want to point something out. If we the people don't have the one last vestige of hope (the media) on our side, then we're all doomed. This country is crying out in every possible way for a new direction and we will see that through, you have my word. Very Sincerely, Jordan Fowler

Now is where I make my point. We need to get this article out in the open, to force CNBC to respond directly and to let all other major networks see that we the people are making a stand. It's time to rise up and show them our true strength.

Let us join together in the fight for freedom, constitutionality, and individual freedom!

sci·on

Etymology can be an extremely interesting subject. Today, while researching various things for work, I came across a reference to the word 'scion.' In all honesty I had never heard the word used outside of the context of the car company Scion.

I decided to look up the definition of the word and found out it means: "A short length of stem, taken from one plant which is then grafted onto the rootstock of another plant." * You may or may not know that the company Scion is owned by Toyota but maintains an entirely different brand/image. Someone at Toyota got a raise for that one :).

See, aren't words interesting when you dive a little deeper!

* Glossary of Gardening

One Small Step

I've never in my life had any interest in politics. People who've known me for a long time will tell you that I in fact despised the entire political process in this country. This has all changed for one reason: Ron Paul.

If you believe in regaining constitutionality and changing the course in this country, it's time to look at Ron Paul's message. The only way Ron Paul has an inkling of a chance for success in the Republican Primaries, is if our generation rises to the occasion. I beg of you to give Ron Paul 10 minutes of your time, what do you have to lose?

Here are some links:

GO RON PAUL!!!

Just in case you thought I was kidding (yes that's my car):

Google Maps Kicks Ass

So I'm on Craigslist looking for apartments when I find a place that seems too good to be true... Just before I decide to call for an appointment I click the Google Maps link to see where exactly the apartment is. Lo and Behold, I find out the house is directly under the flight path of San Diego International Airport.

Check it out:

Thanks Google!

Ruby on Rails Stack (Part 1)

I've had some difficulty pulling together disparate pieces of information from questionable sources across the internet on the best way to go about building a Ruby on Rails stack on top of Debian 3.1 (Sarge). This operating system is widely considered one of the best for web servers. After banging my head against the wall for a while, I decided I'd just start from scratch and build this stack from the ground up.

Web Host and Operating System

Choosing the right host can be difficult. Shared Hosting has for the most part gone by the wayside and virtualization-based (VPS) hosting has become a cost-competitive replacement with plenty of added benefits. RimuHosting offers great VPS options with many OSes to choose from.

Through my experience with various flavors of Linux, Debian based systems have proven to be solid and reliable. Debian 3.1 (Sarge) is my preferred choice of OS for web application server stacks for its proven robustness and security. Whether you go with RimuHosting or not, the rest of this post assumes you're using Debian 3.1.

Virtualization at home

One thing that can be helpful in putting together a server stack, is having a sandbox to play around in. With the multitude of options available in the virtualization space today, it's becoming easier and easier to run any number of virtual machines on a single physical computer. Since I'm on a Mac, I run Parallels Desktop and mess with a local virtual machine before ever touching my production system.

Starting from a Debian 3.1 (Sarge) base install

At this point, I will assume you have a Debian 3.1 (Sarge) base system installed and you are comfortable installing software from source code. The first thing we need to do is add some source locations for Debian. Open the file @/etc/apt/sources.list@ in your favorite editor and replace the contents with the following:

deb http://http.us.debian.org/debian sarge main contrib non-free
deb http://non-us.debian.org/debian-non-US sarge/non-US main contrib non-free
deb http://security.debian.org sarge/updates main contrib non-free

Save the file and run the following commands (after calling su, you'll need to enter your root password):

su
apt-get update
apt-get upgrade

It's a good idea to install @sudo@ so that you don't have to always be running around your system as the root user. Bad things can happen when you're root and you type in an unintentional command. Having @sudo@ means you only use the power of root on a per-command bases, i.e. less possibility of error. Here's what to do:

su
apt-get install sudo

Now, open up @/etc/sudoers@ and add yourself like so:

your_username   ALL=(ALL) ALL

Save the file and you are now a sudoer.

Your Debian system should now be ready to handle the forthcoming stack.

Nginx front-end web server

For a front-end web server, I've chosen to use nginx. Despite its relative obscurity, it has proven to be a lightweight, high performance replacement for something like Apache. You can however run whatever front-end web server you like.

Dependencies

We'll be downloading/compiling/installing three libraries (pcre, zlib, and openssl) before we install nginx:

apt-get install zlib1g-dev libgcrypt11-dev libpcre3-dev libssl-dev

Installation

Now it's time to install nginx. I will be installing from source, so you'll need to be comfortable with this. If there is a newer version of this source code (since this writing), feel free to get that instead. Here we go:

wget http://sysoev.ru/nginx/nginx-0.5.30.tar.gz
tar zxvf nginx-0.5.30.tar.gz
cd nginx-0.5.30
./configure --pid-path=/usr/local/nginx/logs/nginx.pid --sbin-path=/usr/local/sbin/nginx --with-md5=/usr/lib --with-sha1=/usr/lib --with-http_ssl_module --with-http_dav_module
make
sudo make install

Startup/Shutdown script

We'll need to add the startup/shutdown script for nginx:

wget http://notrocketsurgery.com/files/nginx -O /etc/init.d/nginx
sudo chmod 750 /etc/init.d/nginx

And let's make sure nginx is started upon a system reboot:

update-rc.d nginx defaults

Ruby, RubyGems, Rails, and Mongrel

Ruby 1.8.6

It's time to install ruby. I chose do do this from source so that you'll have the latest version 1.8.6. Here we go:

wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6.tar.gz
tar xzvf ruby-1.8.6.tar.gz
cd ruby-1.8.6
./configure
make
sudo make install

RubyGems

Next we'll need a Ruby package manager called RubyGems. This will be our gateway to installing Ruby on Rails as well as a whole plethora of other libraries. I've chosen to install this from source for the same reason as Ruby, here's how:

wget http://rubyforge.org/frs/download.php/20989/rubygems-0.9.4.tgz
tar xzvf rubygems-0.9.4.tgz
cd rubygems-0.9.4
sudo ruby setup.rb
sudo gem update --system

Ruby on Rails

Last but certainly not least, time to install Ruby on Rails. It's pretty simple too:

sudo gem install rails --include-dependencies

Mongrel

Mongrel will be our Application Server(s). The way it works is, you'll start up a cluster of Mongrel instances (bootstrapping your Rails app). Nginx will then proxy requests to one of these instances (once we've configured everything). This is the last piece to a great stack upon which we can place our rails web applications:

sudo gem install mongrel mongrel_cluster --include-dependencies

Mongrel Startup/Shutdown script

Just as we've done with nginx above, we need a script that will handle starting and stopping our mongrel_cluster:

sudo ln -s /usr/local/lib/ruby/gems/1.8/gems/mongrel_cluster-0.1.3/resources/mongrel_cluster /etc/init.d/mongrel_cluster

Let's also make sure our clusters are started after a system reboot:

sudo /usr/sbin/update-rc.d mongrel_cluster defaults

To be continued...

This concludes Part 1. Very soon, I will complete Part 2, which will guide you through installing Capistrano for deployment as well as Mongrel, Capistrano and nginx configuration. Cheers!

The Shire

Whenever I describe my hometown of Missoula, Montana to people, I always refer to it as "The Shire." This place has never, in all my years lost its charm nor its place in my heart. Many famous authors have written passages and entire novels recounting its ethereal beauty and allure. One such novel, A River Runs Through It by Norman Maclean was later adapted to screenplay and made into a film. Starring Craig Sheffer and Brad Pitt, the film went on to be nominated for three Oscars, winning Best Cinematography (1993).

There is most definitely more picturesque and stunning places to go in the state, but that's not what makes this place so special. Sure, it has a river running through it, bike trails everywhere, and plenty of other reasons to never stay inside, but this still doesn't quite explain it.

The simple fact is that, no matter how incredible a place is on the outside, it's the feeling one gets that will make a lasting impression. In other words, the people who inhabit a place and whose values become impressed therein are what make something truly valuable and worth noting.

Here in the Shire, it's not quantity that matters, it's quality. And that is what I believe makes this place so special.

Shared Hosting vs VPS

When I initially launched this new site, it was being hosted on a TextDrive Shared Hosting plan (so slow). As of last night, I've switched to my Rimu Hosting VPS plan (snappy). I've left the caching I setup in place, but now I'm wondering about other ways to tune for speed.

Here's my setup:

  • Nginx frontend web server
  • Mongrel clusters (3) for application servers
  • Full page caching for /, /about, /contact, /gallery

I would like to get a discussion going here or elsewhere about tuning a server for speed. Leave a comment with relevant links, comments, etc.

Daring Fireball, Apple's Free Marketing

I'll admit it, I read Daring Fireball. It was one of two default feeds I actually kept when I installed NetNewsWire. As I was reading a more recent post of his (Josh Quittner Returns His iPhone), it suddenly struck me. This guy would literally buy a shit pancake from Apple (and defend it) if they sold one.

Don't get me wrong, I am a huge Apple fan and have been one since I was 8 years old. It is the only kind of computer I own and the only computer I see myself owning in the foreseeable future: so long as OS X exists. You might ask, "Why don't you defend Apple with the same conviction and irreverence then?" I'll tell you why. Apple is just a company, who's goal is to generate incredible buzz and then make optimal profits off of you and me.

DF, however, approaches the situation as if he's Gandhi, defending the oppressed people of an occupied nation. In reality, Apple customers are far from oppressed peoples. The fact is that they are pretty well-to-do if they can afford to buy an iPhone.

Call me bitter, but I'm just calling it how I see it, and I was annoyed by what I saw. In closing, DF, Apple should be paying you. They sure as hell don't need free marketing.

Using CSS Vertical Rhythm

I've updated this site to use a technique known as CSS Vertical Rhythm. This method makes web pages far easier to read and scale perfectly to text resizing. The approach is based on simple proportionality in order to form a rhythm.

If you simply focus your eyes on how the spacing of the lines of text are proportional to the spacing between the lines and paragraphs, you'll begin to see the rhythm. Though I am not a designer, it is clear to me how effective these techniques can be. Here are some helpful links: