Archive for the 'Computer Science' Category

Tonight’s procrastination reading list.

I've got a midterm tomorrow morning, so obviously I had some reading to do tonight. Here's the list:

And that's in addition to all the time I spent playing with Linkstew's random taglines.

I also played around with the idea of making a new sidebar item that's just a list of articles I've read recently, without any commentary. I don't typically like posting links, because I always end up feeling like I should say something more about them. Since any post requires a title, I always feel like a puny little link would be dwarfed by the other interface elements on the page. So that might happen, but obviously not tonight. I've got "studying" to do.

Irony, served fresh wirelessly!

So I'm sitting in CS 160 right now, and 6 people in front of me (out of about 30) are using laptops right now. In particular, these are laptops that are issued to us for a minimal deposit, for use in CS 160. And important to this story, these laptops comes with wireless cards.

So it's true that these laptops are being used "in CS 160," and I suppose that's good. But what's bad is what the people in front of me are using them for. Here's the rundown:

  1. The girl in front of me is the only one who seems to have lecture notes open. Even better, she actually looked at the CS 160 newsgroup at one point. However, she's also on IM, and she's written at least two emails. All things considered, a 9/10.
  2. The guy over by the wall to my right is browsing around some forum or another. He is also using IM.
  3. A guy at the front right of the class is browsing around Amazon, and is also using IM.
  4. A guy over at the left is looking at what looks like car manufacturer sites. Oh, and he's using IM.
  5. Another guy over at the left is just using IM.
  6. And the girl to my left has the dubious distinction of being the only one not using IM. Dubious because she's busy apparently planning a trip. Right now she's buying plane tickets, and earlier she was looking up restaurants and entertainment sites.

If I had my camera with me, I'd do something like Berkeleysucks.com's annoying people in class series, but I reckon that'd be even more disruptive and annoying than all the laptops put together.

What? Who, me? I'm just blogging. But it's not like I'm using a class laptop or anything -- I'm just using my trusty PowerBook! And the only reason I got my PowerBook out in the first place was so that I could experience the irony of writing this entry.

And for the record, I'm not on IM.

Entertainment provided by My 172 Instructor and The Class

Check it out: It's 12:30 am, and I just got home after leaving my apartment at 9:30 this morning. Accordingly, here's another quote from my 172 instructor. AKA, lazy content.

    "Do you think the class of context free languages is the same as the class of context free languages?" my instructor asked.

    "Uh, did you mean you the class of regular languages?" a student queried uncertainly.

    "What did I say?" my instructor asked, his brow furrowed. There were some murmurs in response from the class.

    "Oh... well, I was starting out with an easy question, and of course the answer to that one is yes. So do you think the class of context free languages is the same as the class of Regular languages?" he said, saving the situation fairly well. There were more murmurs from the class.

    "No, they're not the same, because otherwise they'd have the same name." he concluded.

And if you were wondering, I still don't know his name.

Incidentally, during class today, I got to thinking that The Class would be an amusing name for a backup band. You know, like Tom Petty and the Heartbreakers. Huey Lewis and The News. Nick Cave and the Bad Seeds. You know, something like... Brian Harvey and The Class.

But I digress. A little while later in the lecture, we were treated to this ironic follow-up quote:

    "It's good when the class is more on the ball on the professor."
    -- my 172 instructor again

No comment.

Perl vs. Excel, Round 1, Fight!

I was working with a bunch of Excel data this weekend for my CS project, and at some point I decided I wanted to transpose a table of data. You know, swap the rows and the columns? Simple, right?

Well, I tried searching Excel help, and had no luck. A quick google search didn't immediately yield the answer. And I asked my CS partners, but they also had no clue. A few of them even asked other people they knew in the lab, and still no luck.

For a bunch of CS majors, I was amazed by how little they all knew about Excel. Hell, that I was the one manning Excel in my group (because I knew the most about it) kinda says a lot by itself. I mean, I can get around in Excel, but I wouldn't dare list Excel on my resume. I know how complicated that sucker is, and I know that I can barely scratch the surface.

So I shrugged and decided I was going to write a perl script to transpose colon-delimited data that I could export from Excel. Perl is, afterall, my swiss-army chainsaw. What's the point of having a chainsaw if you're not going to use it? And besides, I figured it wouldn't take me more than 5 minutes to write, and I'd already spent at least that long trying to figure out how to do it with Excel.

