failing like never before

7Nov/080

Keeping It Clean

Ernest Hemingway once said, "I write one page of masterpiece to ninety one pages of shit...I try to put the shit in the wastebasket." And just like writers, programmers also manage to produce quite a bit of shit. Of course, most programmers are perfectly capable of recognizing when they've created an inelegant function, but because of time restraints and deadlines, they just keep on going. But students that are still learning to program, often have trouble recognizing when code is in desperate need of deletion.

A university-level programming class usually requires students to spend a great deal of time working on projects and homework. So its quite easy, after hours of coding, to become emotionally attached to one's code. Generally, a student programmer will make a mistake in a function or block of code, and so they'll add in a quick little fix. Eventually, after numerous little fixes, their function starts to become a giant, awkward, lumbering behemoth that is still wrong.

The most obvious choice is to simply, as Hemingway so succinctly said, "put the shit in the wastebasket" and start from the beginning. But the student has managed, after hours of labor, to become extremely attached to their hundred lines of awkward code and just can't manage to throw away the terrible result of all their hard labor. I say this because when I was learning to program, I often found myself becoming too attached to my code. On one particular occasion, I spent two days patching up the code for my self-balancing AVL binary tree, which was frankly, a piece of shit. Eventually, I threw my AVL tree class in the garbage, started again from scratch, and recreated a working tree class in a few hours.  If I had only been a little more emotionally detached, I might have realized how stupid I was acting.

In order to keep code clean and effective, student programmers need to learn to stop falling in love with their misshapen code-children; code cannot love you back, so don't waste your time developing emotions for it. Just keep it clean kids, and save the loving for another time.

4Nov/080

Making Good Time

I thought I was pretty cool, riding my bike to and forth from class. Instead of the normal fifteen to twenty minutes that it would take me to walk from my room to class, I can now bike to class in about five minutes, even less if I don't have to slow down when people cross the street. It takes a little bit longer to get to my room since its all up hill going back, but I can still make good time. The only down side is that I get pretty sweaty, especially coming back to my room. (I don't have a road bike, or even a lightweight hybrid: I've got an old chromoly Trek 820 mountain bike with 1.95 inch tires, so its a lot harder for me to reach the same speeds as a racing bike.)

The fact of the matter is, I always thought I was pretty cool, racing cars (and sometimes beating them!) to class. But I saw the most amazing thing as I was picking up my bike to head back to my room last week: a segway locked up at the bike rack. So I took a picture, for my blog.

I actually saw the guy, riding his scooter up the hill a few days ago. I was sweating up the hill and he was crusing along, cool as a cucumber, talking on his cell phone the whole time.

Tagged as: , , No Comments
4Nov/080

Election Day

Come on, all you lazy Americans! Todays the presidential elections, and as much as you hate it, its your civic duty to vote. Even I'm voting!

Tagged as: No Comments
29Oct/080

Best Burn Ever

One of my roommates likes to leave our door open all the time in hopes that random people will stop as they walk past, allowing to meet new people. So last night, we had the door open and were setting up the TV and DVD player to watch The Wizard of Oz, when some guy knocks on our door and asks, "hey, do you guys know where Elfusio [or something like that, I really don't remember that well] lives?" One of my roommates replys with "nope, sorry."

But another of my roommates gives the visitor a funny look and says, "Wait, its a person? Sounds like a Pokemon."

And the visitor walked away. I hope he told his friend, 'cause it was pretty damn funny I think.

Tagged as: , No Comments
29Oct/080

Enchanted – A Review

While I was home for Christmas break last year (2007), I went to the movies with my friends. The fact that I went to the movies is actually quite noteworthy since I generally go about once a year, if even that. (I find it much more enjoyable to watch a movie on a 22 inch computer monitor in the comfort of my own dorm room, rather then have to keep moving my head to see past some fatty behemoth in front of me while a dumb kid kicks my seat every ten seconds. But I digress...) I had no idea what movie we were going to be seeing, but I went to hang out with my friends.

We saw Enchanted, that happily stupid, Disney movie thats a weird parody of a bunch of old Disney movies. I don't generally keep up with all the new movies coming out, so I wasn't really sure what it was about at first, so my initial reactions were a little something like this:

(Opening credits and then the movie begins with a cartoon.)

Me: Really guys, a cartoon? I just paid money to see a Disney cartoon? OK, the Incredibles and Finding Nemo were pretty cool, but still, someone could have told me. 

(The cartoon continues, showing Giselle building her prince mannequin out of random crap scourged from the forest.)

Me: If this doesn't get any better, I think I may very well leave. Because this is just sad people. We're legal adults, we shouldn't be watching this. Its not like we're even babysitting someone's younger sibling. We're here, sitting in a crowd of little kids and parents watching a Disney cartoon.

