Re: How do you write tests if you aren't sure what the result should be?

Ron Jeffries <[email protected]>
Newsgroups gmane.comp.programming.test-driven-development
Message-ID <[email protected]>
Hi Avi …

On Feb 16, 2013, at 2:47 PM, Avi Kessner <[email protected]> wrote:

> The basic formula for the penguin flying through the air is  x += dt + v
> If this is calculated 30 times per second you basically get x += dt +
> 30v,   but if you calculate it  32 times per second, you get  x +=
> (dt*0.937) + 32v


That formula (x += dt + v) doesn't seem right to me.

if velocity is v meters per second, then the distance travelled in time interval dt is v*dt, isn't it?

so I'd expect x += v*dt always.

I don't see what this dt + v is about, much less the (dt*0.937) + v. I get that 30/32 is 0.9375, but I expect to see that multiplied by velocity not added.

Can you explain to me what's going on?

Ron Jeffries
www.XProgramming.com
I'm not bad, I'm just drawn that way.  -- Jessica Rabbit



[Non-text portions of this message have been removed]



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/testdrivendevelopment/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/testdrivendevelopment/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.