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

Re: [XP] Pattern Encoded Suffix

Expand Messages
  • Charlie Poole
    Sometimes I feel the need to use a general suffix on certain names. When I do that, it s always a readable English word or words. I limit that sort of usage to
    Message 1 of 191 , Aug 9, 2012
      Sometimes I feel the need to use a general suffix on certain names. When I
      do that, it's
      always a readable English word or words. I limit that sort of usage to
      those things that
      are easily standardized.

      For example, an XxxxxxTextBox is always a text box. A SomeKindOfEventHandler
      is always a handler receiving notifications for the particular kind of
      event.

      Sometimes, I do this for formal patterns as well. "Visitor" is a good
      example.

      My guidance (to myself and my teams) for this sort of thing is...
      1) Pick a suffix that makes sense to you and everyone else on the team
      2) Don't use an abbreviation
      3) Don't make it a "standard" or "requirement"

      Note that #1 implies consultation rather than just handing down a naming
      convention.

      I recognize that my rules pretty much "rule" out application of a standard
      across an
      entire company. That's by design, because I believe such application to be
      intrisically evil.

      Charlie

      On Thu, Aug 9, 2012 at 12:51 PM, MarvinToll.com <MarvinToll@...>wrote:

      > **
      >
      >
      > This is important... was it perceived that the lack of clarity came from
      > the two-character suffix or the inclusion of pattern name in the class?
      >
      >
      > --- In extremeprogramming@yahoogroups.com, Nayan Hajratwala <nayan@...>
      > wrote:
      > >
      > > On Aug 9, 2012, at 3:12 PM, MarvinToll.com <MarvinToll@...> wrote:
      > >
      > > > Nayan,
      > > >
      > > > While exporing this issue with the team, did you determine if they
      > disagreed with Tim Ottinger's perspective or just the application of the
      > two character suffix?
      > >
      > > I didn't ask them anything about Tim. They felt it led to a lack of
      > clarity.
      > >
      >
      >
      >


      [Non-text portions of this message have been removed]
    • MarvinToll.com
      Jeff, Thanks for your feedback. The notion that a a Java author precisely considers whether they are using one of the two exception mechanisms to indicate a
      Message 191 of 191 , Sep 23, 2012
        Jeff,

        Thanks for your feedback.

        The notion that a a Java author precisely considers whether they are using one of the two exception mechanisms to indicate a true unanticipated exceptional break-down, or as an indication of alternate path processing (e.g. instead of return codes), is the thought-path I'm suggesting for consideration.

        As you mentioned (twice), there are contexts where the author could be wrong... and the code catching can respond as required.

        Said another way, I'm suggesting that authors throwing exceptions clarify the intended usage... even though a client's corner-case might warrant a different course than the author anticipated.

        _Marvin
        PatternEnabled.com

        --- In extremeprogramming@yahoogroups.com, "JeffGrigg" <jeffreytoddgrigg@...> wrote:
        >
        > The code that throws an exception should not (and cannot reasonably) know how the code that catches it will handle it. It's the responsibility of the code that catches the exception to do the right thing.
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.