TIY-ATL-ROR-2015-Sep / assignments

0 stars 0 forks source link

HW 11-03 #409

Closed kingcons closed 9 years ago

kingcons commented 9 years ago

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.

robertcramer commented 9 years ago

In the video when Sandi says its OK to duplicate code, what is the context in which this would be ok?

sunrick commented 9 years ago

@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!