March 21, 2008

Y: The Last Man

I am probably way behind on this but if you haven't read it and like comic books at all, I hugely recommend it. I picked up the first volume (issues 1-5 or so) of this comic book the other day from the library after coming across several mentions of it and it really is just great. Have now read the first three volumes and have the rest on request. Engrossing, fun, and great concept with some very cool ideas of what would happen to the world if all the males were to suddenly die.

Posted by aarondf at 12:57 PM | Books | Comments (0)

March 20, 2008

Project Euler update

Made it into the Top 1000 after yesterday and problems remain interesting.

Couple of ones lately I found interesting were #79 with just how easy it was - did in less than 5 minutes by hand and #58. On this one, it first took me a while to realize the magnitude of the numbers one is dealing with before one gets to the result. Realizing this, I had to shift my approach but I didn't want to individually test for primality an insane number of numbers (mostly for primes I have just been reading in a list of them from a file but it only goes up to like 20 million and here one needs to go way beyond that). I first tried to do a Sieve of Eratosthenes but my computer couldn't handle the memory requirements of a 300+ million element array in Perl. Doing this in C++ with Booleans probably would have solved this but decided not to go that route. I finally ended up using a hybrid approach that was acceptably fast. Read in my primes list file and for numbers under 2 million check against it and then for bigger numbers (by which point one is only needing to test 1 in 1000+ numbers) individually check them.

Posted by aarondf at 03:50 PM | Tech | Comments (0)

Movies: Enchanted

Although I had heard only good reviews of this, it was still better than I expected - just adorable and enchanting. The filmmakers and actors (particularly Amy Adams) take a hokey idea and implement it so beautifully that it almost completely works (the only thing that really doesn't is why doesn't Robert realize that she is something miraculous when he sees her abilities with animals). The first half of the movie in particular is just absolutely great. Incredibly light and super-sweet and highly recommended. ****1/2

Posted by aarondf at 03:43 PM | Movies | Comments (1)

March 14, 2008

Project Euler

Has anyone done Project Euler? It is a quite interesting set of math/programming problems. Really think would be a great way to learn a new programming language but I am just doing them in my primary language, Perl, at the moment. I have done 51 problems so far including all of the first 50 except for #46 which I am kind of stuck on. If by any chance you have done #46 (or go ahead and do it after reading this), can you drop me a note? I'd really like to know the magnitude of the answer.

I've been really enjoying solving these. Haven't worried about speed or elegance and just hacking code to get an answer although in a few cases I had to completely rethink/optimize my approach for one reason or another (#11 and #26 in particular). Think some of this will get into math that is somewhat over my head so not sure whether I will keep trying to solve them all and how far into it I will go. Need another 15 or so to make the top 1000.

By the way, I mentioned this to a friend as a good way to learn a new language and we both agreed but of course these are all mathematical in nature and there is a lot of ground they wouldn't cover. Does anyone know of a site with like N (being 10 or 20 or something I expect) problems to do (probably starting with "Hello World" and then getting much more involved fast) after which one should have a basic understanding of the main elements of a language?

Posted by aarondf at 05:36 PM | Tech | Comments (1)

Movies: No Country for Old Men

Not at all surprisingly, I thought this was absolutely excellent. Wonderful writing, acting, cinematography and story and an unbelievably memorable character in Anton Chigurh. I was particularly impressed by how smart all the significant characters are. Everything they do is sensible and thought out, even if doesn't work out so well in many cases. Was totally confused by the ending but that was pretty obviously intentional and didn't detract from the movie. ****1/2

Posted by aarondf at 05:32 PM | Movies | Comments (0)