Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NFC] Extract getUserCheckSum function #13167

Merged
merged 1 commit into from
Nov 28, 2018

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Minor code cleanup to improve usability & to make checksum info more available to child classes (I have some further cleanup in progress to leverage that)

Before

Code less readable

After

Code more readable

Technical Details

Comments

@civibot
Copy link

civibot bot commented Nov 28, 2018

(Standard links)

@civibot civibot bot added the master label Nov 28, 2018
@seamuslee001
Copy link
Contributor

Agree this is just a straight forward extraction and is NFC, Merging

@seamuslee001 seamuslee001 merged commit e829042 into civicrm:master Nov 28, 2018
@seamuslee001 seamuslee001 deleted the checksum branch November 28, 2018 11:48
@totten
Copy link
Member

totten commented Nov 28, 2018

Agree this looks like a valid extraction, but... a process thing about "NFC"...

It feels like there's been a miscommunication -- e.g. when coining "NFC", I personally expected that it would not include refactorings like "extract method" because refactoring changes how the code executes. There are several kinds of subtle issues that can happen in refactoring (e.g. typos, inverted conditionals, or unrecognized naming-conflicts in the class-hieararchy) which would break functionality. As a reader/potential-reviewer, I look for very different things in the following two examples:

  • Fix a grammatical issue in a docblock or help screen
  • Extract a function or move a function to a parent class

Even though they are different, I can see how genuine refactorings (when done correctly) are still simpler/safer than other changes, and it does seem useful to have a short-hand for them.

@seamuslee001 @eileenmcnaughton @colemanw @mattwire -- could we add another abbreviation to our lexicon? Like one of these?

@eileenmcnaughton
Copy link
Contributor Author

ok - let's go with REF - hopefully that will also keep them out of the 'features' part of the release notes

@colemanw
Copy link
Member

colemanw commented Dec 2, 2018

Thanks for the clarification @totten. I also like REF.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants