Friday, April 30, 2010

Riverworld

Depressing for two reasons. First, because I thought it was a movie when it turned out to be a pilot for a series on Sci-Fi. Quality was low. Second, because no additional episodes were ordered. The food tasted bad and the portions were too small.

What is a Memristor?

The fourth quadrant of Resistor, Capacitor, and Inductor. Insert jokes about the Three Musketeers here. I have a lot to learn, I'm just saying.

There's plenty of room at the bottom



Richard Feynman's talk at the 1959 meeting of the American Physical Society at Caltech, describing nanotechnology as an important field for future.

Yes, these are record grooves. It's what people used to listen to music before 8-track players came along.

Question of the day

This one is mine. I wonder whether people will look back on the huge oil spill in the Gulf Coast and say that it was one of the best things that ever happened to the environmental lobby, because it forestalled or cancelled all of the offshore drilling that Obama had tentatively authorized in the recent energy bill.

That hasn't happened yet, but there was a bit on NPR this morning talking about how the Oil lobby for drilling has put the permission to drill off the coast on the back burner for a while.

How to be a programmer

An article I will read again and again. The applications go beyond programming.

Steve Jobs Letter about Flash

Lots of people are talking/writing about it, but Charlie Stross I think has a good take here. Short version -- no one knows what will happen in the PC market in the next few years, but the future is mobile and the winners will be those who go all in.

Wednesday, April 28, 2010

Prob 10

Question: What is the sum of all prime numbers below 2 million? Compiled correctly and gave the right answer the first time. Booyah.

Unpublished Dilbert Cartoon


Topical. Click on cartoon to see the whole thing.

Clarke's Laws

Arthur C. Clarke formulated the following three "laws" of prediction:

1. When a distinguished but elderly scientist states that something is possible, he is almost certainly right. When he states that something is impossible, he is very probably wrong.

2. The only way of discovering the limits of the possible is to venture a little way past them into the impossible.

3. Any sufficiently advanced technology is indistinguishable from magic.

Star Wars Review

A multi-part review of the Star Wars series of movies. Very funny.

Multiply digits in 1000 digit number

Interesting errors in problem #8 were arrayOutOfBounds and remembering the syntax for string class operators. Slowly the concept of object oriented programming is coming back to me, but it's not coming that quickly.

Tuesday, April 27, 2010

Off by 1

Done with problem #7. Lots of off-by-one errors around my loops to find the nth prime number. Also, a little bit of a problem with the edge case of 2 being prime, but I just manhandled it into the answer. Not pretty, but I'm tired.

New York City from staples



Gotta like this if you like New York.

Monday, April 26, 2010

5 & 6 down, 293 to go

Prob 5: Very cool problem, because the short solution (9 lines) was fast up to about first 10 integers (find lcm), then it became much slower. The long solution was not measurably slower for first 30 integers than for the first 10. If the problem had been first 30 integers, I would have had to have used the longer algorithm, but the short one gets the job done for n = 20.

Big insight on this problem was actually something that would have been a cooler solution for prob 3 -- start with 2 and just divide if you can, then change the target divisor to n/2 and repeat until you can't anymore, then move to 3 and then 4. What's cool about this is that it will pick up all the factors of 2, thus knocking out all the composite even numbers. Repeat until the number you're dividing by equals the number you've reduced your target to. Not only are you done, but (by the Sieve of Aristophanes), the last divisor is the largest prime.

Not much interesting in Prob 6. Not sure why it came after 4 & 5.

4 down

Finished problem #4, which required finding the largest six-digit palindrome number with three digit divisors. The interesting shortcuts for me on this one were that if a number has six digits, then the square root of that number will have three digits (since one million is 1000^2 and 100,000 is roughly 316^2. This made me realize that I could just check divisors starting at 999 and decrementing the potential divisor by one until I reached the square root. This dramatically cut down on the number of divisions to make each time.

