Data Structure Halloween Costumes

Posted October 31, 1998 at 9:00 am | 2 Comments

Happy Halloween! Looking for some ideas for a good Halloween costume? You could succumb to tradition and dress up as a ghost or a witch, but you won’t succeed in scaring anyone with a tired old cliché like that. Here’s an idea for a costume that’s truly frightening, particularly if you’re in the company of computer science majors: a data structure.

If you’d like to keep the costume simple, dress up as one of the most basic of data structures: a linked list. In the picture on the right, some friends and I have dressed up as a singly linked list. Each person in the list points to the next person in the list, except of course for Shawn there on the end, who represents NULL.

linked-list.jpg (18768 bytes)

An unordered singly linked list.

Want to get a little more complicated? Try a doubly linked list! In this list, everyone points to the person behind them and the person in front of them. The only exceptions in the picture at right are me, the sentinel, and Shawn, who once again is NULL, much to his disappointment. This linked list is unsorted, but you could also choose to sort your list by age, height, or another criterion.

doublell.jpg (17638 bytes)

An unordered doubly linked list.

Another option is a circularly linked list. The advantage here is that nobody has to be NULL. Another benefit is the ease of insertion. When you arrive at the party, lots of other people will probably want to join in the fun, and if you’re dressed as an ordered singly linked list, this may require a recursive insertion function. In an unsorted circularly linked list, they can be added in anywhere in in the list with a single constant time operation.

circ-ll.jpg (14971 bytes)

A circularly linked list.

If you’re a real CS badass, you and your friends can try dressing up as some variety of tree. The obvious implementation is a basic binary tree, shown at right. Shawn is happy in this picture, because he’s no longer NULL, and is instead the root node. Dan, Jeff, Adam, and Dennis are leaf nodes, and Kevin and I are interior nodes. See if you can guess the sorting criterion.Looking for an even greater challenge? Dress up as a splay tree, adding people one by one. “Wait,” you’ll be thinking at each stage, “which do we need to do here, a zig-zag splay or a zag-zig splay?” If you have enough red and black shirts, dress up as a red-black tree! Keep in mind that you’ll have to swap shirts whenever you’re involved in a tree rotation.

tree.jpg (18915 bytes)

A balanced binary tree.

If you can’t get anyone to dress up as a data structure with you, you can always go to the Halloween party as a NULL pointer. Just put your arms inside your shirt (since you’re not pointing anywhere) and look lonely.

null-pointer.jpg (14447 bytes)

Dan dressed as a NULL pointer.

Razor Comparison

Posted October 28, 1998 at 9:00 am | No Comments

Last weekend I ran out of razor blades, so I didn’t shave for a few days.   The interesting thing is that my facial hair is really red.  It’s the same with my dad — back when he had a beard, it was very red.  Kind of unusual considering that my normal hair is dark brown.  I actually briefly considered growing a beard; maybe I could have gotten everybody to call me “Redbeard”, or even (as Ethan proposed) “Redbeard the Hacker”.

Then I decided that a beard would just look stupid.  So instead of growing a beard I went out and bought a fancy new razor.  It’s a Gillette Mach 3.  Have you seen the commercials for those?   There’s this guy in some cool jet, and he keeps going faster and faster.  When he hits mach 1 the announcer yells “Mach 1!” and there’s a huge sonic boom and the plane starts coming apart.  By the time he reaches mach 2 the plane has almost completely come apart and it’s pretty much just him rocketing through the sky.  Then you hear another sonic boom and even his clothes are falling off now and the announcer shouts “Mach 3!”  I guess that the razor is so powerful that even clothes cannot withstand its sheer might.

mach3-2.jpg (11884 bytes) You have to give the designers at Gillette some credit though, because the Mach 3 definitely has a rockin’ design.  Just check out those three shining blades, the flexible  swerving head, the blue indicator strip, all of those sleek rubber rib grips… This is the razor they’ll be taking on the next NASA mission.

The question is, is it really worth it? Besides the aesthetic appeal, does the Mach 3 offer any concrete advantages to back up all of the marketing hype? I decided to find out.

