Slaves of Things

 

I adjure you by the gods, cease to admire material things, cease to make yourselves slaves, first of things, and next, for their sake, of men who can acquire them or take them away.

EPICTETUS, Discourses, Book III, Ch. 20

When we moved recently, having to pick up everything we own and transport it from Point A to Point B confirmed something I’d long suspected, which is that we’ve accumulated way too much junk and clutter in our lives.

And if I were to walk away from here with nothing but the clothes I’m wearing, how much of it would I really miss?

Answer: Not much.

EppsNet Labs: VoiceXML RSS Reader

 

The Big Picture

We’re going to build application that takes RSS data — specifically the EppsNet.com feed — as input, and outputs a VXML file that can be read and spoken by a VoiceXML browser.

The RSS Source Format

The general structure of the EppsNet feed — or any RSS 2.0 feed — looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.2.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

  <channel>
    <title>EppsNet: Notes from the Golden Orange</title>
    <link>https://eppsnet.com</link>
    <description>Online journal based in Orange County, CA. 
        Hilarious anecdotes tempered by the icy chill of certain 
        death.</description>
    <pubDate>Fri, 05 Oct 2007 03:51:21 +0000</pubDate>
    <generator>http://wordpress.org/?v=2.2.2</generator>
    <language>en</language>
    <item>
      ...
    </item>
    <item>
      ...
    </item>
      ...
  </channel>
</rss>

Each item within the RSS feed has a format that looks (slightly simplified) like this:

    <item>
      <title>Post Title</title>
      <link>https://eppsnet.com/2007/10/post-title</link>
      <pubDate>Fri, 05 Oct 2007 03:51:21 +0000</pubDate>
      <dc:creator>PE</dc:creator>

      <category><!&#91;CDATA&#91;Category1&#93;&#93;></category>

      <category><!&#91;CDATA&#91;Category2&#93;&#93;></category>

      <description>
        <!&#91;CDATA&#91;
        Item summary
        &#93;&#93;>
      </description>
      <content:encoded>
        <!&#91;CDATA&#91;
        Full item content
        &#93;&#93;>
      </content:encoded>
    </item>

VXML Output

Consult the VoiceXML 2.1 specification for more details, but the output we want will look like this:

<?xml version="1.0" encoding="utf-8" ?>
<vxml version="2.1">
  <form id="MainMenu">
    <field name="select_num" type="digits">
      <prompt>
        EppsNet: Notes from the Golden Orange
        <break size="small"/>
      </prompt>
      <prompt>Please select a story from the following list.</prompt>
      <prompt>
        1: Post Title 1
        <break size="small"/>
      </prompt>
      ...
      <prompt>
        5: Post Title 5
        <break size="small"/>
      </prompt>
      <noinput>
        Please select a number.
        <reprompt/>
      </noinput>
      <nomatch>
        Please select a valid number.
        <reprompt/>
      </nomatch>
    </field>
    <filled>
      <assign name="selection" expr="select_num"/>
      <if cond="selection =='1'">
        <prompt>
          Post Title 1. Post summary goes here [...]
          <break size="small"/>
        </prompt>
        ...
        <elseif cond="selection =='5'"/>
        <prompt>
          Post Title 5. Post summary goes here [...]
          <break size="small"/>
        </prompt>
      </if>
      <clear namelist="select_num"/>
      <reprompt/>
    </filled>
  </form>
</vxml>

What this will do when processed by a VoiceXML browser is:

  1. Say the title of the RSS feed.
  2. Offer the listener a numbered list of post titles to select from.
  3. Parse the user’s selection, by either voice or touch-tone input.
  4. Read out the selected post summary.
  5. Clear the input variable and offer the opportunity to select another item.

Generating VoiceXML from RSS

Because this is a WordPress site, we’re going to use PHP for the task of converting RSS input to VXML output. To simplify the task of parsing the input, we’ll use MagpieRSS, an RSS parser written in PHP.

The main loop in the code below processes up to 5 RSS items and simultaneously builds up two strings, one for the selection prompts and one for the item details.

<?php
/* We need this for MagpieRSS */
require_once 'rss_fetch.inc';

/* Read the RSS feed */
$url = 'https://eppsnet.com/feed';
$feed = fetch_rss($url);

$selection = '';
$detail = '';
$counter = 0;

$selection .= '<form id="MainMenu">';
$selection .= '<field name="select_num" type="digits">';
$selection .= '<prompt>';
$selection .= $feed->channel['title'] . '<break size="small"/>';
$selection .= '</prompt>';
$selection .= '<prompt>';
$selection .= 'Please select a story from the following list.';
$selection .= '</prompt>';

