Development tools and practices for Pythonistas
nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915 at spamschutz.glglgl.de
Tue Apr 26 19:59:25 CEST 2011
Am 26.04.2011 16:39, schrieb snorble:
> When I write a Python app, I have several unorganized scripts in a
> directory (usually with several named test1.py, test2.py, etc., from
> random ideas I have tested), and maybe a todo.txt file. Then I hack
> away, adding features in a semi-random order. Then I get busy with
> other things. Maybe one week I spend 20 hours on development. The next
> week, no time on development. A few weeks later when I have some time,
> I'm excited to get back to making progress, only to find that I have
> to spend 30-60 minutes figuring out where I left off. The code is
> usually out of sync with todo.txt.
> I see people who release new
> versions and bug fixes, so I sometimes will create a new directory and
> continue working from that copy, because it seems like the thing to
> do. But if I ever made something worth releasing, and got a request
> like, "I have problems with the 2.0 version. Can you send me the old
> 1.1 version?" I'd be like, "uhhh... let me hunt through my files by
> hand and get back to you in a month". I'm thinking I can do a lot
> better than this.
That is another subject (IMO), and you are right: you can do a very lot
better, using the right tools.
> I am aware of tools like version control systems, bug trackers, and
> things like these, but I'm not really sure if I need them, or how to
> use them properly.
I have been using several VCS for about 5 or 6 years now, and I can only
tell you that, once started using them, you will wonder how you ever got
along without them.
> I think having some organization to all of this
> would help me to make more consistent progress, and spend less time
> bringing myself up to speed after some time off.
I don't see how these tools will help to get up to date the way you
describe it - but all other issues are well coped with using a VCS. I
personally started with cvs (don't do that!), then worked with svn (do
that only if you really need that), then got working with hg
(Mercurial), which is a very good thing.
Say, you have a certain development progress, and you add a new feature.
Then you do all the changes, including increasing the version number.
The changes you just have done are one changeset which you commit,
providing a good commit message. If you have a version which you ship
out, you give it a tag. In this way, you can easily change from 2.0 you
are working on to 1.5 requested by the customer.
More information about the Python-list