Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Is this a good time to start learning python?

Reply
Thread Tools

Is this a good time to start learning python?

 
 
Rui Maciel
Guest
Posts: n/a
 
      03-31-2008
Recently I woke up inclined to take up the task of learning another
programming language. I've already dipped my toes in Perl (I've read online
tutorials and wrote a couple of irrelevant pet projects) but, as the
computers at my workplace only sport the python interpreter, it probably
means that learning python will end up serving me better, at least in the
short run. Plus, you know how Perl goes.

So far the decision seems to be a no brainer. Yet, Python 3000 will arrive
in a few months. As it isn't backwards compatible with today's Python,
there is the risk that no matter what I learn until then, I will end up
having to re-learn at least a considerable part of the language. To put it
in other words, I fear that I will be wasting my time.

At least that is what a clueless newbie believes. As this group is
frequented by people who have more insight into all things pythonesque,
what are your thoughts on this?


Thanks for the help
Rui Maciel
 
Reply With Quote
 
 
 
 
Reedick, Andrew
Guest
Posts: n/a
 
      03-31-2008

> -----Original Message-----
> From: python-list-bounces+jr9445=(E-Mail Removed) [mailtoython-
> list-bounces+jr9445=(E-Mail Removed)] On Behalf Of Rui Maciel
> Sent: Monday, March 31, 2008 12:41 PM
> To: http://www.velocityreviews.com/forums/(E-Mail Removed)
> Subject: Is this a good time to start learning python?
>
> Recently I woke up inclined to take up the task of learning another
> programming language. I've already dipped my toes in Perl (I've read
> online
> tutorials and wrote a couple of irrelevant pet projects) but, as the
> computers at my workplace only sport the python interpreter, it
> probably
> means that learning python will end up serving me better, at least in
> the
> short run. Plus, you know how Perl goes.
>
> So far the decision seems to be a no brainer. Yet, Python 3000 will
> arrive
> in a few months. As it isn't backwards compatible with today's Python,
> there is the risk that no matter what I learn until then, I will end

up
> having to re-learn at least a considerable part of the language. To

put
> it
> in other words, I fear that I will be wasting my time.
>
> At least that is what a clueless newbie believes. As this group is
> frequented by people who have more insight into all things

pythonesque,
> what are your thoughts on this?
>


Meh. That's like asking if you should learn to use a fork or a spoon.

If you're learning how to program, go with Python. (Learning as in
algorithms and data structures.)
If you need to use OO, go with Python. Perl's OO syntax is just
horrific.
If you're using a lot of regexes, need a bit of speed, or need something
a bit more robust than dynamically typed objects randomly breaking your
code, then go with Perl.
Libraries can also affect your choice. (I had to switch to Perl when
Python's win32com failed.)

Perl's learning curve is "unreadable" syntax, whereas Python's curve
requires knowing about side effects and dealing with strong, dynamic
typing.

Overall, Python is more high level and cleaner looking/readable.
However, Python's dynamically typed objects require additional
effort/expense to debug, and it's regex module is pretty quirky/painful
to use. Perl has a very large library, is fast, is mostly statically
compiled, and doesn't get in the way (automatic type conversions,
several ways to do something, etc..)

Python is probably faster to learn (clearer syntax and OO,) but slower
to master (side effects, strongly but dynamically typed.) With Perl,
once you get the core syntax down, you don't need to master Perl.
Instead you just look up the module/feature you want to use and just use
it. Finally, I find that Perl's documentation is much better than
Python's.


All IMO, IME.


*****

The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. GA623


 
Reply With Quote
 
 
 
 
Gabriel Genellina
Guest
Posts: n/a
 
      03-31-2008
En Mon, 31 Mar 2008 13:40:40 -0300, Rui Maciel <(E-Mail Removed)>
escribió:

> Recently I woke up inclined to take up the task of learning another
> programming language. I've already dipped my toes in Perl (I've read
> online
> tutorials and wrote a couple of irrelevant pet projects) but, as the
> computers at my workplace only sport the python interpreter, it probably
> means that learning python will end up serving me better, at least in the
> short run. Plus, you know how Perl goes.
>So far the decision seems to be a no brainer. Yet, Python 3000 will
> arrive
> in a few months. As it isn't backwards compatible with today's Python,
> there is the risk that no matter what I learn until then, I will end up
> having to re-learn at least a considerable part of the language. To put
> it
> in other words, I fear that I will be wasting my time.


Don't be scared by the "backwards incompatible" tag - it's the way to get
rid of nasty things that could not be dropped otherwise. The basics of
Python will continue to be the same, it's not a new, different language;
learning Python 2.X isn't a waste of time.
Python 3 won't be in widespread use until some (long?) time, and some
people won't ever consider it until Python 3.1 arrives; so Python 2.X will
continue being used for a long time.

--
Gabriel Genellina

 
Reply With Quote
 
Terry Reedy
Guest
Posts: n/a
 
      03-31-2008

