What are the most frequent steps an Objective-C programmer will go through to refactor his code?
Are there frequent processes which the programmer will go through? Or does everyone have different c开发者_开发知识库oding habits?
Often when it looks like I will be repeating some code or algorithm that I already have, I look for ways to avoid it.
A common one for me is to have need for a class that is similar in some way to a class I already have. I break the original class into a superclass (with the common functionality) and a derived class, and use the superclass as the basis for my second class.
精彩评论