Skip to main content
added 93 characters in body
Source Link
user949300
  • 8.9k
  • 2
  • 27
  • 35

As for who decides whether to run, the answer is, from GRASP, who is the "information expert" that knows.

Once you have decided that, renameconsider renaming the function for clarity.

Something like this, if the function decides:

 ensureUpdated()
 updateIfDirty()

Or, if caller is supposed to decide:

 writeStatus()

As for who decides whether to run, the answer is, from GRASP, who is the "information expert" that knows.

Once you have decided that, rename the function for clarity.

Something like

 ensureUpdated()
 updateIfDirty()
 writeStatus()

As for who decides whether to run, the answer is, from GRASP, who is the "information expert" that knows.

Once you have decided that, consider renaming the function for clarity.

Something like this, if the function decides:

 ensureUpdated()
 updateIfDirty()

Or, if caller is supposed to decide:

 writeStatus()
Source Link
user949300
  • 8.9k
  • 2
  • 27
  • 35

As for who decides whether to run, the answer is, from GRASP, who is the "information expert" that knows.

Once you have decided that, rename the function for clarity.

Something like

 ensureUpdated()
 updateIfDirty()
 writeStatus()