Cai Mingjin calls himself a "10-year beginner" in guitar. During college, he formed a band with a partner. Now, in technical work, has a "quiet" understanding of collaboration, programming, and software design.
The following is the story of Cai Mingjin and ONES - partly from his self-report, partly from the content of one of his technology sharing sessions.
Solve problems calmly
I used to have a grumpy temper. If I found inconsistencies in product design, I would go back and show no mercy.
Now I have a big change. I think it is also a good experience to be able to reach an agreement with others on one thing calmly and complete tasks towards a common goal.
Learning to calmly solve problems and deal with interpersonal relationships is the growth I have seen since I worked at ONES for more than two years. Although may have something to do with my age, the more important thing is the ONES working atmosphere.
In some companies, the boundaries between departments are clear and distinct. On the other hand, ONES is a company that is serious about making products. There are many connections and cooperation between departments, so we usually understand each other's habits and situations and communicate patiently, so that the efficiency will not be reduced from the results.
Recently, I sorted out the content of the book "The Philosophy of Software Design" and had an exchange with my colleagues.
strategic programming
Philosophy is a cool way of dealing with it. The reason why I do this sharing is mainly to tell everyone that philosophy is actually a bit of a work process, and the goal is to make everyone code more consciously. In general, I would like you to do strategic programming, not tactical programming.
**
Software design is a fusion of engineering, mathematics, art, and culture. There are "doorways" in software design.
The overall goal of the software design is to reduce complexity. The so-called complexity reflects the difficulty of understanding the structure of the software system and modifying it.
If you try a method and it doesn't reduce complexity, you probably don't need to keep it.
Specifically, complex features include:
1. When adding new features, a lot of code needs to be modified;
2. When a function needs to be developed, developers need to know a lot of knowledge;
3. When adding/modifying functions, it is not obvious which code to modify.
It can be summed up as: is the system difficult to understand, is the system difficult to modify - if so, then it is complex.
complexity is not created by a single huge bug, it's created by the accumulation of many small bugs. A simple dependency and obscure name definition is not enough to affect the whole system. But it adds up, and when there are enough numbers, it can lead to complexity. In the end, any small changes can affect the entire system.
An interface is a kind of information that others need to remember, so too many interfaces or too complex interfaces will increase the burden of cognition and understanding of others. This is an introduction of complexity.
The term "exception" refers to any uncommon condition that alters the normal flow of control in a program. Exception handling can make up a large portion of all code in a system when fault tolerance is fully considered, but error handling is not always better, leading to an overly defensive style where anything that looks even a little suspicious will Throwing exceptions, which becomes a flood of exceptions, increases the complexity of the system.
In order to complete a task quickly, maybe you have a deadline, and the long-term benefit is not the first consideration at this time. You don't spend more time looking for good designs, you just want to solve problems quickly, you want to write a bunch of code to implement functions, the faster the better - This is just tactical programming, not advisable.
Strategic programming starts with small things, and is constantly making "small investments" in the moment, constantly seeking better designs in exchange for long-term compounded returns.
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。