Author Archives: Steve

Rethinking the Office Hours app

It’s Winter Semester at BYU, and I’m again the TA for Phil Windley’s Distributed System Design class (CS 462). This time, we roped Reed into being a TA as well. We really liked the idea of the Office Hours app from last year, but we have a few different requirements this year:

  • There are two of us now, instead of just one, so the Google Calendar holding the hours got more complicated.
  • Since Reed and I both work in a research lab, we want to be available to the students without having to sit down in the TA cubicles all day. We created “on-call” office hours, during which we are available to help students but we won’t be physically present until someone actually shows up.

Those two things increased the complexity of the problem fourfold. We used the same basic model as before (texting via Twilio) but chose a more distributed design:

Here is how this works in terms of events:

  1. The SMS is received by Twilio, raising a twilio:sms event to the dispatch ruleset.
  2. The dispatch ruleset checks the Google Calendar to see if anyone is on the schedule. If so, it raises a schedule_inquiry event to the rulesets handling hours for each TA. If not, it raises an absent event.
  3. The dispatch ruleset responds to the absent event by sending a text to the student that no TAs are on the schedule now. It also includes the date and time of the next office hours.
  4. The individual TA rulesets respond to the schedule_inquiry event by checking the calendar to see whether that TA is on the schedule right now. There are two possibilities: in office and on call. The former raises a present event; the latter raises an on_call_request event. The default behavior is to respond this way:
    • present: Text the student that {Steve|Reed} should be in the cubicle already.
    • on_call_request: Text {Steve|Reed} to get downstairs and reply to the student that he’s on his way.

Separating the TA rulesets allows me and Reed to have the application behave differently for each of us. I prefer texting (or XMPP if I ever figure out a good way to do it), but Reed would prefer email, since his AT&T iPhone gets bad reception in our lab. All I have to do is add another rule to respond to the on_call_request event and make it do whatever I want.

Here is what my version of the TA ruleset looks like:

To read your speech or to speak

Seth Godin wrote a great post today: “Your voice will give you away“. If you give a presentation by reading a speech you wrote beforehand, your voice betrays it. If you’re speaking naturally, your listeners will notice.

The BYU devotional this week was an excellent example of this. President and Sister Samuelson gave a joint speech. They scripted everything and decided who would talk when. But the occasional awkward transition and canned, corny joke betrayed a lack of rehearsal.

At the very end of the speech, Sister Samuelson read her testimony from the script and concluded. Then President Samuelson spoke again and bore his testimony. This time, he had a different tone. He stammered a bit. His words were softer. It was obvious to me that he was speaking from his heart this time, not reading the script. His testimony at the very end of that speech was the most powerful part of the entire hour, because I knew it was real.

The stilted tone made me tune out much of the speech. But when President Samuelson spoke from his heart, I was compelled to listen, and I relished it.


When I give presentations or speeches, I usually write them out beforehand and rehearse them. But I write with the same tone I use when I speak. I use the same expressions; I try to use big words only if I might actually say them. I make it as conversational as the setting permits. Once I have it written out, I practice it again and again until I can speak it without having to read my script.

That method gives a very genuine feel to my talks. The audience thinks I’m just talking, not reading. I work hard to get that tone. Seth is absolutely right.

What the Daily Universe forgot to explain

UPDATE (January 2012): According to the Daily Universe, Brandon Beebe has decided to discontinue Schedule Snatcher at BYU, although he’ll keep rolling it out to other universities.

BYU announced this week a few changes to the registration system that effectively crush an independent service called Schedule Snatcher. The article attacks this service rather pointedly, even if it doesn’t mention it by name.

What’s new
The new system makes two major changes:

  1. When a class is full, you enter a wait list and the system will automatically add you to the class when a spot opens up (first come, first served).
  2. Adding a class now requires you to fill in a reCAPTCHA.

This strikes down both of Schedule Snatcher’s salient features:

  1. Registering automatically for a class once a spot opens was the whole point of Schedule Snatcher, so this renders the service obsolete.
  2. Schedule Snatcher (or any other service) can’t even make requests on your behalf unless a human is there to handle the reCAPTCHA.

    UPDATE: Schedule Snatcher has already implemented a system to handle this. Apparently the registration system only prompts you for a reCAPTCHA once (consistent with my own experience yesterday).

Developer games
When you write to an application that doesn’t provide an API, you always run this risk. (And even when it does provide an API, you still run the risk. Twitter is a shining example of ruthlessly quashing developers. They’ve made developing Twitter clients a game of acquisition-or-obsolescence.)

This same thing happened to me with the BYU Bookstore’s “My Book List” application. I wrote a browser app that extracted the ISBN numbers from the page and looked up textbook prices on Amazon. It then displayed them so you could easily compare the cost to buy the book on campus or online. The Bookstore implemented this feature themselves directly into “My Book List”, rendering my app unnecessary.

I’m glad BYU is implementing these features, both the inline price comparisons and the built-in wait list. But it makes students more wary of developing tools on top of BYU’s systems that would make their lives easier.

Ambiguous claims

Jeff Bunker claims in the Daily Universe article that the new wait list feature “will make sure the long-existing practice of students holding and registering spots for other students will no longer be effective” (as if it were a rebel uprising). The reporter’s unfortunately ambiguous writing fails to explain how that would happen, making Bunker’s claim seem unrelated. Here’s how it works:

  1. You go to sign up for a class. It’s full, so you add yourself to the wait list.
  2. Someone else drops the class.
  3. The first person in “line” on the wait list automatically gets added to the class.
  4. Hopefully, you eventually get added to the class if enough people drop and move you up the wait list.

