3 ms·
What are your thoughts on the habit of wrapping virtually every recurring piece of code in its own method? In case the implementation has to be overridden? E.
by aantix 6y ago
What are your thoughts on the habit of wrapping virtually every recurring piece of code in its own method? In case the implementation has to be overridden?
E.g.:
def current_time
Time.now
end
vs. just repeating Time.now inline within all of the calling methods?
- chooseaname 6y ago> In case... When it happens, deal with it - odds are it won't. Expend the energy making the code base testable not pretending to be an insurance company ("In case sh..").