I have been working on Php for two or three years. when I was doing a big project, I had a good idea. but the core code is to find the code written by others. how can I learn to remember other people's code into my own mind, can I directly tap the code? I have been working on Php for two or three years. when I was doing a big project, I had a good idea. but the core code is to find the code written by others. how can I learn to remember other people's code into my own mind, can I directly tap the code? At this time I will go back to read the PHP documentation (http://php.net/manual/en/
), Especially the concept is not very confident;
I will find a useful REPL (http://psysh.org/
) To test and confirm the understanding of these concepts;
I will read the source code of my framework, analyze its architecture, and learn its code style;
I will learn more about how to make good use of OOP;
I will learn how to write Testable Code;
I will learn how to make good use of PHP functional functions;
I will get familiar with the composer ecosystem (https://getcomposer.org/
);
I will expand my knowledge and skills to improve my future code quality.
Modern PHP
Modern PHP (photo printing edition)
PHP Objects, Patterns, and Practice
PHP Cookbook
Generally, this status indicates that the code is used only for projects. it is an authentic code farmer who only works and does not read books at ordinary times.
Several php-related books should look at, TCP/IP, Introduction to Algorithms, mysql core programming. It's not about php, but it's all about it. things that do not know what to do are usually used here. Many common algorithm ideas and design ideas are also discussed.
In addition, programmers still need to be very keen on themselves, and sometimes they need to learn hard-reading code that they do not understand, unless you think the code is not important at all or you know how it works, you don't need to read it carefully.
If you encounter difficulties, you must face them positively. when you are not busy with projects, you must carefully consider what to do. PHP itself is relatively simple.
I personally think it is a matter of thinking. the same purpose can be achieved through different code channels. I noted down my ideas, and I just want to use a method that I think is easy to use later. In fact, there are two words: Retreat
At this time, let's put down the code and think about something that's just a bit confusing ......
For example, the design pattern, object-oriented, interface, abstraction, dependency injection, and reflection make it meaningless to remember others' code. The key is to understand the way of thinking in the code, plan various types and interfaces. Do not worry too much about some specific implementation methods. No moves, no moves. I think they should understand their ideas first. Then, let's see how to integrate it into your project. Well. Php Cainiao's answer. You need to write your own framework... Implement a simple framework. First, you can understand others' source code.
Second, find fault
Third, help others improve the source code together
Many people think that the open source on the Internet is highly handwritten, and there is certainly no problem, but in fact there are many problems or space for optimization. if you can have your own opinions, as a programmer, you must maintain your own code writing status. every day, Wu will write something. To maintain that feel.