But before I started, I had to go to the bathroom. And when I got back, one of my partners had found the "Paste Special" option, which, among a bunch of other handy features, includes a "Transpose" option. So much for showing off my perl-fu.

Examples in mirror are closer than they appear.

Today in CS 172, the instructor kinda botched one of his examples. But it turned out alright in the end, because his segue managed to distract everyone.

    "Okay, so let's move away from this example as quickly as possible."
    -- uh, my 172 instructor...

In other news, I just realized that I don't remember the name of my 172 instructor. I'll look it up later. Maybe.

It seemed more appropriate.

Today I renamed my work notebook from "triage" to "bsii's virtual memory," because it's where I put things I can't think about immediately.

Pity I’m not studying for a CogSci final.

State Dependent Learning is a pretty well studied phenomena. But in addition to the effects of chemical states and moods described on the linked page, evidence has also been found that a person who studies in the same environment in which he or she is tested will perform better.

So here I am studying for this final and thinking about State Dependent Learning (which has nothing to do with network protocols, I assure you). I'm wired on caffeine right now, but that's not a problem, because I'll be equally wired on caffeine while I'm taking the test. Hell, I'll probably be consuming caffeine while taking the test. I figure I'm not going to be able to take the test in my bedroom, so I'm not going to be able to do anything about the location factor.

But what I'm really pondering is Music. Of course I've been listening to music while studying, but I certainly won't be able to listen to music while taking my final. Instead, when I'm taking tests, I always have some song or another that I hum to myself. Obviously, to be maximally effective, it should be a song I listened to a lot while studying.

So let's see what I've been listening to today:

  • Amon Tobin - Bricolage
  • Amon Tobin - Permutation
  • Amon Tobin - Supermodified
  • Lamb - Lamb
  • Moby - Play
  • Moby - Play: The B-Sides
  • Moby - 18
  • Radiohead - OK Computer
  • Radiohead - The Bends
  • Radiohead - Kid A
  • Radiohead - Amnesiac

Most of these are conducive to my studying because they either have no lyrics or I can easily ignore the lyrics. In contrast, I cannot study to TMBG no matter how much I love them, simply because I get distracted by unignorable lyrics.

Heck, the song I had stuck in my head during Monday's final was Packt Like Sardines in a Crushd Tin Box off of Amnesiac, so I should be in good shape to focus on a song I've been studying to during the final tomorrow.

Assuming, of course, I actually study instead of writing about studying.

I know there have been studies of the effect of music on learning, but I don't have time to look them up right now and see if they thought to investigate state dependent learning effects as part of those experiments. Did they test the performance of the subjects with and without music? Did they poll the subjects to see if they were thought about the music they studied to while they were being tested? These would all be interesting questions to know the answers to, and seem extremely important to any study of the effects of music on learning.

Stick a fork in my NACHOS.

Ugh, and I thought my last CS project was bad... Well, at least now I can say that I've implemented a network transport layer.

"That last submission passed 19/24 tests, and since that submission we've fixed these 3 problems. At this point, I'm so sick of this project that passing 22/24 tests sounds pretty fantastic to me." I said. "Let's submit this and go home."

And with that, I parted ways with the CS group that I spent an immeasurable amount of time with this semester. There were no pats on the back. There was no celebration. There were just four cranky students, each going their separate ways.

And now that I've finally got NACHOS out of my hair, I can actually start studying for my finals. Well, maybe tomorrow...

g6u meexnetcsed

The following is completely correct output from my last CS project. If this is correct output, just imagine what incorrect output must have looked like.

    nachos% execalot
    execalot
    pi2d  a3r geuxmeecnetds
    
    arg 0: child a
    2p iadr g4u meexnaetrcsge
     d1
    : child a
    arg 0: child b
    pid 5 execed
    2 arguments
    arg 1: child b
    arg 0: chil2dp  iacdr
     g6u meexnetcse
    d
    aarrgg  01::  cchhiilldd  dc
    
    2 arguments
    pid 7 execed
    arg 1: child d
    arg 0: child e
    
    [2] Donea r(g0 )1
    : chnialcdh oes
    %
    

If you're wondering what the hell is going on here, it's five copies of the same program all running simultaneously, so their output is being interleaved. The project was the system that's capable of running multiple programs at the same time, along with a bunch of other low level guts of the "operating system".

Debugging this thing gave me one of the biggest school-induced headaches I've ever had. And in the end, though our system was behaving correctly, it was still running too slowly and so we weren't passing all of the test cases.

Well, at least now I know where Aphex Twin got the names of the songs on Drukqs.