Adam Hooper (the blog)

Tags

Sep, 2010 back to Jun, 2006: (nothing)
May, 2006

Got Here Safe

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.)

Thursday: woke up with a killer sore throat, which faded by noon to a rather tame one. Had a great time with Rachel. Saw Dad, Kate, Jesse, and Mike at Hurley's. Made hotel reservations online, reserved a taxi. By the time Rachel left, I technically found myself in Friday.

Friday: you can do a heck of a lot when you count days as 24-hour chunks. I started off with laundry, made some coffee, and packed. Luckily my apartment is small; after seeing the disaster in the country clearing out Gran's and Dave's houses, my apartment is a relief. In the bathroom, I just emptied the medicine cabinet into a plasic bag. In the kitchen, I just ate everything in the fridge. In my bedroom and living room, I stood in the middle and turned in circles until I couldn't see anything left to pack.

3:00am: Went outside with my luggage. I had planned to go outside 5 minutes early to catch some fresh air; as I walked out the door the taxi driver came. Cool. He turned out to be an electrical engineer who was laid off, and he complained to me about discrimination. He though I was a bit crazy to be going to the airport so soon.

At the airport: first of all, I found out that the Expedia receipt, despite the website's protests, is not enough to get tickets: I also need to know which airline I'm flying with (which is not printed on the receipt). I had to whip out my laptop and use the Internet (cost: $5) to view my information online. The logo next to my flight was an Air Canada one, but the flight was "provided by" United Express and Shuttle something-or-other, somehow. I chose the United Express check-in line, even though the flight number on Expedia's wesite was an Air Canada one. I was about 5th in line and the line hadn't started moving yet, so I copied the rest of the passengers and stole a customs information form from the desk and filled it out. The line moved (very slowly) and I was relieved to discover it was the correct one. I then found myself in the enormous customs line. As Flis suggested, I checked that my luggage was tagged correctly.

4:30am: The customs line was huge. It kept moving, so I couldn't play video games. I had no idea what I was supposed to do once I actually got to the counter, but I figured I'd worry about that when the time came. It came and I found myself with an extremely rude customs officer. I was friendly and acted clueless and said I needed a J-1 visa. He was rude: he gave me a form and told me to go "over there" to fill it out, then come back to a different desk. I did, and the person at the different desk was pleasant.

5:00am: Dropped off my luggage. Realized immediately after that my Swiss Army knife wasn't going to fly, literally. I use that thing every day, dammit. Still, I guess I had to forget something in my sick/exhausted state.

The plane from Montreal to Chicago was nice. I had a window seat, but it was raining in Chicago and I saw nothing. The airport is really cool there, and I spent a while wandering around aimlessly, trying to avoid spending lots of money on food. I finished Indiana Jones and the Raiders of the Lost Ark, ate pizza at a place which looked good but tasted bad, and boarded my flight to San Jose. I was miffed at not getting a window seat. The guy next to me didn't want to trade, so boo.

10:00am: I'd been awake roughly 24 hours at this point. The flight lasted forever and I could barely sleep (if only I'd had a window to lean against!). My sore throat was annoying me (I could never drink enough), so I chewed through my pack of gum on the trip. I watched Indiana Jones and the Temple of Doom (the in-flight movie looked absolutely horrible: some Wind in the Willows knock-off written, directed, and animated by a first-year computer graphics student?). I read some Neil Gaiman and tried to sleep, but neither went over very well. Just as I was breaking out the video games ("ultimate boredom"), we were told to disable electronic equipment because we'd be landing soon. Woo-hoo!

12:30pm: After so many hours, morning is just barely over! San Jose's airport is miniscule. I picked up my luggage, got my car (unpleasant surprise: Google said that the corporate discount would bypass the $50 under-25-years-old fee; it didn't). A Chevrolet compact. Then I drove around Mountain View, trying to get a feel for the city. It's larger than I expected. Also less... mountain-y. I think I saw a hill in the distance as I was driving down one street. Most streets are 4-lane at least (many are 4- or 5-lane in both directions). One-way streets are extremely rare. There are huge trees everywhere. There are no skyscrapers; still, the street layout makes Montreal seem somewhat quaint in comparison. Google's collection of buildings is massive: the campus must be a bit larger than McGill (I'll know better once I've been inside).

I checked in to my hotel, then walked along "downtown" (Castro Street: practically the only one-lane street in the city) looking for a place to eat. I was happy to notice at least one Irish pub. I ate, then headed home (I was too tired to execute my plan of getting a bank account).

6:00pm: I was disappointed to discover that the 20 channels in my hotel room don't include the San Jose hockey match. They do basketball instead. I watched that for 10 minutes (flipping constantly for a hint of hockey). By 6:30 I was asleep. Apart from a coughing fit around 7:30, I slept like a baby until 8:30.