It’s not a very generalizable program, unlike some of the others – finding largest prime factor of a number, find the sum of a certain number of values of a sequence – which could be used for other parameters by changing the values of some of the initial conditions. The solution program for this problem was really specifically designed to solve this problem, and it’s not really useful for other (5 digit, 7 digit, etc.) numbers. The structure is basically the same, but it would require more rewriting of the function that generates the palindrome numbers.

A more general solution would involve generating palindromes between the values of x and y and then finding the largest one that is a perfect square or something like that.

Looking at the answers, I was actually a little surprised how much I overthought it. It turns out you can just brute force all the products of 3-digit numbers and then check to see if its a palindrome and you get an answer that way, too. I'm already starting to think about the balance between code that is easy to read (i.e., a simple algorithm) versus code the runs quickly.

Saturday, April 24, 2010

IBM etches small map




"IBM researchers have developed a manufacturing technique capable of etching 1,000 three-dimensional world maps on materials the size of a grain of salt." -- article here from Slashdot.

3 down, 286 to go.

Ok, that one was hard: find the largest prime factor of a 12 digit number. Problems I ran into -- inefficient algorithms, and trouble entering in the number, since 12 digits is bigger than the largest int primitive in Java, and I needed to enter it as a long. However, I couldn't just enter it directly, because the Java compiler tried to read the number as an int, so I had to bring it in as a string, then use the Long.parseLong(string x) method in the Long class to get it into the variable before I could even get started on the algorithm.

This is as much to get me refamiliarized with Java as it is solving the problems. Long way to go . . . .

Standards



Aaron Altman: What do you think the Devil is going to look like if he's around? Nobody is going to be taken in if he has a long, red, pointy tail. No. I'm semi-serious here. He will look attractive and he will be nice and helpful and he will get a job where he influences a great God-fearing nation and he will never do an evil thing... he will just bit by little bit lower standards where they are important. Just coax along flash over substance... Just a tiny bit. And he will talk about all of us really being salesmen. And he'll get all the great women. -- Broadcast News

Nixie Tube Wrist Watch


Very cool. Not just because Woz has one, but partly . . . . Can't spend $400 on it, though.

Friday, April 23, 2010

Two down

Finished the second Project Euler problem. However, they're getting much harder.

One down, 288 to go

Finished the first Project Euler problem.

Thursday, April 22, 2010

iPad Cover



Just because I'm not getting one, doesn't mean I don't want one.

New Pictures of the Sun



NASA's New Eye on the Sun Delivers Stunning First Images

Retweet from The Garden Variety Philosopher Weblog

"The best time to plant a tree is twenty years ago. The second best time is now."

~Japanese Proverb

From a very good blog.

Mirrormask


I wasn't sure what to expect from this movie. On the one hand, it hadn't received good reviews and wasn't around for long. On the other hand, I like Neil Gaiman. So I figured it would be a cool, quirky, low-budget looking movie with an interesting plot. I was totally wrong. The visual effects were really the star of the movie. They were so mesmerizing that I think I want to see it again just to watch it all unfold. The music was distractingly bad, the plot was totally forgettable, and there weren't really characters to speak of. But the images were so wonderful that it saved the whole thing. 3 out of 5 stars.

New David Foster Wallace book

There is a new biography about David Foster Wallace that just came out, which refers to a new novel Pale King, due to be published soon. It makes me want to re-read Infinite Jest.

The Dunning–Kruger effect

From Wikipedia:

The Dunning–Kruger effect is a cognitive bias in which "people reach erroneous conclusions and make unfortunate choices but their incompetence robs them of the metacognitive ability to realize it". The unskilled therefore suffer from illusory superiority, rating their own ability as above average, much higher than in actuality; by contrast, the highly skilled underrate their abilities, suffering from illusory inferiority. This leads to a perverse result where less competent people will rate their own ability higher than more competent people. It also explains why actual competence may weaken self-confidence because competent individuals falsely assume that others have an equivalent understanding. "Thus, the miscalibration of the incompetent stems from an error about the self, whereas the miscalibration of the highly competent stems from an error about others."


