On Tue, Sep 20, 2016 at 10:42 AM, Steven D'Aprano <st...@pearwood.info> wrote:
> On Tue, Sep 20, 2016 at 09:34:12AM +1000, Chris Angelico wrote:
>> It's more than that, though. When a student is given an assignment,
>> it's usually to help said student to learn to *write code*, not to
>> learn how to walk into the plumbing store of PyPI and look for
>> something that approximates to the job being done.
> That might be sufficient for theoretical computer science courses, but
> it is *far* from sufficient for learning to be a professional
> programmer. I think that programmer education lets students down hugely.
> Knowing how to "walk into the plumbing store" to get a standard plumbing
> fixture is a skill programmers desperately need.
> (We also need better standard plumbing fixtures, but that's another
> story.)
> Failure to teach appropriate use of external dependencies, including
> when to use them and when not to, is part of the reason so many
> programmers suffer under Not Invented Here syndrome. It is not always
> appropriate to use PyPI, but being able to use it is an essential skill
> for programmers.

This is true, but by the time we're teaching people how to manage
dependencies, we've already taught them to manage a *project*. That
means a git repository, usually a README, a clear entry point, etc,
etc, etc. With that sort of groundwork, it's easy to instruct them to
use requirements.txt, rather than try to have a single self-contained
.py file that identifies all its deps. Maybe it's different elsewhere,
eg if you're starting people off in a scientific field and there's a
single obvious library to use.

>> Maybe it's
>> different at university, but with my students, it's always been "no
>> external libraries" (and in some cases, a common-sense avoidance of
>> obvious solutions from the standard library - if you teach someone how
>> to implement a sort and the response is simply "lst.sort()", it's not
>> exactly implementing anything).
> This is off-topic, but unless you are specifically doing an algorithms
> course, why would you bother teaching anyone to implement a sort? Do you
> teach them to implement their own float multiplication as well?

Yes we are (at least in that instance). With more real-world tests,
they're allowed to use all the standard library - this was the "in
some cases" bit. (We don't teach float multiplication, because it's
very complication, but we do teach some stuff about how bitwise
operations work. So yes, we are teaching low level stuff in high level

Python-ideas mailing list
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to