Dive into Python
From Wikipedia, the free encyclopedia
Dive into Python (ISBN 1-59059-356-1), by Mark Pilgrim - a teach-by-example guide to the paradigms of programming in Python and modern software development techniques. A hands-on book, rather than a reference or a manual.
Contents |
[edit] Intended reader
Dive into Python assumes that the reader already knows a bit about programming, although not necessarily much about the Python programming language. This assumption may place the book out of reach of the first-time software developer. Although Python is an excellent language to learn modern programming techniques, this book makes a difficult starting point. A book such as How to Think Like a Computer Scientist: Learning with Python by Allen Downey, Jeffrey Elkner, and Chris Meyers would sufficiently prepare a novice to benefit from Dive into Python.
Dive into Python illustrates enough Python paradigms that even an experienced Python programmer may find useful material here.
[edit] Book style
Mark Pilgrim is an extremely accessible author. He teaches by example. Each chapter teaches powerful techniques and Python idioms by creating a useful program. Anybody with programming experience should be able to follow the examples and learn the language - although a few visits to the Python website documentation may help along the way. The book is not overly formal, nor is its usefulness undercut by excessive informality and insider humor.
Each example is brief and annotated. The annotations combine with paragraphs of explanatory text to reveal the power of this versatile programming language. This book will help empower the reader to do useful things almost immediately.
One of the early example programs reads through a directory of MP3 files and lists the header information, such as artist, album, etc. This is accomplished with just a few lines of code. This is a powerful example, not only demonstrating how brief and readable Python can accomplish a great deal, but it also illustrates the "Python" way of doing things. The explanations generally describe how to modify example to serve new purposes.
[edit] Beyond programming examples
Mark makes the point that everything in Python is an object. While this is not a text on hard-core object oriented programming, it is an excellent opportunity for the OOP beginner to get a handle on it.
The book emphasizes good programming techniques, such as documentation and unit testing. In one of the later chapters he even creates a Python unit testing framework that works for testing Python code to see if it performs as expected. Again, this example is annotated, used to develop both the software engineering skill of unit testing and properties of the Python language.
[edit] Python for the Internet
The book also covers accessing websites and parsing HTML and XML code. This is just an introduction to these subjects. Those interested in learning this in depth will want to continue their reading with other books and web pages focused on these topics.
[edit] Conclusion
Dive into Python reads well. It is not a manual, but is well enough indexed to serve as a quick reference guide for many tasks. It exemplifies using the Python language and how to think like a master programmer. The latter is reason enough to buy the book even for those already familiar with Python. This is a great second book for somebody learning to write software. It also serves as a powerful example for those wishing to improve their programming style and/or learn object programming.
[edit] External links
- The text of Dive into Python may be downloaded freely.
- Dive into Mark, Mark Pilgrim's home page.
- How to Think Like a Computer Scientist: Learning with Python, an excellent introduction to programming with Python (ISBN 0-9716775-0-6).
- The official Python home page