Without knowing it, I have been working on programs for 10 years. From the first time I learned C ++ to Java, I have been confused and clear. I feel that there are a lot of things to write, but I always think it is not a system, I 've probably read too many eight articles, so it's really uncomfortable. So no matter what you think. 1. Who is faster from C ++ to Java C ++ and Java? From an algorithm perspective, I think there is no doubt that it is a compilation> C ++> JAVA. Do not be superstitious about some individual evaluations or just loop tests, for example, on the jnode official website, the performance of JVM written in Java is compared with that of Sun's JVM, jnode's JVM written in Java is faster than Sun's JVM written in C ++! The compiler can perform targeted optimization to influence the test results, which is meaningless. In addition, the evaluation results won't have much practical significance. The efficiency of the real application system is 80% depending on the overall design architecture, not the language you use. So those who discuss assembly, C ++, and Java faster may be more concerned for their own purposes, however, his critical attitude towards C ++ is obvious, so Bruce said, "C ++ is not spam, but Java is arrogant. What is the fundamental difference between C ++ and Java? I think it is undoubtedly memory allocation. Programming ideas and design patterns are active and have no direct relationship with languages. Java has no pointer, and C ++ write programs can only be referenced. JVM is really different from C ++ in terms of memory management. The advantage of JVM is obvious: cross-platform and more intelligent memory management. But can it solve all the problems? The answer is no. Is Java memory exposed? Of course not. I think Java Memory leakage is often more difficult to troubleshoot than C ++. Due to JVM, programmers cannot directly manipulate the memory, and the hidden risks are often deeper. I have spent a lot of time studying the JVM memory mechanism. Although I have some experiences, I am still confused. Loop reference, unreasonable cache mechanism, repeated loading of attributes of spring and other normal beans may be the culprit of memory consumption. For a single, low-user, and low-concurrency system, it is very comfortable to use Java. Programmers don't have to consider too many things. Just design and compile code according to the business logic, no need to worry about memory allocation, no need to worry about concurrency and mutex (in fact, it is still necessary to manage), even if there is a memory leakage risk, it is a big deal to restart the JVM every day to solve it. However, for a software product that may be deployed in multiple application environments, memory leakage cannot be ignored. I have encountered a situation where I run very well in one environment, but there is a problem every day in another environment, even if I restart JVM every day, it will not help. At that time, I had doubts about many aspects, such as networks, databases, and containers. At that time, it was not very conceptual. Now I think it is better to look at the program, optimized a lot of code, solved a few memory leaks, and finally solved the problem of instability. For example, in application environment A, the server performance is good, and the JVM has 2 GB of memory. An application may have memory leakage, resulting in about 2 MB of memory consumption each time, in this way, about 1000 times no memory is available, which will cause a significant reduction in JVM performance. However, in application environment B, the server does not have such good performance. The JVM only has 256 m, so more than 100 operations can cause problems. In addition, the Application Usage in each application environment is different. If there are only 10 hidden application operations in a every day, the problem will not be exposed for 2-3 months, and even if the memory analysis tool is used, in the initial stage, it is difficult to find out whether there are any problems. But in B, if there are 100 hidden application operations every day, the problem only occurs in one day. However, in the actual application process, the application usage is often difficult to accurately calculate and cannot be predicted. This is also one of the key factors that make troubleshooting difficult. The uncertainty of the application environment is not only in the region, but also in the time. The same application environment varies with time. Select an application environment. Monitoring JVM memory is a good way to avoid such problems. The conclusion is that for mid-to-high-end productization, multi-user, high-concurrency applications, Java and C ++, it is impossible to ignore the memory. After all, the language is ultimately manipulated by computers. What are the advantages of Java? I think it has a lower threshold for low-end applications. For most small information management systems, it does not require rigorous and thoughtful design and coding. Learning Java allows a newbie to quickly get on the road, but C ++ does not, cross-border migration is a common mistake for new users. In a general software team, the level must be high or low, and not everyone can go deep through learning. This is a problem that C ++ is hard to solve, java is more suitable for beginners because of its normative advantages. C ++ is like a manual car, and Java is more like an automatic car. Although more and more people are willing to drive the automatic file, if they really want to run fast, the car has to be driven. Problems can always cause headaches, and tracing is often difficult and long. However, as long as there are other solutions, you cannot give up. Avoiding problems can solve the pain, but you will never be able to root the problem. 2. There is no doubt that the concept of cloud computing has been expanded. Cloud Services, cloud storage, SAAS, IAAs, and PAAs have already existed. But when I read it carefully, I found that most of them were old wines in new bottles. Although there are still a lot of substantive content, it is still far from the concept of true distributed computing. In the era of more and more advanced networks, storage, software, peripherals, and even memory are all networked. The only thing missing is the CPU, relying on the network to make a large number of CPUs work collaboratively is really attractive, but it is also difficult and far away. Some people think that cloud computing is an excessively hyped thing. I think there is some truth. If I want to choose, I also want to put my own things on my computer, I would prefer to use portable devices to manipulate my computer anywhere, but I would never put it on an invisible "cloud". I would be stripped and controlled by "cloud" every day. Therefore, if the cloud is only a centralized management of services or storage, it is not worth doing so. In fact, I don't think I am an opponent of the restructuring concept. Speculation has a certain effect on technological and social progress, but it can be carried by boat or boat, hyping up some irrelevant things together, will disrupt the theory and academic system, the confusion of the theoretical system will certainly lead to barriers to communication-although communication becomes more convenient (and inevitably more), the barriers to communication are greatly increased, the same term can be explained in one hundred by one hundred people. A sentence that can be clearly understood can be explained in dozens of cases. Pharmaceutical companies can repackage-yuan worth of medicines. The profits are amazing, but the bosses who make money are planning to transfer assets abroad every day, there is no sustainable development in China. Is such a person of high quality or low quality? I used to practice in a hospital when I went to college. I met a family member of a food poisoning patient who spent tens of Miles overnight and handed over a pile of borrowed coins to the hospital for dialysis. Later I went to work, library projects also know that in many places, even 100 yuan of library card deposits are stretched. How many conceptual restructuring experts who live in a superior environment every day will consider for these groups? The hype of the concept of "Cloud" shows their monopoly thoughts. The gap between the rich and the poor in China is still basically in the property aspect, and the information aspect is basically equal, this is also the premise that a rural child can become an entrepreneur after more than a decade of hard work. However, when "Cloud" comes, your every action is under my control and monitoring. Yes, you are convenient and cost-effective, but you lose the equal status in information, as a result, the fart will always be the fart, and there will never be a chance to turn over the salted fish. 3. I have also done a lot of technical work on information explosion over the past 10 years. In the first few years, when I saw a new technology and new concept, the concentration of adrenal hormones will increase significantly, if you don't need it, you may not be able to sleep at night. However, it gradually becomes more rational, and the technology selection must be based on the needs, and the technology cannot be used for the purpose of using the technology. There are many new technologies and new concepts, and you will know the source and advantages and disadvantages from a few eyes. I used to think that the environment had to adapt to the program. Later I understood that the program had to adapt to the environment. The simpler the application system, the better. If it is not simple, it is better to split it into multiple systems for separate design. Otherwise, when I face a lot of concepts and code that I cannot even understand, I feel crazy. Csdn is a good technical community, but it still lacks system organization and management. Forums, knowledge bases, and Q & A are similar in terms of information organization and management. For example, what technologies should I choose if I want to build an information system? At present, this problem can only be explored by yourself, and you can find a technical solution that truly suits you. Wiki may be a better platform, but it is not popular enough. In fact, every questioner or answerer is trying to find a common language between them. After the formation of a theoretical system of common language and semantics, communication can be smooth. Looking at csdn posts, there are no lack of cases to answer questions. If a communication platform can form a set of language and thinking modes, it will be very successful. This also makes the model of technology selection possible. When you want to adopt a new set of technologies, Google and talk about each other, either right or wrong, why can't a search engine determine what has been determined? who is right or wrong? It is because of semantic complexity. The expansion of information is far less fast than we think. A considerable part of it is the bubble produced by language semantics. How can we squeeze out these bubbles? Is there a massive amount of information displayed in statistics? Statistical data is often a strong supporter of the face project. You can discard these flashy data and take a closer look at how the statistical data is made? It often makes people laugh and cry, and most of them are 7 points true, 3 points false, or steal the concept, in short, the purpose is to say a grass as a forest. Information is deceptive, and business operations will use this feature extensively. In addition to adrenaline, there is a sense of distrust between people. In the age of information explosion, the role of communication has become unprecedented importance. However, as communication becomes more and more convenient, the efficiency is getting lower and lower. Maybe a few decades later, we will be overwhelmed by information. At that time, Information Standardization and orderliness will truly stand on the stage of history. This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/chui88/archive/2011/04/18/6330408.aspx