foreach ($feed->items as $item ) {
    /* Limit output to 5 items */
    if ($counter++ >= 5)
        break;

    if ($counter == 1)
    {
        $detail .= '<filled>';
        $detail .= '<assign name="selection" expr="select_num"/>';
        $detail .= "<if cond=\"selection =='$counter'\">";
    }
    else
    {
        $detail .= "<elseif cond=\"selection =='$counter'\"/>";
    }
    $detail .= sprintf('<prompt>%s. %s<break size="small"/></prompt>',
$item[title],$item[description]);

    $selection .= sprintf('<prompt>%d: %s<break size="small"/></prompt>',
$counter,$item[title]);
}

$selection .= '<noinput>Please select a number. 
                              <reprompt/></noinput>';
$selection .= '<nomatch>Please select a valid number. 
                              <reprompt/></nomatch>';
$selection .= '</field>';

$detail .= '</if>';
$detail .= '<clear namelist="select_num"/><reprompt/>';
$detail .= '</filled></form>';

/* Output the VXML */
echo '<vxml version="2.1">';
echo $selection;
echo $detail;
echo '</vxml>';
?>

Try It

I put the PHP script at https://eppsnet.com/lab/vxml but the output is not very interesting in a regular browser. Fortunately, Voxeo offers a free service that maps voice applications to phone numbers. You give them the URL of your voice app and they’ll point a phone number to it.

So — if you pick up the phone, call 800-289-5570 and enter PIN 9992002320, the Voxeo application will fetch the VXML output from our PHP script and read selected excerpts from the EppsNet feed to you over the phone.

Try it!

Limitations

The VXML output doesn’t contain the entire contents of each post, just the truncated version from the RSS <description> field. I tried using the <content:encoded> field instead but some markup constructs choked the Voxeo application. I think I could get it to work if I spent enough time on it, but for now, I’ve decided to leave it as an exercise for the reader.

Be Prepared, but Don’t Overdo It

 

Since I’m currently unemployed, my friend GL asked me to write something about the job interview process. The problem is, there’s already so much written about the job interview process, it’s hard to think of anything to add.

Which brings me to my point: It’s easy to overprepare for interviews.

Best Answers to the 201 Most Frequently Asked Interview Questions

For example, we have a book here that my wife bought called Best Answers to the 201 Most Frequently Asked Interview Questions.

Two problems:

  1. Who has time to prepare answers for 201 interview questions?
  2. What if the interviewer asks a question that’s not on the list? Where is your God now?

But wait! It gets worse! If you go to Amazon and look up this book, you’ll find a list of similar titles like

Clearly this notion of preparing answers to all possible interview questions in advance quickly reaches a point of diminishing returns.

Here’s what I’d suggest instead: Write up a list of the key points you want to make about yourself in the interview, the unique contributions you’ll make to the job and the company. Brush up on a few stories that show you at your best in the workplace.

Then — no matter what the interviewer asks — respond with your points and stories. We’re in the midst of a political season, so it’s easy to observe this technique in action. Politicians are not out there to think up answers to every stupid question someone throws at them. They have a list of points they want to make. So do you!

This list is mostly for your own reference, but you may want to go ahead and put together a nicely formatted version, print out a few copies and bring them to the interview. That way, if the interviewer asks — and they often do — “What makes you the best person for the job?,” you hand them a copy of your list.

Bonus: Most of what’s said in an interview is quickly forgotten. What remains is a general impression and of course — documents!

Related Links

An Open Letter to My Former Employer

 
Guillotine

No hard feelings, but I’m looking at the company president’s new employment agreement on EDGAR . . . the stock’s down 50 percent, the bond rating’s been lowered to junk, you laid off 400 people end of July and announced plans to lay off 1,000 more, and yet shareholders will still be paying for a really fabulous set of benefits for this lout: luxury automobiles, first-class air travel, $35,000 a year for financial planning services, and not one, but two, country club memberships.

The rest of the peasants — er, employees — have to pay for their own cars, green fees, financial planners, etc., which is even tougher when you’ve been laid off thanks to my man’s (lack of) stewardship at the mortgage bank.

Let them eat cake!

I challenge you post a link to the employment agreement on the company web site and see if he isn’t guillotined within the fortnight.

This Week in Sports Parents Must Die

 

My son’s playing freshman football, pursuant to which I received the following email (names changed):

Fellow Freshman parents,

