Chrishan - Chris, Shannon, Jasmine, & Kai

Friday, September 21, 2007

Bad Programming Humor

We are currently looking to hire another php programmer at work and today we where going though and finalizing interview questions. My boss was saying it would be fun to have a silly question at the end to hint at the fact that we are a fun group to work with. His idea was a question like "Are you more a spoon or a fork".

Both Dan (coworker) and I agreed his question wasn't in our taste. I mentioned that it would be fun to do some kind of code joke. For example have them evaluate something with a hidden joke in it. Dan mentioned the fibonacci sequence.

Not sure if that really comes out funny or not, but it stuck and this evening I couldn't help myself. I had to create an example. My first thought being that the fibonacci sequence is the perfect example for using recursion. Of course I wanted to make it in the least amount of lines as possible and came up with this

function fib($n){return ($n < 3)?1:(fib($n-1) + fib($n-2));}
for($i=1;$i <= 20;$i++){echo " ".fib($i);}

It worked out great but two things bothered me, first was the fact that it was two lines (well i cheated a bit) and second that recursion is not the most efficient solution when we want to go out a ways "n" wise. For example n = 50, would start taking a second or two to process.

So I spent a while researching before I came across Binet's formula

an = [ Phin - (phi)n ]/Sqrt[5])

This uses the golden mean (Phi) to calculate the Nth place in the sequence.

With this new formula in hand I was able to create one line of code (still cheating), to create a fib. sequence. This example was a lot more efficient than the previous recursive one.

for($i=1;$i <= 20;$i++){echo " ".(( pow(((1+sqrt(5)) / 2),$i) - pow(((1-sqrt(5)) / 2),$i) ) / sqrt(5));}

Okay, I know this post is really only geared towards two readers on my blog. Feel free to surprise me with a comment, how many of you got the code or understand the math?

Saturday, September 15, 2007

Lotoja

How did the ride go? How far did you make it? How do you feel? All great questions, however I am very disappointed to say that I did not make it. This might not come as a big surprise to many out there, however it wasn't for reasons you are guessing.

Dan, Rosey, and the four of us arrived in Logan the night before the ride allowing us to check into our hotel, get signed in with the ride, and attend the informational meeting before the ride. This part of the trip felt the most rushed. Between getting into Logan and then running around to get stuff done it felt like the evening flew by and left me feeling worried I had forgot to do or grab something.

That night I don't think I slept much constantly tossing and turning and looking at the clock worrying that I overslept my start time. However, the alarm finally went off around 5am leaving me feeling pretty tired. All I could think was how good a nice warm cup of coffee would taste.

Just before 6am Dan and I jumped on our bikes and headed over to the start line. With the forecast for the day in the 70s with lots of sun (which was about the best weather you could hope for) I decided to only wear my shorts and short sleeve jersey. I did learn one thing, even if the weather calls for 70s, when the sun is down and you are in a valley, it is incredibly cold. I was freezing!

The big difference with this ride was that it wasn't a ride, it was a race. This meant that we where released in small packs around 40 in size. Signing up under cat 5 left Dan and I starting after all the faster packs. This wasn't a big issue for me other than I wanted to get moving on the bike to warm up.

Eventually our start time arrived and we took off. It was fun having a police escort out of town. Riding in the middle of a large pack it was incredibly easy to keep a good pace. We where averaging somewhere between 22 and 25 through our first stop.

Just before that first stop everything became hectic when the pack released behind us caught up and merged into ours. It was at this point that I lost site of Dan. With nearly a hundred of us all together the pack began to split into groups. I found myself constantly rushing forward to catch the front pack. This must have happened at least 5 or 6 times. I never was able to find Dan again. A few miles down the road we our first stop it got quite chaotic with a number of riders splitting up, some stopping and some riding. I quickly pulled off to refill one of my bottles after realizing that I was most likely not going to find Dan anytime soon.

After the refill I quickly got back on the road and started riding out toward my first mountain. I was feeling great and had a good pack I was sticking with. Until I heard that dreaded Psstttttt sound. Crap I thought, as I pulled off to deal with a flat rear tire. I quickly tore off my old tube and threw on a new one. I was rushing myself to put the new tube in feeling the pack slipping away.As I was putting the wheel back I heard that great Psstttttt sound again. This time I swore and I swore very loud! That is what you get for rushing. In my hurry to get the new tire on I never checked to make sure the tube was all the way in, and I had left a small part sticking out and caused myself a pinch flat!!! So I pulled off my "new tube" and put on another one this time taking a little more time to make sure I did the job right.

