Alex Rivera | Logout

How can I use Python for large scale development?

Asked 2008-10-25T13:30:27.933
66

I would be interested to learn about large scale development in Python and especially in how do you maintain a large code base?

  • When you make incompatibility changes to the signature of a method, how do you find all the places where that method is being called. In C++/Java the compiler will find it for you, how do you do it in Python?

  • When you make changes deep inside the code, how do you find out what operations an instance provides, since you don't have a static type to lookup?

  • How do you handle/prevent typing errors (typos)?

  • Are UnitTest's used as a substitute for static type checking?

As you can guess I almost only worked with statically typed languages (C++/Java), but I would like to try my hands on Python for larger programs. But I had a very bad experience, a long time ago, with the clipper (dBase) language, which was also dynamically typed.

Edit
Report

2 Answers

44

I had some experience with modifying "Frets On Fire", an open source python "Guitar Hero" clone.

as I see it, python is not really suitable for a really large scale project.

I found myself spending a large part of the development time debugging issues related to assignment of incompatible types, things that static typed laguages will reveal effortlessly at compile-time. also, since types are determined on run-time, trying to understand existing code becomes harder, because you have no idea what's the type of that parameter you are currently looking at.

in addition to that, calling functions using their name string with the __getattr__ built in function is generally more common in Python than in other programming languages, thus getting the call graph to a certain function somewhat hard (although you can call functions with their name in some statically typed languages as well).

I think that Python really shines in small scale software, rapid prototype development, and gluing existing programs together, but I would not use it for large scale software projects, since in those types of programs maintainability becomes the real issue, and in my opinion python is relatively weak there.

answered 2008-10-25T14:01:28.907
16

my 0.10 EUR:

i have several python application in 'production'-state. our company use java, c++ and python. we develop with the eclipse ide (pydev for python)

unittests are the key-solution for the problem. (also for c++ and java)

the less secure world of "dynamic-typing" will make you less careless about your code quality

BY THE WAY:

large scale development doesn't mean, that you use one single language!

large scale development often uses a handful of languages specific to the problem.

so i agree to the-hammer-problem :-)


PS: static-typing & python

answered 2008-10-25T13:44:41.253

Your Answer