650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/7F/F7/wKioL1cy_KjBrhVXAABoL-OAbfo636.jpg "title=" 001. JPG "alt=" wkiol1cy_kjbrhvxaabol-oabfo636.jpg "/>
Many people learn C language, C++,java still do not program, and some people have not learned computer language, but have the programming of the sky, what is missing in the middle?
Let's take a look at 3 questions:
1. First of all, we need to understand the work that computers can accomplish;
2. Understand what each computer language is doing;
3. How to use computer language to let the computer do what we do;
1. What the computer can do most directly:
The work of the computer can be done directly if the refinement to see, is playing binary number;
A. Move the binary number bitwise to the left and right;
B. The bits in the binary number are < and, or, non-, XOR, or >4 operations;
C. read the binary number in the address space when the instruction action;
D. Read the binary number in the address space when the data is manipulated;
E. Saving a binary number to memory space
F. Arithmetic operations on binary numbers, resulting in memory space
G.......
To summarize, the work of the computer = data input-> calculation and operation-> result output
2. What is the computer language doing?
Computer language is only for the convenience of writing command computer action Grammar;
Machine language, command computer to do the original action instructions, converted into binary code form, not easy to read;
Assembly language, the machine languages, converted into English words, easy to read and recognize, but still not easy to understand;
Oriented to the process language, the language is converted into the form of mathematical expression,
Object-oriented language, the mathematical expression, encapsulated into a separate input data output of the module;
For application language, the object module is automatically assembled into the application component according to the requirement. (Under development)
3. How can I get unlimited work done by a limited computer?
The computer can only save and calculate unsigned binary integers, but we still have signed 10 binary number, floating point, text, sound, pictures, video saved to the computer; The key is to convert;
The data that can be saved by the computer is limited, try to convert it into binary;
The capacity of the computer is limited, and a way to do lossless compression of the same data to meet the capacity;
Computer word length is limited, the ultra-long data decomposition, computer segmentation calculation to meet the word length;
The computational speed of computer is limited, and a fast mathematical logic efficient calculation is studied.
The computer's XXX is limited, there is always a way to meet;
Programming idea of software development
The work of the computer is limited = data input-> calculation and operation-> result output
1. According to the needs of the program, the input data into the computer can accept the type of data;
2. According to the computer limited ability to work, the calculation and operation through logical thinking steps into the computer action;
3. Convert the results to the output format as required.
The 1th step, the conversion data type, the computer language has prepared many basic data types and the API;
2nd step, logical thinking form;
The 3rd step, reversing the data type, computer language has also prepared a lot of basic data types and APIs;
The 1th and 3rd steps, as long as Baidu search, see examples can be quickly mastered, most can share and take doctrine, but the 2nd step logical thinking and can not skyrocketing rise, the thought of the cultivation needs diligence and efforts, and learn to write the method is the same, to see the code of others, try to write more code, computer language studious, But programming is not learned, is spent time to write out, like to write Chinese characters, and not necessarily can write good composition.
Program: A code written in a computer language to achieve a specific goal or to solve a specific problem;
From a computer perspective, program = algorithm + data structure
Data structure: refers to the method (order, chain, hash, index) that the computer saves
algorithm: in the computer limited structure, solves the problem the concrete method and the step
Basic process of procedural language program
1. Input data
2. Check data legality
3. Data calculation and processing (algorithm)
4. Output results
The difficulty of development is the algorithm (logical idea)
Computer algorithms can be divided into two main categories:
Numerical arithmetic: Finding the numerical solution, for example, finding the root of the equation and calculating the definite integral of the function. (Really difficult)
Non-numerical operations: including the surface is very broad, the most common is used in the field of transaction management, such as book retrieval, personnel management, traffic dispatching management. (It's hard to say, but it's not easy)
Summarize:
The programming idea of software development is a kind of logic transformation thought, not learning computer language can learn, but can understand from the middle of writing code, first of all, it is necessary to memorize and comprehend the grammar rules of computer language, in order to translate the logic of program calculation into the grammar of computer language accurately; Develop slowly (except for the very few strongest brains);
Original link:
Http://http://www.xcore.icoc.cc/nd.jsp?id=15&_np=0_322_2
IT industry: software development Programming Ideas