About

I am a software developer in Seattle, building a new AI software company.

Ads

August 2009

Sun Mon Tue Wed Thu Fri Sat
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          

Ads


« Driving While Talking | Main | Framework Bug #1 »

September 08, 2006

Comments

Noah Richards

You may want to rethink the "above-average" portion of the show. Most people seem to think that having a majority of people be above or below average is a logical fallacy, when, in fact, it is by no means improbably. For example, the vast majority of people have an above-average number of legs (the vast majority of people have 2 and a small number of people have 1 or no legs at all, bringing the average to below 2).
This just points out the limitations of the statistical mean without any measure of normality. In the case of intelligence, I would guess that the curve looks something like that of the number-of-legs curve, meaning that most people center around the same area, with some low outliers that bring the average to below the majority of the population. Someone please correct me if statistics show otherwise, but I would assume that the effect of low outliers is not counterracted by equally high outliers. Just a thought.

Doug Mahugh

That code-optimization example reminds me of something I read decades ago, in some programming book from the 60s or 70s: programmers write for code size first ("I can do that in fewer lines of code!"), performance next ("I can make that run faster!"), and maintainability after that ("I can make that easier to maintain!").

In my own experience, I think this rings true, as general phases of a programmer's development. At first you're struggling with matters of form and syntax, so you learn to express something more efficiently. Then, when people start actually using your code, you need to optimize performance. And finally, when you start taking a long-term view of the process over the entire life of a piece of code, maintainability becomes your focus.

David Rainsford

if (x == 0) {
x = 1;
} else {
x = 0;
}

is not functionally equivalent to x = 1-x. Imagine that x is initially 25.

It is only functionally equivalent to x = !x depending on the language (as !x will actually return a boolean).

I propose therefore a safe bet which is pretty optimal is: x = (x == 0) ? 1 : 0;

Of course, it's just shorthand for the same bit of code, but I don't think you can optimize it any further without changing what it does. (I'd be interested if there was a way though!)

Jaco Esterhuizen

This is in response to Noah Richards' comment. I agree with Noah's argument, but I think that when people say they think they are "above average", they don't really mean average in the statistical sense. They mean that they are above the norm / masses, ie. that they would be one of the "high outliers".

Wesner Moise

The real reason why women can distinguish between periwinkle and lavender:

Women may be able to perceive a wider range of colors than men, because the genes to distinguish color lies in the X chromosome, women have additional copies. Color blindness is more prevalent among men (8%) than women (.4%).

The additional ability to see a fourth color instead of the usual three leads to tremendous increase in the ability to see that most people can't realize.

http://www.post-gazette.com/pg/06256/721190-114.stm

Wesner Moise


With the recent poor posts by Joel criticizing Ruby developers (see http://www.codinghorror.com/blog/archives/000679.html), Joel should keep this continuation of the about quote from Bertrand Russell in mind:

You must not denounce well-defined classes, such as persons with more than a certain income, inhabitants of a certain area, or believers in some definite creed; for if you do this, some readers will know that your invective is directed against them. You must denounce persons whose emotions are atrophied, persons to whom only plodding study can reveal the truth, for we all know that these are other people, and we shall therefore view with sympathy your powerful diagnosis of the evils of the age.

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment