[Disclaimer: All Rights Reserved. You are welcome to reprint it. Do not use it for commercial purposes. Contact Email: feixiaoxing @ 163.com]
I read a book "coming out of the software Workshop" some time ago, and I am in a heavy mood. Whether you admit it or not, the situation described in the book exists in current domestic IT enterprises and may involve a wide range. Think of the industry you are currently in, and you will be amazed. Similar events and similar methods are played every day. Endless version modifications, endless tests, endless development needs, loss and replacement of personnel, in addition to fatigue or fatigue. Today's IT industry is no longer 10 years ago, and everyone is facing challenges and suffering. Currently, the IT industry is widely distributed. It information companies, website companies, communication companies, embedded product companies, chip companies, online gaming companies, and ERP companies are in different upstream and downstream positions in their industries, the company's situation varies greatly. It is particularly hard for companies with low technical thresholds and lack of technical barriers, and employees are still suffering from unmatched work intensity while being able to withstand low welfare. This is our current situation. Is it necessary for our IT development?
It is generally considered that the development process of IT projects is based on the requirements analysis, software design and implementation, integration testing and system testing, and post-maintenance steps. We should reflect on whether there is room for improvement in these steps.
(1) strengthen demand analysis
From a commercial point of view, the starting point of a transaction is to meet the customer's needs. Only by precisely meeting customers' needs can we deliver products better and achieve a win-win situation. Of course, the premise for achieving all this is that we need to be able to accurately grasp the customer's needs. For many companies, demand analysis is based on sales, which is very unreliable. As we know, the goal of a salesperson is to sign more orders, so many times he will accept all requirements of the customer without principle. Whether these requirements are true or not, or whether these needs can be achieved by the technology itself, is beyond the scope of his understanding. A lot of sales scope is actually the content of the induction training. As for technical details or product performance, there is no way to do it. As an excellent demand analyst, he can not only accurately grasp the customer's needs, but also influence the customer's needs to some extent. Although there are not many such examples, they are not uncommon. The unprincipled receipt not only wastes development resources, but also affects the company's integrity level and even harms the company's development.
(2) Abstract Public Platform
Currently, there are many server system platforms, which can be windows or Linux or UNIX. Therefore, in many cases, you do not know which operating system your server program will run. So what you need to do is to build an abstract public platform. On this platform, you can ignore the specific details, because all the functions you use are platform functions, and all the data types you use are platform data types, so no matter what operating system, your server programs can run correctly. To achieve this, you may need to re-encapsulate many functions when constructing the platform, for example,
A) memory application and release
B) Create, accept, send, and release a socket
C) semaphore operation
D) Create, open, read, write, and close a file
E) Timer
F) Send and accept messages
G) latency Function
H) thread creation, priority setting, attribute setting, and attribute obtaining
(3) Build your own software library
As a project, software actually consists of many sub-modules. There are many modules, such as basic algorithm module, database access module, graphics module, parsing module, Log Module, decompression module, and PIC read module. For many projects, the functions of many modules can be reused, so how to extract these modules is a task we need to complete. The ideal situation is that all our software is composed of various modules in the form of building blocks. If we need the corresponding functions, open the corresponding compilation macro; if you do not need this function, disable the corresponding macro. In this regard, we can look at the Linux code. Many of the code above is based on modules, so many CPUs, so many FS, so many chips can be run on them, this shows that the entire Linux system is very open and robust.
(4) abstract process
As the main process of a software, this seems to be the responsibility of the main software programmer. As a programmer of a certain module, we can also learn something from it. For example, if we need to design an audio player, we need to support MP3, WAV, Ogg, and other audio format files. Here, you can first think about how to design this software? In this case, we should think about the commonalities of all file operations. Can we construct a general file access process on top of various audio files. With this abstract access process, we can simply register and parse audio. Even if the program we wrote is incorrect, it will not affect the running process of the original main process. With this abstraction layer, We can greatly improve the development efficiency of our work.
(5) unit test
Unit testing is a very good method. Essentially, the code designer should be the final person in charge of the Code. However, in actual work, we put too many quality problems of software on testers. Many people think that software testing is very boring and monotonous. In fact, this is not the case. For functional testing, we should try our best to adopt automated testing methods to achieve daily build of the version and daily smoke testing. For Module Testing, code unit testing is required. In my personal experience, designing stub functions and designing unit tests is a very challenging task. With the increase of unit test cases, our code will become more and more robust, and the entire module will become more and more stable. However, in many companies, unit testing is not enough, or many companies simply stop doing it.
(6) write your own test tools
There are not many methods for testing software. Some people are used to using performance analysis tools for windows, or if the company is richer, they will purchase tools such as pure coverage. However, many times we can write test tools by ourselves. The compilation of these tools is not complex, for example
A) You can use the malloc redirection method to count the memory size of malloc and check whether the memory is leaked.
B) use the open-source tool gcov to test code coverage
C) write your own script parsing module to flexibly test the code Function
D) Use the assert attribute to capture all abnormal attributes.
(7) simulation tools
In embedded development, the actual environment is often very limited. Therefore, what is important to create an effective simulation platform. Taking android as an example, we develop an android simulation environment on windows, so app developers do not need to develop a version every time, you can see the actual running result only after downloading it to the actual phone. With the simulation of PC, the result displayed on PC is basically the result displayed on phone. Without disturbing others or building the actual environment, the work efficiency can naturally be improved. Of course, not only the GUI can be simulated, in principle, as long as there are no specific hardware-related operations, but also should be placed on the PC.
Many of the content above is my personal summary and comments. You are welcome to share your views.