From 1 + 1 =? Related theoretical courses on computer software

Source: Internet
Author: User
1 + 1 =? This is a problem for a sensible child, but what if it is another process?
Write one Program To calculate the value of a simple operation? MS is relatively simple:
Cin>;
Cin> B;
Return A + B;
This program is simple and simple as long as you have learned a program Design Language , You can implement it.
Now, let's change our requirements: enter a four-digit formula to evaluate its value.
Haha, this is not only 1 + 1, it may be 1 + 1 + 2, or even 1 + 2*2. Now, if you only Programming Language It is difficult to solve such a problem, because you need to know how to judge the priority and how to save the intermediate results. in this case, apart from programming languages, you have to learn another basic course in computer theory: Data Structure You need to save the intermediate results and determine the priority through the data structure. To be more detailed, it is the stack.
Now, when our requirements are further deepened, we need to add sin cos, tan, LG, kaifang, etc. If we use a stack to solve the problem and judge it, it will be very difficult, because you need a lot of switches, you need to use Compilation principles Because the process of grammar is involved here. However, after learning the data structure, you cannot directly jump to the compilation principle, because there is another course in the middle, that is Formal Language After learning it, you will not be intimidated by the various production types in the compilation principle.

It's a bit strange to post this article here.ArticleIt is to remind everyone, because many programmers, or half-way out of their homes, or enter the IT line through professional training. Maybe, you may know a lot about many programming languages and architectures, but after a short period of work, you will find that some problems cannot be solved, but they are actually due to lack of theoretical knowledge, you need to study the theory. The better way is to learn it before you encounter a bottleneck. If there are some problems, you may not know which theory he uses to solve the problem. For example, many people have a headache for multithreading, and problems may occur during a single operation. synchronization can lead to deadlocks, and you cannot figure it out for a long time. In fact, thread-related problems can be learned in the operating system.Operating SystemThere will be detailed descriptions of various models of thread synchronization, such as consumers/producers and philosophers, which must be more detailed than the information on any web page.

If you want to work, write so much hope to be useful to everyone.

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.