What is different with Python ?

Magnus Lycka lycka at carmen.se
Tue Jun 14 14:41:16 EDT 2005


Peter Maas wrote:
> Learning is investigating. By top-down I mean high level (cat,
> dog, table sun, sky) to low level (molecules, atoms, fields ...).

Aha. So you must learn cosmology first then. I don't think so. ;)

I don't know if you really think that you learn things top
down, but I doubt that you do. I know I don't. It's very
rare that I have a good understanding of the overall workings
of a system before I start to learn details. As I learn little
details here and there, my understanding of the entire system
is gradually growing and changing. Sometimes, a minor detail
might completely change my overall picture of a system.

In my experience, software designs developed by people who
lack a good hands-on understanding of the details in a software
system rarely work. We can't know the "top" properly unless
we know a lot about the "bottom".

Do you think children learn to speak by arriving at some
kind of general understanding of grammer before they learn
individual words? :) People typically don't learn things top
down, and I think there are good reasons for that.

Regarding software development, Bertrand Meyer said something
like this: "Top-down design doesn't work, because real software
systems have no top." His view of Object-Oriented development
is that it's a process where we go from that which is known
to us, to that which is (still) unknown. It might go up or
down, but we start with what we know, and gradually expand our
understanding into new territories armed with what we have
learnt so far.

Analysis or decomposition is only half of logical thinking.
Synthesis or composing parts into entire systems are just
as important, and we can't just do one part first, the other
after, and then be done with it.

We are all different intellectually, both genetically and by
training and education. Some people find it easier to grasp
theories, and others need more tangible examples. For each
person, the useful approach will probably depend on the previous
experience in that particular field, or in related areas.

> And to know the lowest levels is not strictly necessary for
> programming. I have seen good programmers who didn't know about
> logic gates.

People might be "good programmers" in some sense, but they will
make mistakes if they don't understand the underlying mechanisms.
This doesn't mean that you need to understand all details down
to the quantum mechanics level, but if you see programing as a
purely "logical" activity, without regards for the technical
implementation, you will run into plenty of problems.

One classical trap is to fail to understand how floating point
numbers are represented in computers. Other common problems among
people who lack a technical understanding for computers is that
they fail to see how and why their solutions use up different
amounts of resources, be it memory, CPU time or whatever. I've
also often seen confusion because people fail to understand the
distinction between other logical and an internal representations,
such as cunfusion over the fact that a date which looks like
eight digits don't use eight bytes in the database, and
frustration over the fact that the database doesn't allow you
to store 0000-00-00 in a date field.

It's just the same as with cars. You can be a fair driver without
knowing anything about mechanics, but the more you know about how
the car works from a mechanical and physical point of view, the
easier it will be to understand why it behaves the way it does,
and the less likely you are to make mistakes when unusual things
happen.

Just as you can learn how cars behave from experience, or from
advice from others with experience, without understanding the
underlying mechanisms, you can learn programming this way. We
have learned things that way for thousands of years. I don't
think it's optimal though.

Robert Pirsig's "Zen and the Art of Motorcycle Maintenance"
covers this subject.

But we all have to start somewhere, and it's never to late to
learn something new. Curiosity and an open mind often means
more than formal education. Some people with a very "good"
education seem to believe that the thing they've learnt is
all that matters, and they will fall into other traps. There
is always another perspective that might give us a new insight.



More information about the Python-list mailing list