jacob andreas [.net]

GC Bug R,ant

October 31, 2006

Shah B. and I have spent the last 3 weeks trying to resolve a segfault in our hex module. We’d been through it line by line, reduced the size of the game to deal with any memory errors and confirmed the validity of our initial hash. Clearly, the bug wasn’t in our code. After long discussions with the team leads and a final appeal to Dan, we were still unable to discover the source of the mysterious segmentation fault.

I came home after school today to do one final sweep of the code to look for the error. A couple passes with GDB modifying various little things turned up nothing, and I finally decided to recheck the hash setup.

To my horror, I discovered a single missing comma at the end of our pieces array in generic_hash_init.

3 weeks. Because of a comma.

GAAAAAHHHHHH!

Thinking about the loss of productivity makes me slightly nauseous, but I guess the whole situation’s pretty funny, or at least will be in retrospect.

Still, just one comma!

Berkeley…

October 16, 2006

I just discovered this in the spec for a project we’re doing later in the semester:

Acknowledgement: This assignment is loosely based on an MIT homework assignment in their version of this course. But since this is Berkeley we’ve changed it to be politically correct; instead of killing each other, the characters go around eating gourmet food all the time. N.B: Unless you are a diehard yuppie you may feel that eating gourmet food does not express appropriate sensitivity to the plight of the homeless. But it’s a start.

No place like it.

Rethinking the Window

October 15, 2006

Litestep is probably one of my favorite Windows apps. As a litestep developer (the word “programmer” doesn’t seem right here) I do a lot of thinking about efficiency; ways of making desktop environments that are more fluid and intuitive than the one that comes with Windows. At the same time, coding litestep themes makes me painfully aware of the things I can’t control.

In lecture, a couple of weeks ago, Prof. Harvey showed a video of Alan Kay discussing UI design. It’s an excellent video that discusses a number of major breakthroughs in human-computer interaction. At one point, he starts going over the capabilities of the infant Smalltalk environment. One of the things that gets him most excited is the ability to create and manipulate windows. It was a revolutionary idea at the time, and one that has stayed with us to this day. But why?

Obviously, an idea doesn’t stick around this long without having some merit. The metaphor of programs as little, self-contained boxes full of content is a powerful one. In a threaded, multitasking environment, it’s convenient to have everything on the screen at once. It’s also critical to be able to compare and transfer content across applications and windows, and compare things side-by-side. Windows are friendly and understandable.

But can we do better?

In spite of the massive plasma displays they’re turning out nowadays, screen space is a real concern. Ideally, we would be able to use 100% of the screen to display our content, with no “dead space” (Figure 1). Maximized windows can do a perfectly acceptable job of this.

Figure 1
Figure 1

The difficulty starts to arise when there are multiple applications that need to be viewed and interacted with simultaneously. I remember one incident when I had to make nametags based on information contained in a spreadsheet. It involved a constant “type ALT+TAB look ALT+TAB type ALT+TAB”, and I was pissed off the entire time. If I had been thinking clearly, I would have taken the time to resize the two windows to fill the entire screen (Figure 2) and hopefully fit all of the information I needed. Instead, it ended up looking a lot more like Figure 3.

Figure 2
Figure 2

Figure 3
Figure 3

Indeed, Figure 3 is the archetypal “windowed environment” set up. One active window and one control mechanism (in green) and a whole lot of dead space (red). This is bad for two reasons.

  1. Obviously, it wastes space. What good is your expensive new monitor if all you do is look at the picture on your desktop?
  2. It wastes memory. Depending on the application, your machine may be putting a lot of effort into drawing a window that you’re not interested in.

It’s important to note at this point that you can make windows efficient – just like Figure 2 with the name tag example. The problem is that the window concept is not conducive to efficient use of space. Moving and resizing windows is a (relatively speaking) time-consuming process. What is necessary is a system that encourages and facilitates efficiency.

The way I always envisioned my ideal environment was one covered with a set of “frames”. These could be divided up by simply drawing or erasing lines on the screen. Applications would “project” their contents onto the frames created. A taskbar-style list of running apps would sit off to one side, and it just takes dragging applications off the bar and onto screens to show them where to display (Figure 4).

Figure 4
Figure 4

