×

Announcing: Slashdot Deals - Explore geek apps, games, gadgets and more. (what is this?)

Thank you!

We are sorry to see you leave - Beta is different and we value the time you took to try it out. Before you decide to go, please take a look at some value-adds for Beta and learn more about it. Thank you for reading Slashdot, and for making the site better!

Comments

top

Why Does Beta Last So Long?

Chromodromic Why? That's so easy ... (258 comments)

Because most programmers are male, and most male programmers have a fear of commit.

about 9 years ago

Submissions

top

Foundations of Agile Python Development

Chromodromic Chromodromic writes  |  more than 6 years ago

Chromodromic writes "'Agile' is a common enough catchword these days, but an important one which encapsulates a development philosopy and its accompanying practices and tools, all of which address the goal of defeating the enormous failure rate of software projects while delivering to the client exactly (or better than) what he asked for. Apress tackles development practices at the language level of detail with "Foundations of Agile Python Development", by Jeff Younker. This is a book which specifically and very effectively provides a roadmap to agile development tools and practices in the Python universe. It does quite a bit more than this, too, with a few chapters rising to the level of "essential reading".

Learning language details well is only part of the process by which a developer becomes productive. For example, it's usual for a developer new to a language to peruse the various blogs written by the community in order to acquire a feel for the culture, but especially to learn the best-practice approaches which address the language's typical problem domains. "Foundations" functions in this context a bit like the ultimate blog postzilla, quickly introducing a Python developer to the tools and terms which form the basis of the community's lingua franca. Not every Python developer I know uses all of the tools and practices in this book — but every serious Python developer I know uses some subset of them, and is familiar with all of them.

Unless you've been programming Cobol in a cold, dark basement for the last six or seven years, you've at least heard the term agile as it applies to development methodology — Jeff Younker excerpts "The Agile Manifesto" in his overview of the topic:

Individuals and interactions over processes and tools
Working software over comprehensive documentation
Customer collaboration over contract negotiation
Responding to change over following a plan
That is, while there is value in the items on the right, we value the items on the left more.

Manifesto for Agile Software Development (http://agilemanifesto.org/)

Younker then provides an overview of core agile philosophy as it applies to the pragmatics of software development, explaining how essential concepts reinforce the overall approach. These concepts include pair programming, user stories, the system metaphor, unit tests and test-driven development, refactoring, simple design, collective code ownership, short iterations, continuous reflection, continuous integration, and the agile approach to documentation. I'm usually not one for much introductory material, preferring to get right to the good stuff, but I found Younker's quick overview of these concepts and approaches to be important in framing the content of the coming chapters.

On to the good stuff. There's plenty of it. The book gets you up and running with PyDev and Mylyn on Eclipse. The chapter moves quickly and really only serves to introduce PyDev's featureset while beginning to build what will become a complete, platform independent Python development environment. The IDE is just the beginning — though, if you've ever used PyDev, you know what a useful beginning it is.

A discussion of revision control in general, and Subversion in specific, follows. Here, the book begins to roll. Not only does Younker introduce a typical Subversion work cycle, but he elaborates with a discussion of Subversion and Eclipse integration. The chapters can stand alone, but good work is done throughout the book by continually reviewing how the various tools interoperate. So it's simple to take from the information what you like and leave the rest, which is a real necessity for developers who have grown particularly attached to particular tools — editor choices, for example, are frequently religious in intensity. Subversion, too, is an excellent choice for this chapter which addresses revision control concepts on a broad scale. Because Subversion is hugely popular, the information offered here is both theoretically and pragmatically useful, especially viewed, as it is, through an agile lens.

Chapters 4 through 7 are key, especially for anyone who will be using Python as a team member on medium or large projects. These chapters cover in detail often assumed components of the agile development process, with every chapter following the theory-tool-practice pattern. Using a stock Python installation, Chapter 4 introduces the creation of a test/build harness, which functions as the heartbeat of a test-driven developed project. In order to demonstrate how this harness works, the book also introduces a sample project: a simple RSS reader. It's difficult to overstress how useful this contextualized example becomes.

Python's setuptools are used to establish the harness, which, when completed, builds the sample project on any stock Python installation. In a little over 20 pages you're introduced to setuptools' inner workings along with, again, how they best integrate with Subversion and Eclipse. Because you're involved with building a simple but fun project, dry material is rendered as interesting, or at least as interesting as it can be. Never before this book had I found the setuptools documentation very compelling. Maybe that's just me.

Chapter 5 discusses build systems in an agile environment and Buildbot in particular, a Python-based system which automates the compile/test cycle. Build systems are extremely important, for solitary developers but especially for teams, because they implement the agile philosophy of catching bugs as soon as they're introduced. Essential concepts are covered along with an explanation of how to make Buildbot and Subversion talk to each other via Subversion hooks. Because all of this happens very quickly, once again, potentially dreary material — if picked up out of context — is made enjoyable and trivial to follow. In Chapter 6, the process of test-driven development concepts and setup are discussed at length, and the discussion continues in Chapter 7 with many test-driven examples and further demonstrations of monkeypatching and test mocking. The tools explained in these chapters are unittest, Nose, a test runner, along with pMock (based on Java's jMock library) and PyMock, both (obviously) mocking tools and, no, these are not normally used to communicate with non-Django developers.