Zelda and I are disappointed with the poor quality of the duffle bags the boys purchased at the start of the season. Rocko’s bag is already ripping and the zippers are becoming non-functional. As a result, we intend to buy him a much higher quality, replacement bag made out of extra heavy duty material from a Montana vendor. My firm has purchased customized travel bags from this vendor before, and our clients/employees love them. We also intend to have the bag (which will be slightly larger to accommodate a football helmet) embroidered with the T-Wolf logo and his name. This is what the bag looks like, sans logo:

High quality duffel bag

If ten or more families decide to buy such replacement bags, the cost will be $285 each plus tax and the cost of name embroidery (I don’t think the latter will amount to much, but I’m looking into it). If the order is for less than ten units, then there will be a modest charge for logo. Two families in addition to our has already asked to be included them in this order. You can visit the vendor’s website at http://www.redoxx.com/.

Please let me know as soon as conveniently possible (i.e., by the game this Saturday) if you would like to be included in the order. If so, kindly also respond back with the spelling of your son’s name to be embroidered on his bag.

Thanks.

Go Wolves, Beat University!

Scott and Zelda Fitzgerald

In short, if you are experiencing similar problems, this would be a high quality replacement that should last for some time.

 

Yeah sure, I’m definitely up for spending $300 for a bag my son can stuff his football uniform into, particularly if your “firm” has a track record with the company.

I sent the following response:

I’ve never seen a decent bag for only $285. I’ve been looking at this one from On the Fly:

Alligator leather bag

It’s a little pricey (around $12,000) but it’s made of black alligator leather and if you’re concerned about durability, it will withstand a charging rhino.

Don’t ask me how I know that.

Best regards,

Captain Jeffrey T. Spaulding

 

I didn’t hear back from the original emailer, but I did get a response from a philanthropic but somewhat dim individual:

I hope that was a joke. If not I think you are getting carried away about a bag that the boys are going to drag around through the mud. If you have that much money to throw away maybe you should donate it to children who can’t afford equipment to even play sports.

Just a thought…

 

Oh dear, I guess I was a little too subtle . . .

I Love My Work

 

The notion of meaning as a guiding principle for happiness explains some interesting facts about what actually compensates workers in their jobs. . . . For example, people who think their work allows them to be productive are about five times more likely to be very satisfied with their jobs than people who do not feel they can be productive. And those who are proud to work for their employers are more than ten times as likely to be very satisfied with their jobs as those who are not proud. In contrast, money matters relatively little, and the amount of leisure time a job allows has no significant effect on satisfaction at all.

— Arthur C. Brooks, “I Love My Work” (emphasis added)

We Get Letters

 

This is the best email I’ve had all week. Let me preface it by saying that I don’t know the sender, so I changed her name to protect the “innocent.”

From: anne sexton [mailto:annie-s@hotmail.com]
Subject: Teacher?

Only in Southern California could someone so woefully ignorant be a teacher.

Your childish clinging to some 1950’s idea of masculinity in order to bolster your own ego is pathetic, and the sad thing is, you’re teaching your son to be equally disrespectful. Wow. Nice parenting. In short, I’m sorry you have a small dick. It doesn’t give you the right to disrespect women.

Oh, And GO BEARS, mother fucker.

Love,

