tags:

views:

200

answers:

6

Decided to learn PHP, Python. Lots of topic/books are there, but don't know which are latest/newbie friendly.

Need your help..

+5  A: 

For Python, DiveIntoPython is good, and there is another thread asking for that.

For Php, take a look this thread

S.Mark
Dive Into Python is for experienced programmers. I want newbie friendly guide..
Sandy
+2  A: 

My favorite introduction-to-Python book is Learning Python. I learned Python from an earlier edition of that book. It teaches the language, but also teaches why things are the way they are, and teaches some of the common idioms and why they are used.

EDIT: Here is the Amazon URL for the book. I suggest using the "Look Inside!" feature to preview the table of contents and first chapter.

EDIT: Okay, here are some shorter references.

Overall, I liked Python: Visual QuickStart Guide (2nd Edition). (You want the Second Edition because the First Edition is years old and very out of date.) It quickly covers the basics in Python, barely scratches the topic of object-oriented programming, and I don't think it teaches you the idioms. It teaches Python 3.x only, with little or no mention of differences between 3.x and 2.x. Maybe if you read this you will be more interested in Learning Python. (But I hate to learn things twice. IMHO it's more interesting to learn something thoroughly once, than to learn it sketchily once and then try to go back and fill in the missing details. Maybe that's just me.)

Also, here is an online tutorial that I was introduced to in an answer here on Stack Overflow: A Byte of Python

steveha
I note that the 4th Edition is an intimidating 1160 pages.
pavium
@pavium, I suggest you go to Amazon.com and use the "Look inside!" feature to start reading the book. Look over the table of contents and read the first chapter, see if you like it. As I said, I used an earlier edition of this book to learn Python and I enjoyed it. (I've tried twice to get hooked by Thinking in Java, which had been recommended to me as a great book, and bounced off it twice, so I'm not some kind of amazing reading machine or something.)
steveha
By the way, the full 1160 pages covers all of Python, including very advanced stuff like metaprogramming. The first 600 pages or so really cover most of what you would need to know; then the book starts covering good OOP design and advanced features.
steveha
1160 pages? Is that a lot nowadays all of a sudden?
shylent
A: 

If you're planning on starting with Python 3, then I recommend Programming in Python 3. This is a well-structured, concise and practical introduction to Python 3 without any ballast from earlier versions. Also, it contains some very good (and actually useful) example programs.

Dive in Python 3 is also very good, but assumes some more prior knowledge.

Tim Pietzcker
+2  A: 

If you're ok with something that isn't a book, I can highly recommend the official Python tutorial which is excellent. It's how I learned Python.

Oskar
+2  A: 

I taught Python at the university, and I had to ask myself the same question, when I prepared my class. There are some great online resources, for learning Python. Online resources have the advantage of being more up-to-date than books, which always become partially obsolete.

I would recommend that people who do not really know how to program read the following online books (in the given order):

  • Read the parts of Think Python that they find interesting. This book contains interesting exercises (those that look interesting are worth doing). For object-oriented programming, I would recommend reading the tutorial by Alan Gauld before reading the corresponding chapters from Think Python (16–18).
  • If Think Python is too complicated, the book Snake Wrangling for Kids can be a first read, instead.
  • Read, in the official tutorial, subjects that were not covered completely in the above sources.

People who know how to program can use the following references:

  • Read Instant Python or Python in 10 Minutes: they give a nice and quick introduction to the basics.
  • Read the official tutorial (as already mentioned in another answer). This is in effect an almost complete course in Python, which is best for people who have some notions in programming.
  • The exercises in Stack Overflow's contributor S. Lott's book are good.

Whether you are a seasoned programmer or a complete newbie, some references are important to bookmark, and keep handy: it is important to know that they exist, and what information they give access to:

More general and important resources include:

  • The pydoc command is very useful.
  • The main documentation site is a must.
  • … and stackoverflow.com, where questions are answered at a lightening speed (but you already know about that).
EOL
A: 

For PHP would suggest php manual and PHP Object Patterns

Rachel