A Pro-Grammar Nerd: Beautiful Code Makes Beautiful Language

A Note from Aaron: I published this post on my old blog when I was in my 20s and thought I knew more than I did. When launching my new site, I could either trash old content like this or port it over. I decided to port it over as a personal archive and reminder of my own evolution. In other words, sorry it sucks.

For my birthday, my RocketBolt cofounder, Matt, sent me a $20.00 Starbucks “eGift” card.1 Take a look at the notification email:

Do you see the error? I noticed it immediately because, in addition to being a developer, I’ve spent six years teaching Freshman Writing, and it’s an error my students constantly make. Let me break out one of my giant red pens in the hopes that, just like my students, both you and Starbucks might learn to hate me appreciate my constructive criticism.

Because Matt Hofstadt is one person, he can’t be the antecedent of a plural pronoun like “they.” The sentence doesn’t make any sense, and the mistake is surely damaging the “high quality” brand Starbucks cultivates in order to sell $5 coffee. If Starbucks is lucky, one of its employees is reading this blog post and correcting the problem right now. If not, I can’t help but worry that poor use of the English language is causing Starbucks to alienate the pretentious-douchebag-grammar-nerd demographic.2

Speaking of pretentious-douchebag-grammar-nerds, allow me to explain the evolution of the “I’m going to refer to a singular noun with a plural pronoun” linguistic phenomenon. It’s a product of increased gender equality. People used to generically refer to everyone as males, but you guys probably already knew that, right? As women (rightfully) began to take offense to always being referred to as dudes, a writer could either refer to gender-neutral, singular nouns with a clunky “he/she” type of construction, or he/she could opt for a less-awkward-to-write but absolutely wrong “they” or “them” pronoun. If you’re wondering what option writers tend to prefer – even though it makes no sense – scroll back up to that image of a Starbucks email.

Despite what this post might imply, I’m actually not the kind of guy who believes writers should unquestionably adhere to every grammar rule. To paraphrase Winston Churchill, strict adherence to grammatical rules simply for the sake of following rules is the sort of English up with which I will not put.

I don’t care if you end a sentence with a preposition. I don’t care if you put periods inside or outside your quotation marks. And I certainly don’t care if you start a sentence with a conjunction. However, even in a digital world where text without professional editing is globally accessible and likely to have errors — including this post — I don’t think I’m being unreasonable by suggesting we maintain the grammar practices that computers actually make easier.

Luckily, we still have time to fix a grammar problem, and the programmers of the world can help. By using programmatic logic when we code dynamically generated text, we can determine which gender a noun is referring to and then fill in the pronoun accordingly. It goes something like this:

[if $person == female :  return she ; else : return he ;]

In a case like the generic email I got from Starbucks where the gender of the purchaser is likely unknown, the solution is even easier. Try this little programmatic trick:

[$first_name] [$last_name] wanted to make your day so [$first_name] sent you a $20.00 USD Starbucks Card eGift to spend on your favorite beverage.

Wasn’t that easy? And yet, every day I witness discussions about the importance of beautiful, efficient, semantic code that never mentions outputting proper sentence structures. Why is it OK to harp on things like “semantic css classes” but it’s not important for dynamically generated text to use proper grammar? Let’s not forget that the end result of beautiful code is more than functionality and design. The code we write often dynamically outputs the words our users read, which means no matter how much you hated your Freshman Writing instructor, he or she probably taught you a lesson that could improve the quality of your code.


This post made the front page of Hacker News because people apparently have some very strong (and in some cases) strange notions about both grammar and morality. Anyhow, I should do what I always tell my students. If the structure of the sentence causes so much controversy that it distracts from the meaning, change the sentence. Allow me to offer an alternative that solves everything:

Matt Hofstadt wanted to make your day by sending you a $20.00 USD Starbucks Card eGift to spend on your favorite beverage.

Wasn’t that even easier?

Pay No Attention To The Man Behind The Keyboard

A Note from Aaron: I published this post on my old blog when I was in my 20s and thought I knew more than I did. When launching my new site, I could either trash old content like this or port it over. I decided to port it over as a personal archive and reminder of my own evolution. In other words, sorry it sucks.

Before my students begin writing their papers, I try to remind them of the importance of establishing their ethos. I also spend an entire class period discussing what the heck ethos is, but since I don’t have that luxury here, I’ll summarize by explaining that ethos is the reason your audience should care about what you’re saying. It’s why when Mitt Romney speaks, people listen (whether or not they agree), but when Sarah Palin speaks, everyone chuckles and thinks she’s backwoodsy-adorable. Romney has the ethos of being credible, intelligent, learned, and successful, Palin has the ethos of being… well… backwoodsy-adorable. (For the record, I’m using the Romney/Palin example not because I agree or disagree with either of their political ideals — that’s partially why I chose two politicians from the same party — but because, deserved or not, the mainstream media has assigned them very distinct brands.)

