November 17th, 2008
A long time ago I was watching an episode of Good Eats all about squash (or “pumpkin” for my friends down under), and Alton Brown made these very yummy looking butternut squash dumplings. Since it’s the season for squash and we have a bunch of them floating around, I decided to give this dumpling recipe a try. Instead of using butternut squash I decided to use acorn squash, since we have a few extra acorn squash that hadn’t been spoken for yet.
Read the rest of this entry »
Posted in Food | 1 Comment »
November 15th, 2008
Lately I have been tinkering with a simple little 3D graphics program in my spare time. To support my various graphics and math projects I have put together a simple C++ math library including matrices, vectors, and the like. My matrices are stored in row-major order, like most matrices in C/C++ programs, but OpenGL uses column-major order. “Simple,” I think, “I just need to transpose my orientation matrices before passing them to OpenGL!”
But it just wouldn’t work. See if you can figure out why:
template<class T, int dim> class SquareMatrix {
...
/** Transpose the matrix. **/
void transpose() {
for (int r = 0; r < dim; r++) {
for (int c = 0; c < dim; c++) {
// Diagonal elements don't need transposing!
if (r == c) continue;
T tmp = getElem(r, c);
setElem(r, c, getElem(c, r));
setElem(c, r, tmp);
}
}
}
...
};
Posted in C++, Graphics, Hacking | 3 Comments »
November 4th, 2008
Guess what I saw at the Sydney Airport:
That’s the new Airbus A380! It’s one big plane! It can seat more than 500 people. Fully loaded it takes ~9K feet to get off the runway - nearly two miles, which is a little disturbing because the LAX airport runways are between 10K and 12K feet long. Not a lot of leeway there!
Well, everybody who knows me knows I’m already afraid of flying, so it’s not a big surprise that this thing scares me. But it is still really cool to finally see one up close!
Posted in Uncategorized | 1 Comment »
October 30th, 2008
Last night I was looking for interesting programming problems, and I came across this page about the Möbius Function. It’s a pretty simple idea, although I have no idea how August Möbius came up with the idea in the first place.
Given a positive integer n, the Möbius function μ(n) returns:
- 0 if the number is a multiple of a square
- -1 if the number has an odd number of distinct prime factors
- 1 if the number has an even number of distinct prime factors
The n = 1 case is a special case; μ(1) is defined to return 1.
I thought this would be a fun little problem to play around with; it’s all about generating the list of prime factors for the input value. A number is a multiple of a square if it has any duplicate prime factors; for example, 12 = 2 × 2 × 3, so it is a multiple of a square, and μ(12) = 0.
An interesting little related problem is to find runs of numbers for which μ(n) is 0. For example, the first run of three multiples of squares is {48, 49, 50}. The first run of six square-multiples starts at 22020.
So, I wrote a Scheme program to implement the Möbius Function, and to find runs of square-multiples; here it is if you want to take a look! It was pretty fun, although the program starts to get annoyingly slow when hunting for runs of 7 or 8 square-multiples. I would have to upgrade to a much faster language if I were going to do something like that. Or perhaps there’s something I can improve in my implementation…
Posted in Hacking | No Comments »
October 28th, 2008
If you ever liked Rubik’s Cubes, check out these beasts: V-Cubes
The short version is that some professor figured out how to make Rubik’s Cube puzzles with sizes all the way up to 11×11x11. Right now his company is selling up to 7×7x7 “cubes” (they are actually slightly rounded), with larger versions in the offing.
I decided I just had to check these out, so I went ahead and ordered the set that includes the 5×5x5, the 6×6x6, and the 7×7x7. Should be fun!
Posted in Uncategorized | No Comments »
July 31st, 2008
For about the last month I have been really working hard to rearrange my working area at home, because it was just unusable before. I didn’t have enough room to do much of anything, and what little room I had was really unenjoyable to use.
So, I got a new desk - a really nice large desk with plenty of filing space, and I have been cleaning things up and throwing things out like crazy. But the last thing I needed was a storage cabinet, for all the odds and ends that couldn’t really go anywhere else. Blank media, blank paper, tools, planispheres, that kind of stuff. (Actually, I already have a good place for my planisphere…)
I finally found the storage cabinet I wanted on Office Depot’s website, so I ordered it earlier this week. I got an email confirmation with details on how to check my order status, so I went ahead and checked out the order page.
Lo and behold, the very first order status, before anything has actually happened, is called “Buyer’s Remorse.” What’s up with that??
(The only thing that made me feel any remorse was that the estimate said it was going to take a month to get my storage cabinet.)
Posted in Uncategorized | No Comments »
July 30th, 2008
I was browsing through MSNBC.com (the CNN.com clone) this morning, looking at some of the pictures of the Chinese Olympics facilities, and lo and behold, I came across this picture of the aquatics center:
The pattern on the wall is called a Voronoi diagram, and is formed by taking a bunch of random points, and dividing the space into regions that are closest to a particular point. The boundaries are lines that are equidistant between two points.
The ceiling of the aquatics center uses the same technique:
Who knew?!
Posted in Uncategorized | 3 Comments »
July 29th, 2008
Evidently there was a sizable earthquake today.
Unfortunately, I didn’t feel it since I was in the swimming pool when it happened.
So now I am trying to figure out if it is a massive nationwide conspiracy.
Posted in Uncategorized | 1 Comment »
July 21st, 2008
A while ago a friend sent me a link to an article called Vogue’s 8 Steps to Hamburger Perfection. The article is actually based on an interview with Jeffrey Steingarten, who frequently appears on Iron Chef America, and is highly entertaining primarily because he is just so disagreeable with everyone. He is mesmerizing to watch at times, because he is so inventive in devising ways to crush the spirits of other people.
Anyway, the article goes through and describes how to create “the perfect hamburger,” although it focuses primarily on the preparation of the meat patty. This is only one of many factors in preparing a perfect burger. But, I am also a bit obsessed about perfect hamburgers, and I had never tried grinding my own meat for making burgers, so I decided that it was worth giving this whole thing a try.
Read the rest of this entry »
Posted in Food | 1 Comment »
June 19th, 2008
The summer break is finally here, and I for one am very excited about this summer. This year I have a SURF student helping me out with the implementation of my “educational database system” in Java. The working name is currently NanoDB, although I am certainly open to other suggestions.
Read the rest of this entry »
Posted in Databases, Java | No Comments »