What is different with Python ?

Andrea Griffini agriff at tin.it
Mon Jun 13 20:50:17 EDT 2005


On Mon, 13 Jun 2005 01:54:53 -0500, Mike Meyer <mwm at mired.org> wrote:

>Andrea Griffini <agriff at tin.it> writes:
>>>In short, you're going to start in the middle.
>>
>> I've got "bad" news for you. You're always in the
>> middle :-D.
>
>That's what I just said.

Yeah. I should stop replying before breakfast.

>I disagree. If you're going to make competent programmers of them,
>they need to know the *cost* of those details, but not necessarily the
>actual details themselves. It's enough to know that malloc may lead to
>a context switch; you don't need to know how malloc actually works.

Unless those words have a real meaning for you then
you'll forget them... I've seen this a jillion times
with C++. Unless you really understand how an
std::vector is implemented you'll end up doing stupid
things like looping erasing the first element.

Actually I cannot blame someone for forgetting that
insert at the beginning is O(n) and at the end is
amortized O(1) if s/he never understood how a vector
is implemented and was told to just learn those two
little facts. Those little facts are obvious and
can easily be remembered only if you've a conceptual
model where they fit. If they're just random notions
then the very day after the C++ exam you'll forget
everything.

>That's the way *your* brain works. I'd not agree that mine works that
>way. Then again, proving either statement is an interesting
>proposition.

Are you genuinely saying that abelian groups are
easier to understand than relative integers ?

>The explanation has been stated a number of times: because you're
>letting them worry about learning how to program, before they worry
>about learning how to evaluate the cost of a particular
>construct. Especially since the latter depends on implementation
>details, which are liable to have to be relearned for every different
>platform.

You'll get programmers that do not understand how
their programs work. This unavoidably will be a show
stopper when their programs will not work (and it's
when, not if...).

>I don't normally ask how people learned to program, but I will observe
>that most of the CS courses I've been involved with put aside concrete
>issues - like memory management - until later in the course, when it
>was taught as part of an OS internals course. The exception would be
>those who were learning programming as part of an engineering (but not
>software engineering) curriculum. The least readable code examples
>almost uniformly came from the latter group.

I suppose that over there who is caught reading
TAOCP is slammed in jail ...

Placing memory allocation in the "OS internals" course
is very funny. Let's hope you're just joking.

Andrea



More information about the Python-list mailing list