Matt Brundage

Archive for 2009

Thursday, 24 December 2009

Adult Onset Pescetarianism

It all started on May 22, 2009, en route to Bethany Beach. Annie and I pulled up at a stoplight somewhere near Bridgeville, DE. Next to us was a big red truck full of live chickens, presumably heading to a slaughterhouse. The chickens were virtually motionless and didn’t look too happy. Annie became distraught and I’ll admit that I was a bit freaked out by it as well.

The “Cluck Truck” incident has slowly changed our eating habits. While I had been observing meatless Fridays for some time, Annie soon started the same. Once a week became twice a week. Then thrice. Meatless days became the rule, rather than the exception.

Over the summer, our meat supply dwindled and was not replenished. Beef, pork, and chicken: gone. By fall, practically the only non-vegetarian food in our house was fish and seafood. And we’re starting to wean ourselves off the cholesterol-laden seafood as well.

If we had to put a label on our eating habits, we’d be “pescetarians with rare exceptions.” My recent exceptions include a trip to Outback Steakhouse in November (rationalized with a $10 coupon) and a hamburger at a company party last week. Perhaps with time, these dalliances will become less frequent, and then peter out.

Thursday, 17 December 2009

Bringing children into the world

It seems that people are always asking my wife and me when we’re going to have kids. The fact was, I never had an appropriately snarky answer; I’d always say something bland and inoffensive like “oh, I don’t know, two or three years perhaps.” From now on, this is my answer: I don’t want to bring children into a world in which Internet Explorer 6 still holds a statistically significant share of the browser market. The End.

Thursday, 19 November 2009

A hip hop translation

I thought that it might be a good linguistic exercise to translate a particularly catchy hip hop track from back in the day. Anyone hazard to guess the song and artists behind it? Here’s a clue to get you started: It was nominated for a Grammy Award. I’ve deliberately excluded lyrical clues such as promotional utterances of record labels and nicknames.

Ferraris and Jaguars are brands of automobiles known to signify certain levels of wealth — or, at the very least, a high marginal propensity to consume. Thus, possession of these types of cars enhances my persona, especially convertibles with their tops down. Driving one of these vehicles recklessly while simultaneously shouting that money is of no substantial consequence helps to bring home the point.

Rolls Royce is another brand of automobile known to signify wealth. They should be driven aggressively while wearing flashy rings. I like the windows slightly open, implying that, unlike the Ferraris and Jaguars in the aforementioned verse, drop top Rolls Royces should be avoided. Again, I shout that money is of no substantial consequence.

I have an aversion to material goods that do not “gleam”, perhaps showing a preference for freshly painted and waxed sheet metal; chrome; gold, silver, and other precious metals; diamonds, and other gems. Price is not taken into consideration when acquiring material goods that gleam. After all, money is of no substantial consequence.

Recent forays into philanthropy consist of contributing financially to friends who are in prison. When my friends come home from prison, new cars are waiting for them. Money is of no substantial consequence to me.

Join us in flaunting our material goods. We travel all around the world, spending our money.

I wear Rolex watches, another outward sign of my material wealth. I contribute financially to my friends’ girlfriends. Perhaps “girlfriend” is too polite a word to use in this context. In any case, the amount of money that I contribute shows how much I love and care for my friends and their significant others. Do not bother praising me for these selfless actions. My income comes from many sources. I paid $100,000 for this bracelet. [Approximately $132,600 in today’s dollars.] Was it foolish of me to have purchased such an expensive piece of jewelry? Consider this: the reflective qualities of said bracelet will cause eye strain. My gun is solid platinum. Even the bullets gleam with gems and/or precious metals. You will die. Unseasoned acquaintances want to join my circle of friends and perhaps benefit from my material wealth. While I am not wholly averse to forming such associations, I prefer that my true friends possess “old money” and that their bank accounts be large. Like mine. My bank account balance is $1,000,000. [Approximately $1,326,200 in today’s dollars.] I have so much money that it fills up the trunk of my car! When I arrive at parties and such, my full trunk of money must look daunting to the average person. This is basic. I have been a free-spender since before the one hundred-dollar bill underwent a major redesign in March 1996. We have a lot of money. Where are the people who have professed hatred toward us?

