gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-dev] [PATCH] Speed up gpsfake.


From: Eric S. Raymond
Subject: Re: [gpsd-dev] [PATCH] Speed up gpsfake.
Date: Thu, 17 May 2012 16:23:27 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

Gary E. Miller <address@hidden>:
> Yo Beat!
> 
> Cool.  Now in git head.

I was going to sent Beat a note mildly chastising him for the magic number
un the patch.  Never, ever do this:

            elif self.count % 11 == 0:

Much better is this:

            elif self.count % Baton.SPINNER_INTERVAL == 0:

with this:

    # By setting this > 1 we reduce the frequency of the twirl
    # and speed up test runs.
    SPINNER_INTERVAL = 11

Always document your assumptions.
-- 
                <a href="http://www.catb.org/~esr/";>Eric S. Raymond</a>

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]