Adam Hooper's Blog

Apr, 2021 back to Jun, 2006: (nothing)

May, 2006


Posted May 19 in California

Believe it or not, there comes a point where one looks down at a freezer full of Ben & Jerry's ice cream, free all-you-can-eat...

... and passes.

The lesson learned: I have to cut back on free between-meal snacks so that my stomach can accomodate more free mealtime desserts. The ultimate goal is to maximize the value of the free food, so that no free food eaten now actually detracts from superior postponed free food options.

As you can see, I'm learning things at Google that I couldn't learn anywhere else in the world.

Read full story

Life of a Googler

Posted May 18 in California

A typical work day:

  1. Wake up, shower, dress.
  2. Bike to work.
  3. Eat breakfast.
  4. ???
  5. Eat lunch.
  6. ???
  7. Eat supper.
  8. (optional) ???
  9. Bike home.
  10. Brush teeth.
  11. Sleep.

Notice the complete and utter lack of expenses. As long as I don't run out of toothpaste, I'll be fine.

Read full story


Posted May 17 in California

I've been through orientation (including the horrendous paperwork marathon). Is this place ever cool!

I still don't have Internet at home so I can't write more. And I have signed NDAs so I can't say what I'm doing here. But it is so cool.

Read full story

Financial Fiesta

Posted May 14 in California

Little financial bonuses:

  • My new VISA card has a different statement due date. That means I've got a huge balance riding on it for several months at 0% interest. Sweet.
  • $1US = $1.13CAN. I wonder if the exchange rate has ever been lower in my lifetime.

I looked for an apartment today. My lack of United States credit history and my short lease terms are obstacles. I saw one place which looks nice, but it made me worry about my budget. I also looked at the NASA Ames Research Centre, which is cheaper than anything else I could find. At this point I'm leaning towards Ames: it's simply less hassle. I haven't decided whether I'd choose to room with somebody or not. The lack of Internet is a big minus.

Read full story

Got Here Safe

Posted May 14 in California

This particular California blog is sort of new to me: I'm actually blogging about my personal life. Well, I suppose it had to happen sometime.

For the remainder of this entry I'll dispense with words like "yesterday", which for obvious reasons are overly complicated.

Also, this entry is excessively long so that Mom won't ask me endless questions.

Wednesday: had a great time with my friends at McKibbins and Brutopia. Thank you for coming, Lisa, Beth, Jen, Sam, Marc, Rob, Raph, Caitlin, Gen, and Jesse. ("The Other Jesse" will henceforth be referred to as "Jesse S". Sorry you couldn't make it, Jesse S.)

Read full story

Got a Bike

Posted May 13 in California

I left my apartent around noon on foot, planning to return on a bike. I walked downtown. I didn't get lost, but I did find bike stores rather rare. The first one I walked by is a Specialized "concept" store, which looked really cool but only opens in July. The next one I walked by (at least 30 minutes later) was big and open. The salesperson really liked me; he got the impression I know bikes more than most of his customers (I guess I can give that impression; all I do is ride them, really...). He told me another Google intern (a Russian) had recently bought a bike from him. He hooked me up with a GT Timberline 2005 for $300:

GT Timberline 2005

I also got a helmet and lock, both on sale. I rode my new bike around the Google complex. I saw somebody else biking on a trail there. I like to imagine it was a Russian with a new GT Timberline 2005, but I didn't stare so I really don't know.

The new bike is much nicer than my 12-year-old mountain bike back home. It has shocks on the front wheels, which make it feel squishy. They also make a small deflating noise when going over a bump, which makes me scared my tire is deflating (I'm used to a 12-year-old bike). The seat is low and the handlebars are high, which is the "comfortable" style (I'm old); I think I'd prefer lower handlebars but I'm not complaining: it's a bike I'll be using for less than four months, and biking in Mountain View is easy compared with Montreal.

Read full story

May, 2006 back to Apr, 2006: (nothing)

Mar, 2006

WebCT auto-login

Posted March 28 in Code

Even more stuff about McGill's network that I hate! WebCT (the worst classroom management web system thingy) at McGill has a really stupid sign-in page. I used to be able to bookmark the login page and enter by pressing Enter; but when they upgraded to WebCT Vista they removed that feature.

I wrote a Greasemonkey script which automatically clicks the Submit button on the sign-in page. It assumes your password is auto-completed.

It eliminates one of those little things that makes life just a teeny bit worse.

I've only tested it with the Epiphany Greasemonkey extension but I expect it works with Firefox as well.

Read full story

McGill Wireless - if-up script

Posted March 22 in Code

Last blog entry I displayed an Epiphany plugin to solve one of my McGill wireless woes. Today I spent about 45 minutes playing with wget and bash, and I came up with a much better solution. It's quite McGill-specific, and unfortunately for many of my friends it won't work on Windows, but here it is:

Dump the following into /etc/network/if-up.d/00mcgill-wireless-login:


# Configuration
PASSWORD=`cat /home/adam/.mcgill-wireless-password`

# Only run this script on the wireless interface
[ "$IFACE" == "$WIRELESS_IFACE" ] || exit 0

# Find our IP address
ADDR=`/sbin/ifconfig "$IFACE" | sed -n -e '/^.*inet addr:([.[:digit:]]*).*/{s//1/;p;q;}'`

# Exit if we're not on the McGill wireless network
host $ADDR | grep -i '' > /dev/null
[ $? -eq 0 ] || exit 0

# Bizarre variables for the authentication page
NAS_IP=`host $NAS_HOST | sed -n -e '/^.*has address (.*)/{s//1/;p;q;}'`

# Pretend we're a web browser
wget "$LOGIN_PAGE" -o /dev/null -O /dev/null 

Read full story

McGill Wireless

Posted March 21 in Code

At McGill, our wireless network requires a web-based log-in. That is, the first web request results in an authentication web page being presented to the user. After the user types in a valid username and password, some voodoo is performed, and an authentication succeeded page is displayed.

There are two enormous annoyances:

  • No Internet is available over any port until the web page has been visited. I'm constantly frustrated: email, VNC, ssh... none work. I haven't looked into how feasible it is to write an if-up.d script to automate the log-in.
  • After typing in a web page and hitting Enter, the authentication web page intercepts; the original web page the user typed in is never presented. This is especially annoying because the URL of the authentication succeeded page actually contains the originally-typed web page as a GET parameter. Why don't they just use a simple HTTP redirect and save thounsands of students the trouble?

One day a flash hit me, and I realized I could solve the second problem (which I'll admit only exists because of the first, which is still annoying) in ten minutes, using an Epiphany extension. It had been a shameful while since I'd last written one, but my example was extremely close to what I wanted.

Read full story

Multiple Projects

Posted March 3 in Code

Back when I started at university, I'd be able to immerse myself in projects. I accomplished quite a few things, one project at a time.

Now things are different. I'm taking only four courses this semester, but three of them have semester-long projects. I am currently working on:

  • An Internet version of the game Pit, using the Twisted Python framework for the Internet part and client. The end goal: code an AI player for the game (language undecided: either C++ or Python, probably).
  • A simulation of a distributed computing network. This involves a simulated local network of processes (using an event queue) as well as a real network component (using MPI). Language: C++.
  • A sticky-notes application. I really like this one. Language: Java.
  • (Work, not school:) A medical-imaging application, using Qt, VTK, and ITK. Language: C++ (and each of the libraries has a different idea of how C++ should be written, leading to acute pains in my neck.)

Switching between projects takes a change in mindset. As soon as I get immersed in one, I discover I've neglected another. It's a real pain. Not only that, but I strongly dislike C++.

Read full story