“In the modern world the stupid are cocksure while the intelligent are full of doubt.”

— Bertrand Russell

Wednesday, April 21, 2010

Update on the Metro-North Bar Cars Upgrade

A very helpful comment came in from Jim Cameron last night:

The NY Times story is WRONG. I was interviewed by the reporter and he conveniently ignored the facts I gave him.

The old bar cars will not be retired when the new M8's arrive.

I am confident there will be new M8 bar cars ordered, but not until our first priority is met: passenger cars.

JIM CAMERON / Chairman
CT Rail Commuter Council
www.trainweb.org/ct

Thank you, Mr. Cameron, for chiming in. Your clarification is very reasonable, and it is appropriate that the CT Rail Commuter Council put a higher priority on passenger cars.

Tuesday, April 20, 2010

Metro-North considering ending bar cars

This would make me very sad.

Merlin Mann Interview

I like Merlin Mann, in part because he reminds me of a lot of my clever friends. I don't get to talk to my clever friends as much as I'd like, so I settle for listening to and reading Merlin.

Thank You, Kurt Vonnegut


"Hello, babies. Welcome to Earth. It's hot in the summer and cold in the winter. It's round and wet and crowded. At the outside, babies, you've got about a hundred years here. There's only one rule that I know of, babies -- God damn it, you've got to be kind."

Kurt Vonnegut, Jr.

The Enemy of my Enemy

Nice New York Times column that starts with math and ends with politics.

Thinking about Grade Inflation

The website gradeinflation.com is trying to be a little more systematic in its approach than rants about Harvey "C-Minus" Mansfield.

Politics and the English Language by George Orwell


There is something fundamentally hopeful about this:

A man may take to drink because he feels himself to be a failure, and then fail all the more completely because he drinks. It is rather the same thing that is happening to the English language. It becomes ugly and inaccurate because our thoughts are foolish, but the slovenliness of our language makes it easier for us to have foolish thoughts. The point is that the process is reversible. Modern English, especially written English, is full of bad habits which spread by imitation and which can be avoided if one is willing to take the necessary trouble. If one gets rid of these habits one can think more clearly, and to think clearly is a necessary first step towards political regeneration: so that the fight against bad English is not frivolous and is not the exclusive concern of professional writers.

Monday, April 19, 2010

Tastes like chicken



A new brown thing I'll totally eat.

Movie update

Desk Set. 4/5 -- very good, but the pacing seemed so slow by 2010 standards, that I couldn't go all the way up to 5. Also, A fell asleep, which DQ's the highest rating.

Cube 2: Hypercube. 2/5 -- Hard to believe I was actually disappointed by this, given how low my expectations were, but I was. How much extra would a smart screenwriter have cost, given the budget that was bigger than the original (which was better).

Terminator: Salvation 3/5 -- nothing super-dope special-effects-wise, which is what the franchise usually offers. Good plot, but it felt more like a regular adventure movie. Too much emphasis on the -- "Oh, no! A paradox if someone from the future kills my teenaged dad before he can go back and meet my mom!" This was all picked through in the first movie. Don't tackle this unless you have something to offer.

Ninja Assassin 2/5 -- all the good scenes were in the preview. Very disappointing, given that the Wachowskis were involved.

I still like this picture


I don't care that it's in the dorm room of >10% of college frosh, or that it had to have been staged. It's still wonderful.

Westminster Hockey Alumni help BC


Two Westminster alumni helped the Boston Eagles' men's ice hockey team win the NCAA national championship at the 2010 Frozen Four.

Friday, April 16, 2010

Thursday, April 15, 2010

Increase your word power

These are the words David Foster Wallace circled in his dictionary.

Game Store Owns Your Soul

Better read that fine print from now on.

Wednesday, April 14, 2010

Wallace and Gromit



Why order each story individually from Amazon for $9.99 each, when you can get all three together for $11.99?

