POV-Ray : Newsgroups : povray.off-topic : Paranoia? Server Time
7 Sep 2024 13:26:33 EDT (-0400)
  Paranoia? (Message 1 to 10 of 22)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Invisible
Subject: Paranoia?
Date: 21 May 2008 09:39:38
Message: <4834261a$1@news.povray.org>
OK, does anybody *else* find that testing software makes you... 
slightly... paranoid??

I wrote a program with the simple purpose of checking that two files are 
identical. It passed all the tests I constructed. Performed flawlessly. 
(But then, it's a pretty trivial task, right?)

Today, I suddenly discovered that it sometimes gives you the wrong 
answer. (!!!) Specifically, I constructed two very slightly different 
files that are erroneously reported as being identical.

Obviously, it's pretty easy to fix my program, and I can add a new test 
case to the system to catch this in future. But considering that "it's 
so simple there's nothing that can go wrong"... now I'm wondering 
exactly what the hell *else* my test cases haven't caught! o_O

[For anybody who cares: I forgot to put the streams into binary mode. So 
all the line-ends get converted to canonical form. OOPS!!]

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


Post a reply to this message

From: scott
Subject: Re: Paranoia?
Date: 21 May 2008 09:48:56
Message: <48342848$1@news.povray.org>
> I wrote a program with the simple purpose of checking that two files are 
> identical. It passed all the tests I constructed. Performed flawlessly. 
> (But then, it's a pretty trivial task, right?)
> 
> Today, I suddenly discovered that it sometimes gives you the wrong 
> answer. (!!!) 

Good job you weren't using it for something mission critical :-)


Post a reply to this message

From: Invisible
Subject: Re: Paranoia?
Date: 21 May 2008 09:55:21
Message: <483429c9@news.povray.org>
>> Today, I suddenly discovered that it sometimes gives you the wrong 
>> answer. (!!!) 
> 
> Good job you weren't using it for something mission critical :-)

._.

Erm... yes.

[I mean, realistically, what are the chances of two binary files being 
identical except for an extra few 0x0A bytes, all of which just happen 
to be prefixed by 0x0D bytes? Pretty small. But even so... EEEEK!!]

I think the worrying this is not so much that I wrote a bad program, but 
that I came up with ineffective test data. :-/

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


Post a reply to this message

From: Invisible
Subject: Re: Paranoia?
Date: 21 May 2008 10:19:14
Message: <48342f62$1@news.povray.org>
What...the...hell...?

I just had a closer look at my test data. For reasons *beyond* my powers 
of comprehension, I used a hand-written LCG psuedorandom number 
generator to generate the file contents. Trouble is, the particular 
coefficients I picked have a period of... four.

*WHY* would I do such a thing?! >_<

Of course, The *Real* WTF is that I seeded my broken PRNG using... the 
system PRNG. Which actually works correctly.

Dude. Seriously. What the HELL was I smoking that day?? [shakes head in 
disbelief] I literally cannot *believe* I managed to do something this 
retarded...

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


Post a reply to this message

From: Gilles Tran
Subject: Re: Paranoia?
Date: 21 May 2008 10:32:32
Message: <48343280$1@news.povray.org>

48342848$1@news.povray.org...
>> I wrote a program with the simple purpose of checking that two files are 
>> identical. It passed all the tests I constructed. Performed flawlessly. 
>> (But then, it's a pretty trivial task, right?)
>>
>> Today, I suddenly discovered that it sometimes gives you the wrong 
>> answer. (!!!)
>
> Good job you weren't using it for something mission critical :-)

Remember that Invisible works for a company that specialises in 
bioanalytical chemistry. This can be quite critical. If you send them your 
kid's DNA for paternity testing, don't be surprised if their answer is that 
1) that you're not the father and 2) according to their files the read dad 
is a French poodle named Fluffy.

G.


Post a reply to this message

From: Invisible
Subject: Re: Paranoia?
Date: 21 May 2008 10:41:19
Message: <4834348f$1@news.povray.org>
Gilles Tran wrote:

> Remember that Invisible works for a company that specialises in 
> bioanalytical chemistry. This can be quite critical. If you send them your 
> kid's DNA for paternity testing, don't be surprised if their answer is that 
> 1) that you're not the father and 2) according to their files the real dad 
> is a French poodle named Fluffy.

1. If you send *us* some DNA for testing, that's roughly the answer 
you'd get. We don't even have the equipment to perform that kind of 
work. ;-)