I'll sum up the rest of the book — the chapters all follow, essentially, the established pattern of theory-tool-practice discussions. Chapter 8 addresses concepts around coding standards and code coverage, mentioning a number of useful tools while outlining the agile philosophy. Chapter 9 introduces Python ORMs, focusing on SQLObject and SQLAlchemy and framing their roles in agile development methodology. Chapter 10 discusses Web TDD and Chapter 11 provides an overview of functional testing, with detail provided on acceptance testing using PyFit. Whew!

This is a lot of material for 368 pages, but I found, once I was knee-deep in it all, that it was hugely valuable to see how the pieces could fit together, and, along the way, I saw a nice overview of the Pythonic agile development process. It's a great way to build software.

Problems? Nothing too serious. I read the book and worked through examples on my Ubuntu Hardy Heron machine. Mostly, everything installed as advertised and the instructions served well, but in a book which moves this quickly, little attention is paid to small installation details and, especially in the case of Eclipse and Mylyn, I had to do a bit of fumbling to get things humming along. This is not a "how to set everything up" manual in the sense of covering every configuration scenario. Again, the purpose of the book is to provide a pragmatic overview of agile development for Python. Your specific environment's mileage may very with regard to some setups, but there's little cause for worry. Again, most things were pretty smooth and, in the process, you will get a solid foundation regarding what Python expects out of your platform.

