app/api/model_extensions/stamp.rb
ModelExtensions::Stamp#locate_qcable doesn't depend on instance state (maybe move it to another class?) Open
Open
def locate_qcable(d)
- Read upRead up
- Exclude checks
A Utility Function is any instance method that has no dependency on the state of the instance.
ModelExtensions::Stamp#locate_qcable has the parameter name 'd' Open
Open
def locate_qcable(d)
- Read upRead up
- Exclude checks
An Uncommunicative Parameter Name
is a parameter name that doesn't communicate its intent well enough.
Poor names make it hard for the reader to build a mental picture of what's going on in the code. They can also be mis-interpreted; and they hurt the flow of reading, because the reader must slow down to interpret the names.
ModelExtensions::Stamp#stamp_details= has the variable name 'd' Open
Open
stamp_qcables.build(details.map { |d| locate_qcable(d) })
- Read upRead up
- Exclude checks
An Uncommunicative Variable Name
is a variable name that doesn't communicate its intent well enough.
Poor names make it hard for the reader to build a mental picture of what's going on in the code. They can also be mis-interpreted; and they hurt the flow of reading, because the reader must slow down to interpret the names.