RE: Python development time is faster.

Discussion in 'Python' started by Gabriel Genellina, Nov 21, 2006.

  1. At Monday 20/11/2006 13:04, Sells, Fred wrote:

    >My design goals are for a method to be <10 lines of code and a class
    >definition to fit on one printed page (ok, 10pt font ;). I don't always
    >achieve these goals, but more often than not.
    >
    >In order to achieve these goals, I seldom comment and rely on long function
    >names and clear variable names. Perhaps that's a bad thing, but I've found
    >that the comments were always obsolete when I picked up someone else's code,
    >then they just got in the way.


    Docstrings are A Good Thing (TM).
    I usually never write silly comments like this:
    savedState = state # store the current state
    but I always write an explanation when something is not done on the
    "obvious way" or following "common practice" - to prevent the "smart
    guy next door" (myself inclusive) from modifying it later just to
    discover it won't work that other way.
    And loop invariants are good comments sometimes.


    --
    Gabriel Genellina
    Softlab SRL

    __________________________________________________
    Correo Yahoo!
    Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
    ¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar
    Gabriel Genellina, Nov 21, 2006
    #1
    1. Advertising

  2. Gabriel Genellina

    Neil Cerutti Guest

    On 2006-11-21, Gabriel Genellina <> wrote:
    > And loop invariants are good comments sometimes.


    They are even better as code, though not always practical that
    way.

    --
    Neil Cerutti
    Neil Cerutti, Nov 21, 2006
    #2
    1. Advertising

  3. At Tuesday 21/11/2006 11:18, Neil Cerutti wrote:

    >On 2006-11-21, Gabriel Genellina <> wrote:
    > > And loop invariants are good comments sometimes.

    >
    >They are even better as code, though not always practical that
    >way.


    That's why I say "sometimes"...


    --
    Gabriel Genellina
    Softlab SRL

    __________________________________________________
    Correo Yahoo!
    Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
    ¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar
    Gabriel Genellina, Nov 21, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. steve
    Replies:
    17
    Views:
    684
    Mike Smith
    Sep 13, 2004
  2. Replies:
    37
    Views:
    937
    Thomas Bartkus
    Jul 11, 2005
  3. Chris Brat

    Python development time is faster.

    Chris Brat, Nov 13, 2006, in forum: Python
    Replies:
    19
    Views:
    605
    =?UTF-8?B?xYF1a2FzeiBMYW5nYQ==?=
    Nov 15, 2006
  4. flamesrock
    Replies:
    8
    Views:
    438
    Hendrik van Rooyen
    Nov 24, 2006
  5. Kevin Wan
    Replies:
    0
    Views:
    385
    Kevin Wan
    Jan 16, 2007
Loading...

Share This Page