[Tutor] beginning to code

Steve D'Aprano steve+python at pearwood.info
Mon Sep 18 09:00:37 EDT 2017


On Mon, 18 Sep 2017 09:53 pm, Rick Johnson wrote:

> Tell you what: test your hypothesis on non-programmers and
> report back here.

Why would someone do that?

The purpose of source code is not to communicate with non-programmers. It is to
communicate with other programmers. (If the code is executable by a computer as
well, that's even better.)

I wouldn't ask a non-programmer to critique my source code any more than I would
ask a non-English reader to critique my English prose, or a non-musician to
read my musical score[1]. It would annoy the non-programmer and provide no
useful results.



> all i'm
> suggesting is an extrapolation of that philosophy into the
> realms of conditional logic.

By writing True == True when you actually mean just True.


> I'm thinking of writing a linter (or pre-parser, call it
> what you like) that will enforce the explicit forms that i
> have outlined above.

That's an excellent idea. And just like I promised all those many, many years
ago when you announced you were re-writing Python to implement all your other
brilliant ideas, I'll beta test it for you. If and when you actually write some
code and make it publicly available.







[1] Always supposing I could write a musical score. 


-- 
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.




More information about the Python-list mailing list