Jun 23 2008

Fire, fire, everwhere!

Published by Brian under Weather, california

This past Saturday morning I went up to Benton to take one of my last lessons and instead watched a nasty lighting storm roll through.    Mix lightning and dry terrian, and you can imagine what happens next.

We have about 50 or so major fires going on in the highlands around us, and all the smoke is settling down into the valley around Redding.   It smells like BBQ outside and the Sun has turned an eerie red-orange color; you can stare at it without even squinting.

One of the Mt. Lassen fires is a few miles away from my parents place in Shingletown.

Smoky Sun

No responses yet

May 29 2008

Phaedrah flew!

Published by Brian under Flying

Today Tex and I took Phaedrah up for a ride in 5519J. Though she liked the ride, it got a little bumpy at the end–and she ended up getting a little motion sickness. All in all she had a good time, which is what counts!

Do we possibly have another pilot-in-training in the family? Only time will tell!

One response so far

May 16 2008

First solo flight!

Published by Brian under Flying

What great day! We started out by doing some usual pattern work at Benton, a total of three landings. After the third, my coach asked me to taxi up to the building’s garage, and then he proceeded to get out of the plane.

Next he said: “Now it’s your turn, do three more of the same. Have fun!”

I did three more trips around the pattern on my own. Coach stayed on the radio, just in case I needed him–but it was smooth flying. After three decent (but not great) landings and doing it all on my own, I came back in and parked it. He took a polaroid of me next to N5519J, filled out a Solo Certificate (for framing) and then wrote stuff all over my shirt and cut it out :)

Tomorrow I had more time scheduled with my coach, but the plan has changed–it’s now all to myself. I’m planning on taking her south over our practice area and just doing some basic S-turn stuff and circling our house a few times (turns about a point)! Taking it easy at first and just having fun. I can’t wait!

2 responses so far

May 15 2008

Flying solo… soon!

Published by Brian under Flying

After heading down to Disneyland last week, I got back on the horse and went up with my flight coach this morning. After having a week off, a bit of “skills rust” formed–mainly just flying the plane on final before landing. Nothing major; I just needed a few gentle reminders to cross-check things.

Overall today’s lesson was “in my hands” and in the words of my coach, he was “only along for the ride”.  We departed from Benton Airpark on runway 33, and made a left downwind departure South on towards Red Bluff’s big airstrip. At Benton, we had 29 knot head winds from the North, but fortunately straight down the runway. By the time we made it to Red Bluff , the Northerly wind had died down a little–but because of it I made a decent (but unintentional) short-field landing. I received a word of caution from the coach, and also another lesson learned today–keep the airspeed at 65 knots on final no matter what it takes (power, flaps, whatever!). Don’t get so stuck in routine that you forget the basics.

After doing a touch-and-go at Red Bluff, it was off to Redding Municipal for some controlled airspace (Tower) work. I called in to Redding Tower about seven miles to the south with this line:

“Redding tower, cessna five five one niner juliet. We’re seven miles South over the I-5 weigh station inbound for a touch-and-go and request a left crosswind departure with information Romeo.”

Which won me some accolades from the coach.   I have never really been radio shy, and apparently this is now really helping me out down the road when dealing with controlled airspace.

Fortunately for us, Muni was slow today and I was the only plane in the area. After the call Redding Tower cleared us for a landing on 34. Nasty thing was that we were back in some rough North wind: 29 knots according to Muni ATIS–and now at about a 15-degree crosswind from the East. I did my best to keep it lined up, but rolled a little too much to the right in my slip just before touchdown. Coach helped out at the last bit, and made for a hectic few second.  But overall not a bad touchdown–for a 30 knot crosswind!  As my coach said: Any landing you walk away from is a good one! Heh.

Leaving Muni airspace and heading back to Benton, my coach said he’d take over for the landing at home. The winds were just getting too strong and starting to lean in further from the Northeast. Sure enough, as I flew over midfield at Benton, the windsock was straight out and at about a 20-degree angle from the East.  My coach did some amazing flying work coming down and we made it home safe.

During the de-brief we discussed how my landings still need some practice, but nothing so bad as to keep me from Soloing. I did received another “good job” on my radio work and for that I received a “1″ again today (on a scale from 1-5, 1 being best). According to my coach–my first solo could be any time now, so I need to come prepared and in a beat up old shirt(?) I guess there’s some rite of passage when a PiT (Pilot in Training) first solos at Benton!

I’m on for trips up Friday morning and Saturday morning. We’ll see how it goes!

No responses yet

May 05 2008

BASH Pipeline Exit Codes

Published by Brian under Computers, Linux, Scripting

I think I’ve mentioned many times on this blog, but one of the most satisfying things regarding Linux and Unix are that you’re never done learning about it. A never-ending lesson in operating systems! Well, chalk up another lightbulb moment for me this morning.

Imagine a script wherein a process needs to be checked for proper exit. Let’s say “mysqldump”. Typically I’d do something like this, for example:


#!/bin/bash
STATUS=1
while [ ${STATUS} -ne 0 ]
do
mysqldump -uroot -psomepass --all-databases > sql-backup.sql
STATUS=${?}
done

exit 0

That’ll work just fine–the special reserved variable ${?} contains the exit code of the last run command. Mysqldump is kind enough to use non-zero ones on any kind of error, so if it doesn’t work in our script we’ll retry.

But for instance, let’s say our script looks like this:


#!/bin/bash
STATUS=1
while [ ${STATUS} -ne 0 ]
do
mysqldump -uroot -psomepass --all-databases | gzip > sql-backup.sql
STATUS=${?}
done

exit 0

The problem here is that ${?} now contains the exit code for gzip, not mysqldump! Will gzip respond properly if mysqldump doesn’t provide an input stream from the pipe? Maybe, maybe not. Bottom line is that it isn’t reliable, and not what I’d consider good shell programming.

Instead, check out this solution:


#!/bin/bash


STATUS=1
while [ ${STATUS} -ne 0 ]
do
mysqldump -uroot -psomepass --all-databases | gzip > sql-backup.sql
STATUS=${PIPESTATUS[0]}
done

exit 0

The BASH reserved array ${PIPESTAUTUS[x]} contains the exit codes for all programs in the array. In this example, ${PIPESTATUS[0]} is mysqldump, and ${PIPESTATUS[1]} is gzip.

2 responses so far

« Prev - Next »