The reason this system can prevent upperclassmen from saving spots for their friends is that the person dropping the class has no control over who gets the spot he just vacated. It goes to the highest bidder.

Playing catch-up

All the same, it’s nice to see this “significant service,” as Bunker puts it, being provided in the platform itself, even if it’s merely a response to someone else’s innovation.

Very short stories

I wrote a couple 140-character stories for one of the final assignments in CS 404 and found it quite a satisfying experience.

The first details one of the strange aspects of meeting in person for the first time someone you only “know” via Twitter:

He sat across the room, his face familiar, his voice strange. Despite resembling his avatar, this man could speak more than 140 characters.

The second deals with a theme I’ve pondered for quite a while—living life through a screen.

She danced gracefully while I watched through a 3.5″ piece of glass. It’s all in 1080p video, but I missed the higher-def live performance.

Real life

I spend a lot of time online every day, partly by choice and partly by profession. But being online never replaces “real life.” Last week, I disconnected for a few days to spend time with my family and friends. We relaxed and enjoyed each other’s company. We strengthened friendships, laughed, and played. Those “real life” relationships will last. Love, friendship, a hug, and a pat on the back are things I don’t find online. The concept of “life” doesn’t change by sticking “real” in front of it. Life is lived in the world where I can see and hear and interact with the people I love. No game or chatroom or network will ever replace that.

A call for moral leadership

The brutal police violence that ended the peaceful protests at UC-Davis last week is appalling and frightening. While I can understand Chancellor Katehi’s concern about the health and safety risks of allowing students to camp overnight on their campus, she’s out of touch with the situation. Katehi sent a letter to the protestors informing them of university policy and asking them to dismantle the encampment. When that failed, she tried to solve with policy and police force a problem she should have addressed by going there herself and engaging the students in a dialog about the issues.

In an interview with AggieTV, Katehi talked and talked about the task forces they would form and the dialogs they would have (for at least a year) and the systems they would implement. She’s approaching the problem entirely the wrong way, trying to control it with bureaucracy. That is not the solution for a peaceful protest.

I’m proud of the students who stood their ground, sitting on that sidewalk with linked arms, meekly accepting police violence without retaliation. Katehi and her police cowardly tried to repress them but only brought strength to the students’ cause and dishonor to their administration.

I sincerely hope the University of California dismisses Katehi and brings in a chancellor who will exercise moral leadership, someone who will esteem the students as allies and work with them to change the world. I have the same hope for universities across the country, including my own Brigham Young University. We need strong, moral leaders to work with the rising generation to ensure this country is in good hands.

Quick start guide to mod_rewrite

The Apache mod_rewrite module turns out to be a very useful tool when you’re building PHP applications. The unfortunate souls who chose to do the CS 462 project in PHP last winter semester had to learn it. I had never touched it myself until this semester when I needed it for a project in CS 360. It turned out to be pretty easy to use. Here’s a simple quick start guide:

First, make sure Apache has the mod_rewrite module installed. In Ubuntu, you can execute this command:

sudo a2enmod rewrite

Now, create an .htaccess file in your site’s root folder. Here’s an example:

RewriteEngine On
RewriteRule ^list/popular(.*)$ index.php?list-popular$1[QSA]
RewriteRule ^list/recent(.*)$ index.php?list-recent$1[QSA]
RewriteRule ^$ index.php

The [QSA] at the end of the line means “query string append”. You can find a list of the other possible flags here. You’ll find good documentation on the whole module there as well.

Technology and the economy

This is a “position statement” vlog for CS 404 about technology’s role in changing the world economy

The inspiration was largely drawn from Phil Windley’s “Productivity and The Distribution of Wealth.”

Webcams at BYU

UPDATE (12/9/11): The BYU iOS app now includes a “Campus Cameras” feature. The cameras listed in that feature are exactly the ones I discovered with this Google search. Looks like I was successful.

Out of curiosity, I went searching for all the webcams at BYU that I could find online. I found nine locations with a total of fourteen cameras.

Exterior webcams:

Interior webcams:

  • Bookstore The Bookstore has three functioning cameras. Two show line conditions on the text floor and one shows the courtyard outside the Wilkinson Center.
  • Testing Center Shows the line conditions at the Testing Center.
  • ID Center Shows line conditions at the ID Center and WSC information desk.
  • My friend recently helped install a new webcam in the student fitness facility in the Richards Building, but it hasn’t been published yet.

The subdomain webcam.byu.edu is operated by the university for the south campus construction cameras. The subdomain webcams.byu.edu is operated by the Bookstore. All the rest of these are hosted on department subdomains. Most of these can be found with a simple Google search: “webcam site:byu.edu“.

Those who take the present for granted

Clay Shirky writes in Here Comes Everybody about the social changes effected by the evolving tools of the Internet. Here is one particularly insightful bit from his book:

[T]he future belongs to those who take the present for granted. . . . [Y]oung people are taking better advantage of social tools, extending their capabilities in ways that violate old models not because they know more useful things than we [Generation X and older] do but because they know fewer useless things than we do. (p. 303)

The people who are revolutionizing society with technology are the people who grew up taking it for granted. Changing society on this grand a scale would have taken disruptive, unconventional vision in the corporate world of twenty years ago. Today it happens as the result of many small companies innovating in their own spheres, building on each other and creating interesting platforms and services. Generation Y lives in the perfect environment to revolutionize while requiring only the limited experience, capital, and influence they have.