Steve Nay's ramblings

Global Constant


He sits nestled between the window and two harried businessmen,
Sunk into an uncomfortable beige chair
One foot planted atop the heating vent on the wall
A half-read book open in his lap,
Perused only by shut eyelids.

The salesman across the aisle is closing the day’s last deal
Which transpires here because
The children expect him at 6.
The woman behind him animatedly explicates impending adventures
      to her seat-mate.
And a man with serene but exhausted comportment
Gazes fondly, silently
At no one in particular.

But our friend, couched in the warm sunlight of his wall of glass
Is napping insistently,
Head bobbing up and down, up
And down,
Tuning his ears only to the ceiling’s bold double tone
And the conductor’s scratchy call,
“Now arriving.”

Eventually the voice in the roof will name this man’s little town,
The intermittent nonsense of his dreams will cease,
The blindly-read book will close,
And the uncomfortable sunlit perch will discharge its occupant,
Who will descend groggily to the platform and watch
As the train roars away.

Posted 16 August 2013

In Defense of Marriage: The Supreme Court’s Rulings and Their Implications

The Supreme Court ruled today that the Defense of Marriage Act, which denies some federal benefits to citizens in legal, state-recognized homosexual marriages, is unconstitutional. It also ordered the Ninth Circuit Court of Appeals to dismiss the Proposition 8 case it previously ruled on, effectively overturning the ballot initiative and making same-sex marriage legal again in California.

The DOMA decision is perhaps the most important victory so far for proponents of gay marriage, as it removes from the federal government the ability to define marriage and returns that power to the states.1 Its immediate implications will only affect same-sex couples living in (or married by) states that recognize such unions, but it won’t be long before other states follow the precedent.


As a Mormon, I believe homosexual activity to be morally wrong in the same way as adultery and fornication. But sexual orientation is not a choice, and I have no qualms with anyone being gay or lesbian. Only by acting on these feelings do they move into the realm of moral decision-making. Despite my personal principles, however, I can still support the Supreme Court of the United States or a state government that chooses to recognize same-sex marriages. Here’s why.

I happen to believe that drinking alcohol and smoking are wrong. I don’t do either one. But the government can make those things legal without affecting my beliefs. Society can make them acceptable or even normal without influencing my behavior. Religious people, including Mormons, fought to keep Prohibition early last century. They failed, but that hasn’t impeded their abstinence in the time since. Nothing in their lives changed with the policy, and it’s difficult to prove whether American society is any better or worse as a result.2


The civil rights movement occurred in the United States over 50 years ago, and remnants of discrimination still exist in our culture today. Reason eventually triumphed over the bigots who fought equality under the law for all races. The gay marriage movement has many parallels to that dark period of discrimination, and it will hold similar status in history when it succeeds. It’s politically inexpedient to fight it anymore. Even the LDS Church, once a formidable advocate of California’s Proposition 8, has softened its stance in recent years.

In the late 1800′s, Mormons were on the other side of a marriage definition battle.3 We wanted the right to practice polygamy but the United States denied it. In 1890, the leaders of the Church issued a manifesto that discontinued polygamy as a matter of Church policy. Only then was Utah allowed to become a state. Having seen both sides of marital discrimination in the government, I would expect more sympathy from my LDS compatriots to this modern-day civil rights debate.

A Social Experiment

I have no problem with any federal or state government recognizing or allowing same-sex marriage. I’m happy for those who will exercise this new right and build loving relationships. I may not agree with the morality of their decision, but I understand it, and their choices will not prevent me from living life the way I think is right. I can share my moral views and encourage others to follow them, but I cannot force them on anyone.

We don’t yet know what effect gay marriage will have on the fabric of society, just as with many similar questions in the past. As Ray Douthat famously wrote last year,4 “Same-sex marriage is a social experiment, and like most experiments it will take time to understand its consequences.”5 If society wants to try this experiment, I say good luck.

