Loading ...
Sorry, an error occurred while loading the content.
 

Re: [XP] How to name variables

Expand Messages
  • Michael Feathers
    There is a lot of ground to cover in naming. I know that I like seeing code bases where the parts of speech are used well. I remember seeing Kent s advice on
    Message 1 of 62 , Dec 1, 2001
      There is a lot of ground to cover in naming. I know that I like seeing code
      bases where the parts of speech are used well.

      I remember seeing Kent's advice on changing state in his Smalltalk Best
      Practices Patterns book. The idea of using methods like beOn or beOff was
      nice to see.

      One thing that I like to do is use past tense for notifications.

      http://www.c2.com/cgi/wiki?NamingNotifications

      Michael Feathers
      www.objectmentor.com
    • Phlip
      ... The algorithm is a playful example. The real issue here is that hard-to-remember names, or hard-to-reconstruct names, are a DesignSpell. -- Phlip
      Message 62 of 62 , Dec 12, 2001
        > How do you know that algorithm will converge?

        > > I have memory issues. So suppose I type the name of an
        > > object. Then I type a
        > > dot. (I can usually remember the procedure this far.) But
        > > then I need to ...
        > > "remember" ... the method name the object should call.

        The "algorithm" is a playful example. The real issue here is that
        hard-to-remember names, or hard-to-reconstruct names, are a DesignSpell.

        --
        Phlip phlip_cpp@...
        http://www.greencheese.org/PeaceAndCalm
        -- "In my experience, the customer doesn't know what he wants
        until you don't give it to him." --David Brady --
      Your message has been successfully submitted and would be delivered to recipients shortly.