Thursday, September 15th, 2011

Scamazon Credit Card

Amazon.com has a no annual fee rewards Visa card with a simple points earning structure: 3 Points: For every $1 spent on Amazon.com 2 Points: For every eligible $1 spent at gas stations, restaurants, drug stores, and office supply stores 1 Point: For every other $1 spent On the plus side the card doesn’t charge [...]

Wednesday, July 6th, 2011

Halfway To Hawaii

During a recent United flight from San Francisco to Maui, I played the “Halfway to Hawaii Game”. The objective, determine the exact time the airplane would reach the geographical midpoint of the flight to Hawaii. Shortly after takeoff, the crew provided this flight data: Departure – 6:07a Hawaii time Duration – 4hrs 42min Distance – [...]

Thursday, April 21st, 2011

Predicting When Derek Jeter’s 3000th Career Hit Will Occur

Unless Derek Jeter suffers a season ending injury, he will collect his 3000th career hit sometime during the 2011 season. Before opening day, Mike Vaccaro of the NY Post thought it would happen around June 7th based on Jeter’s historical average of 1.27 hits per game. Through the first 16 games of 2011, Jeter had [...]

Friday, February 5th, 2010

Project Euler Problems #9, #10, #11

It’s time to get back to discovering how much math and python I’ve forgotten… Problem #9 Find the only Pythagorean triplet (a,b,c where a < b < c and a^2 + b^2 = c^2) where a + b + c = 1000. The first thing I decided to do was figure out some bounds based [...]

Wednesday, October 7th, 2009

Project Euler Problems #6, #7, #8

I took a break from projecteuler to whip up a webOS application before my Tahoe Rim Trail Thru-hike. Upon returning I started skiming some technical books and started playing around with the Facebook Puzzles. In general, starting lots of threads is exciting and gives me the feeling that I am learning a lot; however, I [...]

Thursday, July 16th, 2009

Project Euler Problems #3 and #5

I got ahead of myself last post and skipped problem 3. Maybe it’s because it wasn’t that interesting: what’s the largest prime factor of 600851475143? Being an odd number meant 2 was not the largest prime factor, and no even numbers are prime so this simple trial division function seemed to work pretty well: def [...]

Sunday, July 12th, 2009

Project Euler Problem #4

As I work through these projecteuler problems, it’s become apparent that my brain tends towards a particular style of solution. When I know one way to solve a problem, I tend to just implement it, as I want to get to the next one. In the future, I’m going to start trying to find multiple [...]

Monday, July 6th, 2009

Project Euler Problem #2

Problem 2 from projecteuler requested the sum of all the even Fibonacci numbers below 4 million. I had seen references to “generators” in some of the Python howtos and after further reading, this seemed like a reasonable place to try them out. def fibGenerator(): fib0 = 0 fib1 = 1 while True: yield fib1 fibNext [...]

Friday, July 3rd, 2009

projecteuler.net + Python

I’ve started working through the problems at projecteuler, using Python. After playing around with Erlang for a while, I began to dislike the way the programming methodologies were baked into the language. It’s not that I disagreed with them, but sometimes it’s overkill to HAVE to do things via the idioms of assign once and [...]