POV-Ray : Newsgroups : povray.off-topic : Very interesting... : Re: Very interesting... Server Time
31 Oct 2024 19:07:45 EDT (-0400)
  Re: Very interesting...  
From: triple r
Date: 31 Jul 2008 18:30:00
Message: <web.48923c602b2c0b34ef2b9ba40@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> You would be surprised. I've had people do things like pass the number
> of columns wide that the printer report should be in index zero of a
> floating point array indexed by customer age, just so they wouldn't have
> to spend 20 minutes to recompile other parts of the program when they
> changed what variables are shared between programs.

Sounds familiar.  The job came down to a lot of signal processing, and I had a
coworker who needed to improve his programming ability, so he decided to write
a Sudoku solver on his own time.  Of course you need to keep track of which
numbers are possible, so in each square for 1-9 a '1' represented a possible
number while a '0' mean that possibility was ruled out.  Why not?  Makes sense.
 But we need to store that data, so lets have '1' correspond to a 1, '10'
correspond to a 2, '100' to 3, and so on up to 10^8.  Just add 'em up.  (so
1100 == 3 and 4 possible.)  Oh, and let's just store that as a real number
since we'll be doing all those log10's anyway.  I was unable to convince him
otherwise, which probably reflects more badly upon me than him, but at least no
one else ever had to see it, and at least I think he used double precision...

 - Ricky


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.