On Mon, Nov 27, 2017 at 3:04 PM, Rustom Mody <rustompm...@gmail.com> 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? > ¹ Ive seen CS PhDs ask a student why a student didnt incorporate some > error-checking > into his compiler which amounted to solving the halting problem. > More mundanely I see students have a hard time seeing their phones and their > laptops as 'the same' Again: so? Testing methodologies don't require that. ChrisA -- https://mail.python.org/mailman/listinfo/python-list