1. A Grand Day Out - 1989
2. The Wrong Trousers - 1993
3. A Close Shave - 1995

Streaming Netflix for the Wii

My productivity, such as it was, will now drop to near flat-line.

Project Euler


Anyone who says that they're bored should go here and do problems until they're not bored anymore.

No post yesterday

I ended up spending my posting time playing Civilization Wars (free as in beer Warcraft knockoff).

Monday, April 12, 2010

It probably all boils down to this

Before enlightenment; chop wood, carry water.
After enlightenment; chop wood, carry water.

~Zen proverb

101 Zen Stories

Available here.

Thursday, April 8, 2010

Last Stanza of Philip Larkin's "Church going"

A serious house on serious earth it is,
In whose blent air all our compulsions meet,
Are recognized, and robed as destinies.
And that much never can be obsolete,
Since someone will forever be surprising
A hunger in himself to be more serious,
And gravitating with it to this ground,
Which, he once heard, was proper to grow wise in,
If only that so many dead lie round.

Beowulf

Felt more like a proof of concept than a movie, although Robert Zemeckis had already explored this technique in Polar Express. Angelina Jolie is much better in person than she is as a CGI artifact. The script by Neil Gaiman was better than I expected. 2.5 out of 5.

Oursourced Grading

Chronicle article about papers graded in Bangalore. Arguably, this is the continuation of a trend that started when professors had T.A.s and students do the grading. I graded the homework assignments for Peter Schultheiss' Linear Algebra course when I was a senior. However, this does erode the proposition that the university is providing some particularly important value-added with the professors when they're not even grading the papers at the school itself.

Wednesday, April 7, 2010

Leaves of Grass improves distribution

Tim Blake Nelson's movie Leaves of Grass gets a better distribution deal after excellent buzz at SXSW.

Tuesday, April 6, 2010

John Carmack Quote

"The idea that I can be presented with a problem, set out to logically solve it with the tools at hand, and wind up with a program that could not be legally used because someone else followed the same logical steps some years ago and filed for a patent on it is horrifying." -- John Carmack

I believe this because a) I think it's entirely true, and b) because given the choice between agreeing John Carmack and not, the smarter play is to agree.

John Conway Interview


Most famous for inventing the Game of Life, John Conway is impressive for other reasons as well. He ended up getting some nice airtime on the Nova special about Andrew Wiles and his proof of Fermat's Last Theorem.

The videos are here and here, and the transcripts of the videos are here and here.

Monday, April 5, 2010

District 9

Very good.

Sometimes I doubt your commitment

Sometimes I doubt your commitment to Sparke Motion.

Texas School Textbook Opinions

Nice article about the Texas School Board and their influence on book publishers nationwide by Roger Ebert, and a thoughtful reply from a publisher which was very reasonable (I think).

Friday, April 2, 2010

Joke from StackOverflow

A woman asks her husband, a programmer, to go shopping:
- Dear, please, go to the nearby grocery store to buy some bread. Also, if
they have eggs, buy 6.
- O.K., hun. Twenty minutes later the husband comes back bringing 6 loaves
of bread. His wife is flabbergasted:
- Dear, why on earth did you buy 6 loaves of bread?
- They had eggs.

The first action figure I'd actually buy



Note the 1:4:9 ratio of side lengths. Quality.

Cory Doctorow on Why I Shouldn't Want an iPad

He's right, of course, but it's so pretty . . . .

How to unlock a chain lock on a hotel room door

Thanks, YouTube.

OKCupid Political Statistics

Very good article about how statistical information gathered on a dating site can give insight into political trends.

OkCupid is an internet dating site, but they run a blog where they use
their massive database of demographic information to draw interesting
conclusions. This post analyzes why democrats seem to have numerical
superiority but are often defeated by Republican organization and
cohesiveness by looking at statistics derived from OkCupid's dating
profiles.

---
Thank you to Brian Howard for the link.