Dear predecessors, may I ask a related question, very vexed

Source: Internet
Author: User
Dear predecessors, Ask a question, very vexed AH
I am a novice, a lot of things are not very well know how to say, roughly speaking, I hope you have pointed to the predecessors, thank you.
A project consists of a lot of code, but the code is divided into many files
Example: Querying a database using view.php
Insert Database insert.php
Update database Data update_db.php
。。。。。。
A lot of files, and the amount of code is also many, if every code can understand, but still feel more and more chaotic, what is the reason? Where did you learn to be bad? On the book more than a large number of code projects, it seems to feel like this, how can I understand other people's projects??
------Solution--------------------
First look at naming, unless the name of a very strange program, generally know this function or the class is probably the implementation of what function.
Then look at the annotations, if any, so that you can learn more about the functionality of the program block.

Distinguish between what each block is doing, and then look at the block of programs you want to understand.

For example, there is a membership system, you just want to know the login part, that should not go to retrieve the password part to see. Look at other people's Code, too.
------Solution--------------------
I recently got the system on 1W files, the removal of cached images or something, or a lot, the directory structure is not. Take the important look, half the index look up. It is advisable to take notes while watching. The first time can be quick. You figure out what this file is about.
------Solution--------------------
The basics are important, read more documents

------Solution--------------------
Just from the novice to play the blame upgrade to the semi-novice ...
I personally think that people look at the code mainly look at the architecture and design patterns, specific to a function, directly find the search engine to ask the principle, and then try to achieve their own

------Solution--------------------
Starting from the functional module, you want to know where to look first, first of all to understand what he is going to do, when you understand what he is going to do your self-feeling can be completed, if you can finish OK first don't look at the place, when there is not understand the place must understand, otherwise you do not have the courage to change the code, afraid of
------Solution--------------------
Boulevard to Jane. Mentality as on. Pedal to the mud. Chunshang Chunshu branches. You can see the scenery along the way by train. Fly to see the colors of the cloud

A bunch of files (you have a lot of treasure), and the amount of code is also very large (which may have garbage code, do not bother), if every piece of code can understand (if a little self-deception.) It's better to read a piece of code first, but still feel more and more confused (without food in your hand). Belly laughed. Enrich yourself), what is the reason (believe you will succeed)
  • 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.