connect four (game)

nospam.Rustom Mody rustompmody at gmail.com
Sun Nov 26 12:35:00 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â1 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