Dump an Existing Database Schema Into a Ruby On Rails Migration Ready Format

May 9th, 2008 by Justin Ball

I have been looking around for a plugin or bit of code that can dump the schema from an existing database into the Ruby on Rails database migration format. The solution is a ‘duh’ moment, and probably obvious to most Rails programmers. All you have to do is change your database.yml file so that it points to the existing database you want to dump. Next run rake db:schema:dump. The schema.rb file in your db directory will now contain a dump of all the tables and indexes in your old database. Rename the schema.rb file to something else so that it doesn’t get over written. Don’t forget to change your database.yml file to back and now you only need to copy and paste what you need from the schema file into your migrations. This one should have been obvious, and it can save you an insane amount of time.

Tags:   · ·

No Comments.

Free Book

May 8th, 2008 by Justin Ball

Marion is a brilliant funny author. He sits next to me every day so I know that for a fact. I mean a guy that looks like this Marion has to be a great author.

Marion has written a couple of books - Chickens In the Headlights and Bullies in the Headlights. His latest book is available for free via podcast. Welcome The Super Trio. I said FREE so you have no excuses.

Tags:   · ·

No Comments.

Genealogy at Risk?

May 4th, 2008 by Justin Ball

The Deseret News writes today, “The Catholic Church has ordered dioceses across the globe not to give information in parish registers to members of The Church of Jesus Christ of Latter-day Saints.” This is a very painful blow not only to the LDS church but to genealogists everywhere. For decades the LDS church has been microfilming every record possible and preserving those records in a secured granite vault in the mountains outside of Salt Lake City. This effort helps to ensure those records are preserved for future generations. As technology has advanced many of those records have become available online. All of the records have always been available to anyone, LDS or not, so that they could research their ancestry.

There are religious differences at the heart of this move, but it seems like those differences could be worked out. FamilySearch.org has been a great resource for many years now and is enjoyed by anyone with access to the Internet. In more recent years companies like Geni.com and MyFamily.com have shown that genealogy is not the boring realm of old people with nothing better to do, but an engaging activity enjoyed by family members young and old. The preservation of the lineage of mankind and access to that precious information seem like such worthwhile en devours that surely both parties can reach an accord.

If not then we have just witnessed a genealogical nuclear bomb.

Tags:   · · · ·

1 Comment

First Real Ride on the New Trek Madone 6.9

April 29th, 2008 by Justin Ball

I wasn’t going to go for a long ride so I didn’t eat lunch and only put a couple of granola bars in my pockets. Then I called Joel and said let’s go for a ride. He was good with the idea so we headed towards Black Smith Fork Canyon. This is one of my favorite rides. It is a reasonable evening ride - a 42 mile loop from my house. It is also a great section to throw onto a longer Saturday ride.

Given that I had a lot going on and that it was my first ride of the season I was going to be lazy and stop at the end of Old Hollow Road which isn’t really that far from my house. When we go to the end of Old Hollow Road we decided that we were feeling pretty good so we kept going to the power plant which is not quite half way up the canyon. We still felt good so to the top of the canyon we went. That was a great time. I felt great. The scenery was beautiful - there was still snow on the mountains up there so it was also cold.

Black Smith Fork is a tricky canyon. You push on the way up because it is uphill, but you assume that coming back will be easy because it is downhill. If you assume that you’re a damn fool. The still air on the way up and the ease at which you ascend is the first sign that something is not right. After you revel in your accomplishment at the top you face the wind the entire way back down the canyon. I know this. I have had ridden this canyon many times and yet I ignore the facts that have been emblazoned into my brain from every ride before. However, the scenery is addictive. Like a Black Widow louring and then devouring her mate Black Smith Fork will draw you to the top and then sap the life out of you on the way back. Typically only divorce lawyers are so skilled and cold hearted.

The last time I did this ride without sufficient nutrition I bonked and I told myself that I had learned my lesson. I guess I have to relearn that lesson once a year. My skipping of lunch and dependence on two 90 calorie granola bars resulted in a painful bonk again towards the end. It wasn’t as bad this time. I didn’t go nuts like the time before, but the million little bugs gnawing the muscle off my leg bones told me I had depleted all my energy reserves.

