connect four (game)

Rustom Mody rustompmody at gmail.com
Mon Nov 27 08:35:09 EST 2017


On Monday, November 27, 2017 at 12:12:24 PM UTC+5:30, Chris Angelico wrote:
> On Mon, Nov 27, 2017 at 3:04 PM, Rustom Mody  wrote:
> >> Aviators have pinned down the best solution to this, I think. A pilot
> >> is not expected to be perfect; he is expected to follow checklists. A
> >> preflight checklist. A departure checklist. A landing checklist.
> >> Everything that needs to be done right is mentioned on the list, and
> >> you just go through the list and make sure you've done everything.
> >
> > And thats where the analogy breaks down.
> > Presumably a 50 person short-flight and a 600-person transcontinental may have
> > at least something in common in their pilot-checklists
> > What common will you find in a multi-million line OS, a thousand line script
> > and a student prime-numbers first-program?
> 
> You locate a pure function. I can pretty much guarantee that the first
> two will have a number of them, and the third one may or may not, but
> almost certainly should. Pure functions are the easiest to unit-test.
> Then you build up from there.
> 
> > No I am not dissing on testing and TDD; just that universality¹ of computing devices
> > is something that our civilization is nowhere near understanding, leave alone
> > dealing with — two programs can be more far apart than a bullock cart and a jet.
> > And yet they are both programs
> 
> ... so?

I know how to drive a car… and various two-wheelers.
I not so sure of a bus/truck… I suppose I could get one from here to there
at a pinch… without killing someone… though not quite sure of that!
Doesn't translate into knowing how to 'drive' planes or bullock-carts


gcc is tested with dejagnu. Do you imagine that knowing python's unittest or
nose directly translates into dejagnu expertise?
And even if we stay with industry-strength programs — gcc, linux-kernel, 
CPython, KDE — do you imagine that testing one helps in testing the other?
I doubt it (though I am hardly an expert with testing frameworks)

Once again let me end by saying that testing and TDD are good ideas
And it would be nice if there was more of it in/for python
[See http://osherove.com/tdd-kata-1/ one of the first hits that google
gives (me) for TDD python, and you find the python example
actually shows Ruby!]



More information about the Python-list mailing list