1: A decision that ought to be celebrated by proponents of limited government, including Republicans who ultimately oppose gay marriage.
2: A similar course of events may play out with some facets of the current “war on drugs”.
3: Jesse Stay does a good job explaining the history and current thinking in the Church about marriage equality, but I don’t share his conclusion.
4: Dallin H. Oaks, a member of the Quorum of the Twelve Apostles in the LDS Church, quoted this essay in the Church’s October 2012 general conference, but he argued a point opposite Douthat, who writes, “a number of studies have suggested that gay parenting may be an exception to this rule [that being raised by a married biological mother and father produces the best developmental outcome], and that the outcomes of children raised by homosexual couples may be identical to children raised by married biological parents.” There simply isn’t enough evidence yet to conclude empirically whether gay marriage is a poor or suitable alternative to traditional marriage. For those who believe the Apostle’s claim to divine revelation (as I do), this question is easier to resolve.
5: While I believe the best outcome for the world at large would be for everyone to adhere to the principles taught by Jesus Christ, that will obviously not happen anytime soon. For now, I think it better for us to respect each other’s beliefs and decisions while seeking the best compromises to let us live in harmony.

Posted 26 June 2013

Definition of a Friend

When I was in junior high, an admired teacher gave me a beautiful book of friendship quotes. One that particularly struck me began, “What is a friend? I will tell you….Your soul can be naked with him.” The entire poem is insightful, but that sentence was especially compelling. A friend requires no pretenses, expects nothing more than what you are. He understands the flaws and contradictions in your character and accepts you notwithstanding.

I have since searched extensively for the source of the poem, which seems to be shrouded in mystery. Many have claimed authorship1 over the years, but the earliest source I can find cites Dr. Frank Crane in the 1910s. Here is the transcription from that publication:2

By Dr. Frank Crane

What is a friend?
I will tell you.
It is a person with whom you dare to be yourself.
Your soul can go naked with him.
He seems to ask of you to put on nothing, only to be what you are.

He does not want you to be better or worse.
When you are with him you feel as a prisoner feels who has been declared innocent.
You do not have to be on your guard.
You can say what you think, express what you feel.
He is shocked at nothing, offended at nothing, so long as it is genuinely you.
He understands those contradictions in your nature that lead others to misjudge you.

With him you breathe freely.
You can take off your coat and loosen your collar.
You can avow your little vanities and envies and hates and vicious sparks, your meanness and absurdities, and in opening them up to him they are lost, dissolved in the white ocean of his loyalty.
He understands.

You do not have to be careful.
You can abuse him, neglect him, berate him.
Best of all, you can keep still with him.
It makes no matter.
He likes you.

He is like fire, that purifies all you do.
He is like water, that cleanses all you say.
He is like wine, that warms you to the bone.
He understands, he understands, he understands.

You can weep with him, laugh with him, sin with him, pray with him.
Through and underneath it all he sees, knows and loves—you.

A friend, I repeat, is one with whom you dare to be yourself.

1: Some who have claimed authorship include Kristina Bruce in the 70s and C. Raymond Beran in the 90s. Their claims are tenuous. Frank Crane seems to be most often cited as the original author, and the Shoe Workers’ Journal from 1916 (linked in the text) is the earliest source I can find with either the poem or the Crane byline.
2: I corrected two typographical errors and added line breaks to increase readability.

Posted 21 February 2013

Using a git post-receive hook for easy production deploys

I have a git repository on my dev machine, which I use for developing and testing code locally. When I’m ready to deploy to production, I simply push that git repo to the server and use a post-receive hook there to move the code into the proper places. Here’s what my setup looks like.

My ~/.ssh/config has a Host entry called prod for the production server that specifies where it lives and how to authenticate.

In .git/config, I have a remote section for the production server:

