• About
  • Bookmarks
Robert-Reinder Nederhoed Internet, Bitcoin en koken (weblog in ruste)

Programming Contest Trouble

May 13, 2006 00:30 / Leave a Comment / Robert-Reinder Nederhoed

Last weekend, I worked all night programming a random player for a programming contest. Things like this always turn out to be harder than expected. Elegant code, nice class dependencies, doctests, Python 2.4.

Results: errors. It turns out the contest sandbox runs Python 2.2. I’m not complaining, host Fred is limited by his hosting provider. Hey, this is the real world. Some companies do use almost 4 year old versions1.

Ok, maybe I shouldn’t have used

for move in moves[::-1]:
    yield move

But did you know built-in function sum(seq, start=0) was introduced in Py 2.3.5?

return sum(scores)
NameError: global name 'sum' is not defined

You live, you learn.

Check my position, second last. But tonight, my random player will get lucky. I just submitted my 4th version, this time tested with Py 2.2. Good night!

1) Red Hat Enterprise servers, for example.

Posted in: Development, Personal, Python

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Post Navigation

← Previous Post
Next Post →

Recent Posts

  • LeWeb 2013: about Bitcoin
  • Rule of acquisition #303
  • Recreational betting with Bitcoins
  • Search activity on Google related to "bitcoin" and its value
  • Bitcoin Statistics to study

Recent Comments

  • ifoods on Ordering food online: a short adventure
  • Evening photoshoot with Margie (and more) « Nederhoed on New camera Canon EOS 1000D
  • R.R. Nederhoed on OmniGraffle equivalent anyone?
  • watziterinhetmais on Where is my mind?
  • warddr on About

Archives

  • June 2013
  • March 2013
  • August 2012
  • March 2012
  • May 2011
  • May 2010
  • March 2010
  • January 2010
  • December 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • January 2009
  • November 2008
  • October 2008
  • July 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • December 2007
  • November 2007
  • October 2007
  • September 2007
  • August 2007
  • July 2007
  • June 2007
  • May 2007
  • April 2007
  • March 2007
  • February 2007
  • January 2007
  • December 2006
  • November 2006
  • October 2006
  • September 2006
  • August 2006
  • July 2006
  • June 2006
  • May 2006
  • April 2006
  • March 2006
  • January 2006
  • December 2005
  • November 2005
  • October 2005
  • September 2005
  • August 2005

Categories

  • Bitcoin
  • Books
  • Development
  • Finance
  • Idealism
  • JavaScript
  • Language
  • Linux
  • Mining
  • Music
  • Object Oriented Design
  • Personal
  • Photography
  • Python
  • Quotes
  • Ruby
  • Spending
  • The Hague
  • Uncategorized
  • Web
  • XML
  • Zope

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org
© Copyright 2018 - Robert-Reinder Nederhoed
Infinity Theme by DesignCoral / WordPress