Monday, October 24, 2005

On Complaining, Off Lisp

I've really been trying to avoid griping about technical problems on this blog. I think such things are more often than not foolish; more often than not the complainer is missing a small detail that is causing his/her whole problem. All of their anger is over nothing. In general, I think that's why it's a good idea to not get angry at things. Of course, I'm not that perfect, so I just try and keep it to myself.

But alas, I'm having technical problems. While I don't believe in catharsis, I do think that typing up and clarifying my thoughts might be valuable for some insight and introspection. I also don't post here enough, so what few readers I might have get to suffer through it. I promise I'll try and be constructive.

Much to my (pleasant) surprise, my internship in Germany has me working in Lisp. As such, I thought it'd be a good idea to read up on some of the writings of Paul Graham one of the loudest evangelists for the language. I have his "ANSI Common Lisp" book, and went through the exercises in the first few chapters on BART for a few weeks a year ago. Lately, I've been perusing his book "On Lisp" during my free-time, really wanting to believe the language is everything he says it is.

Graham's evangelism has always touched a nerve for me. I really want to like Lisp; I want it to be the magical panacea for programming that Graham insists it is. But I can't honestly read most of his gushing without getting the impression of a snake-oil salesman. I'm not accusing him of being a liar. More than likely, I do not completely understand what he's trying to get at. But so many of his early justifications for lisp look like a lot of hogwash.

Who knows, maybe I did learn a thing or two about critical thinking from high school; who'd have though?

Let's take his diatribe on utility functions which takes up just about all of chapter 4 in "On Lisp." Graham spends a chapter on some simple (and possibly very useful) utility functions to demonstrate bottom-up programming in Lisp. He goes on to justify utility functions as if other languages never had such things. As far as I can tell, Graham is describing what every library in the world does. In fact, I remember when that seemed like such a cool thing in C, or C++, or Java. There are some subtle advantages to his examples (namely, that Lisp allows you to pass functions around and declare them on the fly with more leverage than C++), but the tone of the passages make it sound like he's never seen a library. Graham also goes on about macros as if they're the best thing since sliced bread. So far, they look like little more than C++ templates. However I haven't read the macro chapter yet, so I shall see.

But it's little things like this that give me so much trouble understanding what exactly Graham means by "bottom-up programming." It sounds exactly like top-down programming, except you're avoiding design. I have yet to see design book suggest that you don't abstract your functions so that you can use them again; yet that's exactly what I feel like Graham is criticizing top-down approaches for.

I think one of the reasons I gave up on Lisp last summer was because of this sort of writing. It just leaves a sour taste in my mouth. I'm going to try and push through "On Lisp" more though; I might as well since I'm programming in Lisp anyway. And hey, it doesn't really matter if it's not the panacea Graham makes it out to be; I like what I've seen so far in the language, even if I'm probably not using it to its full potential. And who knows, even if he's wrong, I might learn a thing or two.

What might be more helpful would be if I printed out his book, and make annotations of all of the little things that bother me as I go along. Then, as questions are answered, cross off those little annotations, or at least point out where they were answered. The book is 400+ pages though, so I need to find a printer where that kind of printing is okay. I could probably cut it down to 100 sheets of paper, but that's still pretty crazy. It'd be really awesome if I could annotate his PDF. I ought to figure out how to write a utility like that, except it's probably been done. And I'm lazy. It'd be even cooler if I had a tablet PC to do it on. Or if I had my wacom tablet with me. Some way to hand-write it.

All this talk of wanting-to-believe makes me think that I need a big poster on my wall that looks like Fox Mulder's "I want to believe" poster, except with a big lambda instead of a UFO.

The biggest problem I have learning any new programming language always seems to be people's refusal to connect ideas to other programming languages. No C# text I've seen is willing to compare it to Java, even though they're both practically the same language. Many Java texts seemed reluctant to compare it to C++, except to say how it's better. It feels like everyone is willing to say how much better they think they are, but they aren't willing to say how they're the same. "We're great, because we have this feature that's been around since the 70s! But we won't admit it!"

Am I really the only one who learns by finding out how things are similar, and building off of that? Hell, I seem to have the same problems with foreign languages; people seem hesitant to make comparisons because of corner cases. But corner cases are just that; it's easier to learn "this is the same, but keep this one thing in mind" rather than "They are different! Don't even try to compare them! You'll just confuse yourself."

It's a pity too, I really enjoy seeing at how similar both real and programming languages are to each other.

Friday, October 14, 2005

Oktoberfest Madness

