[Tutor] Const on Python
Kent Johnson
kent37 at tds.net
Fri Mar 7 14:16:04 CET 2008
Alan Gauld wrote:
> The problem is as
> Fred Brooks stated in his essay "No Silver Bullet" that the
> real costs in development are the intengibles - the time
> spent thinking about theproblem/solution and dealing with people.
> They far outweigh the time actually writing code. The average
> project delivers around 20-100 lines of working code per
> day. But you can type that in mechanically in half an hour
> or less. The rest of the day is doing the stuff that really costs.
(Jumping in against my better judgment :-)
Hmm...sure, programming is not about typing, it is about figuring out
what to type. With Python the conceptual activity takes place at a
higher level because
- Python provides easy-to-use, high-level constructs like lists, dicts
and first-order functions
- Python doesn't require you to think about low-level details like
const, private, getters and setters, braces, etc.
So Python speeds up the thinking part.
As far as the code, those 20-100 lines will do more if they are in
Python than they will if they are in Java or C++.
I don't see an order of magnitude difference between Python and Java but
I have no doubt that I am dramatically more productive in Python. When I
have compared code samples, I have found Python code to be 20-60% the
size of equivalent Java code. Googling 'python productivity' finds more
specific examples.
Kent
More information about the Tutor
mailing list