The Monty Hall Problem

April 11th, 2008

For some reason, the “Monty Hall problem” has been coming up pretty frequently lately. The basic idea is as follows:

You are on Let’s Make a Deal with Monty Hall. You have three doors to choose from. One of the doors has a NEW CAR behind it. The other two doors have goats.

  1. You choose one of the three doors.
  2. Then, Monty Hall opens another of the three doors, revealing… A GOAT!
  3. Then you have the opportunity to either change your choice to the remaining closed door, or to stick with your original choice.

Is it in your best interest to stick with your original choice, or change your choice after finding out about the location of one of the goats?

Unless you are well-versed with basic probability theory, the correct answer is actually pretty counterintuitive. I won’t go into that; Wikipedia has a great article about it.

But I do have one complaint - who decided that you lose if you get a goat? I think it would be pretty awesome to have a pet goat. You could name him “Chewy” and keep him in the back yard. Now how could anybody call that “losing”?

Butterflies

March 3rd, 2008

Some friends of mine recently received a food processor as a gift, and they were wondering what to make with it. I suggested mayonnaise, since homemade mayo is always tasty, but they weren’t so excited about that. Another good suggestion is cashew-nut butter or almond butter; the texture is just like peanut butter, but the flavor is amazingly rich.

Every time I think of peanut butter, I remember this one episode of Mr. Rogers’ Neighborhood where he made peanut butter. Or, at least, he tried to make peanut butter. His operating premise was that the name “peanut butter” was based on the actual ingredients for peanut butter. So, he threw a bunch of peanuts into a bag, added a stick of butter, and then proceeded to bash the crap out of it. The result wasn’t exactly peanut butter. I distinctly remember the scene - that big traffic light and the aquarium… I seem to recall him saying, “Well that didn’t work very well…”

I am glad that Mr. Rogers never tried to make butterflies.

Science-Fair to Middling

March 2nd, 2008

Last week I was a judge for a middle-school science fair. It was mildly entertaining, seeing the traditional projects involving burning things and playing with blood. Nothing really compelling though. The most disappointing aspect of the fair was the lack of any really scientific hypotheses. It was painful to read some of these hypotheses. In general, I was pretty sad about the students’ lack of understanding of the scientific method.

Read the rest of this entry »

Excitement

February 12th, 2008

A few days ago there was this Slashdot article about a serious Linux kernel security hole. Since I was running a version of Linux that had the issue, I thought I had better patch it on my server ASAP.

My machine basically has nobody on it, so I am really not worried about somebody using the exploit directly. But, I do have a number of network services, like my mailserver, webserver, SSH server - and if any of those has a vulnerability, I sure don’t want somebody using that to get root access on my box!

So, last night I manually patched my kernel source, rebuilt my kernel, and rebooted the machine. It was exciting and nerve-wracking; since it’s been so long since I built a kernel myself (2000? 2001? It was at DALi I am sure…), I didn’t know if I would get it right! Then there’s the fact that I am running RAID1 on my boot partition, and I wasn’t sure how the kernel update would go with that.

But, everything went fine. The machine rebooted fine, and when I tried the exploit on the patched system, nothing bad happened. All my services started back up without a hitch.

It was kind of exciting!

Tasty Squash Soup

January 27th, 2008

About a week ago I tried some butternut squash soup from Trader Joe’s. I was so uninspired by it; the flavor is very subtle and mild. It couldn’t even stand up to the plain ol’ grilled cheese sandwich I had with the soup. Pitiful!

So, since there happen to be more than half a dozen whole butternut squashes around the house right now (stock up!), I decided to make my own.

It’s awesome, and very garlicky, which is great by me! Very easy to make, too.

Moodle Hatred

January 24th, 2008

This is my busiest term all school year, since I teach my database systems course this term. I decided to try something new this term - instead of hand-coding the website for my database course, I have been using Moodle to manage the course.

So far, I really dislike it!

This is actually a step forward, since I used to really hate it. Now that I have used it a bit, I realize that Moodle really does have a few things going for it. It’s easy to work on draft assignments and then make them available when they are ready. It’s also really nice to be able to upload various peripheral files that the students will need; Moodle’s file management capabilities are quite nice.

The thing that I am totally annoyed with right now is that I can’t assign partial points to assignments! I can create an assignment and say that it’s worth 45 points in total, but then I can’t give somebody 39.5 points for their work. What gives?!

The other thing that always annoys me when I use Moodle is that it’s not just a piece of software to help me do my job; it promotes certain alternative teaching philosophies. I don’t want to use a piece of software that lectures me on how to teach; I want a piece of software that will let me publish assignments and other course-related materials, and let me track the students in the course.

Leave me alone, Moodle! Just help me do my job.

ACM Regional Contest

November 12th, 2007

Saturday, November 10 was the ACM regional programming contest. Caltech won yet again… Go Caltech!