One of the many benefits of “living the life” is that I get to eat cake that is thicker than the typical middle-class cake. [It’s the pudding.] In addition to eating thick cake, I eat crab while watching women dance in a suggestive manner. I do big things. My music production skills enable obscure music groups to become well-known. I am like a large dog, but instead of wearing a demeaning chain, I have a necklace — and a matching bracelet to boot! My friends admit that I am an important person — the type of person with whom any group of people would like to associate. I’m the type of person who does things that others won’t do, or are incapable of doing. I am so hot that I am hotter than a candle. For the remaining portion of this verse, I will continue to promote myself by using hyperbole. Now I will drop a Barry Manilow reference. Also, I swing every night.

A fellow rapper cannot truly be recognized until:

  1. One million units of his album are shipped to retailers [Unit shipments are what the RIAA uses to determine Gold and Platinum album status.]
  2. He enters into a relationship with a woman who sings r&b
  3. Said r&b woman has all the qualities that one would expect of a typical woman in her situation

Take me, for example. I entered into a relationship with a woman after she first admired my necklace. All of my jewelry is light gray — mostly platinum. Life is like a roll of the dice. Let’s play!

Note to up-and-coming MCs: It doesn’t matter if your albums merely went gold [In the US, this means 500,000 units were shipped to retailers.] or if you wear Rolex watches with diamonds and/or other gems. To get to my level of wealth, you will have to do much more. In fact, take your paycheck and double it. That’s approximately what I make. The trouble lies in the quality of your rapping. I’m a man who likes Mercedes-Benz automobiles with leather, real wood grain, and a frame that is made out of platinum. Honest! I proclaim loudly that money is of no substantial consequence. My teeth gleam from gems that my orthodontist affixed with cement. In addition, both of my wrists gleam from the assorted pieces of jewelry that I wear, including rings, chains, and bracelets. We have it made, so to speak.

Money is of no substantial consequence.

Thursday, 12 November 2009

Running for the math of it

Running longer distances is finally getting easier for me. Last week, I ran 10 miles on the treadmill just because I felt like it. I had time to kill, so I figured I’d give it a try. I averaged a little over 6 mph — not a blistering speed, but perhaps more of a marathon pace.

There was a time, not so long ago, when I’d come home from a simple 30-minute jog and my legs would just ache. Now, I don’t feel uncomfortable during particularly long runs and post-run soreness is essentially a thing of the past. The only obstacle in my way (aside from time) is the sheer boredom of treadmill running.

I find myself performing minute-by-minute calculations to pass the time. I’ve established what I call my “baseline pace”, which is the 10-minute mile, or 6 mph. An easy pace — akin to treading water. Any sustained pace faster than that “baseline” is icing on the cake. This is where math really comes into play. I earn a “point” for every hundredth of a mile covered over the baseline pace. For instance, If I run for 60 minutes and travel 6.5 miles, I’d have earned 50 “points”. Lately, I’ve been viewing these points as a percentage — that is, if I reach 50 points, my run is half over. I’ve only attained 100 points once or twice. It’s extremely challenging, because unlike absolute distance traveled, points can go down! Let’s say I run 2.09 miles in 20 minutes. Nine points. But If I then slow my pace down below 6 mph, my points start to evaporate! So, earning points requires not just distance and stamina, but speed. There’s some symmetry to it, as well. If I gain 100 points in 50 minutes of running, I will have traveled exactly 6 miles. I’ve also started to calculate the rate at which I earn said points. On today’s run, I wanted to earn one point for every one minute of running — not exactly a difficult feat. This requires a 9 minute mile (6.6 mph). As the treadmill allows me to run in increments of tenths of a mile, I had to alternate between 6.6 and 6.7 mph.

Milestones also keep me on the treadmill. If I feel myself tiring, I’ll look at the time and think “oh, three more minutes and it’s an even 40 minutes.” But once 40 minutes comes around, I’ll notice that my calorie count is approaching 600. A couple more minutes later, and the 5 mile mark is within reach. Once I hit 5 miles, it’s almost guaranteed that I’ll hit 5.5 miles, because that’s the length of Iwo Jima, and I’m now drawing strength from the Marines and the Navy.