Lycra isn’t an especially good insulator. I did have the sense to put on a smart wool base layer and some full finger gloves, but other than that it was pretty much me against the 40 degree weather. I don’t like to get to hot so I typically under dress. After a while I figured I could probably cut off my toes and eat them for sustenance if required. I couldn’t feel them anyway. When I did make it home it took three hours to warm back up in spite of a hot shower. The snow on the hills around us should have been a clue.

I blame it on the bike.

I have a brand new 2008 Trek Madone 6.9. To me there isn’t a sweeter bike. It is a beautiful bike - a piece of art. Every time I find myself in the garage I have to stare at it or touch it. It calls to me and begs to be ridden. I am disgusting. I love that bike.
This bike begs to be ridden

Back to the ride. The hills were non-existent. The pavement smoothed by the carbon frame, my back didn’t exhibit its usual total break down that results in my inability to stand up for days. The Bontrager XXX Lite wheels are so light and smooth that you barely notice they are there at all. They spin up fast and roll like butter on a hot grill.
Carbon is NiceThese are light as air

It took me a while to decide on whether to go with SRAM Red or Dura Ace. I thought I might regret the Dura Ace, but it is silky smooth. My last bike with Shimano 105 had a hard time. Shifting the front ring was like playing BlackJack. You had about a 49% chance of it actually working. I almost died once because when I tried to shift it failed and dropped the chain while I was crossing a road. I am sure the oncoming truck was a little surprised and probably ticked when I jumped off the bike and ran across the road just in time to miss becoming road kill. I don’t even notice the shift now. This is especially encouraging because I wasn’t a fan of the Race X Lite crank at first. I am sure it isn’t the stiffest but it is dependable and smooth.
Not so bad after allSilky smooth as everYou won\'t even notice the shift on the front rings

The frame cannot be beat. I have it hanging on the wall in my garage next to my Santa Cruz Blur XC.
That is my kind of art gallery. If it wasn’t so much more fun to ride the bikes I could just sit there and stare at them all day. The paint job is sweet. Next to my wife it is the sexiest thing I have seen. (Thanks for letting me buy the new bike dear).

I have a bad back - degenerated disk - so for me a comfy ride has to take priority over a super stiff frame. Don’t take that to mean the frame isn’t stiff. It is and it responds well. It smooths out the nasty bumps in the road but is still there for me when I stand up to pound on the pedals. The road noise that was uncomfortable on my aluminum bike turns into a hum that keeps you connected to the pavement without vibrating you to death.
The seat mast helps to stiffen the frame but still provides a comfortable ride

On my previous bike I was always a bit nervous to look behind me as I had a hard time keeping the bike going straight. I feel more comfortable on this bike. It likes to go straight even though I am not great at maintaining a straight line. You don’t think about corners. The bike glides around them in a controlled smooth line. When you look at the spokes on the Race XXX Lite wheels you’d think you’d snap them if you weigh more than a teenage girl but they hold up just fine and in fact aren’t mushy at all. I was worried I’d feel them sloshing back and forth against the brake pads if I stood up to pound on the pedals but nothing of the sort happened. For reference I weight between 170 and 175 depending on the time of day.

There are a few downsides to the bike. I thought that the Race X Lite crank would be one, but as it turns out it works just fine. If Dura Ace made a compact crank I would demand that, but Shimano is late to that party. The big downside? The literature states that it comes with the SRAM 1090 Powerdome cassette, but when I pulled the bike out of the box at the shop it was wearing the 1070 cassette. I had the shop call Trek. Their reply was that the specs are subject to change anytime, we couldn’t get them so sorry you’re screwed. I find it odd that there seem to be plenty available on eBay and Specialized managed to find some for their new Tarmac SL2. Astana is running SRAM Red so you’d think some kind of inside deal would be possible. The largest bike company in the world with a team sponsorship couldn’t get them? Also notice that they didn’t lower the price a corresponding amount. Trek gets a big fat F here. This was the big disappointment in an otherwise perfect experience.

The only other downside is minor and probably common to most bikes. Some of the decals are not especially clean. I see a few jagged edges here and there. You’ll have to click through to the large picture on the seat post joint to even notice. I guess that might be one argument for Project One - there are no decals everything is painted on.
The 1070 cassette should have been a 1090