Finally I was back on the road after what felt like a 20 plus minute stop. I was still feeling great, however I lost the pack that I was riding with. It didn't take long before another pack caught up with me, however this one was heading a bit faster than I could keep with and I dropped off from them after a few miles. I wasn't too worried since we had just started climbing. I figured this was going to be my own pace so I didn't worry too much about having to stay with a group and kill myself.

It was probably a few miles into my ride that I heard a new sound. This one was a snap like sound. I recognized it, the last few rides I had done before had this sound. I knew I had just broke a spoke and I could feel the difference starting with a slight wobble in the rear and slight resistance every time the wheel swayed into the break. I didn't care damn it, I told myself that I was going to summit a mountain. I continued to climb for many miles until my bladder got the best of me. I decided to pull off and take care of nature. I double checked my suspicion and found that I did indeed have a broken spoke. I used this opportunity to opened my breaks up so I wouldn't have to worry about the rubbing anymore and just as I started to get moving a support vehicle stopped by to ask if I was alright. I told them I had broken a spoke and politely refused to catch a ride with them. I figured one way or another I was going over this hill! As they drove off I got back on and continued to ride up the endless hill. It felt a bit longer to me as I struggled for speed against a tire that wasn't working, but I was okay with the fact that people where passing me. It wasn't that I was out of shape it was my bike that was out of shape.

At this point the batteries in my gps died and I could no longer tell how much further it was, I knew it had to be within the next five miles that I would reach stop two at the summit of my first mountain. I had it in the back of my mind that there would be someway to repair the damage and I could then continue to ride through to the end or until my body couldn't endure anymore. Apparently my bike had reached that point before I did, it could endure no more. This time the snapping sound was a much more noisy and my reflector went flying out into the road. I quickly pulled over and realized that if I kept going I was going to destroy my rear wheel. I was bummed, I knew I was just a mile or two from the top.

That might seem a long way when climbing a mountain but I was around mile 28 of a 30 mile climb. Not wanting to cripple my bike further, I pulled off and waved down the next support vehicle. One car took my bike while another hauled me. I still had it in my mind that I would find someone who could repair my bike at the next stop. However a few moments later the guy over the radio informed me that there where no bike shops to be found anywhere near my location and that he marked me out of the ride since my bike was unrepairable. I couldn't believe it :( I had it in my mind that I might not survive the total distance but at least I would find out how far my body could go. This wasn't the ending I was expecting, I still felt like I had another 100 miles in me. I was going to beat the mountain stage of this ride! But I wasn't. Fate had another plan for me.

I had mentioned that the last few rides I had done ended with broken spokes. Well when I took my bike in last time to have it fixed the guy told me that I was hitting the point in my spokes lives where they where going to start breaking from old age. He mentioned that I should look at having him rebuild my wheel. I thought about it for a few minutes and decided to turn that offer down after all the money I had already put into the bike so far, plus the fact that in less than a week I was going to be going on a two week vacation. So I saved a hundred bucks on repairs but it cost me in the long run.

It was still an enjoyable day, and we where able to catch up with Rosey and help her support Dan as he continued to ride on. Oh well it just means I have to do the ride again! Maybe this time I will get myself a newer prettier bike ;)

Here is an elevation chart, the green is what part I rode until my bike broke down.


Labels: ,

Grand Teton National Park

After struggling to find a hotel on Saturday evening, Dan, Rosey, and the four of us all headed up to Grand Teton National park. It was a beautiful drive, and a fairly warm day when the sun was shining, so it seemed to be a perfect day for hiking. We all put on light jackets and started off on our hike to the hidden falls on the back side of Jenny lake. Over all it was a nice walk, consisting of good conversation with good friends. My paranoia of meeting bear always on the forefront of my mind because we were in bear country, the little flier that they handed out at the part entrance told me so.

