On the way to work, I read an accounting book when I took the subway. At present, I have read more than 50 pages. In the process, it is found that there are amazing similarities between accounting and program design. Two examples are given today.
CR design and accounting
Introduction to CR design
CR design is to create and query without updating and deleting. We need historical records for background manual operation and design data change. The difference between historical records and the final result of data change is that historical records have data invariance and can trace the source of events. This method is specifically introduced in the clean architecture. The essence of the popular time series database is also the concrete implementation of this idea.
Account book Introduction
This idea dates back to the stone age. There are records of rope tying in the stone age. Those ropes are the books of primitive people. The registration method is to add a big pimple on it and untie it when it is reduced. Subsequently, the rope evolved into Sumerian mud or Shang tortoise shell. It is estimated that it is to draw a road on it, drawing some lines to indicate an increase and others to indicate a decrease. It is estimated that at that time, the Chinese people did not know the two symbols “+” and “-“, so they had to write the increase and decrease separately. The Chinese people’s habit is to write the increase above and the decrease below (paid by day and land).
CR design application
In the current engineering architecture, those who can use software should try not to use hardware. Because they lack log records, it is difficult to troubleshoot if an exception occurs. For example, layer 2 firewalls are deployed in both active and standby classes because they cannot perform load balancing. In case of failure of one machine, the main machine must be stopped immediately and the standby machine must be started. In case of bit hopping and other problems, there is no scene or log. Restarting the machine will not fail again, so it is difficult to confirm the cause. If you can’t confirm the reason, how can you ensure that there will be no problems next time? It is strongly recommended to list the treatment of failure without giving reasons in the purchase contract.
The following is a schematic diagram of a commonly used active / standby mode called a / S mode. Far away.
Verification design and double entry bookkeeping
Introduction to calibration design
We usually do communication, and the data packets we receive have checksums. Reconciliation is available in the financial payment field. After all, integrity, accuracy and consistency are the three most important standards of data quality.
Introduction to double entry bookkeeping
This idea is also deeply rooted in the essence of double entry bookkeeping. Double entry bookkeeping refers to the bookkeeping method that records every economic business with equal amount in two or more interrelated accounts.
The advantage of this method is that each economic business should be recorded in two or more accounts. In this way, account records can not only comprehensively and clearly reflect the context of economic business, but also comprehensively and systematically reflect the process and results of economic activities. Since each economic business is registered in the relevant account with an equal amount after it occurs, the recorded results can be subject to trial balance to check whether the account records are correct.
Verification design application
When we withdraw money onlineTwo factor check, you should not only enter the password for login, but also send a mobile phone verification code to confirm that you are yourself. Our code needs to go through static code inspection, manual code review, integration test inspection and other links before it can be merged into the main branch. When we synchronize data regularly from a system, we usually obtain incremental data in real time, and pull the full amount for comparison with the timing task.
For a technology, some people learn it very quickly. It is likely that they consciously or subconsciously make abstract analogy, find out commonness and individuality, and master the essence. For example, various forms of “classification” are used in work, technology and various fields: this accounting book says that accounting is the art of classification. Isn’t the commonly used mind map a classification tool? Isn’t data structure the classification of data? This also produced a search engine.
Think — your job! (from the way of programmer cultivation)