I had the shop install my Polar CS600 on the bike. The guys at the shop told me that the power unit wouldn’t quite fit when in the small front ring and the bottom three rings on the back without the chain running right on top of the sensor. Turns out they were wrong. (They also never finished installing all the sensors but still charged me full price.) The powerful magnet pulls the chain down when there is any slack but pedaling shows that there is plenty of clearance. I was a bit freaked out at first since I was worried my nice computer wouldn’t work with my nice bike but it runs out that everything is fine.
The Polar CS600 unit fits just finePolar CS600 Computer on the bars

Even after spending a year doing research and saving money I was nervous about spending a small fortune on a bicycle. If you view it as a bike that is worth than my truck then you might need to be treated for hyperventilation. The retail on this bike with tax will take you north of $8k. However, where I live plenty of people have several four wheelers or motor bikes in their garage. Others have camp trailers or jet skis. Even I have an old motor bike. I use it once a year. Most of the people around me are probably in the same situation with their toys. Here’s the thing - I ride my bike everyday. Since I have started riding I have dropped 30 lbs and I no longer breath heavy when I climb a flight of stairs. Sure a cheaper bike would do the same thing, but if you just can’t resist and you can scrape together the cash you won’t regret parking one of these in the garage.

Tags:   · · · · · · ·

6 Comments

People for the Ethical Treatment of Yeast (PETY)

April 27th, 2008 by Justin Ball

The next time you take a bite out of that yummy loaf of bread consider where it came from. Sure, cutting down all that nasty wheat is harmless enough. After all it’s just a stupid plant. It doesn’t have feelings. However, consider the condition of yeast.

Here is how yeast is brought to market:

How would you like to live in those conditions?

After that kind of treatment being introduced into a warm, nutrient rich environment like this:
Bread Dough
I am sure feels like heaven.

but next comes this:
Bread Oven
at 450 degrees. I can hear the shriek of millions of individual yeasts shrieking out in terror like Joan of Arc as they face their final moments in a fiery furness.

So next time you eat this:
Bread
Just think of the millions of dead bodies sacrificed so you can have light and fluffy bread.

It’s time to be PETY.

Tags:   · ·

3 Comments

Winter Was Hard on us Both

April 26th, 2008 by Justin Ball

I have had colds off and on over the past few months which gave me a great excuse to ignore my bike trainer and be lazy. I had no idea just how bad it had gotten. While sitting in my office chair writing code this morning I hear a loud CRACK… and fall backwards:

I’ll be headed to Staples on Monday to get a new chair and out on the new bike to lose some weight.

Tags:   ·

No Comments.

First ride on the new Madone

April 26th, 2008 by Justin Ball

I brought my bike home from the shop and in spite of the fact that everyone was eating dinner by the time I got home I gave in and went for a ride. You can’t just bring it home and let it sit. Here’s the pictures.

Tags:   · · ·

3 Comments

A Few More Thoughts On Morph Exchange

April 26th, 2008 by Justin Ball

I am working on a quick Facebook application for a company called Flat World Knowledge. Basically I have 4 days to build the application - it has to be done by Tuesday. Because of the simplicity of deployment on Morph Exchange I decided to deploy the application on their platform. I don’t have time to setup a full Rails deployment environment.

One problem. Facebook applications require access to the Facebook API. I used rfacebook because that is the library I have used in the past and could quickly get the application done. (Facebooker is another library worth looking at if you are building a Facebok Application). I deployed the application but it wouldn’t start. I did some checking and finally found their deployment log. Turns out the Facebook gems are not installed. There is a way to package up your gems into your project. (This site will help as well.) With the popularity of Facebook applications growing and the need for scalability on demand I would think that having the Facebook gems already in place would be a must for a platform like MorphExchange. I submitted a ticket yesterday and haven’t heard back yet. Hopefully they are responsive. I deployed on Morph for the speed of deployment. The clock is ticking for me.

Tags:   · ·

3 Comments

Visited My New Madone This Morning

April 24th, 2008 by Justin Ball

I am sure the bike shop is sick of me, but I don’t care. I visit a lot. The new Madone showed up at the shop this morning so I paid it a visit. Here are the pictures:

Tags:   · · ·

No Comments.

Weather in Logan Not Conducive to New Bike

April 24th, 2008 by Justin Ball

My new bike shows up today so what happens?


This is Logan, Utah so it snows of course.

Tags:   · · · ·

No Comments.