POV-Ray : Newsgroups : povray.off-topic : Very interesting... Server Time
16 May 2024 00:08:43 EDT (-0400)
  Very interesting... (Message 11 to 15 of 15)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Orchid XP v8
Subject: Re: Very interesting...
Date: 31 Jul 2008 16:25:37
Message: <48921fc1$1@news.povray.org>
Darren New wrote:

>> It seems to be that, regardless of which programming language you use, 
>> figuring out the best way to divide the problem into abstractions is 
>> absolutely *critical* to writing clean, efficient, maintainable code. 
>> And it's often not very obvious which way *is* the best until you try 
>> to actually "do it".
> 
> Yep. That's where the experience comes in. And the natural ability to 
> recognise the abstractions in things.

Experience.

It's like Chess or Go - the rules is simple, but the tactics and 
strategy to play well come only with practice and experience.

>> This seems like it's only common sense.
> 
> 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.

GAAAAAH! >_< IT BURNS! IT BURNS ME!! MAKE IT STOP!!!! GAH, I WANT TO 
CLAW OUT MY OWN EYEBALLS!!1!!eleven

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Darren New
Subject: Re: Very interesting...
Date: 31 Jul 2008 16:37:57
Message: <489222a5$1@news.povray.org>
Orchid XP v8 wrote:
> GAAAAAH! >_< IT BURNS! IT BURNS ME!! MAKE IT STOP!!!! 

The stupid is leaping up off the page and burrowing into my brain!</Dilbert>

-- 
Darren New / San Diego, CA, USA (PST)


Post a reply to this message

From: triple r
Subject: Re: Very interesting...
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

From: Chambers
Subject: Re: Very interesting...
Date: 8 Aug 2008 19:48:08
Message: <489cdb38$1@news.povray.org>
triple_r wrote:
> 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...

Wait... are you saying that he implemented a bitmap, but in decimal, and 
stored it as a float?

Gah!!!

...Chambers


Post a reply to this message

From: triple r
Subject: Re: Very interesting...
Date: 8 Aug 2008 22:05:00
Message: <web.489cfa412b2c0b34ef2b9ba40@news.povray.org>
Chambers <ben### [at] pacificwebguycom> wrote:

> Wait... are you saying that he implemented a bitmap, but in decimal, and
> stored it as a float?
>
> Gah!!!

On reading that back, it really wasn't as clear as it was in my head--I should
work on that--but you got it!  Gah is right.  1100 (base 2) => 1100 (base 10)
=> 1100.0.  To get the information back out, you just do a log10, subtract the
largest power of ten, and repeat until you have all the information!  Not to
say I haven't done some dumb things in my day, but *that*...

 - Ricky


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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