Interview at Lang.NEXT

bearophile via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Thu Jun 5 00:54:23 PDT 2014


Nick Sabalausky:

> to three lines of tests for every one line of real code is 
> considered rapid development,

My Python development is just development, it's not meant to be 
particularly rapid :-)

And I don't think a 3:1 ratio is too much. Among the testing code 
I also count the doctests, the unittests, the other tests at 
higher level, the logic tests done with the Python version of 
QuickCheck, the contracts, the class/module invariants, the loop 
invariants, and the safety asserts spread in the code.

Take a look at this:
http://www.sqlite.org/testing.html

>As of version 3.8.0, the SQLite library consists of 
>approximately 84.3 KSLOC of C code. (KSLOC means thousands of 
>"Source Lines Of Code" or, in other words, lines of code 
>excluding blank lines and comments.) By comparison, the project 
>has 1084 times as much test code and test scripts - 91452.5 
>KSLOC.<

In my D code I have an average 2.5 lines of testing code or every 
1 line of D code, probably thanks to the stronger typing of D 
(and I think my D/Python code is less buggy than Phobos).

Bye,
bearophile


More information about the Digitalmars-d-announce mailing list