Closed kingcons closed 9 years ago
In the video when Sandi says its OK to duplicate code, what is the context in which this would be ok?
@robertcramer I remember Sandi Metz saying you should write duplicate code first and then see if it would make sense to refactor it, i.e. how many times am I duplicating code? If its just twice, its probably not a big deal. Would refactoring duplication make my code more confusing/complex/abstract? If you have code that is easy to understand and its only being used in a few places, maybe its better just to leave it. No hard rule. She also said if you end up duplicating stuff in a lot of places, it might mean you should actually write another class!
Description
Read the Rails Testing Guide and watch Sandi Metz Railsconf lecture as described here.
Submission
Post questions in the comments of this github issue for review tomorrow morning.