Archive for January, 2006

P4RK1NG

Tuesday, January 31st, 2006

There was a lot of activity on the Caltech campus today, because the CBS tv-show NUMB3RS was filming some scenes here. This had two main effects on my day:

  1. I had to park all the way across campus, because all the trucks and vans were taking up tons of parking space.
  2. I had to walk about 3x as far to get my coffee this afternoon.

This made me grouchy.

I hope they are done, although I’m sure it would affect me less tomorrow because I would know what to expect!

Thwarted

Tuesday, January 31st, 2006

Last night I actually felt like getting out the ol’ telescope for once. Saturn is high in the evenings now, as is M42, and this is the only time of year that I get to enjoy those guys without getting up at crazy hours.

Unfortunately, it was hazy all day, and by the time I went out to start setting up the telescope, there was a thick cloud-cover.

So, maybe tonight or tomorrow night will work out.

This is one benefit of moving my schedule to match the students’ schedules - I’m more apt to pull out the telescope, because I’m already going to be up late!

Geeksta Rap

Monday, January 30th, 2006

Every once in a while, you discover a truly astonishing example of people who don’t seem to realize exactly how uncool they really are.

“Our raps are filled with braggadocio, but instead of boasting about our bitches, blunts, Benzes or Benjamins, maybe we talk about our math skills or the efficiency of our code,” Monzy said.

This quote summed it up:

“I don’t think this new subculture will really stick, though,” Ryan added. “If the genre is to succeed, you’re going to need some females.”

Chili-Coma

Friday, January 27th, 2006

Yesterday was Career Day at Caltech. This usually involves a bunch of companies trying to convince students how cool it would be to work there, primarily by giving away free swag. Students, for their part, are typically laden with big dreams and hastily-drafted resumes, but are of course also happy to just walk away with free trinkets. “And fun is had by all.”

I dropped by Career Day yesterday to see someone that I used to work with, and we took a quick trip to the local Tommy’s Burger. This was quite an exciting experience, since Tommy’s is an institution for Caltech students, and we were getting back to our roots. Plus, it was a good chance to try out the new location on Hill Street, which is dangerously close to my daily commute. (For now I have resisted gratuitous chili consumption, at least from Tommy’s.)

I didn’t eat food from Tommy’s for a long time, because it violates the Possum Rule: “If food comes from a vat large enough to conceal a whole possum, don’t eat it.” I have since stopped following this guideline, trusting the food-safety inspectors to do a good job, but maybe I should have yesterday, because I got hit by the biggest chili-coma ever. I had a chili cheeseburger and chili cheese fries, and afterward I just had to lay down on the floor and let my body recover from the ruthless chili onslaught. Hours later I was still struggling, so I had a cup of coffee!

To make up for this … decision … I didn’t eat dinner, and I went for an extra long run today. Man, that stuff is good, but it does take a toll. Especially if you are out of practice and your tolerance is low. Maybe I’ll drop by there again in a few months. I’ll just have to make sure I have nothing scheduled for the next 10 hours.

Optimize!

Wednesday, January 25th, 2006

So, if your program is too slow, probably a good place to start is to tell the compiler to optimize it.

Who’da thunk it?

I have a friend who is working on a pretty nifty program to analyze spatial data, and build a minimum spanning tree from it. His program was running slow, so he wanted to try it on my computer. You can imagine he was pretty shocked when my result was nearly 70% faster. And I only typed a few extra characters!

Thanks, compiler! You’re my hero.

Improvements

Monday, January 23rd, 2006

Today I gave what will hopefully be one of the last CS11 lectures I have to create from scratch. It was for the Advanced C++ track of CS11, which is going through some minor changes.

The main issue was that I didn’t feel like it had a unified focus, or a contiguous flow from the Intro C++ track. My predecessor Ben probably had it all well in hand, but my first term teaching that track sure didn’t feel right!

So, I have been tweaking it around a bit. This week I created a brand new lecture, all about std::string and the C++ Stream-IO classes. I think it was a nice broad lecture, and probably won’t need major tweaking from now on. It also has the benefit of covering exactly what the homework assignment needs, which I think the students will appreciate, too.

As one point of interest, I explained the dangers of this code:

  char* getUserName() {
    string name;
    cout << "Enter username:  ";
    cin >> name;
    return name.c_str();
  }

People who are used to Java usually get snapped by this one!

Ugh, now if I could only force myself to grade homeworks! (Yes, this blog entry is me flicking…) Just gotta get some grading knocked out by 10pm so that I can watch TV guilt-free…

Windy!

Monday, January 23rd, 2006

Boy has it been windy lately. Usually it is only windy at night, but this has kept up through the days as well. And the gusts are strong too.

Fortunately we have pretty much everything anchored down pretty well. Because I have a simple rule - if it ends up in our yard, it’s ours. Ha ha just kidding.

Of course, this windy weather has yet again wreaked havoc with the garbage-pickup schedule. Only a few people were willing to put their trash out, and well, they chose poorly. I don’t know if they will see their garbage cans again. If they are seen, they will probably be airborne.

Java’s Weakest Link

Wednesday, January 18th, 2006

I have seen this every term in my Java track so far. “Is [whatever] like C++ const?” Sorry, no, it’s not. You see, Java doesn’t have anything like C++ const. You might think that final is like const, but it’s not:

  • A final variable in Java can be assigned to only once, but if the variable is a reference-type, you can still change what it refers to. Fun! (Yes, that is what the language-spec says.)
  • A const variable in C++ can be assigned to only once, where it’s declared, and nothing is allowed to change about the value, whether it’s an object or not. Now that is a nice feature!

I would like Java to have an equivalent to C++ const. Some people have actually worked on variants of Java that include const or something like it. (Just search the web and you’ll turn up more than a few!) But, for now, const is just a reserved keyword in Java, waiting for an implementation.

Bonfires

Monday, January 16th, 2006

How about that. The word “bonfire” is a contraction of “bone fire,” or a fire of bones. Fascinating! I would have never guessed.

“Yes, I’ll take etymology for $400, Alex.”

More Trash Woes

Monday, January 16th, 2006

Today is Martin Luther King Day. MLK Day is one of those ambiguous holidays that people don’t quite know whether it’s a day off or not, but chances are that if you work for a university or the government, you probably get it off.

Of course, one practical issue is: If your trash-pickup day falls on MLK Day, is the garbage company coming by or not? And, looking up and down our street, I can pretty much guess which people get MLK Day off, and which don’t. The people who don’t get MLK Day off, well, they put out their trash, and their trash got picked up this week. Unfortunately, we didn’t put out our trash this week.

I really wish I could get away with lighting a bonfire - the leaves are just piling up now. It would be some bonfire, for sure.