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

Re: How to name variables

Expand Messages
  • Carl Manaster
    ... A practice I find helpful is to have the IDE color foo , bar , foobar , and something in bright orange to remind me I haven t yet given them good
    Message 1 of 62 , Dec 2, 2001
    • 0 Attachment
      Russel Hill <russh347@...> writes:
      >One thing we try to do is NOT get hung up on the perfect name. If we
      >find ourselves at a loss for a name, we'll often name it foo (or bar ,
      >when foo is already in use). Later, when the code is more complete
      >(usually about 15 to 30 minutes), we'll rename it. Last week, we had a
      >Foo & Bar refactoring that lasted about a day. Most of that time it was
      >just something in the back of our collective mind. When we actually got
      >started coding, better names presented themselves rather quickly...
      >actually almost immediately.

      A practice I find helpful is to have the IDE color "foo", "bar", "foobar",
      and "something" in bright orange to remind me I haven't yet given them good
      names.

      But I must confess I named a key class "Whatchamacallit" back in late July,
      and still haven't found a good name for it. That's what you call a smell,
      right? :-(

      Peace,
      --Carl
    • 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
      • 0 Attachment
        > 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.