Questions to ask oneself when evaluating a code:
- What is the type of action being performed (method call, block, conditional, etc..)?
- What is the object that action is being performed on?
- What is the side-effect of that action (e.g. output or destructive action)?
- What is the return value of that action?
- Is the return value used by whatever instigated the action?
Example with a Table
Line | Action | Object | Side Effect | Return Value | Is Return Value Used? |
---|---|---|---|---|---|
# | method `foo` called | Array | None | `nil` | No |