This morning, when I stepped out of the shower, I removed not one but two razors from the medicine cabinet: my new Gillette Mach 3, and an older, far less stylish Bic Tough Beard Twin Select.  I then proceeded to shave, using the Mach three on the right side of my face, and the Bic Twin Select on the left side.


Bic Tough Beard Twin Select

Gillette Mach 3


bic-2.jpg (16632 bytes)

mach3-1.jpg (12856 bytes)

Price $0.00 (free sample) $6.52 plus tax
Blades Per Razor 2 3
DLC Comfort Edges No Yes
Blade Design
No Yes
Lubricating Strip
No Yes
Open Cartridge Architecture
for Easy Rinsing
No Yes
Contour Grip
for Better Handling
No Yes

beforeshave.jpg (13237 bytes)

Before shaving.

aftershave.jpg (12781 bytes)

After Shaving.

shave-bic.jpg (15101 bytes)

Shaved with the Bic Tough Beard Twin Select.

shave-mach3.jpg (14279 bytes)

Shaved with the Gillette Mach 3.

In conclusion (since the above pictures don’t really reveal anything at all) I’d like to say that you get just about as good a shave with a cheap razor, but it takes more passes and isn’t as comfortable.  It’s also the case that the Mach 3 is damn cool.   So if you can afford the seven dollars, maybe it’s worth it.

Answering Machine Message

Posted October 26, 1998 at 9:00 am | No Comments

This is the kind of answering machine message that you’d probably only hear at Carnegie Mellon University.

Don’t worry mom, it’s not what you think.

If you’re having trouble listening to the message, you probably need to download Real Audio Player.

Monzi vs. Monzy Update

Posted October 25, 1998 at 9:00 am | No Comments

Robert Monzi’s web site has been down for almost a week now.  I wonder if I drove him off of the web or something.  If you don’t have any idea what I’m talking about, you need to look at my October 8th update.  It’s possible that Robert just decided to move, or that he wasn’t selling enough of his naked pictures to make a profit so he decided to bail out.  In any case, it’s kind of unfortunate, because without his pictures for comparison my survey page just isn’t very funny.  Luckily, it’s almost the end of the month, so there’ll be a new survey soon.  Any survey suggestions?  Drop me a line.

Wesley Willis

Posted October 24, 1998 at 9:00 am | 3 Comments

When you’re listening to the radio, do you ever stop to think about how few songs are played by obese schizophrenic black musicians from the streets of Chicago?  I know that I think about this all of the time. The airwaves are cluttered with alternative rock, rap, and R&B; meanwhile, the “obese schizophrenic” musical genre is severely underrepresented.  That’s why everyone should start calling their local radio station and requesting songs by Wesley Willis.

Wesley Willis is 6 foot 5, weighs between 300 and 350 pounds, and likes to greet people with a headbutt.  Shortly after he made his first album, he was diagnosed with chronic paranoid schizophrenia, and he now claims to have “schizophrenia demons” in his head that take him off of his “harmony joy rides” to put him on “torture hell rides”. willis.jpg (7687 bytes)

Wesley Willis,
Mozart of the

twentieth century.

Never heard of Willis before? Until recently, no one had. He lived on the streets of Chicago, homeless, selling his city landscape line drawings and playing music on his late 80’s Casio keyboard from K-Mart. After saving for a while, he pulled together the money to cut a few albums, and suddenly his musical career took off. Willis was “discovered”, and is now an artist under Dino Paredes and the major record label American Recordings. He has released at least 20 albums as a solo artist and with his punk rock band, the Wesley Willis Fiasco, and has over 400 songs in circulation.

You might think that fame and riches would have spoiled Willis, but this isn’t the case at all. The background music in nearly all of his songs is still provided by the same demos on his Casio keyboard. You may find it rather lazy of him to use the keyboard’s built-in music, but this isn’t the case either — Willis makes sure to press the “fill-in” button at regular intervals. Besides, the focus of Willis’ compositions is not on the cheesy synth music, but on the lyrics. Just so that you can get an idea of Willis’ lyrical genius, let’s take a look at the words to one of his most popular songs, “Alanis Morissette”:

You are a rockin’ maniac.
You are a singin’ hyena.
You are a rock star in Jesus’ name.
You can really rock Sadam Hussein’s ass.
You are so lovable to me in the long run.