Sunday, 18 October 2009

Charitable contributions by religious denomination

Religious charity percentages

Time span: July 17, 1994 to October 18, 2009.

Update (March 2011)

It seems that at least one person has misinterpreted these numbers, so I just wanted to set the record straight — these numbers are solely what I have donated over the years to various religious denominations.

Thursday, 8 October 2009

Browser observations

We are entering a convergence of sorts, with the Big Three (IE7, IE8, Firefox 3.5) edging closer and closer together and with none garnering more than 25% of the total market share. It is entirely possible that Firefox 3.5 will be the most-used browser come November (or at least in a statistical tie). When combined, the Firefox 3.x releases have been the top browser since July.

On October 4, Internet Explorer 6 — for the first time — fell below the latest version of Safari. Expect another month or so before Safari 4 bests IE6 on the weekly average. I stand by my my earlier prognostications regarding IE6. However, here at work, support for IE6 will end “when it ends.”

I see only positive growth ahead for Google Chrome. It’s not a stretch to predict a 5% share by the end of the year. What I’m most enamored with is Chrome’s seamless update system: version 2 lasted for a mere 15 weeks before it was supplanted by version 3 last month. Version 2 now composes only 2% (!) of Chrome usage. By comparison, IE6, despite having been supplanted nearly three years ago by IE7 (and now IE8), still composes about 15% of IE usage.

Monday, 31 August 2009

Novus Ordo Missae

Changes to the Roman Missal are forthcoming. The US bishop’s conference has a site that contains the proposed changes to the English translation of the Mass.

“The revised translation adheres to new Vatican norms requiring greater adherence to the original Latin text of the Roman Missal. Bishop Arthur Serratelli, who chairs the US bishop’s liturgical committee, describes the new texts as ‘understandable, dignified, and accurate.'”

The translation will be introduced after it receives final clearance from the Holy See.

While I no longer attend English Mass (Novus Ordo) on a regular basis, I am still happy for everyday Catholics, who will get to pray a Mass more in line with the original Latin.

Tuesday, 14 July 2009

Regex to the rescue

At work recently, I was tasked with splitting one massive directory into two equally massive directories. I soon realized that this seemingly simply task would require hundreds, nay, thousands of link changes across perhaps ten thousand pages. Going through each file one by one and manually editing links would have been unthinkable, so naturally, I turned to EditPad Pro. EditPad especially excels at mass file editing; it never ceases to amaze me how it can open hundreds of files at once, all while taking up minimal memory. Its regex features also came in handy, as we’re about to see.

With hundreds of files open at once, I found myself presented with a golden opportunity to fix years of bad code and legacy issues, all while doing that which was most essential to the project: the actual link changes. What started out as a simple string “find and replace” soon became a full-on diagnostic scan of all content pages. Here’s a rundown of some of the regular expressions that I used and honed during this process.

Problematic characters

(?<!href=.*|aspx?|cfml?|"|/|<)\?\w|\?\s(?-i:[a-z])|[^\x20-\x7E\s]| \s|\s |(?<!<cf.*)&(?:(?=\s)|(?!(?:\w{2,6}|#\d{2,5});))|%5F|%20

Problematic characters originally started when I discovered that many content pages were originally composed in Microsoft Word and still contained proprietary characters from Microsoft’s abominable Windows-1252 text encoding. Depending upon the browser or user setup, these characters would display as empty rectangles, seemingly random characters, or other such gibberish. This regex identifies several characters:

  1. A misplaced question mark, namely one immediately followed by a word character, yet not part of a URL string. This may indicate that a text editor had trouble converting Microsoft’s “Smart Quote” characters (or other such nonsense) to a UTF or ISO encoding. Failing, the text editor may have automatically replaced the unknown character with a simple question mark to warn the user.
  2. A question mark, followed by a whitespace character, followed by a lower-case letter. This may indicate that a letter that needs to be capitalized, or it may be a conversion problem (see #1)
  3. A character that is both 1.) outside of the printable ASCII character set, and 2.) not a whitespace character. A good rule of thumb is to encode non-printable ASCII characters with their HTML entities. For instance, the copyright character (©) would be written in the code as “&copy;“.
  4. A literal “space” followed by any whitespace character, or the reverse: any whitespace character followed by a literal “space” character. This expression captures a space adjacent to a tab. It also captures trailing space characters and two consecutive literal “space” characters. These characters are problematic only in the sense that they are unnecessary and slow down page loads (if even infinitesimally).
  5. An unencoded ampersand (outside of a ColdFusion tag).
  6. The literal text “%5F” or “%20”. Both are URL encodings and are unnecessary in some contexts.

