Data structure is better than flow chart

Source: Internet
Author: User

I forgot which book I saw this sentence. It seems like a great guy said it. At that time, I remembered it with a feeling.

After a few projects, I began to realize that "data structure is better than the flowchart", which is also a harvest.

At the beginning of the gift simulation, we adopted a unified multi-level linked list data structure. In one aspect, it has good flexibility. However, it has caused severe constraints in many other aspects. For example, to design the storage structure of data files adapted to this data structure, the file read/write speed is very slow; to achieve the purpose of playing and playing again, the design is more complexProgramProcessing logic; Unified playback processing causes serious problems in the aspect of gift-like scalability.

Instead of using a unified multi-level linked list structure, it would be much better to design only core interfaces, and design specific data structures based on specific needs of other parts.

During the lottery program, the linked list storage award settings were used to store the data structure of the lottery results, in the program, two linked lists are used to combine data to set the status of the lottery interface. The program processing logic is complex and takes effect.

If a specific prize is saved to the data structure of the stack in reverse order according to the lottery order, the processing logic in ascending order will be much simpler.

In terms of web development, such as restful design-style applications (different from traditional Web Services) JSON and other language-independent data encapsulation, workflow design applications, AOP applications, Message Queue applications, and so on. All projects with smooth development, almost all of them are good architectures based on good data structures. As for flowcharts, it seems that apart from business processes, program development is not a must.

-By a farmer-

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.