Experience-how to quickly get familiar with your company's old projects

Source: Internet
Author: User

    • For example, if you go to a company, and then start by downloading the company's old code, then the old code is familiar with the company, if the project was done two or three years ago, then until now, assuming there are 100,000 lines of code, then let you familiar with the old code, and then on the basis of the old code, Add new function module, is very bitter, sometimes, do not know how to start. If you want to read from one line to the next, then when you spend a lot of time reading it, nothing is done, and after that, you forget it. At this time, it seems very sad urge ...
    • Method: Search
      • So we can change the demand without having to read someone else's code. We search the page, the page and the controller, make notes, save, and then you can in the future changes, slowly familiar with the company's old code
      • After recording, if we want to change again later, we will this controller. h put it in and search it out.
    • Will find the code, comment, comment on the current method, or an adjacent method, see what affects the content, and then remove the comment again, verify that it is the affected code
    • Find the code, in the corresponding method, directly return, do not let him execute the content inside
    • cannot be searched ,
      • May be the picture, then if you have enough time, you can go to see a piece, find the corresponding picture name, then go to search, see which file loaded this picture
      • Find a root controller, go to agent inside find root controller, but may some company's agent hide more deep, then still search, we search AppDelegate.h
      • Search int main function: If searching through AppDelegate.h is not, because some company's agent is not necessarily called appdelegate. The main function tells you who the agent is and writes int to narrow the search.
        • When the agent is found, comment it out with the controller to see if the right is found. In fact, the function of the comment is that if we comment out this line of code, which effect does not come out, then the code is what to use.
        • After finding the root controller, probably search a glance, slowly annotated, and then narrow the scope, if there are proxy methods, and so on to find the implementation of proxy methods.
        • If the corresponding cell is found, then we try to annotate the cell
    • So you can almost find the controller that corresponds to what we're looking for.

      • If you want to change the contents of the cell, we search UITableViewCell * so that the search is also a skill, can not be random search
      • If we find that this cell was created through xib, we cannot search directly, then we will go to the Project Finder and see Xib in which file

      • Slowly the company's control is familiar to us, then the next change in demand, and so on, is easy things

Of course there may be a better way to look forward to sharing.

Experience-how to quickly get familiar with your company's old projects

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.