Archive - Jul 2013


July 28th

Pray Without Ceasing

Our Rector at Grace and St. Peter's is out on maternity leave, and various members of the congregation are filling in as guest preachers. Today was my turn. For my text, I used the Gospel lesson of the day, Luke 11:1-13, where Jesus give the disciples The Lord's Prayer. Below is the sermon I preached.

July 26th

Miranda and The Delayed Play

Fiona, my youngest daughter, has been fighting some sort of summer cold. The night before last, she had a nightmare, and crawled into bed next to me. My wife Kim often has problems sleeping, so I acted as a buffer between the agitated child and the exhausted mother. They both ended up sleeping well and I was the one to go without sleep.

As a result, I went to bed early last night and slept soundly, until about five o'clock in the morning, when I awoke in the middle of a curious dream. I don't often remember my dreams, and when I do, all that remains seem like fragments of an epic imagist poem. This morning's dream was different.

I was at some out doors festival, sort like Falcon Ridge Folk Festival, but the space was smaller, more intimate and more wooded and shady. There was an air of a Renaissance festival to it. I set up my tent, ran into a friend from work, whom I talked about the festival with and then sat down to watch some play. The audience gathered. A little after the play was to begin, an older bearded and rotund man came out on the play and announce that there was some difficulty. The audience waited and started to grow impatient. My daughter Miranda was next to me, a details I hadn't noticed prior to this. She read through the program and drew on a piece of paper she had.

A member of the audience got up to leave and Miranda sprang into action. She leapt onto the stage and proclaimed herself Miranda the Bunny. It was a children's play, with children in the cast, so this was completely fitting with the play. She held up her drawing, which was of a rabbit's face and which she used as a mask. She asked the person about to leave where he thought he was going. He mumbled something about being upset that the play hadn't started and he was going to go find something else to do.

Miranda countered that the play had already begun, and was going on around us all the time. The rotund man came out onto the stage, mostly in costume and character, with a quizzical look. He observed what was going on and started improvising with Miranda. Kids in the play slowly made it onto the stage.

Miranda spends her time storytelling and teaching kids, and she interacted with the kids, who had problems, given the turn of events staying in character. Some tried to be in character as they interacted with Miranda others were out of character, and took up roles closer to that of narrators of the play. Miranda started interacting with the kids in the audience. Soon the problem that had delayed the start of the play was resolved, and the play began in earnest. The rotund man who had appeared frustrated, at first, with the problems his troupe had been facing, complicated by a disgruntled audience and an interloper on the stage, finally saw what Miranda had been able to do, and welcomed her into the play, which being full of children, had some room for adaptation, if done in such a way that the youngest of actors could still get their cues and deliver their lines.

As sleep faded and I looked over at the alarm clock, I realized that I was now awake enough, and it was close enough to my regular time to get up that it would be just as good if I got out of bed and started my morning rituals.

Yesterday was a trying time at work for myself and several people that I work with, but as they say in show business, the show must go on, and there are times you need to ad lib. Perhaps life is like that as well. It made me think of Jaques in As You Like It, intoning "All the world's a stage".

Miranda's presence on the stage also made me think of Cyrano when he challenged Montfleury, yet the setting was different. There is tension when an interloper takes to the stage, and it takes a Jodelet to bring humor to the tense setting and to prepare for tomorrow's farce.

But now, the clock has struck six and I need to start my daily chores.

(Categories: )

July 24th

Additional Glass PHP Development Notes

A few days ago, I wrote a blog post about My First Google Glass App in PHP. Since then, I've continued to enhance it, talk with people who have been testing it, and offer suggestions to others trying to get started. Here are some of things I've been telling people.

The first place to start changing code is in index.php. What I did was I read through the various operations to send cards to the timeline. I started making a few changes here and there, and then started getting bolder in my changes. One important tip, especially if you're developing code and sending lots of test cards to your timeline. Add the DELETE action to each card so you can delete them when your testing is over.

$menu_item = new Google_MenuItem();
array_push($menu_items, $menu_item);

While you're at it, you may want to add functionality to PIN or UNPIN a timeline item. This is the same as the above code for adding the DELETE action, but use use TOGGLE_PINNED. (It took me a little while to find the action.

Another minor glitch in the sample PHP code. It makes reference to $service_base_url. But that isn't set anywhere. You should change it to $base_url or set $service_base_url = $base_url. If you do this, some of the images start working.

An issue that another person ran into is that the code is written to use SQLite2. If you have SQLite3 but not SQLite2, the PHP code doesn't work. Fortunately, I have both. There is a comment on the SQLite3 page that talks about how to migrate from SQLite2 to SQLite3. I haven't tried that, because I wanted to migrate to MySQL.