"Rui Maciel" <(E-Mail Removed)> wrote in message
news:47f1140e$0$735$(E-Mail Removed)...
| Recently I woke up inclined to take up the task of learning another
| programming language. I've already dipped my toes in Perl (I've read
online
| tutorials and wrote a couple of irrelevant pet projects) but, as the
| computers at my workplace only sport the python interpreter, it probably
| means that learning python will end up serving me better, at least in the
| short run. Plus, you know how Perl goes.

If you intend to use Python on the computer at your workplace, then learn
the version installed there.

| So far the decision seems to be a no brainer. Yet, Python 3000 will
arrive
| in a few months. As it isn't backwards compatible with today's Python,
| there is the risk that no matter what I learn until then, I will end up
| having to re-learn at least a considerable part of the language.

Most of the changes are deletions and additions, rather than changes.

3.0a4 will be out in a few days. If you had no reason to use anything
else, I would consider starting with that. (But the IDLE IDE on Windows
may still not work right.)

| To put it in other words, I fear that I will be wasting my time.

If you learn and use 2.x, then avoid things that are going away. In
particular:

Unless you need to learn about old-style classes, I would not bother with
them and the differences from new, soon to be the only style, classes.
Derive all your classes from object or a subclass thereof.

Use // for integer floor division (ie, when you want 1/2 == 0.
Use 'from __future__ import division' if you use '/' in a file where both
operands
might be ints and you would want 1/2==.5.

| At least that is what a clueless newbie believes. As this group is
| frequented by people who have more insight into all things pythonesque,
| what are your thoughts on this?

Diverse, I am sure

Terry Jan Reedy



 
Reply With Quote
 
Ant
Guest
Posts: n/a
 
      03-31-2008
On Mar 31, 5:40 pm, Rui Maciel <(E-Mail Removed)> wrote:
....
> So far the decision seems to be a no brainer. Yet, Python 3000 will arrive
> in a few months. As it isn't backwards compatible with today's Python,
> there is the risk that no matter what I learn until then, I will end up
> having to re-learn at least a considerable part of the language. To put it
> in other words, I fear that I will be wasting my time.


Not at all. The lead developers have a plan for migrating older
scripts to 3000 automatically (or at least semi-automatically). This
can be done because the core syntax and builtin's are remaining
largely the same. The sort of thing that is changing in a way that
breaks backward compatibility are things such as removing the print
statement (e.g. >>> print "Hello world") with a print function (e.g.
print("Hello world")) and rearranging the standard library.

As Terry said, the major changes are additions and deletions - to
expand on this, the deletions are generally likely to be modules that
are rarely used or are unmaintained.

In any case, the python developers have a very good policy of making
the upgrade path to new versions of Python smooth. Generally new
features are released into the __future__ module in a release ready
for inclusion in the next release. This allows time to play with new
features before the "official" release of the feature comes out.
Module deletions usually hang around for a few releases as
"deprecated" before being permanently removed - again giving time to
catch up.

I believe that the deprecation speed may come rather abruptly with
3000, however the 2.6 release will contain a PyLint program for
identifying changes that will need to be made before migrating to 3k.
In addition, the 2.x branch is AFAIK going to be maintained up to (but
no further than) a 2.9 release. So there will be plenty of time to
adjust!

In short, any time invested in learning Python at this stage (except
perhaps old-style classes as pointed out above) will be time well
spent, as learning Python 3000 will be minor tweaks to what you'll
already know.

And for what it's worth, I've programmed in Haskell, C, Java (Java's
my profession), Javascript and Perl, and dabbled with Ruby, Lisp,
Groovy (and probably others), and Python is by far my favorite
language, not just for the clean syntax, rapid development,
readability 5 years down the line etc, but also for the community,
which is very helpful and knowledgeable.

BTW. I have to disagree with Andrew's comment: "With Perl,
once you get the core syntax down, you don't need to master Perl.
Instead you just look up the module/feature you want to use and just
use
it.". This may be true for knocking up Perl scripts, but for reading
*other peoples* code in any language you need to have a good mastery
of the core language. In Perl this is a quagmire of strange syntax,
special cases, multiple ways to do the same thing and esoterica/magic,
whereas Python's design to make whitespace significant and its "One
(obvious) way to do things" philosophy makes reading other peoples
code much easier. (Of course other peoples code always sucks, but
hey
 
Reply With Quote
 
Colin J. Williams
Guest
Posts: n/a
 
      04-01-2008
Terry Reedy wrote:
> "Rui Maciel" <(E-Mail Removed)> wrote in message
> news:47f1140e$0$735$(E-Mail Removed)...
> | Recently I woke up inclined to take up the task of learning another
> | programming language. I've already dipped my toes in Perl (I've read
> online
> | tutorials and wrote a couple of irrelevant pet projects) but, as the
> | computers at my workplace only sport the python interpreter, it probably
> | means that learning python will end up serving me better, at least in the
> | short run. Plus, you know how Perl goes.
>
> If you intend to use Python on the computer at your workplace, then learn
> the version installed there.
>
> | So far the decision seems to be a no brainer. Yet, Python 3000 will
> arrive
> | in a few months. As it isn't backwards compatible with today's Python,
> | there is the risk that no matter what I learn until then, I will end up
> | having to re-learn at least a considerable part of the language.
>
> Most of the changes are deletions and additions, rather than changes.
>
> 3.0a4 will be out in a few days. If you had no reason to use anything
> else, I would consider starting with that. (But the IDLE IDE on Windows
> may still not work right.)