For those not in the know, I'm in Germany until near the end of December. I managed to get here just in time for Oktoberfest, and made an effort to go there for the festivities. Pictures are in the Gallery, but I thought the event warranted its own description.

Booking a train for Oktoberfest with with a week's notice is not a good idea. The best "overnight" train I could find left Bremen at around 8 p.m. and arrived in Munich at 1 a.m. Yuck. I hoped I'd be able to sleep on the train at least, but that didn't happen.

There's no direct train from Bremen to Munich (or at least, if there were those were the first to fill), so I had a transfer. It's the transfer that made booking the ticket such a pain, and I could see why. My first train was pretty empty; I pretty much had the seat next to me empty the whole way down.

The second train was another story. Let me talk about German trains for a bit. Seating is assigned when you reserve your ticket, though you can choose to buy a ticket without a seat reservation and pray that someone doesn't show. Every time I've taken the train, someone is in my assigned seat. This wouldn't bother me, if it weren't for the fact that I hardly speak any German.

Word of advise: when it's Oktoberfest weekend and your train is heading to or from Munich, every seat is taken. I didn't get any sleep on the way down since things were so crowded and loud. That and some really awesome old guy was in my seat, and I'd have let him stay there if he didn't get up and stand there. He spoke really clear English too, which surprised me. I forgot to ask about it though. Alas. The train did eventually make it to Munich in one piece, despite drunken loudness.

I had been worried the station would close; it was 1 a.m. after all. Oh man, was I wrong. The city of Munich seems to relax laws for the weekend; the train station might as well been a refuge from some natural disaster. A drunken natural disaster. The waiting room was full of people sleeping on the benches and on the floor with sleeping bags or less.

Some were passed out in their own puke, and others were still drinking. Burger King was open, and I helped myself to a late night meal. German fast food sucks, but I'll save that for another post. Anyhow, given all of the insanity and my lack of desire for sleeping in a train station around drunks, I found a quiet corner and worked on reading the last bit of the Illuminatus! Trilogy. Interestingly enough, I was at the part in Ingolstadt where Nazi zombies come out of a lake. No, I am not making this up.

Eventually the sun did rise and not knowing Munich, I followed some crowds onto the underground rail to the festival itself. The rail looked very reminiscent of the Bay Area's BART. It was about 7:30 a.m. or so now, and festivities don't start until 9. I enjoy sunrise and look around at all of the tents and booths. Needless to say, the whole thing was a lot larger than I thought. It was bigger than any fair I've been to in the states and was centered around beer.

I did check out St. Paul's Cathedral, since that was nearby. I noticed a lot of cars parked outside the festival area with sleeping bags inside; I guess the hotels were seriously booked. After walking around a bit, I went back to the fairgrounds.

I found a beer tent I thought might be worth waiting in front of, and stood around. I overheard some English, and like a remora, latched onto that group of people and struck up conversation. It turned out some of the people were from Germany, some were Americans living in Europe, and some were friends of the Americans visiting. All were from California, making them easier to relate to. Time passed, and the line started going around the side of the tent.

Then things got crazy. The German sense of personal space is much smaller than the American sense. So the line was denser than I'd expect. I can handle that. However, when it started nearing 9 a.m. the back line started moving forward. What this means, is that personal space vanished, and we were essentially being pushed forward. People still weren't being let in, so this accomplished very little, but was kind of funny to me. Eventually people started getting let in, but security was getting really pissed off at the crowd and kept closing the doors. My group decided to try another door, and I followed them to the much more manageable line.

We got into the beer tent eventually, only to find there were no tables large enough for the group. D'oh! We ended up sitting at a table outside, which turned out to be pretty nice. Having fellow native-English speakers to sit with was nice, and everyone was really cool. Beer was drank, and one person in the group tried the saltiest chicken known to man. Hours later, the group started to disperse, so I thanked them for letting me hang out, and went about on my way.

It was getting to be late in the afternoon, so I started taking pictures of the beer tents and people in costumes. I grabbed a bite to eat and a shirt, and started to feel rain. Feeling done with festivities (that is to say, I really could not handle any more beer, was tired, and full), I went back to the train station to pass the last two or three hours before my train arrived.

I did get sleep on the way back, though one of my connecting trains was nearly an hour late. That was the first German train I've seen that wasn't on time. I appreciated it though, since it got me home at a more reasonable morning hour (i.e. after sunrise).

I'd definitely like to try Oktoberfest again to experience it minus sleep-deprevation and plus friends (and hopefully more German-speaking on my part). Time will tell if I go again, but if I do I'd like to plan things out to enjoy the whole thing more.