wescover.gif (20236 bytes)

Fabian Road Warrior,
Wesley’s latest album.

Willis’ music has to be heard to be believed. That’s why I suggest you immediately visit this page at CD-Now, where you can listen to samples from many of his best songs, including “I Whupped Batman’s Ass”, “The Chicken Cow”, “Rock and Roll McDonald’s”, and “I’m Sorry That I Got Fat”. If you’d like to hear more, you should purchase his latest album, Fabian Road Warrior — it contains “Alanis Morissette” as well as 23 other original compositions including the hit songs “Suck a Cheetah’s Dick”, “Suck a Pitbull’s Dick”, and “Suck a Donkey’s Bootyhole”.

Pick-Up Line Responses

Posted October 22, 1998 at 9:00 am | No Comments

I must say that I’m a little bit disappointed at how few responses there were to my October 13th update, in which I suggested engaging in a collaborate effort to create a rated catalogue of pick-up lines.   So far, I’ve only received one submission:

Pick-Up Line

Success Rating

“Hold still.”



Posted October 21, 1998 at 9:00 am | No Comments

At the lab where I work we have a bunch of I-Glasses.  They’re these little stereo goggles manufactured by Virtual I/O that you hook up to a video source through RCA input jacks.  You can use them to create “augmented reality” type simulations, or connect them to your VCR or DVD player to watch special 3-D movies.

hackerglasses.jpg (18694 bytes)

You’d think that a head-mounted display device
would draw lots of attention, but this doesn’t
seem to be the case in Wean Hall 5203.

Ethan and I borrowed a pair to try out in the Wean Hall computer cluster.  We hooked the VGA out on one of the Sun Ultras to a scan converter, and then plugged in the I-Glasses.  The result, as you can see, is the ability to “hack” in a private display environment.  The I-Glasses have a special “transmissive optics” design so that solid blue signals appear transparent on the display.  This means that if you make the background in your text window blue, you’ll see your real-world environment overlaid with the computer text.   This could be really useful — if you were to carry a laptop in your backpack and strap a keyboard to your chest, you could work on your code while walking around outside!   Imagine going for a jog in Schenley Park and completing your 15-212 assignment at the same time.  The challenge is learning how to touch-type on a keyboard attached to your body.

The Wave

Posted October 19, 1998 at 9:00 am | 1 Comment

Yesterday we were discussing the homecoming football game against the University of Chicago when Adam had a great idea.   At football games, it’s common for fans to do the “wave”, right?   Well, what do you do if the fans who are cheering for the other team start doing the wave?  Simple.  You and your friends start another wave of the same amplitude and period, but out of phase by one half cycle.  This results in maximum destructive interference between the two waves, and the opposing fans’ wave is rapidly nullified.

That started us thinking a bit more about the wave.  Have you ever noticed that the wave always has only one pulse?  Fans start the wave and then wait for it to come all of the way around the stadium before standing up again.  Why don’t they ever create a series of pulses, so that two or three waves are traveling around the stadium at the same time?  If the pulses were timed correctly, the fans could even create a standing wave, so that everyone stood in place and moved up and down constantly.   Although I suppose that it wouldn’t technically fit the definition of a standing wave, since no reflection or interference would be occurring.  The distance between the nodes would depend on how fast the fans could stand up and sit down.

Brendan’s theory is that the wave can be compared to a damped linear oscillator.   It’s strong at first, but then dies out gradually as the fans lose their enthusiasm.  Since the enthusiasm of the fans is more or less proportional to the amount of beer they’ve consumed, it’s actually possible to calculate the coefficient or damping given the price of beer.  Once you’ve figured out the relation between beer prices and the damping coefficient, just solve the system of simultaneous differential equations and you can predict approximately how long the wave will last.  Next time you go to a football game, don’t forget your scientific calculator.

Drive-Through Fun

Posted October 17, 1998 at 9:00 am | No Comments