Replace IDLE by PyScripter and then you
have a good development environment for
Python 3000.

Colin W.
>
> | To put it in other words, I fear that I will be wasting my time.
>
> If you learn and use 2.x, then avoid things that are going away. In
> particular:
>
> Unless you need to learn about old-style classes, I would not bother with
> them and the differences from new, soon to be the only style, classes.
> Derive all your classes from object or a subclass thereof.
>
> Use // for integer floor division (ie, when you want 1/2 == 0.
> Use 'from __future__ import division' if you use '/' in a file where both
> operands
> might be ints and you would want 1/2==.5.
>
> | At least that is what a clueless newbie believes. As this group is
> | frequented by people who have more insight into all things pythonesque,
> | what are your thoughts on this?
>
> Diverse, I am sure
>
> Terry Jan Reedy
>
>
>

 
Reply With Quote
 
Rui Maciel
Guest
Posts: n/a
 
      04-01-2008
After reading all replies I've decided to keep the subscription to this
group, crank up the tutorials and start getting my head around Python.

Thanks for all the helpful replies. Kudos, everyone!


Rui Maciel
 
Reply With Quote
 
Reedick, Andrew
Guest
Posts: n/a
 
      04-01-2008


> -----Original Message-----
> From: python-list-bounces+jr9445=(E-Mail Removed) [mailtoython-
> list-bounces+jr9445=(E-Mail Removed)] On Behalf Of Ant
> Sent: Monday, March 31, 2008 5:58 PM
> To: (E-Mail Removed)
> Subject: Re: Is this a good time to start learning python?
>
> On Mar 31, 5:40 pm, Rui Maciel <(E-Mail Removed)> wrote:
>
> BTW. I have to disagree with Andrew's comment: "With Perl,
> once you get the core syntax down, you don't need to master Perl.
> Instead you just look up the module/feature you want to use and just
> use
> it.". This may be true for knocking up Perl scripts, but for reading
> *other peoples* code in any language you need to have a good mastery
> of the core language. In Perl this is a quagmire of strange syntax,
> special cases, multiple ways to do the same thing and esoterica/magic,
> whereas Python's design to make whitespace significant and its "One
> (obvious) way to do things" philosophy makes reading other peoples
> code much easier. (Of course other peoples code always sucks, but
> hey



Eh... reading other people's Python code can be pretty hit or miss too.
Between undeclared variables (did you mean to reuse that variable name?)
and dynamic typing, Python can be really tough to follow. Add in side
effects, over-use of lambdas, and the really hit or miss quality of
Python's documentation, and Python can be just as difficult to follow as
Perl.

The things that make code readable are good comments, good design
(Python emphasizes OO which helps,) and well-structured code (i.e. don't
combine 3-4 operations in a single line.) This holds true for any
language, so I wouldn't go out of my to ding Perl. IME.


> its "One (obvious) way to do things" philosophy


Given some of the solutions people have proposed to code questions in
the past, I'm going to pretend you didn't say that.



 
Reply With Quote
 
lbonafide@yahoo.com
Guest
Posts: n/a
 
      04-01-2008
On Mar 31, 1:36*pm, "Gabriel Genellina" <(E-Mail Removed)>
wrote:

> Don't be scared by the "backwards incompatible" tag - it's the way to get *
> rid of nasty things that could not be dropped otherwise.


I would consider breaking production code to be "nasty" as well.
 
Reply With Quote
 
Gabriel Genellina
Guest
Posts: n/a
 
      04-01-2008
En Tue, 01 Apr 2008 13:57:55 -0300, <(E-Mail Removed)> escribió:

> On Mar 31, 1:36*pm, "Gabriel Genellina" <(E-Mail Removed)>
> wrote:
>
>> Don't be scared by the "backwards incompatible" tag - it's the way to
>> get *
>> rid of nasty things that could not be dropped otherwise.

>
> I would consider breaking production code to be "nasty" as well.


Please explain how the existence of Python 3.0 would break your production
code.

--
Gabriel Genellina

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Good website ref to start learning PHP Kabuki Armadillo HTML 3 06-15-2008 06:11 PM
Is time.time() < time.time() always true? flamesrock Python 8 11-24-2006 06:51 AM
What are good books to start learning from scratch gamerfry@gmail.com C++ 7 04-27-2006 01:24 PM
e-learning, (collaborative learning environment) collinm Java 1 09-08-2005 09:52 PM
delta time = time stop - time start engsol Python 2 01-26-2004 12:06 PM



Advertisments