Another thing to keep in mind: If you have different projects, make sure that you set up the config.php to point to different databases for each project, otherwise, you can run into various issues with the credentials.

One person asked about how to make bundled cards. I didn't find any good documentation about this, so I hacked around until I figured it out. To add bundled cards to a timeline item you need to use the setHtmlPages method, passing it an array of strings containing HTML. e.g.


To get a good idea at the possible html code, take a look at the Google Mirror API Playground. It has lots of good examples, and I used this to tweak my application.

To put a map in a timeline card, you should read the section of the location documentation, Rendering maps on timeline cards.

The next thing to look at is the util.php code. This is the code which stores credential information in the SQLite2 database. I changed the code around to use MySQL instead. There were a few error conditions that I didn't properly handle, which prevented some people from accessing the app. However, once that was fixed, I started adding the code to save decks of timeline cards. The first part of that is completed. Now, I just need to add code so people can save multiple decks, optionally share them, and retrieve them.

One person suggested that some of this would probably be better done in Drupal. I like working in Drupal and I've thought about using this as a framework for my application. However, I wanted to get past the mirror API complexity first.

To see the latest version of my app, check out Glassdeck. If you want the MySQL util.php code or have questions, contact me via Google+

More soon...

(Categories: )

July 21st

Being Still

It is Sunday evening. Kim is off at the barn with friends. Fiona is in the shower. Mairead is meeting with another JET program participant and Miranda should be on her way back to Boston.

I am sitting in my chair in the living room. There is so much going on in my mind right now. The Google Glass development is proceeding nicely. I've shared the early version of my app with other Glass users and have lots of ideas about things to work on.

In a week and a half, it will be the Falcon Ridge Folk Festival. I have looked at the list of Emerging Artists for this year's show case and set up a playlist on Spotify. I need to listen to the performers.

A church, our rector is on maternity leave. Different people are filling in, in different ways, and next Sunday, I will deliver the sermon. I've been thinking out what I will say and will spend some time this week writing it out.

This weeks sermon was based on the story of Mary and Martha. With all these things that I'm thinking about, I feel a bit like Martha. Yet one of the biggest things going on right now is that Mairead will leave for Japan next Saturday. She is going for a year, and then we will see what she decides to do next.

Mairead has been to Japan before, but never for so long. There is a pang in my heart as I think of not seeing my beloved eldest daughter for perhaps as long as a year, or maybe even long. I am excited for her, but anticipating missing her as well. There were big hugs as she left the house.

Yet my way is to sit quietly, to reflect, perhaps a little bit of Mary in the midst of Martha's business.

(Categories: )

July 20th

GlassDeck - My First Google Glass App in PHP

Over the past week or so, during the limited free time I've had, I've put together my first Google Glass App. It is a fairly simple application that sends a bundled deck of timeline cards to your Google Glass. It is similar to how the New York Times app sends a bunch of articles, or several emails, birthday notifications, or other bits of information are bundled. Look for the white triangle in the upper right corner of the card.

I started the project simply to learn my way around writing apps in Glass. I chose to use PHP since it is the language I'm most comfortable with to program webpages. I started by downloading the Mirror Quick Start code for PHP from Google and making small modifications to it.

My initial thought was to create a tool that I could use for doing presentation. The goal would be to use the Glass app as a PowerPoint replacement. I often mirror what I'm seeing in Glass to my smartphone. I've found this useful in demonstrating Glass. I've thought it would be nice to build a presentation in Glass and then run through it, showing what is on the smartphone screen. Ideally, either hooking the smartphone up directly to a projector, or sharing it to a computer connected to a projector.

As I got the app a little further developed, I started thinking more generally about ways a deck of Timeline cards could be used. I've used my app to load a recipe that I can follow while cooking. I've used it to load a poem. I've used it to load a todo list.

Getting started was fairly easy. I started with the The Google Mirror API Developer Preview. I used the sample apps on that page, and then started my open application.

First, I created my project at the Google API Console. I selected Create… on the menu on the left to create my project. I turned on the Glass Mirror API in the Services section. I requested OAuth permission and went to the API Access section to create a Client ID for the web application.

I then downloaded the PHP code using GIT:

git clone

I changed the config.php section to use the API key information from the API Access section of the Google API Console and started hacking. I read different parts of the code and started making small changes. When I got a better sense of what could be done, I started making larger changes. Glass Explorers are welcome to test out the app, and provide feedback. Beginner Glass Developers who want more information are welcome to contact me directly.

You can see the app at Glass Deck

(Categories: )