cycling

I don’t like Lance Armstrong, I don’t really like the sun, and I’m not a fan of lycra shorts. Despite this, I have decided to start cycling. Many of my best friends have become avid cyclists over the past year. Two of my friends don’t even drive cars anymore, they just ride their bikes, most of the time over 50 miles a day. They have a great time doing it also.

Recently I have started training to be a kick boxer (muay thai), and I have realized that I need to work on my cardio and my hip strength. I think that riding around town with my friends will be more exciting and motivating then siting in a gym with an ipod on, riding a stationary bike.

I live in Redlands, California. Every year Redlands plays host one of the largest bike races in the United States, “The Redlands Classic“. There are lots of people who cycle around here, so that means lots of used bikes. CraigsList.com is awesome for that sort of stuff.

Last Sunday I bought a used bike through Craigs List.

roadbike.jpg

  • Trek 5000 OCLV 56 Carbon Frame
  • Shimano 105 Components
  • 23/13 cluster
  • Mavic Wheels
  • New Saddle
  • New Brake and Shift cables

Once I figure out what all that means, I will make another post. Right now all I know is that I don’t have all equipment that I need to ride it yet. My good friend Hardcore Steve has been awesome and kicked me down with a helmet and some shoes. I have a feeling that many good times are going to be had if I don’t crash and kill myself, or get hit by a car and die

experiments with MySQL FULLTEXT searching

I just read a great article on FULLTEXT searching in a MySQL database
(http://www.onlamp.com/pub/a/onlamp/2003/06/26/fulltext.html)

I took a few minutes to run some of my own test using two of the largest text fields on the notPopular.com user profile table. I wanted to check out the results of a FULLTEXT search versus a LIKE query using real data in my database.

First I did a search using the LIKE clause looking for “xdeathstarx”


SELECT *
FROM profiles
WHERE approved =1
AND
(interests_general LIKE '%xdeathstarx%'
OR
interests_music LIKE '%xdeathstarx%')

Showing rows 0 – 29 (119 total, Query took 0.0763 sec)

The query was fast, and took under a second to run

Next I created a FULLTEXT index on the “interests_general” and “interests_music” fields. It was really easy to do.


SELECT *
FROM profiles
WHERE approved =1
AND MATCH (interests_general, interests_music)
AGAINST ('xdeathstarx')

Showing rows 0 – 29 (119 total, Query took 0.0016 sec)

Talk about fast! it took 0.0016 seconds

lets compare the differences:
LIKE statements : 0.0763 sec
FULLTEXT search : 0.0016 sec

hands down the FULLTEXT search won, it was about 50x faster. If that isn’t instant results, I don’t know what are. Sure there will be more disk space used on the FULLTEXT index, but disk space is cheap, CPU cycles aren’t.

This makes me want to look more into optimizing the queries I am planning on using for the ever elusive notPop 2.0

My router is running linux

tomato_linux_router.jpg

Its no secret, I like to install Linux on things that should be running Linux, like my iPod.

My friend at work, Stephen, recently told me about installing Linux on a linksys router. To be honest, I looked into my router in the past, but it was years ago, and required soldering wires and things inside of it. I don’t have the best luck when it comes to hardware mods, so I didn’t do it.

Stephen turned me on to a new Linux based firmware for older linksys routers called “Tomato”.

Tomato is a 3rd party firmware that voids the warranty on your router, but lets you do some awesome stuff you weren’t able to do with the original firmware.

It took all of about 5 minutes to download the firmware and reflash my router with it. You can get a copy of it at http://www.polarcloud.com/tomato

The interface is ajax based and really clean. Because its all powered with ajax, there is some really cool monitoring features, like real time bandwidth monitoring (flash movie)

If you have a weak wifi signal from your router, you can use the tomato firmware to crank up the output of the signal.

All in all you turn your $50 router into a $500 router with this open source firmware.

You have to have a Linksys WRT54G, version v1-v4. Newer ones are v5, so before upgrading be sure to check yours.

If you aren’t a big geek, this mod is kind of useless, but how awesome is it to say that you are running Linux in your router.