Programming newbie coming from Ruby: a few Python questions

S

simonharrison

Hi all. I've been try to learn ruby for a few months but I'm about
ready to give up. The available books either assume a programming
background, or are out of date. Anyway, I think python may suit me more
due to its 'theres one way to do it' philosophy (hope the quote is
right)! Another quote that I liked was:

'Clever is not considered a compliment in Python.' (don't know where I
read that...)

In Ruby, there are many ways to do the same thing and cleverness seems
to be held in high regard. These attitudes are not too helpful for
beginners in my experience. Anyway, enough waffle.

What books and tutorials are recommended to learn Python? The tutorial
that comes with Python is great and has given me a good overview but I
think I'd benefit from some programming projects, now I have a little
understanding of how Python works.

Ideally, I'd like a whole series of projects where I'm walked through
how to go about writing real Python. The way I look at it, nobody
learnt to build a house just from reading about building materials!

Any other tips for getting up to speed with Python fairly quickly will
be greatly appreciated.

If anyone can help, thanks very much
 
R

Ravi Teja

'Clever is not considered a compliment in Python.' (don't know where I
read that...)

On a similar note.

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by
definition, not smart enough to debug it."

-- Brian Kernighan of C
 
B

BartlebyScrivener

'Clever is not considered a compliment in Python.' (don't know where I
read that...)

"To describe something as clever is NOT considered a compliment in the
Python culture."--Alex Martelli, Python Cookbook 2nd Ed. pg. 230 (a
great book for learning by doing, after you have the basics down)

Do you have Python installed yet?

If not, consider

http://www.richarddooling.com/index.php/category/geekophilia.

You sound like a nonprogrammer (except for your Ruby experience), so
you probably want:

http://wiki.python.org/moin/BeginnersGuide/NonProgrammers

Good luck! Have fun.

rd
 
C

crystalattice

Hi all. I've been try to learn ruby for a few months but I'm about
ready to give up. The available books either assume a programming
background, or are out of date. Anyway, I think python may suit me more
due to its 'theres one way to do it' philosophy (hope the quote is
right)! Another quote that I liked was:

'Clever is not considered a compliment in Python.' (don't know where I
read that...)

In Ruby, there are many ways to do the same thing and cleverness seems
to be held in high regard. These attitudes are not too helpful for
beginners in my experience. Anyway, enough waffle.

What books and tutorials are recommended to learn Python? The tutorial
that comes with Python is great and has given me a good overview but I
think I'd benefit from some programming projects, now I have a little
understanding of how Python works.

Ideally, I'd like a whole series of projects where I'm walked through
how to go about writing real Python. The way I look at it, nobody
learnt to build a house just from reading about building materials!

Any other tips for getting up to speed with Python fairly quickly will
be greatly appreciated.

If anyone can help, thanks very much
Of course there's the O'Reilly set: Learning Python, Programming
Python, Python in a Nutshell, etc. I found them great for an overview
and capabilities look at the language, but like you I prefer a more
project-oriented approach. They are good to have on your reference
shelf though.

The best book I've found for "teaching" you the language is from Deitel
and Deitel: Python, How to Program. It's outdated in that is uses
Python 2.2 but the vast majority of concepts still apply; it does
mention when certain features are deprecated so you shouldn't have a
problem.

It is a college textbook so it goes into detail in many areas plus it
has the usual quizes, chapter summaries, and tests. The tests are
usually easy enough to figure out but with enough difficulty to make
them challenging. It covers a wide range of topics, from CGI and XML
to multithreading and networking.

It's normally $90-$100 but you should be able to find it used for <$40.
 
J

John Salerno

crystalattice said:
Of course there's the O'Reilly set: Learning Python, Programming
Python, Python in a Nutshell, etc.

Yep, Learning Python is the best to start. I haven't tried Programming
Python yet (new edition soon), and once you understand Python, Python in
a Nutshell is an excellent reference and also teaches you how a lot of
things work under the hood.

For plenty of examples and "learn by doing," you can check out Dive Into
Python. And while I don't really recommend Beginning Python to *learn*
the language, there are 10 projects at the end of the book that you can
work on once you have a grasp of the language.
 
E

Edmond Dantes

Ravi said:
On a similar note.

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by
definition, not smart enough to debug it."

-- Brian Kernighan of C

Well, if you are talking about C, that is *definitely* true. I would think
that would be less the case for languages like Java, Python, PHP, etc.

Of course, it's all what you really mean by "clever". To me, being "clever"
partly means writing code without bugs in the first place, so there is
nothing that needs debugging!!!!!!!!

Well, if anyone can pull that sword from the stone...!

--
-- Edmond Dantes, CMC
And Now for something Completely Different:
http://bridal-registry.weddingbelljoy.com
http://3D.CraftyMen.com
http://lapis.StellarChemistry.com
http://civil.LesbianGetTogether.com
http://workstation.funiturenow.com
http://cosmetics.whitegirlstuff.com
http://strapless.WomanNightlife.com
 