For some reason, I find drive-though restaurants fascinating.  I think that my fascination began when my family was driving through Indiana and we saw a sign advertising “Drive-Thru Daiquiris!”  Or perhaps it was the time that I tried to go through the Dairy Queen drive-through on my bicycle.  This was one of those old school drive-throughs that had a thick black cable extending across the road.  The restaurant employee was notified of the presence of an automobile when the automobile ran over the cable.  I tried running over the cable on my bicycle, but received no response.  I think that my bicycle wasn’t heavy enough to trigger the sensor inside the cable.  So I stepped off of the bicycle and started jumping up and down on the cable, stomping on it repeatedly.  A few seconds later, I heard a voice from the speaker shouting “WHAT?” in a very annoyed tone.  My repeated stomping must have been setting the alarm off over and over again.

Drive-throughs can be an endless source of amusement, particularly at 3:00 AM when nothing else is open.  Here are some games that you can play at to liven up your experience at the drive-through and to keep things interesting for the people who work there.

  • Loopity-Loop
    This game really only works late at night, when there aren’t any other cars trying to go through the drive-through.  Drive up to the window and order a small fries.  Pay for them and pick them up.  Then, as soon as you drive out the exit, drive back into the entrance.  Order a small fries.  Pay for them, pick them up, drive out, and drive back in.  Order a small fries.  Repeat endlessly.

    The employees might not notice the second time.  The third time they’ll realize that three cars in a row have ordered a small fries.  The fourth time they’ll notice that the car looks the same too.  By the fifth time they’ll be checking the license plate.   Pretty soon they’ll start to laugh, or ask you why you didn’t just order a large fries.  They might also say: “Did you know that that you can order more than one thing at a time?”  Pay no attention to them.

  • Invalid Menu Items
    In this game, you try to order things that aren’t on the menu.  Here’s an example:
    Drive-Through Employee: Welcome to Burger King, can I take your order?
    You: Yeah, give me a Big Mac please.
    Employee: I’m sorry, sir, but this is Burger King.  We don’t sell Big Macs.   May I suggest the Whopper?
    You: Naw, I don’t think I want that.  I guess I’ll take a Monster Burger instead.
    Employee: Um, sir, I believe you’re thinking of Wendy’s.  We don’t offer the Monster Burger here.  Would you like a cheeseburger, perhaps?
    You: No, not really.  If you don’t have Monster Burgers, I’ll have a chicken Gordita.
    Employee: No, we don’t have those either.  This is Burger King.
    You: Jeez.  How about a pepperoni pizza?  Can you give me that?
  • Free Items
    Many drive-though restaurants offer certain items for free with each order.  The challenge of this game is to get as many of these free items as possible without actually ordering any food.  For example:
    Drive-Through Employee: Are you ready to order?
    You: Yes, I would like some sweet and sour sauce please.
    Employee: Sweet and sour sauce?
    You: Yeah.
    Employee: JUST sweet and sour sauce.
    You: Right, just some sauce.
    Employee: Don’t you want anything else?
    You: Actually, yeah.  Could I get a cup of water?  Also I’d like three straws and five napkins.  And some of those little ketchup packets.

    WARNING: This game has been known to backfire, as evidenced by the following transcription of my experience at Arby’s.

    Me: I’d like some cherry dipping sauce please.
    Drive-Through Employee: That sauce goes with the chicken fingers.
    Me: Oh.  Well actually I just want the cherry dipping sauce.  No chicken fingers.
    Employee: But it’s a dipping sauce.  It only comes with the chicken fingers.
    Me: You have a big sign out front proclaiming “try our new cherry dipping sauce!”  I just wanted to try it, you know?
    Employee: Yes, but it’s assumed that you’ll try it by purchasing some chicken fingers.
    Me: Can’t I just have a packet of sauce?
    Employee: Hold on, let me ask the manager.
    Me: OK.
    Employee (after a long pause): Your total is 27 cents.  Please pull ahead to the second window.

  • Bartering
    Our society’s market system has all but eliminated bartering from day-to-day transactions.  Try to bring it back at the drive-through!

    Drive-Through Employee: Your order totals to $3.79.  Please pull up to the window.
    You: What?  $3.79?  For a chicken salad?
    Employee: Right.  $3.79.  Please pull ahead.
    You: That’s ridiculous.  I’ll give you two bucks for it.
    Employee: But your total comes to $3.79.
    You: And I say that I refuse to pay more than $2.50 for a crappy chicken salad.
    Employee: Perhaps you should have considered that before you ordered it.
    You: All right, three dollars, but that’s my last offer.

  • Radio Fun
    I’ve never done this before, but Adam Berson claims that if you set your CB radio to the right channels, you can actually intercept the messages sent back and forth from that speaker and microphone next to the drive-though menu!  You can also transmit messages at the same frequency.  Apparently there’s one frequency on which the employees and the customers communicate and another frequency that’s just used by employees and isn’t heard by customers.  Unfortunately, there’s no frequency that’s only heard by customers and not employees, but this configuration still offers endless possibilities for mischief.   Here’s an example.

    Customer: I’d like a bacon quarter pounder and a small Sprite.
    Drive-Through Employee: I’m sorry, sir, but we’re all out of rolls.
    Customer: Oh.  I’ll have a chicken sandwich instead then.
    You (hiding in the parking lot with a CB radio): Listen, you stupid fuck — we’re OUT OF ROLLS!  That means NO SANDWICHES!  Get that though your thick skull you MORON!
    Customer: Well, I’m not coming here again if you’re going to have that kind of attitude with your customers.
    Employee: But that wasn’t me who said that!  I swear!
    Customer: That’s strange.  Do you think someone is tapping in?
    Employee: I guess it must be.
    You (on the channel only heard by employees): Give me 108 chicken nuggets please.   And a small Sprite.
    Employee: Hmm.  I guess that would be nine 12-piece nugget orders.  Or would you prefer twelve 9-piece orders?
    Customer: What the hell are you talking about?


