My lovely bride-to-be has just posted her hand crafted stationary and holiday cards up on her Etsy store. If you’re looking for something unique to send out this holiday, please check these out.
Mele Kalikimaka is the thing to send…
7 November 2007 |
13:05 |
Life in General |
No Comments
there is justice (on some level)
8 June 2007 |
11:54 |
Life in General |
No Comments
According to this CNN article, Paris Hilton was ordered back to jail today. The Sheriff’s office has cried that this is an outrage, and that an example is being made of this celebrity. I have to imagine that any regular joe on the street would get the same sentence if they were caught driving with a suspended license on two occasions AFTER getting a DUI.
Not only is Paris foolish enough to leave the house drunk to get a burger (can’t she pay people to do that?), but she’s foolish enough to break the law two subsequent times.
I am delighted to see that the judge has sent her straight back to jail. I hope that he now moves on to slapping the sheriff on the wrist for being so stupid in the first place.
If LA county jail is two harsh for this frail bitch, then put her up somewhere that is not a MULTI MILLION DOLLAR MANSION. I want to know how I can be put on house arrest in her fucking house.
They should totally put her bony ass on a chain gang.
If our impact on this earth is measured by the difference of our contributions and drawls from society, Paris on on her third mortgage and she’s not even a quarter of the way there.
I wonder if she had a breakdown because someone made her their bitch…
Shiiiiiiiiit….
According to this CNN article, Paris Hilton was ordered back to jail today. The Sheriff’s office has cried that this is an outrage, and that an example is being made of this celebrity. I have to imagine that any regular joe on the street would get the same sentence if they were caught driving with a suspended license on two occasions AFTER getting a DUI.
Not only is Paris foolish enough to leave the house drunk to get a burger (can’t she pay people to do that?), but she’s foolish enough to break the law two subsequent times.
I am delighted to see that the judge has sent her straight back to jail. I hope that he now moves on to slapping the sheriff on the wrist for being so stupid in the first place.
If LA county jail is two harsh for this frail bitch, then put her up somewhere that is not a MULTI MILLION DOLLAR MANSION. I want to know how I can be put on house arrest in her fucking house.
They should totally put her bony ass on a chain gang.
If our impact on this earth is measured by the difference of our contributions and drawls from society, Paris on on her third mortgage and she’s not even a quarter of the way there.
I wonder if she had a breakdown because someone made her their bitch…
Shiiiiiiiiit….
CakePHP vs. Symfony
1 June 2007 |
8:40 |
Ruby on Rails |
2 Comments
CakePHP and Symfony are both inspired by Ruby on Rails. As an every day Rails user, let me tell you that it’s fantastic.
I’m currently setting up a framework for a PHP project I’m doing and sat in to evaluate both of these. The requirements for this project are unique and shitty, so I wasn’t sure how far I’d get with these two frameworks.
First of all, my requirements are:
- PHP 4 or 5
- IIS
- MSSQL
Yuck, right?
So my solution looks something like:
- Windows XP Pro
- IIS 5.1
- SQL Server 2005 Express
- PHP 5.2.3
Now, let’s talk about CakePHP…
I installed CakePHP and immediately had a web page responding. I was seeing directory names such as “model” that I’m familiar with in Rails. However, when I began to search for all the sweet scripts that simplify Rails development and everything is strangely absent. I was able to find a script that allows you to add models views or controllers, but it’s overdone and underpowered, giving you few options and running from a menu driven interface.
It took me awhile to figure out that the mssql driver bundled with php just wouldn’t work. I wound up settling for the adobb-mssql driver, which is easily integrated with CakePHP.
Once I was able to get the DB up, my CakePHP installation was complete. Not super featured, but easy to get up.
As for Symfony….
I downloaded the Symfony Sandbox, as it seemed it would suit my needs. The moment I unzipped Symfony, I was excited. Everything just looked more organized. Then when it was actually unzipped, I started to notice that the file structure is actually quite confusing.
Much to my delight, Symfony comes bundled with a shock of command line tools that help you manage the parts of your project.
The more I worked to setup Symfony the more excited I got. All of the config files are in YML which is true to Rails… Heavy use of prototype.js, like Rails…
However, I ran into a problem once the whole picture started to form in my mind. Symfony was really really complete… However it was also really really complex. One thing Rails is not, is complex. It would seem a lot of thought has gone into things like the Rails file hierarchy. I just don’t think the Symfony guys have put this much thought into it.
The Straight Dope:
CakePHP
Pros:
- Easy to setup
- Easy integration with 3rd party plugins
- Simplicity of file hierarchy is true to Rails vision of MVC
- Application seems very portable
Cons:
- Lacking supporting cast of command line scripts
- Doesn’t seem to make much use of YML for configs
- Everything you need is there, but doesn’t feel complete
Symfony
Pros:
- Feels very complete
- Makes use of YML, leaving it feeling very Rails-like
- Powerful command line tools to help you develop
Cons:
- Application seems tied down and reliant on other software
- Confusing file hierarchy
- A lot to learn
My Solution…
In the end, I decided on CakePHP because it felt like they were truly Rails inspired and I want to see where they are going. With CakePHP, I am really left with the feeling that my application is portable. I know this is hardly a measure of quality for frameworks, but this is really only a review of the installation and first impressions.
Now I need to figure out rewrite in IIS
CakePHP and Symfony are both inspired by Ruby on Rails. As an every day Rails user, let me tell you that it’s fantastic.
I’m currently setting up a framework for a PHP project I’m doing and sat in to evaluate both of these. The requirements for this project are unique and shitty, so I wasn’t sure how far I’d get with these two frameworks.
First of all, my requirements are:
- PHP 4 or 5
- IIS
- MSSQL
Yuck, right?
So my solution looks something like:
- Windows XP Pro
- IIS 5.1
- SQL Server 2005 Express
- PHP 5.2.3
Now, let’s talk about CakePHP…
I installed CakePHP and immediately had a web page responding. I was seeing directory names such as “model” that I’m familiar with in Rails. However, when I began to search for all the sweet scripts that simplify Rails development and everything is strangely absent. I was able to find a script that allows you to add models views or controllers, but it’s overdone and underpowered, giving you few options and running from a menu driven interface.
It took me awhile to figure out that the mssql driver bundled with php just wouldn’t work. I wound up settling for the adobb-mssql driver, which is easily integrated with CakePHP.
Once I was able to get the DB up, my CakePHP installation was complete. Not super featured, but easy to get up.
As for Symfony….
I downloaded the Symfony Sandbox, as it seemed it would suit my needs. The moment I unzipped Symfony, I was excited. Everything just looked more organized. Then when it was actually unzipped, I started to notice that the file structure is actually quite confusing.
Much to my delight, Symfony comes bundled with a shock of command line tools that help you manage the parts of your project.
The more I worked to setup Symfony the more excited I got. All of the config files are in YML which is true to Rails… Heavy use of prototype.js, like Rails…
However, I ran into a problem once the whole picture started to form in my mind. Symfony was really really complete… However it was also really really complex. One thing Rails is not, is complex. It would seem a lot of thought has gone into things like the Rails file hierarchy. I just don’t think the Symfony guys have put this much thought into it.
The Straight Dope:
CakePHP
Pros:
- Easy to setup
- Easy integration with 3rd party plugins
- Simplicity of file hierarchy is true to Rails vision of MVC
- Application seems very portable
Cons:
- Lacking supporting cast of command line scripts
- Doesn’t seem to make much use of YML for configs
- Everything you need is there, but doesn’t feel complete
Symfony
Pros:
- Feels very complete
- Makes use of YML, leaving it feeling very Rails-like
- Powerful command line tools to help you develop
Cons:
- Application seems tied down and reliant on other software
- Confusing file hierarchy
- A lot to learn
My Solution…
In the end, I decided on CakePHP because it felt like they were truly Rails inspired and I want to see where they are going. With CakePHP, I am really left with the feeling that my application is portable. I know this is hardly a measure of quality for frameworks, but this is really only a review of the installation and first impressions.
Now I need to figure out rewrite in IIS
Ruby on Rails… Multiple Databases, Single Project
2 May 2007 |
17:22 |
Ruby on Rails |
1 Comment
Ruby on Rails brings a lot to the table, but it doesn’t necessarily scale well without a little hand holding. However, you’ll likely find that this hand holding is very much worth it.
My example of scaling issues is a real life situation I’m working on with my employer. Rails makes it incredibly easy to have isolated environments for every stage of your application design, but it doesn’t offer many built in solutions for having isolated databases within a single project and single environment. No elegant solutions anyways.
In our situation, we wanted to access a local readonly mirror of our co-location hosted database in situations where no write access was needed. Not only would this reduce the bandwidth used by accessing a database on our LAN, but it would relieve stress on our master database server.
ActiveRecord provides a few methods for managing your connection pool, but how do you use these easily? I propose the following solution that appears to be fairly elegant. Only time will tell how efficient it is.
The first thing we needed to do is provide a profile for our readonly database in the database configuration of our rails project.
config/database.yml:
readonly:
username: readonly
password: readonly
host: readonly
database: readonly
You will want to substitute the values above for the correct values for your given situation.
The next step is to create a library that will assist you in swapping out your connections. I called my library ro_database.rb
lib/ro_database.rb:
# This library hijaacks the DB connection forcing it to the read only
# local mirror. Us this __ONLY__ when you do 0 writes, or you will
# derail the train!
module ReadOnlyDatabase
def ro_database
if RAILS_ENV == “production”
ActiveRecord::Base.connection = :readonly
end
end
def rw_database
ActiveRecord::Base.connection = RAILS_ENV.to_sym
end
end
From here, the final steps are surprisingly simple. You will need to take precautions to isolate your code that writes to the db from the code that doesn’t, however how far you take that is at your own discretion. In our situation, this was already done for the most part. So, all I had to do to make a specific controller hit the readonly database was:
app/controllers/sample_controller.rb:
class SampleController < ApplicationController
# This bit sets us to the read only mirror and back when we're done
require 'ro_database'
include ReadOnlyDatabase
before_filter :ro_database
after_filter :rw_database
# End funky DB bits
You could even move the require and include statements into the application_controller so you only need the before filter and after filter.
This code possibly makes a few unfair assumptions, but I’m not sure what they are yet. I’m also looking for more elegant ways of switching back so we only switch back when we need to, but I wanted something that wasn’t too intrusive across the board.
In the event that Rails doesn’t hold the primary connection open while it hits readonly, I will look into storing the primary connection somewhere while the switch is in effect. There’s no point in opening and closing connections repeatedly here.
So there you have it. It’s easy and it’s pretty damned clean. I’d love to hear suggestions on making it more efficient, however my goal here is to remain as streamlined as possible.
Ruby on Rails brings a lot to the table, but it doesn’t necessarily scale well without a little hand holding. However, you’ll likely find that this hand holding is very much worth it.
My example of scaling issues is a real life situation I’m working on with my employer. Rails makes it incredibly easy to have isolated environments for every stage of your application design, but it doesn’t offer many built in solutions for having isolated databases within a single project and single environment. No elegant solutions anyways.
In our situation, we wanted to access a local readonly mirror of our co-location hosted database in situations where no write access was needed. Not only would this reduce the bandwidth used by accessing a database on our LAN, but it would relieve stress on our master database server.
ActiveRecord provides a few methods for managing your connection pool, but how do you use these easily? I propose the following solution that appears to be fairly elegant. Only time will tell how efficient it is.
The first thing we needed to do is provide a profile for our readonly database in the database configuration of our rails project.
config/database.yml:
readonly:
username: readonly
password: readonly
host: readonly
database: readonly
You will want to substitute the values above for the correct values for your given situation.
The next step is to create a library that will assist you in swapping out your connections. I called my library ro_database.rb
lib/ro_database.rb:
# This library hijaacks the DB connection forcing it to the read only
# local mirror. Us this __ONLY__ when you do 0 writes, or you will
# derail the train!
module ReadOnlyDatabase
def ro_database
if RAILS_ENV == “production”
ActiveRecord::Base.connection = :readonly
end
end
def rw_database
ActiveRecord::Base.connection = RAILS_ENV.to_sym
end
end
From here, the final steps are surprisingly simple. You will need to take precautions to isolate your code that writes to the db from the code that doesn’t, however how far you take that is at your own discretion. In our situation, this was already done for the most part. So, all I had to do to make a specific controller hit the readonly database was:
app/controllers/sample_controller.rb:
class SampleController < ApplicationController
# This bit sets us to the read only mirror and back when we're done
require 'ro_database'
include ReadOnlyDatabase
before_filter :ro_database
after_filter :rw_database
# End funky DB bits
You could even move the require and include statements into the application_controller so you only need the before filter and after filter.
This code possibly makes a few unfair assumptions, but I’m not sure what they are yet. I’m also looking for more elegant ways of switching back so we only switch back when we need to, but I wanted something that wasn’t too intrusive across the board.
In the event that Rails doesn’t hold the primary connection open while it hits readonly, I will look into storing the primary connection somewhere while the switch is in effect. There’s no point in opening and closing connections repeatedly here.
So there you have it. It’s easy and it’s pretty damned clean. I’d love to hear suggestions on making it more efficient, however my goal here is to remain as streamlined as possible.
Ruby on Rails… Refactor! Refactor! Refactor!
2 May 2007 |
17:05 |
Ruby on Rails |
No Comments
to my existing readers — I’m sorry that this programming crap is boring, but for Christ’s sake, I need to post!
For what it is, Ruby on Rails is, simply put, Amazing. Who knew how much additional fun you can have on a project when all of the monotony is replaced by a comprehensive, easy to use framework backed by a language that you can try to spread as far and as thin as you want and still get that same great taste with no aftertaste?
Everything great has a pitfalls though, right? Right. A very large pitfall in Rails is knowing where the magic stops. As a Perl coder, I can recount stories in which I poured hours into trying to develop libraries that make insanely monotonous tasks incredibly simple. As a Ruby on Rails coder, I pour hours into searching for that magic that Rails must have in order to do something incredibly simple, and wind up turning the event into something entirely monotonous.
In this pitfall, the real beauty of Rails makes itself glaringly apparent. Refactoring Rails is easy, and borderline fun. Furthermore, if you partake in test-driven development, you can rest soundly knowing that your refactoring doesn’t harm anything else.
Next time you’re stuck looking for the magic, just create a solution. It doesn’t have to be elegant. When you find the right magic later, you’ll find that updating your code is easy as pie.
It’s there… Take advantage of it.
to my existing readers — I’m sorry that this programming crap is boring, but for Christ’s sake, I need to post!
For what it is, Ruby on Rails is, simply put, Amazing. Who knew how much additional fun you can have on a project when all of the monotony is replaced by a comprehensive, easy to use framework backed by a language that you can try to spread as far and as thin as you want and still get that same great taste with no aftertaste?
Everything great has a pitfalls though, right? Right. A very large pitfall in Rails is knowing where the magic stops. As a Perl coder, I can recount stories in which I poured hours into trying to develop libraries that make insanely monotonous tasks incredibly simple. As a Ruby on Rails coder, I pour hours into searching for that magic that Rails must have in order to do something incredibly simple, and wind up turning the event into something entirely monotonous.
In this pitfall, the real beauty of Rails makes itself glaringly apparent. Refactoring Rails is easy, and borderline fun. Furthermore, if you partake in test-driven development, you can rest soundly knowing that your refactoring doesn’t harm anything else.
Next time you’re stuck looking for the magic, just create a solution. It doesn’t have to be elegant. When you find the right magic later, you’ll find that updating your code is easy as pie.
It’s there… Take advantage of it.
new old adventures in bathtub hootch
5 February 2007 |
22:41 |
Life in General |
1 Comment
When a friend asked a group of us what the theme for a weekly potluck should be, I suggested White Russians and a Burger Buffet. White Russians because; A. They taste great, B. The Dude abides. I suggested Burgers, because… Well? What the fuck do you eat with White Russians? I thought about that one for awhile.
When I got to thinking more about the White Russians, I decided I was going to try something my mother referenced awhile back. Making your own Kahlua.
So here I am working on Jereme’s Kahlua recipe 1.0. Actually I’m just trying someone else’s. Using Dana’s homemade Kahlua recipe I’m working up my first batch.
1
quart water
2 1/2
cups sugar
3
tablespoons instant coffee
1
tablespoon vanilla
2 1/2
cups vodka
- Boil water, coffee, sugar.
- Simmer for 3 hours (stirring frequently).
- Let cool and add vanilla and vodka.
- Bottle and cap tightly.
I’ll let you know how it goes. So far it tastes like old people candy.
When a friend asked a group of us what the theme for a weekly potluck should be, I suggested White Russians and a Burger Buffet. White Russians because; A. They taste great, B. The Dude abides. I suggested Burgers, because… Well? What the fuck do you eat with White Russians? I thought about that one for awhile.![]()
When I got to thinking more about the White Russians, I decided I was going to try something my mother referenced awhile back. Making your own Kahlua.
So here I am working on Jereme’s Kahlua recipe 1.0. Actually I’m just trying someone else’s. Using Dana’s homemade Kahlua recipe I’m working up my first batch.
| 1 | quart water |
| 2 1/2 | cups sugar |
| 3 | tablespoons instant coffee |
| 1 | tablespoon vanilla |
| 2 1/2 | cups vodka |
- Boil water, coffee, sugar.
- Simmer for 3 hours (stirring frequently).
- Let cool and add vanilla and vodka.
- Bottle and cap tightly.
bushlit
29 November 2006 |
17:00 |
Life in General |
No Comments
This was actually meant to be a response to a stupid comment on some news site. However it grew far too long and too angry… So I publish it… as-is… here.
Say what you want about Clinton. He was far from perfect. However, he did produce positive results in this country. I can’t see where GW has succeeded once, save capturing Saddam Hussein, which arguably didn’t need to be done.
To call lefties “terrorist loving” is proposterous. Nobody loves the terrorists. Everyone is in favor of finding better ways to combat terrorism, but not in favor of curbing a great many of the liberties that make this country so fantastic.
Bush screwed up bad. His approval rating is in the 20% range. The economy is finally on a rebound, but it will take awhile before people actually feel the relief.
Not to mention, Bush is the laughing stock of the world… and it’s not funny at all. My grandma sends me Bush jokes and e-mails often, and she has always voted and will still vote Republican. (more…)
This was actually meant to be a response to a stupid comment on some news site. However it grew far too long and too angry… So I publish it… as-is… here.
Say what you want about Clinton. He was far from perfect. However, he did produce positive results in this country. I can’t see where GW has succeeded once, save capturing Saddam Hussein, which arguably didn’t need to be done.
To call lefties “terrorist loving” is proposterous. Nobody loves the terrorists. Everyone is in favor of finding better ways to combat terrorism, but not in favor of curbing a great many of the liberties that make this country so fantastic.
Bush screwed up bad. His approval rating is in the 20% range. The economy is finally on a rebound, but it will take awhile before people actually feel the relief.
Not to mention, Bush is the laughing stock of the world… and it’s not funny at all. My grandma sends me Bush jokes and e-mails often, and she has always voted and will still vote Republican. (more…)
Man immolates self in Chicago as war protest… Media doesn’t care.
29 November 2006 |
16:59 |
Life in General |
No Comments
All the way from truthout.org comes the story of a artist/musician/activist who hoped to make the ultimate statement and sacrifice in order to wake this country up. It’s almost certain that he didn’t count on the media not caring…
“Chicago - Malachi Ritscher envisioned his death as one full of purpose. He carefully planned the details, mailed a copy of his apartment key to a friend, created to-do lists for his family. On his Web site, the 52-year-old experimental musician who’d fought with depression even penned his obituary.
At 6:30 a.m. on Nov. 3 - four days before an election caused a seismic shift in Washington politics - Ritscher, a frequent anti-war protester, stood by an off-ramp in downtown Chicago near a statue of a giant flame, set up a video camera, doused himself with gasoline and lit himself on fire.”
All the way from truthout.org comes the story of a artist/musician/activist who hoped to make the ultimate statement and sacrifice in order to wake this country up. It’s almost certain that he didn’t count on the media not caring…
“Chicago - Malachi Ritscher envisioned his death as one full of purpose. He carefully planned the details, mailed a copy of his apartment key to a friend, created to-do lists for his family. On his Web site, the 52-year-old experimental musician who’d fought with depression even penned his obituary.
At 6:30 a.m. on Nov. 3 - four days before an election caused a seismic shift in Washington politics - Ritscher, a frequent anti-war protester, stood by an off-ramp in downtown Chicago near a statue of a giant flame, set up a video camera, doused himself with gasoline and lit himself on fire.”
thirty two inevitable truths
25 October 2006 |
11:26 |
Life in General |
2 Comments
- Moles are always smaller than you imagine.
- At the end of every party there is always a fat girl crying.
- One of the most awkward things that can happen in a bar is when your pint-to-toilet cycle gets syncronized with a complete stranger.
- Everyone who grew up in the 80’s has entered the digits 55378008 into a calculator.
- Reading while you’re drunk is horrible.
- Sharpening a pencil with a knife makes you feel really manly.
- You’re never quite sure whether it’s against the law or not to have a fire in your back yard.
- Whatever your age, the desire to make plastic dolls mate is impossible to resist.
- Nobody ever dares make cup o soup in a bowl.
- You never know where to look when eating an apple.
- It is impossible to describe the smell of wet cat.
- Prodding a fire with a stick makes you feel manly.
- Digging through an overgrown garden will always turn up a super bouncy ball.
- You always feel a bit scared when petting a horse.
- The smaller the monkey, the more it looks like it would kill you at the first given opportunity.
- Some days you see a lot of people on crutches.
- Every man at least once has flushed halfway through a piss, then raced to beat the flush.
- Old women with mobile phones look funny.
- It is impossible to look cool while picking up a frisbee.
- Driving through a tunnel makes you excited.
- You never run out of table salt.
- Old ladies can eat more than you think.
- You can’t respect a man who carries a dog.
- There’s no panic like the panic you momentarily feel when you get your head or hand stuck in something.
- No one knows the origins of their metal coat hangers.
- The most painful household incident is wearing socks and stepping on an appliance plug.
- People who don’t drive slam car doors too hard.
- Everyone had an uncle who tried to steal their nose.
- Bricks are horrible to carry.
- In every bag of chips there is one bad chip.
- Triangle sandwiches taste better than square ones.
- I didn’t make any of these up.
- Moles are always smaller than you imagine.
- At the end of every party there is always a fat girl crying.
- One of the most awkward things that can happen in a bar is when your pint-to-toilet cycle gets syncronized with a complete stranger.
- Everyone who grew up in the 80’s has entered the digits 55378008 into a calculator.
- Reading while you’re drunk is horrible.
- Sharpening a pencil with a knife makes you feel really manly.
- You’re never quite sure whether it’s against the law or not to have a fire in your back yard.
- Whatever your age, the desire to make plastic dolls mate is impossible to resist.
- Nobody ever dares make cup o soup in a bowl.
- You never know where to look when eating an apple.
- It is impossible to describe the smell of wet cat.
- Prodding a fire with a stick makes you feel manly.
- Digging through an overgrown garden will always turn up a super bouncy ball.
- You always feel a bit scared when petting a horse.
- The smaller the monkey, the more it looks like it would kill you at the first given opportunity.
- Some days you see a lot of people on crutches.
- Every man at least once has flushed halfway through a piss, then raced to beat the flush.
- Old women with mobile phones look funny.
- It is impossible to look cool while picking up a frisbee.
- Driving through a tunnel makes you excited.
- You never run out of table salt.
- Old ladies can eat more than you think.
- You can’t respect a man who carries a dog.
- There’s no panic like the panic you momentarily feel when you get your head or hand stuck in something.
- No one knows the origins of their metal coat hangers.
- The most painful household incident is wearing socks and stepping on an appliance plug.
- People who don’t drive slam car doors too hard.
- Everyone had an uncle who tried to steal their nose.
- Bricks are horrible to carry.
- In every bag of chips there is one bad chip.
- Triangle sandwiches taste better than square ones.
- I didn’t make any of these up.

