Myth: Python is ideal for beginners

marshall marshall at spamhole.com
Fri Feb 7 05:26:22 CET 2003


"Mark McEahern" <marklists at mceahern.com> wrote in message news:<mailman.1044565398.10942.python-list at python.org>...
> [Pedro]
> > Okay, that is very true. Thanks for pointing it out . I can try and
> > start one.  But my point remains that people shouldnt say 'Python is
> > ideal for beginners'
> 
> By the way, why do you suppose they say that Python is ideal for beginners?
> 
> I personally don't know whether that's true or not.  I'm sure it's ideal for
> some beginners and not ideal for others.  It's probably more ideal than some
> languages, less ideal than others--all of which of course depends on the
> beginner, how they were introduced, their level of initiative and tenacity,
> etc.  Is Python in the middle of the pack, in the front, or straggling
> behind?  I don't really know.

How about some perspective from a 'beginner':
I'm a wannabe programmer. I'm probably older than most beginners
having learned BASIC on Commodore PET in 1979 in high school.  Over
the years I have wasted countless hours on C and then C++ (fortunately
less on VB). "Learning" a language means nothing.  Doing something
with it means learning the associated libraries and API calls unless
you are writing for the command line.  I got mired in one set of tools
after another (insert your euphemism for MFC here) and turned away
discouraged each time.  I found Python one month ago and have written
more code and learned more than in the past twenty years.

Why is Python good for beginners?
1. If you are not sure if something will work as intended you can try
it in the interpreter.
2. Simple syntax.  As easy as BASIC.
3. Object oriented pretty much from the ground up so you can learn OO
concepts.  Even the irritating 'self' reinforces the lesson albeit
painfully.
4. You only import what you need.  Importing seems much easier to
understand than the include process.  Typing 'module.object'
reinforces what is going on.
5. Less typing = more code faster = learn from your mistakes earlier.
I created some classes to make simple a GUI interface.  My approach
was flawed and I had to rewrite much of it.  Time lost: 2 hours. 
Lessons learned:  priceless.  I would have given up in frustration
with C.
6. dir().  I dir every new module or instruction I use - lots of
'Aha!' moments.
7. Compact, easy to read code.  Complexity increases geometrically
with size. It is always easier to understand code that fits on one
screen vs. code that spans three or more.

...and  more ...

What would make it better for beginners?
1. Some 'best practices' on how to structure code across multiple
files, handle main(), and maybe some other things I can't think of
right now.  I know these are addressed in various places and I learned
from browsing this newsgroup.  But when I started I wasn't even sure
where I should put my files.
2. Maybe a better IDE but IDLEfork serves my needs pretty well.
3. NOT books.  Been there.  Every C++ book I have seen shows you what
but not why.  Some excercises graduated in difficulty might be good
(but none where you create an 'employee' object and give it a 'salary'
attribute please!)

The bottom line with Python is that, because you can do more in less
time, you can learn more in less time.

Sorry for the long post but I've been lurking for awhile.  I'll go
back to my code now.

_marshall_




More information about the Python-list mailing list