The kids were having a great time taking turns holding Rosey's hand and walking with their new favorite person. Only a couple of fights broke out about who was going to hold Rosey's hand and Rosey, was a good sport about the whole thing, took it in stride. About half way through the hike I was regretting not putting on shorts, it was getting down right hot out. We saw lots of birds and rodents but nothing of large size. We stepped over some droppings in the path and I couldn't help but chuckle about how we should have had the "Who Pooped in the Park" book to identify what specific animal made the pile of skat.

Jasmine was happy talking about everything and anything that came to her mind and Kai took a nap in his daddy's arms. After about an hour and a half we got to the falls. The weather was still pretty nice although it had cooled off a little. We took some pictures and enjoyed the beauty of the falls. Unfortunately, as we stood at the falls, the temperature started to drop quickly, and we decided it was time to go before we got rained on. We chose to take the boat back across the lake and it was only a short walk down to the docks. During that time the rain started, and was slowly turning to a more snow like consistency. We got on the boat and started back across the lake.

The conversation with the boats driver slowly ended up going to the subject of bears in the parks and the problems they have had. During this time I kept glaring at Chris because he is of the opinion that bears aren't anything to worry about where I am of the complete opposite opinion. The driver just confirmed my opinion: we are in bear country, we need to be careful. Chris would argue later that it was a non issue and I shouldn't be worried about it. Long story short, we finally made it back to the opposite shore a little wet but none to worse for wear.

We joined Dan and Rosey for lunch and with hugs and goodbyes we wished them the best. They headed out toward the cost for the wedding and we headed north to Yellowstone......

Friday, September 07, 2007

Visiting Dan

Wednesday afternoon saw us to Dan's house to visit. That evening we got in a short 20 mile ride through the valley. I was able to experience the joys of not being acclimated to the elevation. Overall I didn't feel too horrible but it was definitely noticeable.

We hung out for the rest of the day and on Thursday I got a small tour of Novell followed by a game of frisbee golf for lunch. That evening Owen and Kim stopped by for brats and beer and we played into the wee hours with the wii :)

It was nice to get the college group together again. Now as I write this on Friday after getting ready to head north to Logan, I look ahead to tomorrow where Dan and I will start out on the LOTOJA ride. Leading us about 206 miles through the mountains from Logan Utah to Jackson Hole Wyoming. The true test is to see how I fair after such an undertaking. Hopefully well enough to hike in Yellowstone on Sunday. Wish us luck!

Bryce Canyon NP

After a day of on and off rain we arrived at Bryce Canyon just as it was starting to show blue sky again. It was nice to have time again to setup camp and get a mile long hike in with the kids. I feel bad when we drive for long periods of time and it is nice to give them some time to run off their extra energy.

Bryce Canyon is up there as one of our favorite National Parks so far. The landscape is incredible Orange / Pink color with an almost alien feel to it. However this is another park where the steep cliffs make it a bit nerve racking with young children. We where still able to walk along the top of the ridge and the next day we did a fun walk at the bottom of the valley. The walk takes you along a small river bed and ends next to a waterfall and small cave. The kids of course absolutely love waterfalls and keep telling us how huge it is. One of these days we will have to go to an actual waterfall that is huge just to see their reactions.

The Drive to Bryce Canyon NP

Dan suggested a route between Natural Bridges NM and Bryce Canyon NP, that has to be the most incredible drive I have done to date. The drive itself leads you from Natural Bridges through the Canyon Lands NP, Capitol Reef NP, Dixie National Forest, Grand Staircase - Escalante NM, and into Bryce Canyon NP.

One of the things that makes Utah such an great state is the fact that you can drive 50 miles and watch the landscape change so dramatically from one park to the next. The entire drive I found myself watching the land more than the road.

One of the wildest parts of the ride is along the Grand Staircase where they take you between to valleys at the top of the ridge. There is a short section where you are driving on a two lane road with huge cliffs on either side of the road. I definitely wouldn't want to drive that stretch in the winter. Funny thing is up until this point I have been seeing signs all over about drinking and driving, but was unable to find any signs on this stretch of the road. Wonder if they figure the problem takes care of itself.

Natural Bridges National Monument

We arrived at Natural Bridges with a few hours of sunlight to spare. This gave us enough time to setup our campsite and head out into the park for a few overlook hikes. Natural Bridges was felt like a really cool area which is completely overlooked. The whole time there it felt like the park was pretty much our own. We maybe saw a total of ten people the entire time.