2. How the hell would you know the poodle is named Fluffy just from it's 
DNA? :-P

3. It's a good thing that when we finally put this stuff into operation, 
it's only going to be used for checking our backup CDs anyway...

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


Post a reply to this message

From: Invisible
Subject: Re: Paranoia?
Date: 21 May 2008 11:12:36
Message: <48343be4$1@news.povray.org>
Invisible wrote:

> I just had a closer look at my test data. For reasons *beyond* my powers 
> of comprehension, I used a hand-written LCG psuedorandom number 
> generator to generate the file contents. Trouble is, the particular 
> coefficients I picked have a period of... four.
> 
> *WHY* would I do such a thing?! >_<

Somebody on the Haskell list just wrote

"Did you also by any chance patch Debian's OpenSSL a few years back?"

I think I just got 0WN3D. :-(

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


Post a reply to this message

From: Eero Ahonen
Subject: Re: Paranoia?
Date: 21 May 2008 13:16:29
Message: <483458ed$1@news.povray.org>
Invisible wrote:
> 
> I wrote a program with the simple purpose of checking that two files are 
> identical. It passed all the tests I constructed. Performed flawlessly. 
> (But then, it's a pretty trivial task, right?)
> 

No offence, but why do you need to reinvent the wheel? Just use diff.

For future cases there's lots of useful small programs ported on 
Windows, too ;).
http://unxutils.sourceforge.net/

-- 
Eero "Aero" Ahonen
    http://www.zbxt.net
       aer### [at] removethiszbxtnetinvalid


Post a reply to this message

From: Darren New
Subject: Re: Paranoia?
Date: 21 May 2008 14:35:47
Message: <48346b83$1@news.povray.org>
Invisible wrote:
> [I mean, realistically, what are the chances of two binary files being 
> identical except for an extra few 0x0A bytes, all of which just happen 
> to be prefixed by 0x0D bytes? Pretty small. But even so... EEEEK!!]

Unless you loaded it into an editor that converts line endings for you? 
Or downloaded it via FTP in the wrong mode?

Lots of ways *that* can get screwed up.

And yes, I had the same problem I ran across in one of my programs. I 
have no idea how it passed the tests in the previous version of Tcl I 
was using and failed them now. It should have failed all along. (Create 
a bunch of files. Delete some. Scan the results. You'd think the "are 
the two different" would have failed when passed the "original" list 
twice, yes? :-)

-- 
   Darren New / San Diego, CA, USA (PST)
     "That's pretty. Where's that?"
          "It's the Age of Channelwood."
     "We should go there on vacation some time."


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Paranoia?
Date: 21 May 2008 14:53:50
Message: <48346fbe@news.povray.org>
Invisible wrote:
> What...the...hell...?
> 
> I just had a closer look at my test data. For reasons *beyond* my powers
> of comprehension, I used a hand-written LCG psuedorandom number
> generator to generate the file contents. Trouble is, the particular
> coefficients I picked have a period of... four.
> 
> *WHY* would I do such a thing?! >_<
> 
> Of course, The *Real* WTF is that I seeded my broken PRNG using... the
> system PRNG. Which actually works correctly.
> 
> Dude. Seriously. What the HELL was I smoking that day?? [shakes head in
> disbelief] I literally cannot *believe* I managed to do something this
> retarded...
> 

It's one of those "who the hell wrote this piece of... oh" moments


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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