Posted October 15, 1998 at 9:00 am | No Comments
Every April during Spring Carnival, the Carnegie Mellon School of Computer Science invites undergraduates and other members of the Carnegie Mellon community to participate in the annual “Mobot Slalom Race”.  Participants build and race mobile autonomous robotic vehicles (“MObile roBOTs”) along a slalom-type course on the paved walk in front of Wean Hall.  The course consists of a series of gates connected by a wavy, painted stripe. Vehicles are judged on their ability to navigate sequentially through the gates. mobot_logo3.gif (6087 bytes)

The Fifth Annual Mobot Slalom Race
will be held on April 16, 1999.

This year I decided to enter the competition, and for the last few days I’ve been hard at work building, testing, and revising my mobot.  I could post some photos here, I don’t want to give away all of my “trade secrets”.  Instead, I’d like to share with you a design for a “next-generation” mobot that I believe I’ll be building next year, once I’ve gained a foothold into the mobot arena with my current design.

mobot1.gif (7079 bytes)

The Hoverbot 5000,
a next-generation mobot.

The secret behind this mobot is its hovering capability.  Since it always stays a few inches above the ground, it won’t run into problems when it encounters bumps, cracks, hills, or debris.The mobot has bottom thrusters for lift and side thrusters to navigate in multiple directions.

mobot2.gif (6426 bytes)

Phase I: Deployment of
slave probe squadron.

The first thing that the mobot does is deploy a small fleet of probe droids.  The probes are launched in many directions with powerful rocket engines.  The probes contain digital cameras, image processing circuitry, differential GPS position tracking units, inclinometers, and radio transmitters.
mobot3.gif (12611 bytes)

Phase II: Data collection
and transmission.

Once the probes reach a sufficient height, they take a series of digital photographs from different angles.  Along with each photograph, altitude and angle information are measured and stored.Once enough data has been collected, information is sorted and transmitted back to the mobot “mothership” via a radio signal.  The probe rocket then self-destructs in a fiery ball of flame.
mobot4.gif (5603 bytes)

Phase III: Data processing.

The powerful central computer on the mobot mothership analyses the vast collection of data received from the probe droids.  It then uses image processing algorithms and statistical modeling techniques to generate a complex map of the course layout, accurate to the finest detail.
mobot5.gif (5220 bytes)

Phase IV: Course navigation.

Naturally, once the map is generated, the mobot has no problem using it to navigate through the course rapidly and with extreme accuracy.  Victory is virtually guaranteed.
Next Page »

Powered by WordPress with Pool theme design by Borja Fernandez.
Entries and comments feeds.