I thought I was the first person to come up with this idea until I discovered Emacs. Emacs uses a similar concept: “windows” display the contents of selected buffers, while other buffers reside elsewhere waiting to be displayed. While Emacs is a command-line app, the concept is basically the same, and I’m surprised it hasn’t been continued.

So what does it take to make this new setup a reality? Obviously, neither Windows nor Mac is about to risk a major interface change anytime soon, but a tweaked-out window manager for Linux might just do the trick. Time to start coding….

ATT: Paul Marthers, Dean of Admission

October 13, 2006

A couple of days ago, I received a package in the mail. It contained a letter, as well as an attractive, glossy foldout with the name “Reed College” on the front. Rather than the normal stack of papers about financial aid and student housing, this pamphlet listed a series of websites such as the Encyclopaedia Britainnica and collegeboard.com. On the back was a copy of the periodic table of elements. Intrigued, I decided to read the letter:

Dear Jacob,
Do you ever feel peer pressure to hide your brainpower?

This is weird…I don’t recall asking anyone to mail them my transcripts.

Is it okay to read a lot, ask a lot of questions, and show that you care about learning — or is that sort of going against the flow?

Funny you should mention it; our school isn’t to big on the success/graduation thing. I’ve been doing a lot of studying by candlelight, locked in my closet.

At Reed College, it’s not just okay to be smart and care about learning – it’s central. Passion for learning is at the core of the Reed universe: it’s what defines and unites our students.

Ahh… a college focused on learning I wish I’d known about those things before.

As you can tell from your mailbox, colleges and universities around the country — Reed included — are already vying for your attention, proclaiming their offerings. Yet as you sort through the myriad college possibilites, don’t lose sight of what you want.

Interesting…actually, my mailbox is empty. It appears I have no future. Then again, I haven’t given my mailing address to anybody.

Stalkers.

Reed students learn and live in a community of collaborative exploration. At Reed you will be challenged, surprised, rewarded, and challenged again. When you graduate, you will be ready for anything — any career, any calling, any adventure — you find in your future.

“At Reed you will be challenged, surprised, rewarded….” Sounds suspiciously like operant conditioning to me. At any rate, I’ve always secretly dreamed of going into musical theater — looks like Reed is just the place to prepare.

We’ll even help you get ready. Enclosed is a list of reference sites on the web that may help you with many of your school projects. You will also find links to all these sites at academiclinks.reed.edu. You may not click your way to knowing it all — but you might click your way closer.

This explains the mishmash of urls and the periodic table included. I’ve always wanted to read the encyclopedia.

To get more information about Reed, log on to web.reed.edu/apply, talk to Reed students, or visit the campus. If Reed is right for you, you’ll know it.
I wish you the best in your college search.

That’s the best you can do? You’re not sure you even want me at your school? I don’t quite understand what the point of all this was – all the information’s online, and “If Reed is right for me” I’ll know it anyway.

On the other hand, maybe I’m being too harsh. My mother informs me that the nice boy across the street went to Reed and is doing very well.

I guess I’ll just have to stay tuned and wait to see if any other colleges start “vying for my attention.” Maybe there’s an “unsubscribe” button somewhere.

This college thing is going to take a lot of getting used to.

Yo – Semite!

October 9, 2006

Just came back from an incredible weekend in Yosemite. It’s hard to believe we have such a beautiful park practically in our backyard – I definitely need to see about getting the troop out there more often. The view from Half Dome is unbelievable, and I had a hard time wrapping my mind around the fact that I was standing over several thousand feet of empty space at the edge. Of course, my camera started dying at the beginning of the hike, but I managed to get some good photos in anyway. John was right – we need to do the John Muir trail sometime soon.
And I can’t think of a better way to spend Sukkot than sleeping in a tent in Yosemite.

‘(hello, world)

October 7, 2006

I finally decided that I like blogging after all (in spite of having nothing to talk about), so I’ve moved over to Wordpress and started over.

Just finished churning out all of my 61a homework yesterday, and finished that project. As usual, foiled by the bureaucracy – I still haven’t been able to get a copy of eXceed, after everything I went through to get an id.

There is no compassion for concurrent enrollment students. I weep.

fine print

All content in public domain unless otherwise specified. Powered by prgmr, FreeDNS, Wordpress and vim.