Anne Sexton
PhD candidate in English, UC Berkeley (ranked #1 in the world for their English program. Where’s USC ranked?)

Sweet! Here’s my reply:

Hi Anne –

You sound very angry about something but I’m not sure what.

I don’t know where the USC English program is ranked but I know where the football team is ranked! #1, BABY! FIGHT ON, TROJANS! See you Nov. 10 for another beating!

Also, I’m pretty sure “motherfucker” is one word, not two, Miss “#1 in the world” English program.

Love,

Paul

P.S. Send a picture!

Tricks of the Trade

 
Hot dog

The Chevron Extra Mile store near us has a Meal Deal where you get a 32-ounce fountain drink and a Johnsonville Brat for $1.99.

My son’s looking it over . . . he’d rather have a Smoky Cheddar Dog but that’s not the deal. So he plops a Smoky Cheddar Dog into a bun, completely smothers it in mustard and chili so you can’t tell what’s in there, takes it up to the register with his 32-ounce soda and says, “This is a Meal Deal, right?”

“Yace,” says the Indian clerk.

As we’re walking out of the store, he says to me, “Tricks of the trade.”

Advertisement for Myself

 

I was laid off recently by a mortgage bank here in Southern California. Times are tough in the mortgage business, as you may have heard.

First, some tips on how not to do a layoff:

Man with sandwich board
  1. Call the layoff a “rightsizing,” which suggests that there was something “wrong” with the people who were let go. (Actually, the company I worked for has already announced another “rightsizing” in which 1,000 more people will be laid off over the next few months. They just can’t get these “rightsizings” right.)
  1. Overnight a layoff information packet, including a 20-page severance agreement, to the home of laid-off employees, asking them to sign and return it via the enclosed UPS envelope.
  1. Don’t enclose the UPS envelope.
  1. The next day, overnight a second packet to employees’ homes, containing the UPS envelope and a letter correcting phone numbers, email addresses and other misinformation in the previous day’s packet.
  1. Include an obvious misspelling or two in the letter — ideally, something that would slip past a spell checker but be caught easily by anyone who bothered to proofread it. Suggestion: “If you have nay questions . . .”

Unemployed people like to see the kind of flamboyant incompetence that still draws a paycheck.

Want to hire me?

Here’s what I’m good at:

  • Software development
  • Project management
  • Writing
  • Training, coaching and mentoring

Killer Popcorn

 
Popcorn
Doctor Links a Man’s Illness to a Microwave Popcorn Habit
New York Times, Sept. 5, 2007

If you actually read the story, you see that the man’s doctor says that there “is not a definitive causal link” between popcorn and the man’s health problems.

You’ve gotta love the total overreaction to one case where popcorn may have caused a lung problem.

The Bush administration had better crack down on this pronto!!!

Frankly, I’d rather get a lung disease and die than live in a country where the government tells me I can’t eat popcorn! You can take my popcorn when you pry it out of my cold, dead hands!

I’m going to go pop up a batch right now in protest!

Have a nice day . . .

A Waste of a Morning

 

The California Employment Development Department — aka the unemployment office — scheduled a meeting for me this morning at the Orange County One-Stop job center.

I thought it was going to be a one-on-one meeting to discuss appropriate employment opportunities for someone with my outstanding qualifications as a technologist.

Instead, I found myself placed in a room full of misfits and losers, none in professional attire, and many of them dressed for a day at the beach — shorts, sandals, Hooters T-shirts — while we listened to a presentation on how to make $50,000 a year selling cars.

(“Sounds pretty good,” my son says, and for someone with a junior high school education like him, it probably is.)

In the course of the meeting, three people asked to borrow my pen because they didn’t think to bring one.

Of course, I was wearing a shirt and tie, so I could very easily carry a pen in my shirt pocket. If I’d been wearing a Hooters T-shirt, I wouldn’t have been able to do that . . .

If the Shoe Fits

 

I hobbled into a job interview today like a man whose shoes were too small for his feet.

No, wait, let me back up a little bit . . .

Shoe

I can never find anything around the house because people keep moving my stuff. Why everyone can’t keep their hands to themselves, I don’t know, but I don’t even try to keep track of things anymore. I just look for something in the last place I put it, and when it’s not there, I ask someone.

“Don’t ask me. I didn’t touch it.”

So I look some more and it always turns out that my camera is in my son’s room, or my keys are in my wife’s purse, or the important document is in the trash, and everyone still maintains that they have no idea how it got there.

Living with people is a mixed blessing, I’ll tell you.

So I was leaving the house for a job interview, nobody else was home, and I couldn’t find my black oxfords.

I was able to find my son’s black oxfords, but his feet are a little bit smaller than mine . . .

Marital Inequity

 

I’ve decided to start the day by addressing an inequitable situation . . .

“Honey,” I say to my wife, “I’ve noticed that because you go to bed earlier than I do, you get to unmake the bed every night. Then because you get up before I do, I have to make the bed every morning, which is harder. It’s not fair.”

“I also do everything else in the house, like cooking and cleaning,” she says, “so don’t bother me with that.”

OK, she’s got me there . . .

Chicken Dinner

 

I picked up 8 pieces of fried chicken — 2 legs, 2 thighs, 2 breasts and 2 wings — at the Albertson’s deli today, which seemed like a pretty good deal for the family until my son decided to eat all 8 pieces himself.

Wait, I take that back . . .

“I’m going to eat this one,” I said, holding up one of the wings.

“The whole piece?!” he shouted.

“Are you kidding? You’ve got 8 pieces here.”

“Not anymore!” he shouted.

Another Thing I Hate About Sports

 

Pitch counts and closers.

Johan Santana

Johan Santana had a 2-hit shutout going through 8 innings yesterday — with 17 strikeouts. The record for most strikeouts in a 9-inning game is 20.

Santana threw 112 pitches, so instead of coming back out in the 9th inning with a chance to tie the record, he was replaced by closer Joe Nathan.

Was he tired? Well, he struck out six of the last seven batters he faced, so it sounds like he was just warming up.