If you don't post a post, it doesn't mean you didn't want to talk about it at all. In view of the tight schedule and the urgent task, you may have a hunch that the high production period is coming again. For now, it's not as long as you 've done in the past.
The first thing we should talk about is getting fewer Internet cafes. these days, the Internet access conditions are limited, and the efficiency is much higher. I don't want to talk much about this. Everyone knows their situation. here we will discuss the issue of getting information and learning. what I want to talk about here is the excuse. All of them are the excuse. for example, IT news seems very important, especially for some comrades who are mainly engaged in the Web like me, is IT really indispensable? Tomorrow, Google/MS will launch a product that you have been studying for more than half a year, and you are still in alpha, so I am so sorry to release it for preview. Then you will not do it? If you find out what other people's ideas can be integrated into your own products, you will immediately design again? I'm afraid this is almost the same as that of the previous project.
Learning. learning can never be stopped. however, one of my experiences is that I must know whether the current knowledge is sufficient to cover all technical needs. it is impossible for us to change the code one time after writing the code using the Linq method. Another implementation is implemented using the SilverLight method. for example, I didn't use reflection at first. I saw related articles on the Internet one day and thought it was a good tool. at that time, our system had a lot of objects and data to be shared and directly locked. This was not consistent with my design philosophy (because this object may not need to be locked in another scenario, for example, it can be shackled by an external owner ). I think everyone knows how Hashtable handles lock. This is a classic tutorial, while Java and. NET is implemented in this way: Inherit and build a synchronization proxy. Like Anders said, like what he wants to eliminate, these practices are full of red tape.
So I learned a day of reflection, and the next day I realized dynamic generation of proxy, combined with Attribute or description configuration, using Sync <T>. synchronized (T obj. no more than two days. how many classes are used for this dynamic proxy? 2. because only two classes have not been manually written as proxies for synchronization. for more than a dozen types of synchronization agents, handwriting only takes one or two hours. since there is a unified method, how can we look at the original handwritten code, and finally remove all the synchronous proxies for handwriting classes, all changed to the dynamic generation. it took several hours to test and sort out the code. there is not much time in the two days, but there are two days in the two days. Why is there no time? If you cannot avoid temptation when learning to find the right one, it is better not to learn.
But I said, I am just getting started. What is getting started? To put it bluntly, the specific technology, such as reflection, looks at my status and takes only some practical and hard work to learn. Besides the limitations brought by my physical and mental conditions, there will be no difficulties. you can use my standards to measure yourself, but don't lie to yourself. In my experience, many programmers do not have enough learning skills to learn; in particular, it is hard to figure out the learning costs of one thing. knowledge is often tied. Looking at it is simple, it is just like this. The result is a waste of time and cannot be used to grasp a knowledge point. I learned this design pattern earlier, because I didn't get started at that time, but I thought it was just some method. I had a good grasp and suffered a lot of losses and took a lot of detours.
If you fail to meet the entry standard, you may waste a lot of time in learning. Isn't it? I think this is the opposite. I said that if a programmer is not as good as me, it is really time to work hard. programmers who are not getting started are worthless. even if the work is delayed, you have to set aside time for yourself to learn. Only in the learning process can you master the learning skills and finally form an acceleration. delayed work, not responsible to the boss, but when you get started, or even embark on the road of experts, you can return to the boss (although it may be another boss) there are more people than those who are not getting started. In the end, your abilities will use social productivity (although it may be only a small corner, it is not direct ), it is worthwhile to sacrifice a boss project.
Of course, I don't recommend doing this myself. If I want to learn how to get out of work, I can ask for training money. It's not easy to say that training money is a small task. After all, I am still responsible. obviously, I cannot tolerate this problem if I am the first. But I cannot tolerate the failure of programmers. for me, either arrange some lighter tasks for him and leave some time for study; or, when the task is finished, ask him to leave. there is no shortage of such programmers in society. I don't expect this programmer to be more suitable for maintaining existing projects than others because he knows more about projects. many management personnel are technically unable to compare with me, so I also want to ask them to note: whether in the long term or short term, there is only a short-term demand, you should consider retaining a programmer who does not learn. In addition, don't patronize the big knife, don't know the strength and time to set aside for the sharpening. otherwise, the Organization will pay the cost. For the upper layers of the Organization, this price is often not obvious. after all, the ten-fold speed change grouve brings about by the first productivity has a considerable power. A well-running technical team yesterday may not be able to adapt to the competition today.
The last thing to say about this paragraph is that for organizations that have closed their doors two years ago, programmers who have come to think of their own lives as a blind mix and other things that are more meaningful to you are not here. I do not reject anyone. The choices made by reality and happiness are worthy of respect. IT just reminds people and organizations who want to go further on the IT Road.
I did not expect it to be so long. the next section is a big gossip and Martin Fowler. two days ago, I had nothing to worry about, and I often hit it again, and I often cited the words in the POEAA. in the last chapter, I will talk about "implicit interfaces". I can't remember the details, but I forgot what I said. However, martin calls Xxxx ["yyyy"] an implicit interface (more broadly, there is a general method. How to use it fully depends on the user's logic. there are no suitable books at hand, and I just flipped through some books, such as Objective C ++. for example, Meyers's implicit interface refers to an interface that consists of an explicit signature but a valid expression and is also completed by the compiler. the expressions in other books or authors are not much different from those in Meyers.
If you ignore "Check completed in the compiler", it is hard to say whether Xxxx ["yyyy"] is a valid expression. this shows that Fowler still captures some things from the implicit interface, but it is clear that he has made a mistake. some people may want to say that I have to chew on the text again. However, in my opinion, this is a very serious conceptual error. It implies a service interface and an implicit interface, a pure program concept, thoroughly obfuscated. for beginners like me, it is normal to say wrong. As a master, especially a master in modeling, object-oriented, and pattern, this cannot be said. although I translated the Chinese version, the English version also uses the word implicit interface. yes, I am a little newbie than Martin, but I have to complain that this problem is something I can understand, and it does not affect design and code writing; but how many traps are there in those more complex areas?
My "Old cainiao" statement is: on the one hand, he summed up a lot of knowledge and experience we need. on the one hand, he is an old cainiao. to put it bluntly, just think about the growth path of the big-mouth people and the amount of work required for a qualified big-mouth person. In fact, there is not much time for busy people like Fowler to solve the problem. how can he not cook? However, this does not mean that we, for example, have a reason to not respect him or deny his level in whole. for example, even if he has seen fewer projects than some other great guys, even if he doesn't count on indirect contacts, it's much larger than me; even if he is not as deep as an expert, his environment gives him more details than I do. He has serious negligence, obviously, the depth and breadth of related fields are much better than mine. this is the meaning of the word "old". It is absolutely objective. What should I say? I have not eaten more salt than the old man. in addition, I personally quoted many Fowler's things and read his books in the course of his preaching and teaching. How can I not respect him, and even grateful to him? However, if we have two questions, we can be vigilant. When we are learning knowledge (in fact, it is also a topic related to learning), don't because of who the author is, or other factors that affect our judgment. in particular, we don't need to let things we see first become a prejudice, which is often not from our own.
At any time, I had to maintain the spirit of suspicion. I read a book about how to behave from the perspective of game theory just two days ago. I also emphasized this point.
In the last section, I want to talk about object-oriented topics.
The design pattern itself is not like some people saying it is a kind of thought, but the techniques it introduces reflect some ideas. these ideas are emphasized at the beginning of the basic introductory books such as SICP (university textbooks. however, most imperative and object-oriented language users do not seem familiar with it. A foreigner has an article about FP programming, and the design mode does not exist at all, because your programming method directly solves the problems to be solved by the ideas embodied in the design mode, of course, the specific means are not necessary. he said exactly the right thing, but I also tried to improve the programming style by more FP, and finally found that, in general, my FP level is purely confusing. For me, FP splits parts into fragments and is not easy to manage. my personal opinion is: after all, FP misses the best time for programming language development due to performance and other reasons, and lacks the support of developers, therefore, there will not be a lot of Optimization on the use of sugar beans, in terms of structure and other aspects, and even IDE, it provides too little convenience. for imperative programming, although the object is just a sugar bean in the Anders mouth (the delegation is the whole FP in the Anders mouth, it is nothing great for him anyway, A real master like him may see everything as a float cloud), but there are more and more such sugar beans, coupled with a lot of specific guidance such as design ideas and design patterns, we will gradually eliminate many imperative weaknesses in design and implementation (the native issues such as stateless and concurrent imperative programming are not discussed here ).
Imperative programming, especially object-oriented programming and the emphasis on interfaces, adds a lot of red tape. For example, you need to implement an IDictionary interface to work with the Framework, I rely on it. There are no implementation methods and there is no need to implement them ..., it is annoying to have IDE support. If you need to implement two more interfaces, what kind of TM elegance is simply P. to put it bluntly, it is to implement the type and constraints, and the more complicated it is. thanks to the continuous emergence of new sugar beans, after all, red tape can also be hidden. it should be said that the complexity of the type system, FP programming is also to face. the development process of static object-oriented language is simply a process of solving problems while creating new problems and then solving them again, but I believe that the development will eventually reach a relatively stable state.
Well, the above is purely nonsense. My experience is that, since the programming language is a tool for us to express, the various principles that I used to worship in the past, we 'd better increase the volume of attention. if you want to merge them, you have to have a more advanced principle. what are these principles (for me) in the final analysis?
First of all, when you write every part of a function or process, you should not (use) Think elsewhere (sometimes it is useless), so that everything is much simpler. this is one of the first goals to be achieved and one of the goals that will eventually be achieved. in this process, the implementation of other tasks, as long as it has been implemented, is like you.. NET Framework or other basic frameworks. for example, A simple and effective means is that when task A is implemented, there is Task B. If Task B is involved, A shell of Task B is created, and B is assumed to have been implemented, and directly call the operations above B. what needs to be exercised here is a quick response intuition and the ability to determine whether there is really a Task B. the final result is that the shell created after completion of A does not need to be adjusted too much. in my experience, the shell that is built at will need to be adjusted more or less. when implementing A, try not to pay attention to them and try to make A reasonable. of course, it is only follow this practice, and it is impossible to be perfect without corresponding skills.
The second is the ability to extract common processes or standardized things. object orientation always talks about encapsulation changes. In fact, it is more important to encapsulate unchanged content first: In the process of fixing unchanged content as much as possible, it is natural to set a constraint or contract for those unstable factors and then exclude them (that is, the encapsulation change is caused by a fixed change ). at this time, the inheritance and polymorphism will be useful. Strategy, TemplateMethod, and AbstractFactory will all come out. this seems to be the same as the encapsulation change statement, but the angle is completely different (there is no essential difference in how we look at it, but it may change the difficulty we grasp it ), is it easy to find the rules of change, or is it easy to determine the entry point from the beginning? With this capability, slogans such as reusable can gradually turn into reality, and be very sensitive to realizing what should be put into another task, the practices mentioned in step 1 can be better implemented and implemented.
Finally, the granularity should be appropriate to solve one or more of the basic problems. I think it is a more appropriate practice. When the skills are more skillful, we may sometimes choose to merge some things, and break down some other. with these basic particles, the rest is assembly. for. NET Framework, the size of particles is often not so strict, sometimes you can feel how easy, how to come; also, according to the specific situation, for example, the particle size can be adjusted for the purpose of simplification or better assembly. if it is not suitable and cannot be connected, then how to use the interface design and specific methods such as Adpter la Bridge is a natural thing.
In fact, the three steps I mentioned are the prerequisite for the awareness of the above steps. The next step is to solve the problems that may be encountered in the previous step. in practice, it is much easier to implement, learn object-oriented, or FP (maybe FP has less things that don't have to be essential. no matter what the principle is, I personally feel that the main purpose is to reduce the complexity we face directly, and put all the things that can be traced into the drawer, only the work that comes from the demand is left (because all these work need to be done ).
In fact, the only learning here is how to find the point to see. This learning is not as good as reading a thousand books. The only skill is how to squeeze toothpaste, squeeze out irrelevant items. the model should be built around the demand, and the demand should be treated as garbage, scanning from here to there, and finally moving them to the appropriate position. when the workload is heavy and implementation is messy, it is often that the above three axes are not yet in place, which is equivalent to the effect of yourself as your own user, resulting in many implicit requirements, the remaining garbage dumps in the system should be those closest to external needs.
For example, I don't know what you think about the base Page class and the aspx of code writing. cs: Actually, it can be regarded as an intermediary. This [DP] is very clear. if we look at the entire process from the perspective of implementing a page display, aspx. cs can be said to be the dirtiest place. It is connected to every control on the page, and different controls are only a small part of objects connected to it, in the end, it may even include our specific business needs. As GoF said, the intermediary may eventually become a very complicated giant. in my opinion, if we look at the WebForm framework as a whole for implementation, the place where we write is a garbage: Because WebForm addresses the needs of our users.
In turn, we can also design the system in this way. The noodle code, super-large and super-complex types, are not available, but are fixed one by one with something that can be fixed, squeeze out a lot of extra things from different places, and then find one or more suitable ways to settle for them. however, do not equate this method with the more extreme XP. Pre-design and so on are all necessary: the pig can't go out of the pigsty; the discount and adjustment are suitable for ordinary people. NET Framework. as far as my experience is concerned, such practices and learning methods are more natural and comfortable than just thinking about how to conform to various object-oriented principles; of course, this method also has disadvantages. Since the instruction manual tends to be simplified, you cannot work as an architect or designer until you accumulate enough experience. However, is it so easy for programmers to become a designer?
I seem to have said a lot again. I will not talk about it for a long time at the beginning. finally, we say, "I love my teacher, but I love truth more." Only when we learn, ask, study, challenge, and live in a down-to-earth manner can we speak out to the masters, there are also those who support us in reality, the best tribute.