Meanwhile, an even cooler festival seems to be starting in Bremen this week. I'll take pictures and blog about it eventually. It's not beer-centered, but it looks pretty freaking neat. It's called Freimarkt, and the whole town seems to be turned into a fairground. Both Marketplatz and the train station have a ton of stuff. It goes on for the rest of the month, so I have plenty of time to check out the different parts of town.

Friday, October 07, 2005

Knowledge vs. Randomness

We're finally on our way back to Redmond. At the end of the cups puzzle, we had to make one last swim out to the small island to retrieve one last item from Game Control. It is a set of boxes forming a pyramid (first line had one box, second three, and so on). The bottom read "Encoded words in bold"

We think we know where this is going. Most puzzles had a story pyramid associated with them, most of which had "random" letters circled. Occasionally some of those letters would be in bold.

The sun is nearly down, and we're back in Redmond. We head to the cafeteria, noticing that it's hot, but there's other teams working there, and one of the two head honchos of Game Control. Cool. There's also a pile of the pyramid sheets, if we didn't get one.

We know that "encoded words" means we need the MSIG, the Manual System for Interpreting Gibberish, that we received back at the Library. We had unfortunately lost ours, but thankfully, Game Control reluctantly gave us a new one. We know that we need to cut out the snippets from the story pyramids and some how use them to fill this new pyramid. But we're not sure how.

The snippets don't seem to form words. We eventually manage "cafeteria," but we have trouble with anything else. It's also nearly impossible to form full words horizontally with the bold letters, since some have non-bold letters. We figure the bold words are all that will matter, so we focus our attention there.

Eventually, someone from another team tells us GC said the cafeteria line was a dead end. We believe him for now, since we had been given mixed signals when GC walked by our table and looked over our shoulders with some advice, but keep it in the back of our heads. The AC gets turned on, so things feel a lot better. We make some copies of the cut outs, so that we can have multiple people working on this.

We eventually decide that maybe we need to spell bold words vertically. There's some odd letters, such as j, that have a very limited set of words in the MSIG that they can correspond to. The meanings of those words don't look useful either. We decide to try forming vertical bold words in the confines of the pyramid so that we don't go crazy.

I start to get close with some words. I have three or four bold words with only one or two bold letters left.... it's so close. I show the rest of the team, and then we get back to work. Soon after, another team member has it! The configuration for the bold words! We look at the other letters... some of them look like actual horizontal words. We start to form words horizontally with the non-bold letters, wrapping across the pyramid as necessary. When we translate the bold words with the MSIG, everything is suddenly legible.

"Now is the turning point. Choose your side logic or randomness. Go to cafeteria such-and-such to finish"

Damn straight! We call up Game Control. We're heading to the last cafeteria! Please tell us that was the last puzzle. Hold on they tell us; which side do you choose? Uh... give us a second.

We discuss it as a team. Some of us like SLACK, the Society of Logic and Cryptic Knowledge. Others support ORD, the Order of Random Discord. SLACK has mind-control lasers that have been what a lot of the story has been revolving around lately.

We agree to decide via a coin toss.

I think at this point, I'd have been disappointed if logic won.

We call again; we're with Discord! Now we have the okay, and we hop in the van and high-tail it across the Microsoft campus to the cafeteria. When we arrive, the valet who gave us our van back is in the center of the cafeteria with his stand. We hear the ending of the story; ORD destroyed the mind control lasers, but not before using them on the two head honchos of Game Control. We're told a conference room number, and are sent on our way to meet our Illuminated Masters.

We pat each other on the back. This has been awesome. The elevator practically takes an eternity. It's about 10:30pm, and we haven't had real sleep since 5:30am the previous day. We arrive at the conference room, and proudly open the door.

Behind the door is Game Control Central. This is where they have been taking calls and keeping track of teams. There's messages on the board, bets, pizza, sodas.

And Game Control gives us a standing ovation. Team Ultraviolet is proud: we completed The Game. Then Game Control breaks it to us:

We're the fourth team to make it. We're all rookies, and we came in fourth (out of something like 12-15 teams). Needless to say, we're thrilled. We hang out for about half an hour, partaking in a little bit of pizza and discussing our favorite puzzles. When the team that had told us about "cafeteria" shows up (who, when we solved the puzzle, we told were wrong, and that is IS part of the puzzle), we decide we're tired, and we're done. We thank Game Control and leave. I was really sleepy before entering that room; but a lot of our energy came flooding back after walking into the ovation.

We do take a look at the valet's script on the way down. The van driver starts to drop people off, and we all agree; this was an outstanding experience, and are thrilled to have worked with each other.

