Skip to main content
added 45 characters in body
Source Link
candied_orange
  • 114.6k
  • 27
  • 222
  • 352

Choosing a good name is important.

The name should:

  • Indicate the single responsibility of the class
  • Ensure that when I look inside the data, methods, and implementation I find do not surprise meno one
  • Indicate the level of abstraction that it is working at

If, in addition to all that, the name also:

  • Indicates what architectural level the object is at
  • Indicates what the user does with the object
  • Indicates a family of objects that the object belongs to

then it might be nice, but these can also cause problems.

Objects work best when they make as few assumptions as possible about the world around them. Get those assumptions wrong or let enough time go by that they become wrong and suddenly the name isn't helping, it's actually in the way.

A name should withstand changes to the world around it.

The problem with your question is you haven't described your class independently of the name you claim is problematic. So we don't have any better idea what it does then the problematic name gives us.

I'm guessing that an image is going to be chosen in some view. I can't think of a better name than that because that's all you gave me to think about. I end up thinking of things inspired by a thesaurus like, PictureSelectorGUI.

Choosing a good name is important.

The name should:

  • Indicate the single responsibility of the class
  • Ensure that when I look inside the data, methods, and implementation I find do not surprise me
  • Indicate the level of abstraction that it is working at

If, in addition to all that, the name also:

  • Indicates what architectural level the object is at
  • Indicates what the user does with the object
  • Indicates a family of objects that the object belongs to

then it might be nice, but these can also cause problems.

Objects work best when they make as few assumptions as possible about the world around them. Get those assumptions wrong or let enough time go by that they become wrong and suddenly the name isn't helping, it's actually in the way.

The problem with your question is you haven't described your class independently of the name you claim is problematic. So we don't have any better idea what it does then the problematic name gives us.

I'm guessing that an image is going to be chosen in some view. I can't think of a better name than that because that's all you gave me to think about. I end up thinking of things inspired by a thesaurus like, PictureSelectorGUI.

Choosing a good name is important.

The name should:

  • Indicate the single responsibility of the class
  • Ensure that the data, methods, and implementation surprise no one
  • Indicate the level of abstraction that it is working at

If, in addition to all that, the name also:

  • Indicates what architectural level the object is at
  • Indicates what the user does with the object
  • Indicates a family of objects that the object belongs to

then it might be nice, but these can also cause problems.

Objects work best when they make as few assumptions as possible about the world around them. Get those assumptions wrong or let enough time go by that they become wrong and suddenly the name isn't helping, it's actually in the way.

A name should withstand changes to the world around it.

The problem with your question is you haven't described your class independently of the name you claim is problematic. So we don't have any better idea what it does then the problematic name gives us.

I'm guessing that an image is going to be chosen in some view. I can't think of a better name than that because that's all you gave me to think about. I end up thinking of things inspired by a thesaurus like, PictureSelectorGUI.

Source Link
candied_orange
  • 114.6k
  • 27
  • 222
  • 352

Choosing a good name is important.

The name should:

  • Indicate the single responsibility of the class
  • Ensure that when I look inside the data, methods, and implementation I find do not surprise me
  • Indicate the level of abstraction that it is working at

If, in addition to all that, the name also:

  • Indicates what architectural level the object is at
  • Indicates what the user does with the object
  • Indicates a family of objects that the object belongs to

then it might be nice, but these can also cause problems.

Objects work best when they make as few assumptions as possible about the world around them. Get those assumptions wrong or let enough time go by that they become wrong and suddenly the name isn't helping, it's actually in the way.

The problem with your question is you haven't described your class independently of the name you claim is problematic. So we don't have any better idea what it does then the problematic name gives us.

I'm guessing that an image is going to be chosen in some view. I can't think of a better name than that because that's all you gave me to think about. I end up thinking of things inspired by a thesaurus like, PictureSelectorGUI.