N

Nick Vatamaniuc

For a tutorial try the Python Tutorial @ http://docs.python.org/tut/

For a book try "Learning Python" from O'Reilly Press

For reference try the Python library reference @
http://docs.python.org/lib/lib.html

For another good book try "Dive Into Python" @
http://diveintopython.org/
It is a book you can view online or download for free. It is written by
Mark Pilgrim. If you like it, please support the author and buy a
printed copy:
http://www.amazon.com/gp/product/1590593561/ref=nosim/102-5606503-6853720?n=283155

Also take a look at common recipes on how to do things when you get
more used to Python @
http://aspn.activestate.com/ASPN/Cookbook/Python/

Hope this helps,
Nick V.
 
L

Laurent Pointal

(e-mail address removed) a écrit :
....
Ideally, I'd like a whole series of projects where I'm walked through
how to go about writing real Python. The way I look at it, nobody
learnt to build a house just from reading about building materials!

Take a look at "Dive Into Python" from Mark Pilgrim, good examples with
comments.

http://diveintopython.org/

Its available as paper-print or as electronic reading.

A+

Laurent.
 
B

Bruno Desthuilliers

Hi all. I've been try to learn ruby for a few months but I'm about
ready to give up. The available books either assume a programming
background, or are out of date. Anyway, I think python may suit me more
due to its 'theres one way to do it' philosophy (hope the quote is
right)!

Actually it's :
"There should be one-- and preferably only one --obvious way to do it."

And FWIW, it's followed by:
"Although that way may not be obvious at first unless you're Dutch."

!-)

NB : launch your Python interactive shell and type:

import this

to get the whole thing.

Another quote that I liked was:

'Clever is not considered a compliment in Python.' (don't know where I
read that...)

I don't remember having read this, but it probably refers to Brian
Kernighan:
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."

In Ruby, there are many ways to do the same thing and cleverness seems
to be held in high regard. These attitudes are not too helpful for
beginners in my experience. Anyway, enough waffle.

What books and tutorials are recommended to learn Python?

There are some recommandations on python.org:
http://wiki.python.org/moin/PythonBooks
http://www.python.org/doc/intros/

Mark Lutz's "Programming Python" was a mostly good intermediate book,
but it's a bit outdated now.
The tutorial
that comes with Python is great and has given me a good overview but I
think I'd benefit from some programming projects, now I have a little
understanding of how Python works.

Ideally, I'd like a whole series of projects where I'm walked through
how to go about writing real Python. The way I look at it, nobody
learnt to build a house just from reading about building materials!

Indeed. But you don't necessarily need to follow a tutorial for this -
just think of some programs you'd like to write, and try to write them.
You can ask for help and submit (at least parts of) your work for review
here. FWIW, examples in books and tutorials are usually meant to help
you graps some points, features, idioms and gotchas, and are seldom as
complex and complete as "real" programs.
Any other tips for getting up to speed with Python fairly quickly will
be greatly appreciated.

Lurking here may be a good idea...
 
J

jitya

Hi all. I've been try to learn ruby for a few months but I'm about
ready to give up.

Perfection is achieved only on the point of collapse. -- C.N. Parkinson


Welcome to Python , apart from the tutorials whenever time permits do
read this articles .

Why Python : http://www.linuxjournal.com/article/3882
The Python Paradox : http://www.paulgraham.com/pypar.html
Why I Promote Python : http://www.prescod.net/python/why.html

Regards
Jitendra Nair
Ensim India Pvt Ltd ,
Pune , India



The available books either assume a programming
 
A

Aahz

The best book I've found for "teaching" you the language is from Deitel
and Deitel: Python, How to Program. It's outdated in that is uses
Python 2.2 but the vast majority of concepts still apply; it does
mention when certain features are deprecated so you shouldn't have a
problem.

The main problem with the Deitel book is that it does not, in fact,
teach you how to program in Python. Instead, it teaches you how to
program in Java using Python. (That's a little bit of an overstatement,
admittedly, but not much of one.) There is also lots of incorrect
information.
--
Aahz ([email protected]) <*> http://www.pythoncraft.com/

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by
definition, not smart enough to debug it." --Brian W. Kernighan
 
T

Thomas Nelson

I strongly recommend trying to come up with your own projects. Just
pick small things that reflect something you actually want to do: maybe
make a simple board game, or a few scripts to help you keep all your
files organized, etc. Generally speaking I think it's easier to teach
yourself a language if you have a project you care about finishing. I
was pleasantly surprised by how easy python makes it to travel from "It
would be cool if I could..." to finished product. In my own case, I'm
a college student, and I wanted a program that could help me schedule
my next semester's classes without conflicts and with the maximum sleep
possible. That first "project" gave me a lot of good python
experience, and I know use python all the time for "real life"
applications.

THN
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top