This year was definitely one of the least intentional wins. There was little interest in an ACM programming contest track for CS11, so we just didn’t have one. Then, two weeks before the contest was scheduled, some all-star students expressed interest in going, so we arranged it. And they won! Caltech rocks.

Anyway. Hopefully we won’t do it this way ever again. Next year I want to really try to drum up interest in the contest and actually get 3 or 4 teams out there. But at least we were able to land the win this year!

Some olive “harvest”…

November 9th, 2007

A week ago, Caltech had its very first olive harvest. Caltech has many olive trees all over campus, and usually they are quite a nuisance because they fall on the ground, get squished under foot, and leave oily splotches on the concrete for months. In the past, the grounds crew would spray the trees to get them to produce less, but then two students decided to pick some olives and make olive oil out of them. (A very clever way to avoid homework, I must say.) Once the students succeeded at producing some actual olive oil, the administration decided to make an annual event of this.

So, call me crazy, but I would think that after an “olive harvest,” there wouldn’t be any olives on the trees anymore after that. Yet for the last week I have been walking around campus and looking at those trees, and guess what — still lots of olives.

I’m pretty annoyed by this. My coworkers think my standards are too high, but if you’re going to do something, do it right. No Olive Left Behind.

Astrophotography with the Canon 40D

November 7th, 2007

Now that I have had a couple of serious astrophotography experiences with my new Canon 40D, I figured that I should actually write a bit about it. Before the 40D I used a 20D, which was certainly better than film, but I never was really able to achieve the level that I wanted to. The primary problem is invariably achieving a good focus. There are several techniques for getting a good focus, the best of which is probably using a focusing aid like the Kendrick Kwik Focus. The concept is simple - when the telescope is out of focus, the light takes on the shape of the aperture of the telescope, central obstruction and all. Thus, if you put a mask on the front of the telescope with two or three holes, you see two or three spots if the scope is out of focus. But, once the telescope is brought into focus, all of those spots converge, and you see only one image.

Aside: Most focusing aids use circular holes, but if you are making your own focusing aid (and why wouldn’t you?) you probably would do best with triangles at different orientations, rather than circles. This way you get some diffraction spikes as well, and when they are all centered around one point in the field of view, you know you are in focus.

There is one feature on the 40D that hands-down makes it a sheer joy to work with: Live View! Live View lets you get a really good look at what is coming into the camera, before you actually take any photos. This means you can point the telescope at a bright star, switch on Live View, zoom in on the image, and get a really good focus on that star before taking any photos. I have used Live View for both piggyback-mount photography and prime-focus photography, and it is just great for getting a good sharp focus. (I do have to say though, nothing shows the ugly realities about the quality of your camera lenses like focusing on a star. Oh well…)

The Canon 40D has a number of other nice features for use with astrophotography. I always switch the camera into timer-mode and set the mirror to pre-fire so that there is as little motion as possible when the photo is taken. (Even with that, there is still vibration from the shutter, but you can see my previous post for details about that.) I also use the TC80-N3 timer-remote to control the camera without touching it. Of course, the main feature I use is the timed-exposure functionality; the other features of that remote aren’t so relevant to astrophotography. If you switch the camera into M (manual) mode, turn on the camera’s 10-second timer, and set the timer-remote to your desired exposure length plus 10 seconds, everything works great. The only hard part is sitting there waiting to see the results.

That is about all I have to say about using the 40D for astrophotography at this point. I don’t know much about “frequency-response curves,” how suitable the camera is for imaging hydrogen-alpha wavelengths of light, or anything like that. I’m an amateur. I just know that this camera is a whole lot easier to use than the 20D, and it really has me motivated to get out of the city a bit more often to take some pictures of the sky. I’m happy with that!

Comet Holmes

November 6th, 2007

For the last couple of weeks there has been a strange, tailless comet in the constellation Perseus. It started getting more attention in the news when it suddenly brightened, so it’s one of the more popular things in the sky at the moment. Hopefully it will be around for a while; you don’t normally have things that easy to see from the city.

Now, usually I would be whining about how much I hate comets, but this time I was actually able to find it myself, so this one is okay.

Here is a wide-field photo of Holmes, taken with my camera mounted piggyback on my telescope, using a 100mm macro lens:

IMG_0283_crop

And, here is a close-up taken through the telescope:

IMG_0291

You can see some vibration in the close-up photo. I am pretty sure this was caused by the shutter when I took the photo. Normally I set the mirror to pre-fire, and I take photos on a timer, so I can’t think of anything else that could cause any vibrations.

There is this technique called the “hat trick” (at least, that’s what Michael Covington called it in his great book on astrophotography), which is the simple solution to this problem. Put something large and dark in front of the telescope - say, a hat - start the exposure, then move the hat out of the way. That way there will be absolutely no vibrations during the exposure.