[Read the report] transparency and controllability of software design and implementation

Source: Internet
Author: User
Tags freeciv

Document Name

Transparency:
Let there be light

Work
By

Eric
S. Raymond

Author Unit

 

Output
Location

The
Art of Unix programming

Reading Time

2008.12.20 ~ 2008.12.25

  1. Main Content

This article introduces two important qualities of software design:
Transparency and controllability. The author first defines these two properties in popular languages, and elaborates the importance of transparency and can be explicit from the perspective of users and developers.

This article analyzes several transparent and explicit Unix
Design instances. These instances include audacity
Fetchmail
, GCC
And kmail
, Sng
, Terminfo
, Freeciv
Such as UNIX
Software. This article tries to sum up experience after introducing the full instance. While summing up the experience, the author also describes his design methods and concepts, such as data regionalization, separation of mechanisms and policies, reduction of the thickness of the abstraction layer, and modular encoding.

 

  1. Problems Involved

  1. What is transparency and can be explicit?

  2. Why should software design be transparent and explicit?

  3. What is the principle of transparency and explicit encoding?

  4. How can we bring transparency and controllability during design?

 

  1. Author's Point of View

In this article, the author tries to define transparency and controllability. The author believes that transparency is a passive quality. If you can predict all or most of the program behavior and establish a simple psychological model, this program is transparent. On the other hand, if the software system contains functions designed to help people establish a correct "what to do, how to do" psychological model for the software,
This software system is visible.

After defining these two properties, the article describes the necessity of software design to meet these two properties. The author first explains this from an aesthetic point of view. The beauty of software lies in its combination of power and conciseness. This combination can also be seen as an elegance (elegance)
. From the user's point of view, elegant software means simple and direct Gui
Interface, gentle learning curve. From the software developer's point of view, the elegant code means that not only the algorithm is passed to the computer, but also the confidence and insights are passed to the person who reads the code,
Elegant Code also brings stability and maintainability to the software system.

In section 2, the author describes the principles of transparency and explicit encoding, including eight principles:

1
>
Generally, the maximum static depth in the Program Invocation layer is no more than four.

2
>
The Code has a powerful and obvious immutable nature (invariable)
, Which is implemented by prefix and suffix assertions During encoding.

3
>
API
Function calls meet the requirements of orthogonal and compact.

4
>
Some handy key data structures or globally unique recorders capture the high-level state of the system.

5
>
There is a clear one-to-one ing between the data structure and the external entities they represent.

6
>
Functions and modules are easy to understand.

7
>
Minimize conflicts between special situations and implied situations.

8
>
Magic number of code (
Ambiguous constants)
Too many, the limit (such as the size of the key buffer) is too obvious.

In the last few sections, This article summarizes some design methods that are transparent and explicit, including the following:

1
>
Do not stack too many abstraction layers on the code for specific operations.

2
>
Data regionalization makes it easier to read and maintain data.

3
>
Data (policy) and engine (mechanism) are separated from freeciv.
Summary in the software instance.

  1. Self-evaluation

By reading this article, we understand the transparency and explicit definition and importance of software design, and master the basic methods for evaluating software instances.

 

  1. Proposed improvements and Improvements

Although this article has put forward some valuable ideas, some expressions have some limitations.

1

The author advocates data regionalization during design, but not all applications in reality apply this principle. For example, embedded applications and network applications with high practical requirements.

2

The author's evaluation of the selected software instances is inaccurate. For example, the author advocates audacity.
The software interface is clear and natural. View audacity
After the software, I think audacity
The UI layout is not aesthetic, and the functions are not clearly displayed.

3

The article puts forward many points of view in the Summary section, but it is too fragmented and unorganized.

 

  1. Reader's Point of View

After some efforts, this year's project tasks have been basically completed. I want to summarize the software design and implementation methods based on my project experience this year, so I chose to read <Unix
Programming art>
This article describes software design.

Recalling this year's project experience, many of my ideas in this article have been resonated with me. For example, software design methods for data regionalization and policy and mechanism separation are all embodied in our project. In Xuanwu project, our case data adopts XML
The format is organized and stored in text format, which facilitates development and maintenance. In addition, in the workflow software that Mr. Li introduced last time, we used freeciv similar to the one described in this article.
The instance adopts the data (policy) and engine (mechanism) separation method. The server maintains the shared status, while the client focuses on the GUI.
The process logic is stored in XML
File, read at server startup. In the database module I designed, I also used the design method of layering the basic functions of the database and the data business logic. However, according to the viewpoint in this article, my design is unreasonable, there are too many abstract layers on the code for specific operations, so that the Program Calling layers in the image feature extraction module have reached four layers, so my design has to be improved in terms of transparency.

Related Article

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.