In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
UNIX programming has its own specific style, when we learn UNIX programming, we should try to follow this design style, it can help us avoid some problems as much as possible.
Simplification
Many useful and easy-to-use UNIX system software are very simple, small and easy to understand. "small and simple" is a technology worth learning. The larger and more complex the system is bound to contain larger and more complex errors, which is a very painful thing for us to debug.
Concentration
Getting a program to perform a task is usually much better than concatenating all the functions together. Bloated programs are generally difficult to maintain and use. Compared with single-function programs, modifying one function of the program is easy to cause other errors and affect the use of other functions. In UNIX programs, when users have new requirements, we usually combine various gadgets together to achieve a more complex task, rather than trying to complete the user's needs in a single program.
Reusable component
Implement the core of the application as a library. Libraries with simple and flexible programming interfaces and well-documented libraries can help others develop similar programs, or apply these technologies to new applications. An example is the dbm library, which is a set of reusable functions rather than a single database manager.
Filter
Many UNIX applications can be used as filters. That is, they convert the input and produce the output. As you will see later, UNIX provides mechanisms that allow us to combine some UNIX programs in a novel way to develop fairly complex applications. Of course, this type of reuse is supported by the development approach we mentioned earlier.
Open file format
The more successful and popular UNIX programs use pure ASCII text files or XML files as configuration files and data files. If you use either approach when developing a program, you're doing the right thing! It enables users to use standard tools to modify and search configuration items, and to develop new tools to perform new functions on data files. A good example is the ctags source code cross-reference system, which records symbol location information in the form of regular expressions suitable for search programs.
Flexibility
You can't expect users to use your program very correctly. Therefore, you should try to consider flexibility when programming, and try to avoid arbitrarily limiting the length of fields or the number of records. If you can do it, the network programs you write can run both on a stand-alone machine and across the network. Never think you know everything the user wants to do.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.