Python Productivity over C++

Albert Hofkamp hat at se-46.wpa.wtb.tue.nl
Fri Jun 9 04:39:31 EDT 2000


On Fri, 09 Jun 2000 05:12:56 GMT, Steve Mullarkey <stevemul at ozemail.com.au> wrote:
>I have been a 'C' programmer for the past 15 years and a "C++"
>programmer for the past 3 years. I'm not a genius but would modestly (?)
>class myself as reasonably competent.

I learned C about 11 years ago, and switched to C++ 4-5 years ago.

>I have read in several places productivity claims of 5 to 10 times over
>'C' and "C++". I would like to ask for some feedback from "C++"
>programmers who have moved to Python as to whether these estimates are
>realistic.

Depends on what you define as productivity. With a nice definition, no doubt
you can get these rates. On the other hand, I have way too many advertisements
promising me incredible productivity increasements, so I tend not to believe
any of these claims.

>In "C++" I have :-
>
>1. Good tools, Borland C++ Builder, MS VC++, Memory Leak Tools,
>Profilers, Programmers Editor including Class Browser, etc..
>
>2. I use the STL (Standard Template Library) which gives powerful string
>and container classes.
>
>3. I use incremental compiling and linking. This reduces wait times to
>very small amounts.
>
>4. I can also use background compiling and linking.
>
>5. I have 3rd party libraries to handle Regular Expressions, Date/Time,
>etc..
>
>I don't want to start a flame war but, given the above, I just can't see
>where the productivity increase is generated. I am genuinely interested
>to ask "C++" programmers :-

The big question is, are you happy with the above stuff ?

For example, why do you need a memory leak tool ? Are you really interested in
spending your time hunting down memory leaks, is that your goal in life ?
I think not.
I'd rather use a computer to perform tracking of memory usage, and let it
handle memory management for me.
A lot of the tools have an origin from the design ideas of C/C++, which is fast
execution on small machines. The price that you pay is that you have to do a
lot of management around it yourself.

Python starts at the other end. With an easy to learn language, take as much
management away from the programmer as possible. CPU time is extremely cheap
now, much cheaper than a few hours developer-time (you can buy a new PC if you
save 14 days of work !).

>1. What productivity increase do you achieve ?

I am not sure, I don't measure it. My basic problem is that everything I do has
to be multi platform.
Python is a bigger help than C++ in that respect, basically because it provides
an abstraction layer just like Java, while at the same time it is more open,
conceptually cleaner, and freely available.

However, development tools is not the entire story.
The main gain imho is maintainability after the program is `finished' (notice
this is still the main cause of costs for programs). Python is an easy
language, but it scales well. That means that others can read your programs
quite easily without sacrificing (word doesn't look right) the ability to
tackle real-world problems.
Also, since it is interpreted rather than compiled, the source is always
nearby. If necessary, you can even do some bug-hunting in the
production-environment rather than your own development environment (which is
important for me since most of what I do is prototyping).

>2. How long did you use Python before you achieved increased
>productivity ?

Hmm, that's tricky. I'd say -6 months.
I started building Python extensions in C++, before I could program Python. 6
months later, I wrote my first program in Python. Due to the excellent
documentation and books, learning was a matter of hours. After that I only
needed to look up some details on syntax.

Obviously, I picked Python because I had a problem that was suited to use Python
for. If I would have to do the same thing in C++, it would have cost me days
instead of hours. In that respect I had a huge productivity increase in minutes.
As said before, I don't believe these numbers, and I don't understand why
management loves these numbers. Imho, it is not unlike the productivity
increase you experience when you switch from hammer to screw-driver when trying
to insert screws.



Albert
---
Look ma, windows without Windows !!



More information about the Python-list mailing list