(We see Giselle transported to a world without love. Shocker, its our world.)

Me: OK, well maybe its getting a little better.

(Watching Giselle traipse across New York City)

Me: OMFG, somebody fetch me a gun.

(Lemme guess, you're looking for your princess. No, I'm looking for my prince)

Me: OK, so maybe this movie does have some funny parts.

(A few minutes later.)

Me: Nevermind, the bad outweighs the good. WHERE IS THAT GUN?!?!?

(The evil stepmother turns into a giant laughing dragon.)

Me: This is worse then the Eragon movie. ARGHHHHHHHhhhh

So that was my Enchanted review. I hope you all had fun. I happened to just think of writing this because I saw Enchanted again a few days ago when I was on a bus.

29Oct/080

Celebrating the Internet

Today I celebrate the 39th anniversary of the birth of the internet with a short blog post.

On September 29th of this year (2008), Leonard Kleinrock, a professor of computer science at UCLA received the National medal of Science at the White House for his work on the developing the basic principles of packet switching. It was because of Kleinrock's early work in packet switching, that his Network Measurement Center at UCLA was selected to be the first node on ARAPNET in 1969.

On October 29, 1969, the UCLA team sent, without any great public fanfare, the first ever host-to-host message to the Stanford Research Institute. The team meant to begin by sending the word "login" but only managed to send "log" before the network died. Nevertheless, the sending of the message was still a great success and a landmark in the development of the internet.

One would think that UCLA, or somebody, would maybe post a nice plaque commemorating what is essentially the birth of the internet. But the birthplace of the internet remains almost entirely uncelebrated. Almost.

Your brave and intrepid blogger, decided to venture out to UCLA's famous Boelter Hall to see the historic site, and found a little piece of paper tacked next to a room. It read:

1969-10-29 22:30
IN COMMEMORATION
of the first ARPANET
message, sent to the
Stanford Research
Institue from 3420
Boelter Hall.
It marks the most
evident orign of
today's internet.

And just so everyone doesn't think I'm a big fat liar, I've taken a few pictures.

Its epic cool, I know.

I bet y'all are so jealous that I got to visit the birthplace of the internet...

22Oct/082

Me

I've always tried to keep some seperation between my internet and physical presence, especially when it comes to this blog. I don't want my roommates knowing that I write unflattering articles about them on my website, and nor do I want some random dude that lives in the middle of Montana (i.e. nowhere) knowing everything about my day to day life ('cause thats just kinda creapy).

Most personal blogs have a little "about the author" section, or something that describes the writer and their personality. But because of my desire to seperate my internet and physical self, I've never really written one, until now. So here's a suitably vague description of me.

I like computers, and reading, and mucking about with Linux. I tend to go through phases where I get obsessive about one single thing. Right now, its bikes, before it was watching old reruns of Buffy the Vampire Slayer.

I often have trouble concentrating on anything; when I'm in class I'm thinking about fixing my bike, and when I'm watching TV with my roommate I'm thinking about my math homework.

I have an extremely active imagination and am capable of keeping myself amused for hours on end without moving an inch.

I often wish I were smarter.

Filed under: Site News 2 Comments
10Oct/080

Weirdo Student

I'd like to describe a very brief dialogue that went on in my math lecture just this morning (about an hour ago). Mind you, my lecture has about 150 people in it, attendance is not taken and therefore not mandatory. For the sake of space, I shall refer to the weirdo student as WoS from this point forward. 

Prof: (after having explained a new concept) Are there any questions?

WoS: (raises his hand and is called on by the professor) Its more of an aside really, are you going to be letting us out early on Friday? 'Cause I have some business to take care of.

(Seriously, who the hell says, "I have some business to take care of?" Is he referring to Flight of the Conchords? "Its Business time!"  Although I seriously doubt it, WoS doesn't seem to be that kind of a person. Or perhaps WoS just really had to go to the bathroom. Anyway, I digress...)

Prof: If you have to go, just get up and go.

WoS: Oh, but you're such a great professor, I don't want to just leave.

Prof: If you have to go, just go.

At this point the professor continues on with the regular lecture.

I should probably point out, that in these large lectures, it is quite common for students to leave before lecture is over. Professors generally don't mind as long the student is discrete about it.

I'm pretty sure someone whispered that WoS was an asshole, right after the little dialogue was over. I personally would have called him a dumbass, but thats just me. WoS ended up staying for the whole lecture (maybe he peed in a cup) and as people were filing out, he said "OK, who was it that called me an asshole?" and managed to make a complete ass out of himself.

So well done WoS, well done.