The Blog

By @ 07/16/12 in Python

While living at Emmaus House in downtown Atlanta, my wife volunteered in service of their food pantry program. When she arrived, there was no system for managing the food pantry and she soon asked me to develop a simple inventory system. As I’ve been learning Python and Django, I thought an inventory system was the ideal CRUD application. The best way to learn is by doing and I’m excited to see this used in practice.

I’m releasing the source code for the food pantry inventory system under the MIT License on Github. I welcome you to fork and contribute to the project.


Two features are worth highlighting. The first relates to data input. Most of our food pantry items carry typical bar codes that are used by supermarkets at checkout. The interface is designed to support barcode scanning using a modern USB-connected scanner. The mechanism to get this working is actually fairly easy. After connecting the barcode scanner, it registers itself as a keyboard-like device. When a barcode is scanned, it produces a string of characters followed by the enter key. In a web interface, it’s simple to bind to the enter key press and then parse the input characters. After entering the details of an item the first time, future scans lookup the information in the database and speedup the scanning process.

The second feature relates to deployment. Unfortunately, the office where the food supplies are kept lacks an internet connection. Wanting to use a web browser for the front-end, I knew that I would need to host a web server on localhost. This also meant that deploying the application and updates would mean more than sharing a url and refreshing the page. Fortunately, py2exe is a wonderful project that supports packaging the Python runtime and supporting files into an executable. This mechanism is a bit more complex.

My Django application requires source code and static files for template rendering. While packaging source is clearly understood by py2exe, static files is a little more tricky. And getting all the environment variables right during deployment was even harder. Eventually, I gave up trying to use the built-in source and static file management tools. Instead, I use py2exe to deploy a script with a large zip file embedded in the executable. When the script starts (from the executable), it pulls the zip file out and extracts it to a temporary directory. That zip file contains the entire Django application, source and all. Once extracted, you need only set the application root and start the web server. Read the web application script for all the gory details.

By @ 03/23/12 in Software

Hi, my name is Grant and I fixate on problems.

It all started when I was young. I wanted a way to automate all the math problems I had to solve in school. That started my affair with computers. Rather than sitting down and solving the math problems myself, I could just teach the computer to solve them and then it could solve hundreds of variations on that problem. I was never much one for games but I loved the idea of computers playing games to solve problems. My intuition was often brute-force search, which, though I couldn’t do it in my head, a computer could do it in seconds.

My early successes with computers were habit forming. Whatever the problem was I thought I could solve it with a computer. I grew up in an area (Cupertino) where computers were all the rage anyways. Everyone spoke of them and their infinite potential. Would a computer become sentient? Would one cure cancer? When would we start learning from them? Though I now see that their major use is making money in business and consumer markets, I hold on to the hope that their making the world a better place.

Read more

By @ 02/03/12 in Parables

I enjoy riding my bike a great deal and miss it while we are serving in Mission Year. Back in Washington, I rode my bike usually on Saturdays along a river that connected the Sammamish and Washington lakes. The ride traced entirely through a valley and so the river was gentle. (So gentle that my wife and I were able to paddle kayaks up and down it.) While I appreciated the ride, I didn’t like how flat it was. The only obstacle was wind. Back in California, I loved going up and down the foothills that were so close to where my parents lived.

In California, I would spend hours pedaling up hills. Sometimes there were beautiful sites along the way. Turning between two hills, I would get glimpses of the Bay Area and cutouts from the mountains. It wasn’t uncommon to fly down a hill in a fourth the time it took to go up.

Read more

By @ 01/26/12 in Faith

Last weekend I went to a retreat that joined several service corps groups together: Jesuit Volunteers, Christian Appalachian Project Volunteers, Mission Year Volunteers, etc. One of the topics that came up was hunger and I saw a quote  attributed to Ghandi that went like this: To a man who is hungry, food is God. Now, a couple Google searches later, I understand that Ghandi meant this in terms of a hierarchy of needs. When bringing a message about God (e.g. preaching the gospel) the matter is moot to a man who is hungry. Unless you provide for his most basic needs, teaching about God is missing the point (I find this particularly relevant to my faith with frequent claims that “God is Love.” If that is so, we may need to show our love with food and water before we ever share our motivation by God.)

I understand the priority of needs (like food) over theology. Jesus may have disagreed but for all practical purposes, I don’t mind meeting needs before sharing faith. And if faith sharing doesn’t happen because those whose needs are met walk away, then so be it (also something that happened to Jesus).