Why bring up ethos? Because I’m about to break the number one rule I tell my students: you should never have to explain your ethos; let your argument establish your ethos for you.

Now I’m going to ignore my own rule (and hope none of my students are reading). You should care about what I’m going to explain because before I retreated to the Isengard-like-safety of the Ivory Tower, I was a copywriter at a small Internet marketing company. I realize this professional claim is, to most readers, extremely dull and nowhere near as ominous as I’d like it to be. But to the few folks who read my former job title and thought “I’m not sure I like where this is going,” you’re damn right — that’s exactly where I’m going. As for the rest of you, I’m about to pull back a tiny sliver of the Internet’s proverbial curtain. If you don’t want to learn how the magic happens, stop reading now. Look at some adorable puppies instead.

In my seven years since graduating from undergrad, here’s a brief glimpse at the many, many, many expertises (my ethoses) I’ve shared with the World (Wide Web):

  1. Fitness Guru: I’m not necessarily fat, but the only successful diet I’ve ever created I lovingly referred to as “The Pizza Diet.” To be fair, eating one pizza a day and nothing else did help me lose 20 pounds; still, I hardly think it qualified me to be the lead blogger for a fitness website with thousands of users.
  2. Blushing Bride-to-be: You may laugh, but wedding blogs are big business. So when a client needed a wedding blogger, guess who wrote it. Oh-by-the-way… I’m a dude.
  3. Stock Analyst: Want to know an industry where you absolutely shouldn’t believe anything you read? Penny stocks. In this case, it’s not just because guys like me can do the writing. In fact, you’d be lucky to read something I wrote because I actually cared enough to make sure everything I produced was triple-checked by former SEC attorneys to avoid the potential for legal “actionability.” How many attorneys do you think are verifying “next hot penny stock” newsletters being written in Cyprus? Or India? Or Pakistan?
  4. Philanthropist: I’m actually proud of this one. I run a charity… we try to do good in the world. But still, writing copy for a charity is a far cry from the next example.
  5. Serial Dating Website User: If weddings are big business on the Internet, dating is HUGE business. Plenty of companies are trying to capitalize on all the online-dating traffic, and SEO-rich blogs are a key component. Someone has to create those blogs; can you guess who’s been one of those “someones”? Fun fact: I’ve never used a dating website and I’m married. Am I the guy you want giving you your online dating advice?
  6. Mommy Blogger: This time last year, mommy blogs were the new industry darling. As I posted about taking my kids to soccer practice and defeating diaper rash, I couldn’t help but wonder how many other mommy bloggers didn’t actually have children. Plus, like I wrote before… I’m a dude.

Those are some of the bigger projects I’ve contributed to, and while I could certainly list more, you hopefully get the picture. Also mixed in were things like nutritionist, extreme couponer, ticket broker, and, one of my personal favorites, neighborhood blogger (in six different cities around the country, none of which I’d ever lived in).

The point is, the Internet is big business. When there’s billions of dollars at stake, the only thing you can be sure of is that companies will do whatever they can to legally (and sometimes not-so-legally) get you to click a link, watch an ad, or, the holy grail of all web marketing, capture your credit card information.

To be fair, capturing your credit card information isn’t necessarily a bad thing. Online marketers aren’t outright thieves (most of them, anyway) and the last thing any successful online marketer wants to do is get a credit card chargeback. Too many chargebacks means losing the ability to process credit cards, and losing the ability to process credit cards means they can’t make money. However, it’s their goal (and it was my job) to convince consumers to take certain actions based on a website’s content. Who created the content didn’t matter so long as the readers felt like the content was genuine.

I realize for many readers my revelations won’t come as a shock. For the record, I actually hope they don’t. But there’s a difference between not being shocked by things (e.g. the media is biased, high fructose corn syrup is bad for you, the Holy Roman Empire was neither holy, nor Roman, nor an Empire), and having to be reminded to be aware of such things as you engage with them. The Internet is flooded by millions of websites and the barrier for entry to creating a website is incredibly low. I have no idea how to tell whether a website not belonging to one of the 500-or-so universally recognized name brands is actually a valuable resource, and I’m not sure anyone else does, either. Sure, you can argue “that’s what search engines are for.” But I’ll argue back, “I used to get paid good money because I was great at tricking search engines.” In other words, trust search engines at your own risk.

Still not convinced? Consider my current ethos. I’m claiming to have a PhD in English literature who also happens to be an entrepreneur and have an extensive background in web development and Internet marketing, plus… I’m a dude. Regardless of whether or not that persona is true, you have to admit, it’s certainly not the same as being a mommy blogger. Unless I’m Chaz Bono, I physically can’t be both. Maybe I’m neither. The point is, you’ve never met me, so how do you know which, if either, is true?

Perhaps just as importantly, does it matter?