Saturday, December 29, 2007

Cows, part 2

In Grade 9, I wrote a program to download comics and newspapers from the web[1] and display them in a whiz-bang DHTML page (that's right, back in my day we called it DHTML, you young whippersnappers, none of this new-age AJAX crap.)

Anyway, to drive this, I realized I could write a bunch of painstaking code to generate the URLs to download the images, or I could write some sort of text-based configuration file that would drive the program.

That worked well for simple cases. Over time, distributors got tricky: the URL for their image had some custom string in it that you could only get if you loaded a specific page on the given day. And you had to have a specific Referer, too! This required a complex pattern matching system. I realized I could write a bunch of painstaking code to match the patterns I needed... or I could look into this thing called regular expressions that I had kept seeing people use on the MOO.

As always, I didn't have a deep understanding of what they were, but seeing what they could do pretty much blew my 14-year-old mind away.

And thus, I committed my first act of (unintentional!) intellectual property theft by including the regexpr package from the LambdaMOO server into my program wholesale. "Attribution? What's that?" Consider this a mea culpa and a fix after the fact.

[1] I now understand how older folks feel when they say "it was the 70s," as if the date somehow excuses their pastel leisure suits. It was the 90s: back then, if you were on the web and didn't have enough popups and banner ads to induce seizures in rates competitive with modern Japanese anime, you were a nobody.

Labels: , , , , ,


Cows, part 1

I first learned to hack code in BASIC and Pascal, but the language that truly brought me into the inner circle of real programmers was the MOO language. Invented at the famous Xerox PARC facility, MOOs were programmable, object-oriented, networkable, multi-user, concurrent, distributed environments. Every nerd's wet dream.

An icon of MOO days was yduJ ("rhymes with fudge"), who wrote a few tutorials on the inner workings of MOOs. I am convinced that if a CS grad cannot explain all the concepts touched on in the MOO Lore Pamphlet, they should get a hard spanking and a stern talking-to. Although I didn't realize it at the time, the pamphlet mentions:



Sadly, the MOO where I truly learned to code is now basically a museum relic - it's once-youthful population has reached old age (i.e., kicked out of our parents' basements) and has moved on. Mostly to Google, it seems.

Friday, December 28, 2007

Stupid VIM tricks, part 1

To insert a GUID into your document simply by typing 'guid', toss this into your .vimrc:


imap guid <esc>:r! C:\path\to\uuidgen.exe<cr>k$Jx40la


The k$Jx40la does as follows:

k -> move up one line
$ -> go to end of line
J -> concatenate line below with this one
x -> delete the space that concatenation created
40l -> move cursor right 40 spaces (length of a guid)
a -> return to insert mode, with cursor positioned where it was before we started

Labels:


Friday, December 21, 2007

A momentous occasion

Hi there,

April 30th, 2008.

I greatly dislike your company. The quality of your service is subpar at best, and your website is an exemplar of the sort of functionality that a 12-year-old with FrontPage 97 could provide if you bought him off with a crisp twenty dollar bill.

I cannot wait until the day that I am free from your company’s shackles -- that day will be April 30th. It will be a joyous day, marked with tales around the now-silent TV, amid the unblinking glow of the LEDs of a router that is no longer connected to the intarwebs. There will be champagne for the adults and fizzy ginger ale for the kids. In fact, my fiancee and I are contemplating changing our anniversary to April 30th to forever remember the most special day in our lives. It's either that or get married on that day -- as math majors, the symmetry of us joining together while simultaneously dissolving our union with you has a certain aesthetic to the two of us. Whatever we choose, the champagne is chilling and the fireworks are waiting (in a cold, dry storage area - your concerns for our safety are noble, but we’ll live to see the day we sever our ties with Rogers if it kills us).

That said, I want to pay you hundreds of dollars!

Sorry... did that seem like I wasted a lot of time just so I could pay you money? Yup, that’s about how I feel every month when I try to pay you.

Anyway, I would love to pay you, but I can't! Apparently, since signing up for a Rogers Home Phone account, I am unable to view/pay bills for my Rogers services until I link my Rogers Wireless account on to my One Bill.

I don't get it - I don't have a Rogers Wireless account. Oh, I see. The Home Phone, which is not a wireless phone in any sense of the word, is a Wireless account. Duh. So I click on Combine Your Bills. Uh oh - 500 Internal Server Error. Let’s try that again. Hey it worked! In fact, it worked really well: "The Wireless and Cable accounts you have registered to this User ID are already subscribed to Rogers One Bill."

Oh, I see. I have to register my Wireless account with my One Bill. It’s part of the One Bill, just not registered with the One Bill. Duh.

I phoned your customer support number to get the information needed to register my account. That was fun. "Home phone." "Billing." "Home phone." "Human." "Billing." "Home phone." Clearly, the 12 year-old felt $20 was too much payment for the website, so he chipped in on the classy speech-recognition part of your telephone system.

The one redeeming point of this could have been your customer service rep: she was almost able to answer my question: "what’s my account number?" Sadly, we got sidetracked with updating my contact information - do I have an email address? Do I have a phone number?

Yes, Cathy, I do have a phone number. Now that I’ve paid my bill, I’ll have a phone number for another 131 days.

Colin

This page is powered by Blogger. Isn't yours?