Rather than read it as Ghandi meant, I first thought of his statement as a generality meaning: our God is the thing we lack. I think there are many examples of this practice. We tend to spiritualize those things over which we have the least control or for which we are the most desperate. Ever seen someone whisper to dice at a craps table? Ever heard of a rain dance? For some, including myself, it’s easy to think we don’t have what we want for a mystical reason.

Read more

By @ 11/20/11 in Mission Year

We’ve spent the first six weeks of Mission Year practicing a “technology fast.” The idea has been to disconnect us from our normal comforts and force us to confront the realities of our neighborhood more plainly. As a software developer by career and nature, I was less than thrilled at the idea.

What counts?

Our Technology Fast didn’t mean living an Amish lifestyle. We still benefited from a great deal of technology: books, lights, kitchen appliances, the laundromat and more. Our fast was specific to the computer and, in particular, the internet. We were asked to avoid computer use altogether while at home and abstain from sites social, news, and those consumer related. In addition to computers, we were asked not to use cell phones. Whenever possible, we left them off or at home.

As young adults growing up in a digital age, connectivity with family and friends via cell phones and internet usage feels natural. By severing these connections, we were forced to pay attention to one another, to rely on each other, and to engage the community around us.

Our fast was practiced every day but on our Sabbath (which is Fridays). On those days, internet and cell phones were permitted.

Read more

By @ 11/05/11 in Mission Year


A week ago we had a ‘solitude retreat’. It was one night spent about an hour outside the city in a beautiful park. Our purpose was to practice some of what we’ve been reading in Henri Nouwen’s The Way of the Heart: Desert Spirituality and Contemporary Ministry.

I found the book to be a good reminder of fundamental spiritual disciplines: solitude, silence, prayer, and retreat. Though it’s targeted more toward ministerial staff, I benefited from it and think newcomers to the disciplines would benefit too. You need to like his writing style to really get into it.

Read more

By @ 10/21/11 in Parables

Don’t try to guess what this means before you do it. Just go do it and reflect (it’s called experiential learning).

  1. Start with a large bowl and two cups.
  2. Fill the large bowl with water and put a cup on either side of it in front of you.
  3. Plunge your hand into the water and make a fist.
  4. Draw your hand out of the water, hold it over one of the cups and open your fist. Some water should fill the cup.
  5. Plunge your hand again into the water and make a cup with your hand.
  6. Draw your hand out of the water, hold it over the other cup and spread your fingers. Some water should fill the cup.
  7. Compare the amount of water in each cup.
More than likely, you just read that, drew a conclusion and will move on to read something else. But if you do that, you won’t remember the meaning past an hour. So really, go do it.

By @ 10/21/11 in Mission Year

This talk was one of three primary motivations for participating in Mission Year. Though not a “fun” talk (the beginning is rather comedic), the reality of the challenges he described connected with me.

It’ll be the best thirty minutes you spend today.

By @ 09/27/11 in Mission Year, Software

I’m excited to announce the launch of a new website designed to help us with fundraising for Mission Year!

Good Shoppr is a fun new shopping site that aims to give you a great shopping experience: a wide range of products, the ability to influence what we carry, and the knowledge that every purchase is in fact a good deed. You can browse and shop on Good Shoppr knowing that a portion of your purchase will go to the not-for-profit organization we highlight at the time.

We started Good Shoppr as a creative way to raise funds for charitable organizations. We are not in it for personal gain (other than the ability to support causes we care about), and all our proceeds will go to our chosen charities. (As we grow we may need to offset some taxes and expenses, but our aim is to keep those to a minimum).

Our affiliation with Amazon assures you of secure purchase transactions and reliable shipping. When you are ready to checkout, you’ll actually use and enjoy the benefits of your existing Amazon account.

Shop for goods, shop for good on

Read more

By @ 09/21/11 in Faith

My wife and I attend Mount Zion Baptist Church in Seattle, WA. As a predominantly African-American church, the first few months were a sometimes foreign cultural experience. One thing we quickly grew enamored with was the gospel music. Not just the kind you hear on the radio, but also “Negro Spirituals” (yes, that’s the politically correct term). These songs are captured as hymns in the African American Heritage Hymnal. Last Sunday we sang “Because of Who You Are” which lies somewhere between modern and antique.

Because of who You are I give You glory.
Because of who You are I give You praise.
Because of who You are,
I will lift my voice and say,
Lord, I worship You because of who You are.
Lord, I worship You because of who You are.

Jehovah Jirah, my provider,
Jehovah Nissi, Lord You reign in victory,
Jehovah Shalom, You’re my prince of peace,
And, I worship You because of who You are.
Lord, I worship You because of who You are.

Read more