[remote "prod"]
    url = ssh://prod:~/web.git
    fetch = +refs/heads/*:refs/remotes/origin/*

web.git on the server is set up as a bare repository. In the hooks folder, I have a post-receive file like this:

# Check out the source tree without .git
GIT_WORK_TREE=/home/ubuntu/stage/web git checkout -f

# Turn off debug mode, if enabled
sed -i -e "/^DEBUG = True$/s/True/False/" /home/ubuntu/stage/web/

# You can do any other configuration here to transform the code
#  from development to production.

# Restart Apache
sudo apache2ctl restart

Permissions are set on the /home/ubuntu/stage/web folder and the /etc/apache2/sites-enabled/ file points to that folder as the DocumentRoot.

That’s all it takes. Now every time I do a git push prod master on my dev machine, the code is uploaded to the server, properly configured for a production environment, and fed to Apache.

Posted 20 February 2013

ColdFusion 9 and IIS 7

I’m installing a ColdFusion application and ran into a few issues. Here, mostly for my future reference, is the process of solving those problems.

ColdFusion was installed before IIS 7. As such, IIS didn’t have the correct handlers for ColdFusion files. Follow the instructions on Codecurry to get that resolved. The post is dated (the screenshots are on Vista), but the general process is still correct. Make sure these IIS features get installed: ASP.NET, .NET Extensibility, CGI, ISAPI Filters, and ISAPI Extensions. Then run the ColdFusion Web Server Configuration Tool to perform the necessary IIS configuration.

Once that was working, I started getting HTTP 500 errors. In my case, ColdFusion was only set up to run in 32-bit mode, even though IIS and Windows Server 2008 R2 is 64-bit. To fix this, go into IIS Manager and select the Application Pool your website is using. Choose Advanced Settings and change Enable 32-Bit Applications to True. (If you prefer the command line, see these instructions for this change.)

Posted 8 February 2013

Influential writing

Scott Cowley on Twitter posits that “You don’t earn the title of ‘well-read’ by reading blog posts and news articles.” I mostly agree with his premise. Long-form printed literature is still instrumental in shaping the way we think and act as individuals and as a society. But modern evolutions of writing—blog posts, essays, ebooks—also have intellectually shaping capabilities. They both have place in the library of an educated, well-read citizen.

Here are some of the books that have profoundly influenced my thinking:

  1. The Chosen (Chaim Potok) for its exposition of true friendship and loyalty.
  2. 1984 (George Orwell), ever more relevant an investigation of technology and government and the disaster they can create if left unchecked.
  3. Hamlet (William Shakespeare), if not merely for its quotability (“Alas, poor Yorick!”), serves as a tragic warning against greed and revenge.
  4. A Christmas Carol (Charles Dickens), a well-known classic with a prominent place on my annual reading list, extols the virtues of empathy and charity.
  5. Walden (Henry David Thoreau), which emphasizes the importance of self-reliance, contemplation, and introspection.

In the short-form category, these pieces have had a similarly powerful effect on my life:

  1. The Mansion (Henry van Dyke), a Christian short story about the proper use of wealth.
  2. Buying Happiness (Jeff Atwood), which explains how to make you and others happier through wise choices.
  3. Totally like whatever, you know? (Taylor Mali), which powerfully discusses the need for clear thinking, speaking, and writing. This video is the best way to experience the poem.
  4. The Regret Fallacy (Dan Shipper) — make the best decisions you can and then be happy with them.
  5. Caring for Your Introvert (Jonathan Rauch), a guide for introverts (like me) and their loved ones to understand how they think.

A book, a play, a poem, a short story, an article, two blog posts, and three novels. Plenty of variety.

Posted 2 November 2012

DIY standing desk

A month ago I decided to build a standing desk for my computer at home. By the time I finish my day job, I’m tired of sitting. Here’s what I did.

The Standesk 2200 caught my attention because it’s made from Ikea parts totaling $30: two side tables ($7.99 each), a shelf ($5.99), and two brackets ($4.00 each). Get a screwdriver, drill, level, and some wood screws (presumably already around the house) and put it together. Here’s what mine looks like:

I also put a small lamp behind the monitor for some bias lighting and bought a $20 anti-fatigue mat to keep my feet happy.

The built-in desk atop which this contraption sits is already weirdly high (34″), putting the top of the side tables at 52″. Even with that, I still needed to put a few books under the monitor to raise it to eye level on my six-foot-something self. The keyboard/mouse tray is mounted 11″ up on the table legs. The shelf and books can easily be suited to your height.

So far the standing desk has been a good investment. My lower back bothers me infrequently now (aided by my customary lunchtime walks along the river near my office). It forces me to take breaks more often than I otherwise might, and sitting becomes a welcome relief. I move around more while typing, and of course I can easily, if discreetly, dance to my music.

You can build this setup in its simplest form for $22 and the price of gas for an Ikea trip. If you can spare that (or even the exorbitant $50 I spent), it’s worth trying out to see if your posture and comfort improve. And it won’t require parting with a small fortune for a GeekDesk or Aeron chair.

Boone Gorges has two good posts on why he built a standing desk (which also hails from Ikea). Read those for his take on its benefits and disadvantages.

Posted 15 October 2012

Pandora’s next lobbying attempt

TL;DR Pandora is touting their huge music performance fees to push legislation that would actually decrease those fees. This invalidates the entire argument except for Tim’s already ill-supported last paragraph.

I’m not buying Tim Westergren’s latest rhetoric begging popular support of the Internet Radio Fairness Act. Here’s why.

Pandora pays performance fees to a company called SoundExchange, a non-profit authorized by the Librarian of Congress to collect and disburse royalties for public performance of copyrighted sound recordings. They also pay some royalties directly to labels. When Tim says Pandora has to pay $1 million for Coldplay, what he really means is that SoundExchange and the record labels split the $1 million and some small percentage actually makes it into the pockets of artists. Coldplay doesn’t get the whole million bucks. The $50,000 for 800 artists, which Tim touts as above the average American household income, actually dilutes to much less than $50,000 before the artist sees any of it. The publishers still win.

Pandora’s original argument for IRFA was the unfair advantage of terrestrial and satellite radio stations, which do not have to pay performance fees as high as Internet radio companies. The legislation would put Internet radio on equal footing with traditional radio, lowering the fees Pandora must pay. If that happens, Pandora will start paying much less than $10,000 for the late Oscar Peterson’s music. So much for Tim’s “champion of the underdog” sob story.

The post concludes this way:

Making performance fees fair for internet radio will drive massive investment in the space, accelerating the growth of the overall sector, and just as importantly accelerating the development of new technology that leverages the incredible power of the internet to build and activate new audiences. That’s where the great opportunity lies in the long run. The short-term reduction in revenue would be rapidly swamped by the overall growth of the sector.

Brownie points for the grand vision, but I need evidence before I’ll believe the prognostication.

Posted 9 October 2012

New vim tricks

I’ve been using Vim since 2006, and it’s still my favorite text editor. My current job requires me to live in Visual Studio, so I’m using VsVim, a mostly-compatible Vim mode layered on top of the Visual Studio editor. My .vimrc file, plugins, and syntax files are on my GitHub account.

Since Vim is such an important part of my development toolset, I’m always interested to learn new tricks and techniques to make it more efficient. A coworker gave a presentation on Vim today. It was intended as an introduction, but he managed to teach me quite a few useful new things in the process. Here are a few of them:

Here are a few favorites that I’ve learned over the past few months:

Posted 27 September 2012

Evading Twitter API token limits

Much has been written about the recent Twitter API token limitations. Developers are limited to a certain number of user tokens, above which threshold they must negotiate with the baron Twitter if they want more users. It’s handicapping the developers upon whose backs Twitter rose to popularity.

Tapbots recently ended their Tweetbot for Mac alpha so as not to cross that crippling threshold too soon.

But here’s another idea for Tapbots (or any other developer). What if instead of distributing the application with your own tokens, you require each user to create her own Twitter app and then supply Tweetbot with the Consumer Key and Consumer Secret from that app? This way, Tweetbot accesses the API under the guise of an unrelated app, thus evading the token limits. Tweetbot could grow to as many users as are willing to go through this process.

Twitter Create an Application screen

I recently installed a WordPress plugin for Twitter cross-posting that had me do exactly this.

It’s not very user-friendly, but it’s also not difficult. It distributes the API usage among users. Twitter no longer tells you what client was used to send tweets, so it won’t matter to Tapbots that their users are sending tweets via surrogate app accounts—they’re not getting any links from Twitter anymore as it is. The only way Twitter could crack down on this would be to shut down or restrict accounts of the users, but turning away advertising eyeballs like that would be a bad financial decision.

Am I missing anything? It almost seems too simple.

Posted 14 September 2012