Each time you start a new project, whether it is an independentProgramOr a component of the existing plan, what kind of components should be selected?Programming Language. If you only consider the Previously Used programming language or the most popular language, you will probably get a bad result. Therefore, you should evaluate your choice in real time and constantly look for better alternatives.
When evaluating a language,You also need to consider the overall architecture of the Project. Not all parts of the project are suitable for writing in the same language.The process of selecting a programming language is actually an important part of the preliminary design of your project. How to break down and connect components is also very affected by the results of language selection. Some projects can easily see the most appropriate language, and I believe you can draw your own conclusions. Of course, the language will change with time, so the best choice two years ago may no longer be available now, but the first language to be excluded has become the best choice.
What experience does your team have?
Although obvious, you may have to say that you should choose the language you are most familiar. Although trying a new programming language is a great innovation, non-research projects are not suitable for experimentation. If you need to predict the project schedule and avoid large-scale unknown variables, I believe you will not be willing to use any unfamiliar language.
This does not mean that everyone in the team must be experts in this language. You can even include a small part of the team who are not familiar with the language in development to ensure the efficiency of others.It is really silly to exclude experienced or talented programmers from the development team just because they are not familiar with the languages required by the project!Good programmers have good adaptability. Of course, even if you select a familiar programming language first, it will certainly make you have to use a strange programming language.
Are there any operations with high computing overhead?
For example, video processing, graphic rendering, cryptography, statistical analysis, and signal processing have huge requirements for original processing capabilities. How long it takes for them to directly affect the efficiency of computer chips.
For these modules, you will almost certainly need a static type and compiled language. Or simply put, you need a fast programming language in these areas. No matter how rare the problem is, this will certainly happen. These performance-intensive components are usually limited and can be easily modularized and combined with other languages.
Does it involve many sub-processes and file management?
Many software exists to automatically handle repeated manual work. In the process, you have a very suitable program. All you need to do is to combine them. This is the main focus of the software development system administrator, of course, it also includes many systems and advanced operations.
Here, you need to execute other programs and perform file management, whileThe scripting language is flexible and simple, and is designed to implement these features. It is undoubtedly your best choice!
Are there insufficient resource restrictions?
Although the hardware is sufficient to some extent, in some cases or for some applications, the hardware is still very limited!This is especially evident in embedded devices.However, not all programming languages are suitable for development in a limited hardware environment. You need a compiled program that can run in that environment.
Sometimes the memory limit during running is the main problem, and sometimes the loading process may be more problematic! You may encounter this problem: Your application needs to be initialized from the eeprom or network, so you may need a static linked list or untrimmed library. This does not eliminate the possibility of using a VM-based language. On the contrary, sometimes you even need a small VM.
Are there clear requirements?
No matter what language is written, good programs can always be reconstructed and adjusted quickly. A quick prototype can be created for some languages. In addition, many business projects are completely nonstandard or extremely rough. In this case, the customer does not know what the product should look like before seeing it. You will need to constantly modify it until everyone is satisfied.
If you need to modify the program frequently during the meeting for demonstration or to make a detailed report, you will find thatQuick prototyping is very important.Dynamic Language is advantageous here, and it can easily combine multiple irrelevant libraries. Of course, hiding "detailed programming", such as memory management, also helps to build a rapid prototype.
How long is the lifecycle of a product?
Not all languages are stable enough. Many young dynamic languages become incompatible with the upgrade or greatly modify their core.Code. In fact, many projects will even benefit from these changes. Because backward compatibility of time becomes a problem, projects with short service life will become projects that no one cares about.
If your product has a life cycle of five, ten, or even more years, the problem of backward compatibility may become your nightmare. I don't think you will want to continue using compilers and other old tools for a long time, especially when they are still linked to old hardware. Project support for new versions or new products will certainly benefit you. What you need most at this time is a stable language that is managed by a Standards Board and customized with long-term support and backward compatibility.
What platforms do you need to support?
Not all languages apply to all platforms. If the target device does not support your preferred language, you certainly cannot use it! Of course, you cannot trust experimental support. You like to use C language, and the C compiler on the target OS does not necessarily mean that it is suitable. Customized chips, or even GPUs, sometimes only binary files generated in some languages are supported.
The chipset compatibility issue is not unique. It is also true for other software that needs to work simultaneously. For example, if you need to run code in your browser, there are not many languages to choose from. Some consumer devices are only allowed for some languages on their own platforms. Service providers tend to focus only on some languages and frameworks, and do not care about the sacrifices that others bring. If you plan to write a device driver for Linux, you will find that its kernel team only supports one language. You can publicize the benefits of your ideas,If you want to support a specific platform, you have no choice but to follow the platform's will.
Is there a large number of bit operations?
File Format and protocol-related work usually requires byte and bit operations. You will need to convert the format to a more advanced format, and then serialize it into a compact format. SomeAlgorithmYou also need to perform bit operations on the data. The lowest level of line protocol will also operate the bit stream according to your behavior.
To do this, you need a language that can easily perform bitwise operations and provide suitable data types (such as unsigned integers. However, not all binary operations are so troublesome. Some binary structures are simple, and even advanced encapsulated functions can operate on them. You need to carefully review your work requirements for binary operations, and then select a less troublesome programming language.
Does it involve certain specific fields?
Not all of the best languages are the same. There are many specialized languages in very specific fields. For example, artificial intelligence, text parsing, data conversion, expert systems, mathematics, and financial analysis. Domain-specific languages tend to save a lot of coding work without generating major defects, so you should try your best to use them.Here, you may choose a professional language to replace the familiar programming language.
The use of domain-specific languages also limits to some extent other languages that you can use in projects. Some are translated into another language, while others can be used as callable modules. Either way, you still need some integration method.
This principle is also applicable if an excellent library exists. No matter which language it depends on, I suggest you use it!
Conclusion
To make a wise choice, You Need To Know enough languages.If you only focus on a programming language, you will be held down by the language and its ideas. However, their style may be more important than the language. A good combination of static and dynamic languages, functional and imperative/advanced and low-level languages, and then consider the characteristics of the specific domain environment, you can evaluate the most suitable answer. In addition to choosing a language, you also need enough experience to make the best use of your final language.
Of course, the above is just a rough reference for you. Unfortunately, the first rule, that is, the language that the team is familiar with, is usually the final result of the Left and Right language selection.Break down the project as much as possible, and then find the most appropriate language for each componentAt least from my years of experience, using multiple languages in combination has never brought any harm.
You may think that, considering the above factors alone, it is not always possible to determine the language. In fact, it is usually important to exclude unsuitable languages rather than adding new choices. The project is split by component, and each component is selected with the most appropriate language. In the end, the standards for the language you choose will become increasingly strict until one or two of the best answers are left. However, if you do not break down a project, you can get only one or two bad choices. Generally, splitting items by module is a better choice.
Original article: mortoray.com
This article is compiled by csdn and cannot be reproduced without permission. If you need to reprint please contact market@csdn.net .