A few weeks later, Game Control held the standings "party" where they went over each puzzle, told stories about making and testing them, and we were able to tell our stories during them. Game Control also reveals the standings (after time penalties for hints, accounting for stopping the clock if we had to wait our turn, etc): Team Ultraviolet tied for third! Wow!

And that was the Microsoft Intern Game. I think that was single-handedly one of the most fun parts of my internship.

Thursday, October 06, 2005

Gone Swimmin'

The address we received at Enumclaw was of a normal looking house in Federal Way. The house was next to a huge lake, and the team members who brought swim suits started to get excited; we knew Game Control would want to get us wet, but this sounded way better than the wet we avoided at the Olympia Fountain.

There's some Illumine signs when we get to the house, directing us around the backyard in a maze-like fashion. This leads us to a small beach with a dock to the lake. Awesome. It turns out we didn't have to follow the maze arrows, but oh well. It looks like there's a small floating island (or something similar) not too far into the lake with some Game Control staff on it. The staff on land explain that we can send as many members as we'd like, but they have to wear life-jackets and water-wings.

Two of our members run back to put on their swim gear, while I take off my shoes and sit on the dock. We're given a sheet of paper with 9 circles on a 3x3 grid, with the words "when put together little bits make big things happen" or something along those lines. Our team starts to swim to the island and are given Starbucks cups.

The lake water is really nice. Not too cold. I really wish I had brought my swim-suit. I did bring a change of clothes, and I'm pretty tempted to just jump in with my clothes on. I end up deciding against it. When they get back, it appears that there's a 3x3 grid of numbers on the outside, and hex numbers on the inside.

After some swimming back and forth, we have a total of nine cups. Each of the 3x3 layouts and hex numbers are different. We collect our materials, and sit at some picnic tables further up on land to start working things out.

At first we think the 3x3 grids might have to form a giant 9x9 grid in a sort of sudoku style layout. We're not sure what the hex numbers mean, but we think this might come to us. After a while, I prove the sudoku idea is literally impossible given the number layouts.

Damn. It's getting later and later, we're tired and losing the energy to go on. We call GC for some hints. We're on the wrong track. We notice something else on our own: that the numbers work such that we can make 9 configurations of a 3x3 grid where say, first the upper left numbers go 1-9, then a second configuration where the upper middle do that, and so on. We try it and look at the hex numbers. Nothing.

We interpret "little bits" to mean "least significant bit(s)" and start ignoring numbers in the middle to try and make meaning, with no luck. More calls to GC. We're close with our ordering of the cups, but not with the hex values. Other teams express similar frustration.

Eventually, one of our more savvy members is able to get an important clue from Game Control, that pretty much gives the puzzle to us. It's lame that it came to that, but as I said, we're losing energy.

We arrange all of the cups so that the "1" corresponds to the cup position. In other words, the upper-left cup has "1" in the upper-left corner, the lower-right has "1" in the lower-right, and so on. Now we look at the first bit on the hex numbers. If it's 0, we remove those cups from the grid. We get something that looks like this.


About now we slap our foreheads. It's a "C." This puzzle is way too complicated for this late in the game. When we were done, we had formed: CAFEXCIII. Cafe 43. A cafeteria on the Microsoft campus. We must be nearly done! We hop in the van and head back to Redmond to finish the Game. I heard earlier that last year there were two or three puzzles back on campus, so I worry we've got a ways to go. The sun is falling and we're out of it. But we have enough energy for at least one more puzzle.

Wednesday, October 05, 2005


