Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #14564

Programming Challenge

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail
From markspace <-@.>
Newsgroups comp.lang.java.programmer
Subject Programming Challenge
Date Wed, 16 May 2012 09:26:11 -0700
Organization A noiseless patient Spider
Lines 28
Message-ID <jp0kf5$2le$1@dont-email.me> (permalink)
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
Injection-Date Wed, 16 May 2012 16:26:13 +0000 (UTC)
Injection-Info mx04.eternal-september.org; posting-host="tCs9q+zYIgWty87qnomMxw"; logging-data="2734"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/+guGVCSeN/yoWMRStOb8szjL56e3JNr8="
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1
Cancel-Lock sha1:Z6LXSbB6uKXuBXh2FlxPqF6dHDI=
Xref csiph.com comp.lang.java.programmer:14564

Show key headers only | View raw


Peter Norvig has a programming challenge on his website.  It's rather 
old, from 1999, and the premise is kind of off: compare Java to Lisp. 
However, ignoring the micro-benchmark discussion and the language vs. 
language debate, the problem itself is interesting.

<http://norvig.com/java-lisp.html>

So I went ahead and tried it.  I'm afraid I didn't do too well.  I 
misread the requirements (twice!) and part of the challenge is to 
measure your speed as a coder, so while I wasn't the most extreme data 
point (10 hours to code it up, iirc), I was well above the mean.

Anyway, now that I have it working, I found that the original input 
files are not available.  The website referenced is very old, and seems 
to get "tired" while downloading the large files.  So I'm wondering if 
any else would like to test their skills against Peter's and the rest of 
the sample, and share their solution.  I have a version which should be 
good and fast.  I did find one possible large optimization, and I'm 
wondering if other folks would find the same optimization, or handle the 
large search space in a different way.

Program to follow!  I'll let you work on it first before sharing my 
solution.  Don't forget to read the instructions, which say to produce a 
"professional" result, but also to keep the source to one file (which 
should make sharing over the internet easier).

ttfn

Back to comp.lang.java.programmer | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Programming Challenge markspace <-@.> - 2012-05-16 09:26 -0700
  Re: Programming Challenge Jeff Higgins <jeff@invalid.invalid> - 2012-05-17 08:13 -0400
    Re: Programming Challenge markspace <-@.> - 2012-05-17 08:50 -0700

csiph-web