And luckily, that's 8:30am (as opposed to pm: I wasn't sure). I found an internet cable in my apartment and I've since been setting myself up electronically. Now, my plan is to go out and not come back until I have an apartment and a bike (and maybe a new cell phone plan).

So far, I have seen nothing but beautiful weather in Mountain View. The temperature is just right, and in my experience the sun is always up. I am comfortable and almost completely healthy, and I'm looking forward to my day. Maybe I'll get the bike first; I'd love to bike around a lot.

Odd differences between Mountain View and Montreal:

  • Culture: mostly Mexican and American; I haven't noticed any, say, Chinese.
  • Accents: as expected, the accent will take some getting used to and until then I find it awfully amusing.
  • Smoking: since landing, I saw one cigarette total.
0 comments

Got a Bike

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.

So I got to see more of Mountain View. With a bike, everything is the perfect distance (but I have a hard time finding stands to park my bike). I went to a Safeway and bought myself some orange juice and some "frappuccino" coffee drinks.

While biking, I pondered more about Mountain View. It's rich: I guess there's just money everywhere, so it makes things different from Montreal. No homeless people, very few unappealing store fronts, trees everywhere, big signs, roads in perfect conditions, etc. I think the roads are so big because, duh, everybody has a car. In Montreal it's easy to use nothing but public transportation; I think Mountain View is too spread-out for the same to apply (nobody would dream of building a subway system here, and busses are less useful). Apartments are certainly more expensive, but then again, they're much nicer.

I got home and put my beverages in the fridge in my apartment. I'm not sure, but I think the fridge might be broken.

I've used rent.com to try and find an apartment. It lets me send out emails to tons of places. I have a feeling it'll be trivial to get an apartment here (compared to my last apartment hunt in Montreal). I emailed a bunch of places; if by tomorrow I haven't gotten any responses, I'll bike around and haunt the places. Most rental offices are open weekends. I'm not that picky at this point about where I stay. I should be fine.

0 comments
May, 2006 back to Apr, 2006: (nothing)
Mar, 2006

WebCT auto-login

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.

0 comments

McGill Wireless - if-up script

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:

 /dev/null
[ $? -eq 0 ] || exit 0

# Bizarre variables for the authentication page
LOGIN_PAGE=https://wireless-login.mcgill.ca/wireless/webpages/noc-authenticate.php
NAS_HOST=www.noc-cn3000.com
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 
        "--post-data=username=$USERNAME&password=$PASSWORD&button=Login&ipaddress=$ADDR&CN3000_INT_IP=$NAS_IP"]]>
0 comments

McGill Wireless

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 sample-python-location.py example was extremely close to what I wanted.

I just created the following in my ~/.gnome2/epiphany/extensions, and enabled the extension through the extensions manager:

redirect-mcgill-wireless.py:

redirect-mcgill-wireless.xml:



        Redirect McGill Wireless
        Redirects from McGill's wireless page
        Adam Hooper <adamh@densi.com>
        http://www.gnome.org/projects/epiphany/extensions.html
        1
        epiphany-extensions-1.6
        /opt/mozilla-1.7/share/locale
        
                redirect-mcgill-wireless
        
]]>
0 comments

Multiple Projects

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++.

Also, I've had to shelve some projects I would have enjoyed. If I had more time, I would code the following:

  • A Java applet (complete with AI player) for Black & White, a game I had to code (in C++) for a recent AI assignment. Apparently my cousin Corey visited my web and was disappointed; I figure putting a game on it would gain his interest. Language: Java.
  • Integrating SQLite with Epiphany's History and Bookmarks. It would give speedup and code cleanup. It would also make extensions easier to write and more powerful. Language: C.
0 comments
Feb, 2006

Inspiration

Self-improvement is an admirable goal, but it's easy to lose track of why we should strive for it.

This morning I woke up with a flash of insight. I work hard to always become a better person to merit the respect, admiration and trust of the people I care about. The path takes a lifetime, and the rewards are well worth it.

0 comments

Blame

It's not my fault, it's theirs.

(By ignoring context, I have promoted this blog entry from an anecdote to a mantra.)

0 comments
Jan, 2006

Perfection

Perfection is the art of enjoying the world exactly the way it is.

0 comments

Philosophy vs Engineering

In my first Philosophy conference, we were asked to state our name, program, and reason for taking the course. After going about halfway around the room, the spotlight fell on the person next to me, who said she was in Chemical Engineering and was taking Philosophy because she was afraid Engineering is making her a robot.

My turn came right after that. I had prepared some drivel about improving my methods of reasoning. But I thought about it for one more second, and then I said, "same reason."

0 comments
(admin stuff here)