November 2007 Archives
With apologies to Nelson, The Regex Coach is good software. It's an interactive regular expression authoring tool for Windows. Rather than typing a given regex directly into your Java/Python/Perl/C++-with-PCRE-library code and building your entire program, you type the expression into the top window, type a sample string in the bottom window, and if it matches, the matching part is highlighted. Such a time saver.
My one feature request: menu items that copy the regex to the clipboard, but properly escaped to paste into less regex-aware languages like Java. E.g., ([A-Za-z]+)\\\.[0-9]? would be copied for Java as ([A-Za-z]+)\\\\\\.[0-9]? (at least, I think that's right). The version of the feature that copies into a Bash command line would emit something like \\\\\\\\\\\\\\\\\\\\.
Jeff Zacharias is my certificated flight instructor, or CFI. He's the guy who taught me how to fly. I found him after sending an email to a bunch of local CFIs describing my specific goals and needs. His reply was the first and the best among several. We scheduled a demo flight on November 26, 2006, out of San Carlos, and it went fine.
After the lesson I asked Jeff all the usual questions you're supposed to ask a prospective CFI, in particular what percentage of his students pass their checkride on the first try. His answer was more or less "not applicable," because he hadn't sent anyone yet to a checkride. Usually you expect an answer somewhere very close to 100%, so this was technically a disqualifying answer, but I had a good feeling about Jeff, so we settled on a weekly schedule from 6 a.m. to 9 a.m. Wednesday mornings at San Carlos.
Twice I did my best to kill Jeff. First, in March we were at Livermore Airport doing touch-and-go landings, and on the takeoff roll the plane began veering toward the left of the runway. I had been trying to avoid dragging the brakes during taxi and takeoff, so I'd overcorrected by leaving my feet on the floor unless I really meant to effect a control input. (As I write this eight months later it sounds ridiculous; you're constantly putting in at least some pedal input just about whenever the plane's in motion.) As I realized what was happening, I froze. I was afraid to lift my feet and put them back on the pedals. I recall a visceral fear that I'd flip the plane if I touched the pedals, much as you might if you quickly spun your car's steering wheel on the highway.
We were at nearly 50 knots and headed for the rough along the side of the runway. Today I know several different ways to handle this situation, but at the time as a junior student I'd have certainly nosed-over the plane at a deadly speed.
This was the first time during our instruction that Jeff had to take control from me. The recovery was straightforward: jam on the right rudder pedal, pull back to lighten the load on the wheels, and moments later we were in the air and safe.
We discussed what happened later that day in email. Jeff's attitude was these sorts of incidents are part of learning (specifically that p-factor is huge when you're already off the nosewheel and at full throttle), and that it was no big deal. I took comfort in his response, and didn't let it crush my self-confidence.
The second time I tried to kill Jeff was a few weeks later in April. We were at Hayward Executive, getting closer to my first solo flight, practicing all sorts of emergencies and unusual situations (broken flaps, broken trim, engine-out, short but very high approach). I was too high but the flaps were "broken" in an up position, so I had to execute a forward slip, which is a maneuver in which the pilot yaws the plane but rolls in the opposite direction in order to thwart the airplane's naturally clean aerodynamics and cause it to begin to descend quickly without gaining airspeed. For some reason that day I decided to pull slightly back on the yoke during the maneuver, forgetting that one usually needs to push the plane's nose down in order to keep it safely above stalling speed.
If that was too technical, here it is again in layman's terms: if a plane keeps moving forward fast enough, then the wings lift it and it stays airborne. If the plane slows down too much, it turns into the aerodynamic equivalent of a rock, which, as you may know, falls right out of the sky. You don't want to stall the airplane, and you especially don't want to stall it when you're doing a forward slip, because that leads to a condition called a spin that is generally fatal below 1,000 feet.
The moment Jeff realized what was happening, he reflexively shoved his hands at the yoke, thereby pointing the nose down and increasing our airspeed. He simultaneously issued a wryly phrased admonishment that it would be better if I didn't kill us both. I believe we got close to 52 knots, which is quite close to the stalling speed of a Cessna 172 in the flaps-up configuration (even though the airspeed indicator can be inaccurate in low-speed and slipped conditions), and I'm not sure I'd have corrected in time on my own.
Anyway, as you have no doubt deduced, I failed on both attempts, and we lived to fly again. But my respect for Jeff's restraint, patience, and perspective increased dramatically after these two incidents. I'd have vowed never to fly again with a spaz like me, but it rolled right off Jeff. I think this epitomizes what makes a good instructor good: a determined, unflappable willingness to sit quietly in the right seat and let your student make mistakes, while at the same time staying alert to prevent fatal mistakes.
I could go on, but this is the web, and your attention span is consequently short. So here are some bullet points:
- Jeff videotaped my solo and edited it into a DVD. Amazingly cool and kind of him.
- Jeff was almost never late to a lesson, even though we started at 6 a.m. on weekdays. The one time he was late, I coincidentally forgot to set my own alarm and slept in, and we almost simultaneously called each other, apologizing and begging to reschedule to 7:00.
- During the three hours of my checkride that took place over nearly a month, Jeff went through heroics to ensure I was prepared to succeed. He showed up on his own time to make sure my checkride paperwork was correct. He offered to fly me IFR to get me to Watsonville, where my examiner was stranded. He juggled his work and personal schedule to fit in spur-of-the-moment lessons when I was feeling out of practice. It was gratifying to have another human being on Earth who cared at least as much as I did that my checkride went smoothly (which, other than scheduling, it did).
- Jeff always responded quickly and thoughtfully to my emails. I have no idea how many unbilled hours he spent composing his replies over the last year, but I'm sure the total is substantial.
- If Jeff has an ego, he never showed it to me. Like me, he's a software guy, and when you get two of those types talking about any technical subject, eventually they're going to get into some kind of disagreement that rises to the level of religion. Aviation has just as many styles, dialects, schools of thought, and gray areas as software development, but nothing between Jeff and me ever escalated -- though he did have to try pretty hard to disabuse me of some notions. I've been fairly described as abrasive and stubborn in the past, so I have to give Jeff credit.
All this, and he's a genuinely nice guy, too. Oh, and that question I asked him last year about his percentage of students passing their test on the first try? His answer is now 100%. :) If you're looking for an instructor, give him a call.
Today I flew with my first passengers: my family! Mary, Emily, and Thomas willingly or unknowingly got in N54JA, a Cessna 172SP, and we attempted to fly from SQL (San Carlos Airport) to HAF (Half Moon Bay Airport).
I picked 54JA among the other available planes because it was near the Gazebo, which is a little raised platform at SQL with picnic benches. It's a great place to leave the kids during preflight. I did my normal preflight and then added booster seats into the back row of the airplane and plugged in everyone's headsets. We packed everyone in, and we were off!
I stayed in the pattern once in case anyone freaked out, and then we departed Runway 30 toward VPCRY. As we passed the mountain peaks, we began hitting a little turbulence. I self-announced on HAF's CTAF as we overflew the airport at 2,500, then we began a 180 over the ocean to do the official 1,000-feet-above-pattern-altitude overflight. At this point I noticed people were entering 30's pattern by coming in well north of the airport (versus overflying and then looping left onto the 45), so I turned left, followed their pattern, and began descending to TPA. The mountain turbulence was really starting to bug Mary, but I pressed on a couple miles behind a Cherokee.
As I turned onto base, I decided to call it off; it was just too gusty for an enjoyable landing. I could have easily made a safe landing, but I knew that even with my limited experience my idea of "safe" was well outside my passengers' idea of "safe and comfortable." So I self-announced that I was aborting the landing and departing the pattern on 30's base leg, and we climbed to 2,500 and headed back home to SQL.
The flight was 0.7 hours on the Hobbs with less than half an hour in the air. When the turbulence began the kids fell asleep (their usual defense mechanism). As they got out of the plane back at San Carlos they claimed to have had fun.
I'm glad to have gotten my first flight with passengers out of the way; part of me had imagined doing hundreds more hours of pattern work before taking any passengers, but once I finally got my license, my confidence level was high enough that I wanted to take the whole family right out of the gate. That said, it's a heck of a lot of work to fly to HAF with two toddlers for ice cream. Next time I'd like to go somewhere interesting or do something fun, so that the 30 minutes of preflight and 15 minutes of post-flight cleanup are worth it.
Mary will probably be posting pictures soon.
These are the topics I hope to cover in the future:
- My excellent CFI (certificated flight instructor), Jeff Zacharias
- Why I started flight training to begin with, and why most of those reasons turned out to be wrong
- The time I almost killed Jeff
- The other time I almost killed Jeff
- My theory why many students stop flight training midway through
- How to complete flight training on a budget (subtitled "Everything that I wish I'd done, in hindsight")
- Capsule reviews of various aviation products and services
Some of these posts are already written, but I deferred publication until now. The reason I kept my flight training fairly quiet while it was in progress is because I've noticed that the topic of pilot training tends to dominate all conversation with friends and family, partly because it's genuinely interesting, but mostly because the experience is immersive. It's hard for someone in the midst of becoming a pilot to avoid turning all possible discussion toward the topic of aviation. Now that the most intense part is past, I hope I can start discussing it without becoming too much of a bore. :)
As of a few hours ago, I am officially a private pilot! Today I passed my FAA practical test, informally known as the "checkride." This means I'm now legal to fly passengers in airplanes, subject to about 700 exceptions, qualifications, and limitations.
You know that heavy lead vest the dentist puts on you when you get your head X-rayed? Imagine wearing about three of those for five months straight, and then one afternoon taking them off and suddenly being as light as you used to be. That's how I feel! Beginning in July of this year I've been "just a few weeks" away from my checkride, and I've put much of my life on hold as a result. Little did I know that weather would delay my cross-country flights for many weeks, that a dozen little things would conspire to delay my checkride prep again and again, and that my checkride itself would take six weeks to schedule and almost a month to complete. I'm excited to have my life back.
I'll write more later.
The documentation showing how to upload mail to your Premiere (not Standard!) Google Apps account is good, but there are a few practical matters either implied or missing from it. Here's how to post an email from your Linux command line.
First, let's assume you have a user test@example.com with a password 1234567890. Get your auth token as follows:
$ echo -n "Email=test@example.com&Passwd=1234567890&accountType=HOSTED&service=apps" \ | POST https://www.google.com/accounts/ClientLogin
This will either ask you for a CAPTCHA (resolve as described here and then repeat), or tell you the credentials:
SID=a-long-string-of-characters LSID=another-long-string-of-characters Auth=yet-another-long-string-of-characters
Now you should put a test RFC 822 message into a file called test_letter:
From someone@somewhere.com Sat Jul 15 19:00:40 2006 Return-Path:Received: from somewhere.com (localhost.localdomain [127.0.0.1]) by somewhere.com (8.13.4/8.13.4) with ESMTP id k6G20eq4024585 for ; Sat, 15 Jul 2006 19:00:40 -0700 Received: (from someone@localhost) by somewhere.com (8.13.4/8.13.4/Submit) id k6G20eBj024584 for someone; Sat, 15 Jul 2006 19:00:40 -0700 Date: Sat, 15 Jul 2006 19:00:40 -0700 From: Someone Message-Id: <200607160200.k6G20eBj024584@somewhere.com> To: someone@somewhere.com Subject: hi hello
Then you need to XML-escape it. I used this sed script, called escape-xml.sed:
s/\&/\&/g s/</\</g s/>/\>/g
... and I performed the escaping with this command line:
sed -f escape-xml.sed test_letter > escaped_test_letter
Now wrap the whole thing in a full Atom request:
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:batch="http://schemas.google.com/gdata/batch"
xmlns:gd="http://schemas.google.com/g/2005">
<atom:entry xmlns:atom='http://www.w3.org/2005/Atom'>
<atom:category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/apps/2006#mailItem'/>
<apps:rfc822Msg xmlns:apps='http://schemas.google.com/apps/2006'>
From someone@somewhere.com Sat Jul 15 19:00:40 2006
Return-Path: <someone@somewhere.com>
Received: from somewhere.com (localhost.localdomain [127.0.0.1])
by somewhere.com (8.13.4/8.13.4) with ESMTP id k6G20eq4024585
for <someone@somewhere.com>; Sat, 15 Jul 2006 19:00:40 -0700
Received: (from someone@localhost)
by somewhere.com (8.13.4/8.13.4/Submit) id k6G20eBj024584
for someone; Sat, 15 Jul 2006 19:00:40 -0700
Date: Sat, 15 Jul 2006 19:00:40 -0700
From: Someone <someone@somewhere.com>
Message-Id: <200607160200.k6G20eBj024584@somewhere.com>
To: someone@somewhere.com
Subject: hi
hello
</apps:rfc822Msg>
<apps:mailItemProperty xmlns:apps='http://schemas.google.com/apps/2006'
value='IS_STARRED'/>
<apps:mailItemProperty xmlns:apps='http://schemas.google.com/apps/2006' value='IS_UNREAD'/>
<apps:label xmlns:apps='http://schemas.google.com/apps/2006' labelName='Event Invitations'/>
<apps:label xmlns:apps='http://schemas.google.com/apps/2006' labelName='Friends'/>
</atom:entry>
</feed>
and put it in a file called xml_test_letter. At this point you have your credentials, and a file that constitutes the body of a valid Atom request to insert the mail into the account associated with the credentials. The problem I ran into here is that the POST tool won't let you use a Content-Type header of the form foo/bar+baz, but the Google API appears to accept only the type application/atom+xml. I found the POST tool on my local system (it's just a Perl script) and fixed it:
die "$progname: Illegal Content-type format\n"
unless $options{'c'} =~ m,^[\w\-]+/[\w+\-]+(?:\s*;.*)?$,
(note the new plus sign added into the regex). Now you're ready to do the request:
$ cat xml_test_letter | \ POST -H 'Authorization: GoogleLogin auth=yet-another-long-string-of-characters' \ -c 'application/atom+xml' \ https://apps-apis.google.com/a/feeds/migration/2.0/example.com/test/mail/batch
This should return a result indicating that the new mail is in test@example.com's account. Unfortunately, in my case it told me that because I have a standard account, I can't bulk-upload mail. But I'm confident that if I had the right kind of account, then this process would have worked.
$ crontab -l 0 0 15 11 * chmod -R 555 /music/holiday 0 0 1 1 * chmod -R 0 /music/holiday
If you've found your way here because of NaNoWriMo, then you're probably wondering why my Firefox extension started on November 2 rather than November 1. I reprint here my response in the Mozilla discussion:
Hey everyone, I'm the author of this extension. As pointed out in the discussion, the start date for 2007 was incorrect. It was miscalculated to be November 1, 2007 *as of the current time*, and because that was always not-later-than now on November 1, the extension thought that NaNoWriMo hadn't started yet. On November 2 and beyond, it works correctly. I realized this just as NaNoWriMo was starting and quickly submitted 0.4, which fixes the problem. However, the Mozilla extension reviewers appear to be far behind on their extension-reviewing queue, so they haven't approved 0.4 yet, and that's why it doesn't appear on the site. Meanwhile, I have put 0.4 on my personal website at (link). Note that you should generally not install random extensions you find out on the web; if you're uncomfortable doing this, just wait until the Mozilla folks approve 0.4, and you'll get prompted for an update. Sorry for the distraction. Get back to your novel!
Updated 11/9/2007: The official Mozilla site now has 0.4.
A friend from college and I once went through a giggle session about how our moms would stick their right arms out to stop us from going through the car windshield whenever they braked hard. Now that it's illegal for kids to be in the front seat at all until they're 120 pounds or whatever the law is now, will evolution no longer favor families with strong Mom Reflexes?
My two-year-old son is able to understand these instructions, and he promises to follow them next time he gets separated from us:
1. Look around.
2. Find a mom.
3. Tell the mom, "I'm lost."
Step 1 usually solves the problem quickly; chances are Mary or I are nearby but out of Thomas's immediate field of vision. Step 2 is the brilliant part: every kid knows what a mom looks like, and a mom is very unlikely to exploit a lost kid. Step 3 is actually superfluous. Most moms will intuitively figure out that this strange kid who's suddenly latched on to her is lost. But it provides the social lubrication for the kid to approach the mom and break the ice.