Bad code

(?:<br ?/?>){2,}|<(?:center|font|u)\b[^>]*>|</?(?-i:[A-Z]+[^>]*>)|(?:&nbsp;){2,}|<(\w*)>\s*</\1>

Bad code was originally a part of the regex Problematic characters, but I forked it because the regex was getting too long. Features of Bad code:

  1. The <br> tag occurring two or more times in succession. Nine times out of ten, the developer is using <br>s to space paragraphs instead of the venerable <p> tag!
  2. The following tags: <center>, <font>, and <u>. All are deprecated elements in HTML 4 (and HTML 5, for that matter)
  3. Any tag written in uppercase.
  4. “&nbsp;” occurring two or more times in succession. Again, nine times out of ten, the developer is trying to hack the non-breaking space! (whether he/she knows it or not)
  5. An empty element. For instance, I’ve seen <strong></strong> — most likely residue from a WYSIWYG editor.

Old variables

Old variables is little more than a piped list of legacy variables that either need updating or removing. Using the list is still much faster than searching for each variable individually.

Remove line breaks in text

Regex: ([^>\s])\s*\r+\s*([^<\s.])

Replacement text: $1 $2

This one removes line breaks where they don’t need to be, such is in passages of text. I say, “Let the text wrap on its own!” This may or may not reduce the file size, but nonetheless, it improves readability.


The aforementioned regexes were developed using EditPad Pro, which uses a custom regex flavor — a flavor, I might add, that purports to combine the “best features” of the more prominent regex flavors available: Perl, PCRE, .NET, JavaScript, etc. These code samples may not work as intended in your favorite text editor or programming language.

I’m constantly improving and tightening these expressions. In fact, I made some key improvements to the first two examples as I was writing this post. What is acceptable to me this week I may find to be less than optimal next week. Just a month and a half ago, I posted a regex here; I look back on it and observe how naive and sloppy I was!

Thursday, 28 May 2009

Brain Dump, post-Memorial Day Edition I wonder what effect — if any — Billy Graham’s Crusades and ministry had on the Catholic Church’s Second Vatican Council. Ecumenicism is a major part of Vatican II and was one of Graham’s hallmarks.

Mixing equal parts Mike’s Hard Lemonade™ and regular lemonade should yield Mike’s Somewhat Firm Yet Pliable Lemonade™. Likewise, equal parts Mike’s Hard™ and, say, grain alcohol, should yield Mike’s Extremely Difficult™.

Simon and Garfunkel’s “Cloudy” may not be Paul Simon’s best song, but the arrangement is top-notch. If there is ever a Baroque-pop revival, “Cloudy” should serve as the blueprint.

Jens Meiert is delving deeper into the increasing pedantry that is long-term HTML/CSS maintenance.

Politician A from Political Party X just did [something]! If instead, Politician B from Political Party Y had just done [something], then media and public reaction would be totally different. Double standard! (wash, rinse, and repeat)

(\s\?[^>]|[^< ]\?\w|\?\s(?-i:[a-z])|“|”|’|?|?|?|—| \s|\s |(?-i:the) FAA(?!\s(?-i:[A-Z<]))|(?<!<cf.*)&(\s|(?!(\w{2,5}|#\d{2,5});)))

I’ve decided that I thoroughly enjoy swimming at the beach. Not just wading up to my knees like a little girl but actually swimming.