It was nice in regards to the fact that we has this great place to ourselves but also a bit sad seeing such a great area being under appreciated. The landscape here forms a number of natural bridges and the color and look of the rock is amazing. We where able to see a couple bridges before we had to call it an evening.

The next morning we started out where we left off and re-hiked some trails along with finishing off our stay with a hike down to the last bridge. The kids loved running around the area and Kai had the best time once he realized the great echoes he could make :)

Trip Update

So far the trip has been going great. The kids are doing pretty good overall, other than the occasional temper tantrum. The best part is they absolutely love camping, every day we have Jasmine begging us to camp.

So here is the park tally so far...


  • San Juan National Forest along the Rio Grande

  • Mesa Verde National Park

  • Glen Canyon National Recreation Area (Lake Powell)

  • Natural Bridges National Monument

  • Capitol Reef National Park

  • Dixie National Forest

  • Grand Staircase/Escalante National Monument

  • Bryce Canyon NP




Hula Hoop in designated area?
Gravity has spinning effect?

Mesa Verde NP

We spent most of our morning checking out Mesa Verde National Park on Tuesday. The landscape of this park doesn't stick out like those of lower Utah, however the one thing that makes Mesa Verde special is the cliff dwellings.

Once you get into the park there are a number of overlooks to see the numerous dwellings built into the canyon walls. It is quite incredible to think about the Pueblo living in such a fashion.

Unfortunately this park is more geared towards the serious hiker, which I would normally consider Shannon and I to be. However, with two kids in tow a number of the hikes where ruled out due to steep cliffs, and a number of ladder climbs.

We where able though to climb down to Spruce Tree House with the kids. One of the great things to check out there are the Kivas. They are holes in the ground with ladders sticking out. They allow you to climb down into them about 8 feet down. At first the kids where not to sure about wanting to go down, but after heading down first they both had to check it out as well. In fact when it came time to leave I had to drag them away from the Kiva. I think they found their new hideout :)

Overall I really want to go back either without kids or when they are older and can do the more strenuous hikes.

Monday, September 03, 2007

And we are off

Friday afternoon we left from Madison, starting off our two week road trip. The first day was fairly short and uneventful. We finally pulled off at a KOA a short distance from the Nebraska boarder. We had actually discussed for quite some time if we should keep going and enjoy the beauty of Nebraska at night. However the kids kept waking up since they where not the most comfortable sleeping in their car seats for long periods of time. With that settled we setup camp about 12:30am.

The next day we decided to hit it hard and nocked out all of Nebraska! We decided to hit another KOA just outside Denver since they have wireless and showers. After freshing up the next morning we drove into Denver and did the Aquarium with the kids. They had a blast checking out all the fish, and it gave them sometime out of the car before heading into the Mountains.

The drive through the Mountains was pretty uneventful other than realizing our van has no acceleration in the mountains when it is loaded down. We made a few more stops along the way to let the kids out to play.

One of our memoriable stops was in San Juan National Forest. There was this great 9 mile stretch with a 7% grade downhill. I decided on a whim to stop on one of the switchbacks to take some pictures. As soon as I opened the door I noticed an interesting smell. Boy that smells like burnt rubber. I looked at the tires and could make out a very faint amount of smoke. Yikes, not good I thought. We decided to give the breaks a bit of a rest and headed down to hike a small water fall. Jasmine was quite enthralled with how this was the hugest waterfall she had ever seen and how we had to take a shortcut up the mountain. Realizing we should give the car sometime to cool down, we headed up the path which came out just below the waterfall. The kids where delighted to see the waterfall up close and get to do some hiking.

After our hike we headed back down and drove the rest of the way down the mountains and drove into Durango, Co around 8pm. With storms overhead we decided to give the camping a break and find a hotel instead. It took a bit of searching, guess winging it on labor day weekend was not the most thought out. Oh well it all worked out, we scored a suite at Best Western, which was nice enough to drop the price from $200 to $119. Not quite the cheap place I was looking for but on the fly I won't complain too much about having a warm suite instead of setting up a tent in the rain.

Today after we checkout of the hotel we are heading out to Mesa Verde National Park and then into Utah to camp. Keep your eyes posted on the site, I hope to add a new post every few days on our trip.