Search the web
Sign In
New User? Sign Up
a-a-p-dev · A-A-P project development list (closed)
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Montly overview A-A-P June 2002   Message List  
Reply | Forward Message #15 of 43 |
Re: [a-a-p-dev] Montly overview A-A-P June 2002


Steven Knight wrote:

> > > > Furthermore, I have added a mechanism for testing. Both for testing
> > > > individual modules and executing recipes. The typeless nature of Python
> > > > requires doing a lot of tests. Only a few have been added so far, but
> > > > one bug has already been detected.
>
> I'd highly recommend implementing a testing discipline in your process
> up front. On SCons, we have a policy (adopted from and enforced by
> Aegis) that every checkin must be accompanied by one or more new or
> changed tests that demonstrate the bug or feature by failing on the old
> code base. By building up our tests incrementally, we now have a very
> complete set of unit tests for our modules, and a regression test suite
> of 163 end-to-end tests.
>
> I've found this way of working to be especially crucial during the early
> stages of development, when you may need to refactor parts of the design
> frequently as you add features. Being able to do this and *know* you
> haven't broken anything because all of the tests pass (a la eXtreme
> Programming) is invaluable.

Although I agree with doing a lot of testing, A-A-P is still in a phase
where the design is more important than correct code. The main goal
currently is to quickly get to a stable recipe format and find good
interfaces between modules. This means I do want to find bugs that
influence the design, but don't care much for details. Actually, I
should use tests that check if the specifications are right. That means
using real-life test cases.

> Python will throw an exception if you try to use a function that hasn't
> been imported. It won't throw an exception just because you pass a
> variable of the wrong type, but it will if/when you try to use that
> variable inappropriately.

Thus this basically means the tests must cause every function to be used
at least once, so that an exception will be thrown when it wasn't
imported. Would require a coverage checker to check if the tests really
did this.

> In practice, we've found that the ongoing challenge is to not just rely
> on generic exception-handling, which is great for programmer debugging,
> but to catch exceptions at all of the appropriate points and provide
> error messages more helpful for less sophisticated end-users.

That's something I'm doing already, since it greatly helps quickly
locating a problem. A try/except block around every function that can
throw an IOError, for example.

> > Perhaps some kind of Python-lint exists, I haven't looked for it yet.
>
> Look for PyChecker, available on SourceForge. It finds a number of
> problems in Python code by performing analysis on the compiled byte
> code.

I'll have a look at it later.

--
CRONE: Who sent you?
ARTHUR: The Knights Who Say Ni!
CRONE: Aaaagh! (she looks around in rear) No! We have no shrubberies here.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
/// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\
\\\ Project leader for A-A-P -- http://www.a-a-p.org ///
\\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///



Mon Jul 1, 2002 7:13 pm

vimboss
Offline Offline
Send Email Send Email

Forward
Message #15 of 43 |
Expand Messages Author Sort by Date

In June the recipe executive module was further enhanced. Quite a few tough issues have been dealth with. The choice for mixing Makefile and Python syntax...
Bram Moolenaar
vimboss
Offline Send Email
Jul 1, 2002
8:43 am

On Mon, 1 Jul 2002, Bram Moolenaar wrote: Thanks for this update. ... Isn't the typeless nature of python a problem when you try to build good solid code? I...
Aschwin Marsman - aYn...
marvinmarsman
Offline Send Email
Jul 1, 2002
4:24 pm

... It's true that Python leaves most of the testing to the user. The largest potential problem I see is using a function that wasn't imported and passing a...
Bram Moolenaar
vimboss
Offline Send Email
Jul 1, 2002
5:49 pm

... I'd highly recommend implementing a testing discipline in your process up front. On SCons, we have a policy (adopted from and enforced by Aegis) that...
Steven Knight
knight@...
Send Email
Jul 1, 2002
7:00 pm

... Although I agree with doing a lot of testing, A-A-P is still in a phase where the design is more important than correct code. The main goal currently is...
Bram Moolenaar
vimboss
Offline Send Email
Jul 1, 2002
7:13 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help