Don't grab this book if you're brand new to Python. (Grab this one, if that's the case.) But if you've made a leap into the Python multiverse (trust me, you will enjoy it here) and you have a desire to write bug-free software — yes, I'm being facetious — then this book is more than worthwhile. I remember first going to the Python user group here in Orange County and trying to keep track of all the tools that others were simply assuming I knew about, especially with regard to building and testing. I'd get home and begin to madly Google names and phrases. This book would have bridged a significant knowledge gap and, along those lines, I would definitely recommend it to anyone wanting to get not only the Python's Greatest Hits of Agile Tools and Development, but a set of instructions on how to make everything dance nicely together. Nice work."
top

Practical Django Projects

Chromodromic Chromodromic writes  |  more than 6 years ago

Chromodromic writes "Apress's newest Django offering, "Practical Django Projects" by James Bennett, weighs in lightly at 224 pages of actual tutorial content, but trust me, they're dense pages. Filled with pragmatic examples which directly address the kinds of development issues you will encounter when first starting out with Django, this book makes an important addition to the aspiring Django-developer's reference shelf. In particular, the book's emphasis on demonstrating best practices while building complete projects does an excellent job of accelerating an understanding of Django's most powerful features — in a realistic, pragmatic setting — and which a developer will be able to leverage in very short order.

This book serves an important function by providing progressive, useful examples of Django's role in the development of realistic projects. During the course of the tutorial you build three basic apps: A simple brochureware-oriented CMS, a complete blogging system (with Akismet spam protection and RSS feeds, among other features), and a social code-sharing site similar to that found at djangosnippets.org (with account signups, syntax highlighting via pygments, and bookmarking features — the whole enchilada). You may or may not find these projects immediately relevant to your work or goals, but the projects themselves are really just platforms for delving into Django's nooks and general philosophy. It's an important point to make about the book especially, because though Django itself provides potent facilities for creating reusable code while preserving a high degree of flexibility, "magic" is kept to a minimum compared to some other popular frameworks. It follows that maximizing your knowledge of Django's inner workings through familiar paradigms is critical to making the framework perform to your best advantage. The book excels at accomplishing this goal.

Along these lines, a lot of territory is covered in a short span. You're introduced to a couple of Django's contrib apps — code which comes with a normal Django installation and which cleanly plugs into your own application while remaining extremely customizable. After being ushered through a straightforward installation and database configuration, your first exposure to development is through the contrib app most frequently lauded in the Djangoverse, Django's deservedly well known admin system. But immediately, emphasis is shifted from the basic features of the system to the ways it can be customized. This approach of introducing a feature and then modifying or extending it is repeated immediately with Django's Flatpages contrib app, a very basic CMS which, again, comes with Django and installs with a single line of code and one command.

By the time you've finished the third chapter, you've built the foundation of a typical brochureware site, complete with a working search system and a completely functional customized admin with which you may modify your content using a javascript-based HTML editor (TinyMCE). Pretty impressive for 41 fast-moving pages.

The strongest feature of the book, though, is not the speed or facility with which features are presented, but rather the way these features are always demonstrated with a mind to Django's strongest argument: how easy it is to create reusable code, once you understand the framework's approach. As you move through the next four chapters of building the blogging system, the establish-modify-extend technique of presentation does a good job of working you through various standard Django features — generic views (a very important concept which is illuminated nicely), code organization, ORM techniques, template inheritance, and so forth — and you're smoothly shown the ways by which you will be able to incorporate much of the code you write into your future work. As you begin your last project, the code-sharing app, you've gotten an overview of both coding and workflow techniques which work best with Django. The final chapters reinforce everything you've learned while still introducing new material on library integration, form handling and the newforms library, and code distribution.

The overall approach is very effective, though I found I had to trust the tutorial a little at first in order to get the most out of it. The projects initially seemed somewhat vanilla, so it wasn't until I really focused on the organization of the material that I discovered the book's strengths. Now I wish I'd had this book years ago.

Issues? I had only one, really. The material presents itself as a tutorial suitable for those who are just starting out with Python. For example, near the beginning of the material the def keywork is pointed out as the way Python functions are declared, and similar kinds of notes and comments pepper the tutorial, somewhat unevenly, as well. While I appreciate the impulse to make the material as accessible as possible, I'm skeptical of the book's role as truly introductory at that level, although I could see some experienced developers, especially those coming from other languages, benefiting from these quick notes. But my feeling in general would be that if you're so new to Python that the def keyword is a revelation, you might be better off starting elsewhere before you dive into Django.

This is a minor point, though, and if you're willing to give the material the time, you'll appreciate what Django has to offer more and more with every page. The book maintains a brisk pace which I truly appreciated. And if you've struggled with Django in the past, or you've wanted to learn more about what to do beyond getting the admin running, "Practical Django Projects" is an excellent foundation for your Django education. I absolutely recommend this as the Django book I've found to be, by far, the most useful."

Journals

Chromodromic has no journal entries.

Slashdot Login

Need an Account?

Forgot your password?