You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 24, 2020. It is now read-only.
Readable, concise code.
See Code Smells. FYI: When he refers to "shorter methods" think of them as not necessarily short in terms of lines, but having a single thing to do. Avoid chaining too many methods together or having too much logic on one line.
For example:
# the code below is jibberish, but is what method chaining is. It's easily recognizable due to the many methods chained together by ".""hello".split(//).join.match(/\w/).gsub
If you can't think of a way to improve your code becuase you had an awesome solution the first time, write why you think it's great instead. Do not simply copy the initial solution or leave the refactoring section blank.
The text was updated successfully, but these errors were encountered:
How to Refactor
Refactoring is an important step to becoming a world-class beginner, and it's important to look at your code fresh before refactoring.
Refactoring is not about solving the problem differently, it's about solving the problem well.
Good solutions don't just work, they make it clear what they are doing by having:
See Code Smells. FYI: When he refers to "shorter methods" think of them as not necessarily short in terms of lines, but having a single thing to do. Avoid chaining too many methods together or having too much logic on one line.
For example:
If you can't think of a way to improve your code becuase you had an awesome solution the first time, write why you think it's great instead. Do not simply copy the initial solution or leave the refactoring section blank.
The text was updated successfully, but these errors were encountered: