How Fast?

Martijn Faassen m.faassen at
Sat May 26 10:05:19 EDT 2001

Nick Perkins <nperkins7 at> wrote:

>>>..write code almost as fast as you can type.

>>..with Python I can stay in the flow longer.

> Funny, I was just thinking about this today.  I remember being told about a
> guy who would code in VB, just typing almost continuously at ~40wpm.  This
> was intended to impress me, but made me wonder what that code looked like?

Me too. Tell us if you find any samples. :)

> I think that Python is especially well suited to eliminating any and all
> repetetive typing.  I find that the more I think about and refine a program,
> the shorter it gets! ( I haven't experienced that in other languages )

I've had the same experience, though it happens in other languages as well.
But perhaps not as easily.

> I am curious about how long most programmers 'stay in the flow'.
> Personally, I rarely type more than, maybe, 3 lines at a time before
> stopping to think again.  Sometimes it's much less,
> but rarely more.  I suppose it also depends on your definition of 'stopping
> to think'.  You might think for 2 seconds, or several minutes.

I work in much the same way; type a few lines, stop, think. Erase lines
again. :). If it's a common idion I may type more lines, like in
the 1.5.2 idiom:

result = []
for line in lines:
    line = string.strip(line)
    # or do more stuff here

In 2.0 and up this can often be a list comprehension.

> I can recall typing many lines of Java or COBOL without really thinking, but
> that's because there was no way around it, you pretty much had to 'follow
> the pattern'.  In Python, there always is a way to improve repetetive code.

Agreed. I dislike repetitive code; it's boring and time consuming so I 
spend inordinate amounts of time avoiding it. :)

History of the 20th Century: WW1, WW2, WW3?
No, WWW -- Could we be going in the right direction?

More information about the Python-list mailing list