The next puzzle is a good distance from Sumner (near Enumclaw. I think it was called the "Hanging Garden State Park," but I'm not sure about that), giving me ample opportunity to nap. When I awoke, we were in a rather forested area nearing our next destination. The GPS showed we were close, and parked vans confirmed our suspicions. Sometimes it's awesome not being in the lead.

We look at the gate; it's the same one on our macaroni masterpiece. Then again, we didn't really have to check. There's one of the obnoxious calling cards from one of the other teams. There's also one of the macaroni boards smashed over the rock. Whatever team did that rocks (it turned out to be Fuchsia). Knowing we're in the right place, we start hiking down the trail.

It's still daylight easily, so we're not worried about this long trail. There's what looks like a couple of forks and what sounds like a river and a shooting range nearby. We wonder if the plot is suddenly going to get really interesting. The path goes on longer, and we start going down hill for a while. The hike is actually pretty fun.

Finally, we see some tables. Okay, no shooting. That's kind of refreshing, given how tired I am. There are three tables set up, and at least one team is already at one. Looking at them, they seem to have a board of wood on the floor and some paper that looks like a puzzle. They block our site, and we talk to one of the staff at the table.

The table has a huge grid of rather large wooden "cards" all face down. We're told to try turning one over. We do so, and it has a fraternal organization symbol on it. Okay, we turn over another. It's another organization. We're now told to turn both back face down.

It's concentration. This seems straight forward. At first we think we'd be really clever to take pictures each time. Ha. Fat chance. We realize after one or two that this approach sucks, and we start brute forcing things.

We finally find a pair. "This'll be a piece of cake," I say. We're told we can turn over a third. We do. It's different. We're given a counter that we can put on any card, and told to turn the cards over after putting it down. We realize there's more than two of each pair. Yikes. However, the card that we put the counter on doesn't turn back over. Odd. We eventually find the third for our pair, and complete the triplet. The three cards are removed. We're handed a small bag with two or three sheets of paper.

It looks like these are part of a larger picture, and we split up. Half of our group grabs one of the spare boards of wood and starts the puzzle half.

My half needs to find three of a kinds. Every time we find a new unique pair, we get a counter to put down. But I'm worried; I don't know if the counters mean the card won't be removed when we find a triplet with it. Eventually we find one, and it turns out the counters are completely beneficial. Nice! As we find each triplet, I hurry to hand our new sheets to our other half.

We reach a point where there's still several cards, but the puzzle is nearly done. It looks like an address... Federal Way, is that a district in Seattle?

My half realize we're beaten, but our other half is still missing at least one bag. The staff member suggests we may want to look at the half our teammates are working on. We ask the proctor if there's another card he can give us, and he gives us the final pieces.

It's a partial address. Somewhere in Federal Way, which turns out to be a city north of Auburn. We look back at our game of concentration.

Well I'll be. The leftover cards form a four digit number. The street address. Huzzah! Refreshed, we hike back up the trail to the van, ready to go on our way. This is another long drive, and a chance for most of us to get a bit more sleep. The sun is still high in the air, but we hope we're nearing the end. It's Sunday, and we technically have work tomorrow.

Monday, October 03, 2005

Two in One

"Officially" the next puzzle I describe was actually two puzzles. I felt like it was a two-parter, so I'm going to describe the whole thing in a single blog post.

Our last answer was "Old Cannery Furniture, Ask for Linda." Old Cannery Furniture is a furniture store in Sumner, where we happen to be, so it's a short drive there. We notice other teams running around when we enter the store, and are thrilled to finally get a positive response when asking for Linda.

Linda hands us copies of a sheet of paper and pens. The paper has a series of questions about various items in the store, with certain letters circled. We know what this'll end up looking like, and we now understand why everyone is running around the store.

Old Cannery Furniture is best described as "Ikea with a soul." The store is HUGE and has all kinds of strange displays and robots a-la some Disneyland attractions. For example, one question involved finding out the Hen's name outside the women's restroom. There were two robotic hens talking outside the restroom, and we had to listen to their conversation. Now imagine 20 or so questions along these lines.

We of course chaotically split up and all looked around. Eventually we met up again combining answers and though we were missing a few, someone knew what the circled letters spelt: "Richard Lionheart"

We ran back to the counter to give our answer. We were rewarded with a picture/frame.

Actually, it was about the size of a large picture frame, except the front was Macaroni art, and the back had some text and a small photograph of a gate. The text had some story behind it, and said when we found the answer, the photo showed the entrance we were looking for.

So we started at the macaroni for a while. It resembled England and Ireland, and the flavor text in the back made mention of England. One of our teammates noticed the interesting pattern the border of the frame had. It was macaroni, but the macaroni orientations changed in a somewhat familiar pattern.

Actually, the macaroni was in groups of 5 with smaller macaroni splitting them up. The up-down orientations turned out to be binary; we were looking at ASCII characters. There was one part that looked strange (9 macaroni long, by this point I assumed GC screwed up and the two shared a common macaroni). When we translated it we got "IN CHEDDAR" or "CHEDDAR IN."

Someone had the bright idea of looking up whether Cheddar, England exists. It does. By this point everyone but me was convinced that we had to destroy the macaroni over Cheddar, but some folks looked inside it and noticed something. When they broke that one piece, there was a small sheet of paper with GPS coordinates. I forget the name of the place we were going, but it was a state park quite some distance away.

We called up Game Control and got confirmation, and went onto the next puzzle. We later found out some groups went ballistic, convinced they had to destroy the puzzle. I think I'm proud of our surgical exactness with it.