Tuesday, February 28, 2006

Not Reading Books

Remember when I posted that Marshall Brain is my favorite author? So I realized I've never read a single Marshall Brain work on paper. I've probably read the equivalent of over a thousand book pages, all online.

I haven't read an actual book for leisure in a while. I went to the library the other day and got one. I'll post when I read it.

Saturday, February 25, 2006

It's Just in Your Mind

Technically this funny page is safe for work, but it's certainly awkward. It's just in your mind.

Friday, February 24, 2006

Too Lazy to Help Darfur

Man, can you believe in Darfur there is an actual genocide? This is Holocaust-grade stuff.

Click here.

So far I haven't done anything to help out. Have you? Probably not. We haven't been acting very morally, you and I. Those kids who are suffering are human beings just like us. I think it really is the duty of the American people to get the government to take action.

Here is one thing I could do to help people in Darfur that I am probably not going to do:
  1. Get a random job on campus for two weeks and donate all the money I earn toward helping humanitarian organizations defend their aid delivery lines against Janjaweed ambush.
There should be something that people like me can do in a matter of minutes, because otherwise we won't do anything at all, and a few minutes is better than nothing, especially if a lot of people do it.

Freakonomics Fruit

I read Freakonomics last year. It's a good book. This is what the cover looks like:


I always thought fruit on the cover must be pretty tasty. It has all the delicious sour juiciness of an orange in a Granny Smith apple's skin. Yes, it looked so tasty I thought I'd eat one myself:


To hell with genetic engineering. This is the kind of hybrid cross I want to see at the grocery store.

Monday, February 20, 2006

Ordinary Video in 3D

Normally when you watch a video, you perceive the flatness of the screen because your brain compares the image it sees from each eye and realizes that the objects on the screen are not solid. But try this:
  1. Position yourself so that the video screen fills most of your field of vision and watch a segment where the camera angle is moving around.
  2. Close one eye.
The illusion is very convincing because you eliminate almost all the cues that your eye is looking at a flat surface. Note that following these procedures will also make you one-eye high.

Friday, February 17, 2006

Inspirational

You know how over a billion people don't have electricity or even clean water? Obviously this is not an easy problem to solve because it takes a lot of engineering infrastructure, and the political infrastructure doesn't exist to make that possible.

But this article makes it sound like Dean Kamen, the Segway guy, might really revolutionize things. From the article:
Instead of putting up a 500-megawatt power plant in a developing country, he argues, it would be much better to place 500,000 one-kilowatt power plants in villages all over the place, because then you would create 500,000 entrepreneurs.
Good stuff. It's an inspiration to Mr. Kamen turn his entrepeneurial efforts toward making the world a better place.

Thursday, February 09, 2006

Super Saver Shipping

When you go to Amazon.com and make a purchase that totals $25 or more, you get free shipping. This is a pretty brilliant scheme. I know that whenever I shop on Amazon, I always feel like I'm missing out on savings if I buy something under $25.

But another, more subtle aspect is that Amazon sell a bunch of stuff for just a few bucks under $25. So since shipping normally costs almost $6, you're going to want to get your order up to $25. But then all the products that sell for only a few bucks don't qualify for Super Saver Shipping! So it's an incentive to spend significantly more than you otherwise would.

Recently I had an order that came to $23.99. So I searched for a while around Amazon for the cheapest item that qualified for Super Saver Shipping. I finally found it: FastCap Glu-Bot Yorker Tips, 5 pack. They had it marked down from $1.50 to $0.99, so I actually had to buy two. But with the savings on shipping, it was still a logical decision.

Think about what a ridiculous effect of consumerism it is that I'm receiving two packages of Glu-Bot Yorker Tips, whatever the hell those are, because I took advantage of the system. Not only that, but Amazon has actually ended up putting these in a separate shipment! A carrier service is being paid to carry a package with two sets of five useless Glu-widgets to my address, a package which I will promptly throw away without opening. Instead of me paying Amazon for one shipment, Amazon is eating the cost of two shipments. And there is also the environmental cost of all the steps in the process of getting a useless product from the factory to my trash can.

So having discovered Glu-Bot Yorker Tips, it changes the game of shopping for small orders on Amazon.com. Now you can expect to grab at least a little overall discount if your main order is as low as $20.

Wednesday, February 08, 2006

Fractals

Fractals are images that have repeating elements at any scale -- their resolution is infinite. I had an assignment in CS class to make a computer program to generate a fractal by looping through each pixel and determining the color. Here is one of the fractals my program created:


The program renders grayscale pixels whose brightness is determined by a series of mathematical operations. It works like this:

  1. Each pixel represents a number in the complex plane. The real component ranges from -1 to 1, and the imaginary component ranges from -i to i. The center of the image is the origin, which represents 0 + 0i, or just 0.

  2. The program is given the function F(z) = z^4 - 1. The roots of this function are 1, -1, i, and -i, but the program doesn't know this. For each pixel, the program uses Newton's method to calculate one of the roots of the function given an initial guess z0 that corresponds to the pixel's location in the complex plane.

  3. Newton's method figures out roots of a function by generating a series of guesses, each one dependent on the last, and usually the guesses tend toward one of the function's roots. The program is satisfied that Newton's method has found a root of F(z) when the function of the k'th guess, F(zk), is between -0.00001 and 0.00001.

  4. The program then looks at the value of k -- the amount of successive guesses it took Newton's method to arrive at one of the function's four roots. The fewer guesses it took, the brighter it renders the current pixel. Thus, a pixel's brightness measures efficiency with which Newton's method finds a root of F with the starting guess being at that pixel's location.

  5. But if a pixel is located near to one of the four roots, it should be easier for Newton's method to refine a guess starting from that pixel's location. So each pixel is multiplied by a constant that darkens it in proportion to how close it is to any one of the four corners. Notice the dark spots in each of the four compass directions -- those are the locations of the roots.

Now assuming you roughly understand the process by which this fractal was generated, imagine trying to visualize the image in your head without having seen the computer generated image. You couldn't. So as a result, you wouldn't be able to get some insights about, for example, the efficiency of Newton's method at various locations.

Aren't fractals and computers great?

Monday, February 06, 2006

Double Clicks

A lot of inexperienced computer users can't tell when to single click and when to double click, so they just develop a habit of double clicking on everything. Microsoft has compensated for this in many areas of the UI. For example, double clicking on the Start button or any taskbar button only toggles its state once (except in the classic UI).

I was testing my new website (more on that later this week), and I discovered that IE also compensates for double clicks on web form buttons. It only executes the button's JavaScript code as if it were clicked once, even though it graphically shows the button being depressed twice. This may also be to prevent things like double form submits.

Sunday, February 05, 2006

Atheist Catchphrase

Tell me your definition of God, and I'll tell you whether it's wrong or meaningless.