当前位置:网站首页>[philosophy and practice] the way of program design
[philosophy and practice] the way of program design
2022-07-07 20:11:00 【Apple II】
China's software industry , Influenced by Eastern and Western cultures and thinking .
I was there 【 Rich imagination 】《 West tide 》 And 《 Go to the world series 》_ Apple II blog -CSDN Blog
Invite everyone to share their views . I was there too 【 Philosophy and practice 】 Avenue 、 Law 、 Technique 、 potential 、 device _ Apple II blog -CSDN Blog Mention the aisle .
We should understand the connotation and essence of program design , Philosophical thinking is needed , Let's have a look today , American programmers Geoffrey James stay 《 The way of programming 》(The Tao of Programming) In this book, how to use the Oriental philosophy system of Tao to think and understand deeply .James Say it yourself , The generation of inspiration and the formation of ideas for writing this book , Thanks to the mysterious feeling after practicing Taijiquan every morning .James In the book , Use stories with novel and strange ideas but profound truth , To discuss the following issues .
- The first chapter is the quiet space
- Chapter II Ancient Masters
- Part III design
- Part IV code
- Chapter V maintenance
- Part VI Management
- Chapter 7 knowledge in the company
- Part VIII hardware and software
- The end of Chapter 9
Today I'll explain some interesting examples . Thank you Guo Hai, the translator of the Chinese version of this book .

picture source :Amazon.com
Details can be referred to The Tao of Programming
The first chapter is the quiet space
Programming masters say so : “ When you have the ability to take this crystal from me , It's time for you to graduate .”
1.1 In the quiet space , A magical substance is formed and born . It immediately stopped , Wait alone , Nothing , But in eternal motion . It's the source of all programs , I don't know its name , So I'll call it the way of programming . If this path is perfect , Those operating systems are perfect , If the operating system is perfect , So the compiler is perfect , If the compiler is perfect , So the app is perfect . Customer satisfaction -- Harmony came into being .
The way of programming is gone , And return in the morning wind .
Excellent application design depends on a good foundation of the operating system and compiler , The ultimate goal of program design is to achieve a harmony .
Chapter II Ancient Masters
2.2 Turing, a computer science giant, once dreamed that he was a machine . When he woke up , He exclaimed : “ I don't know -- I dreamt that I was a Turing machine , Or a machine dreaming that it is Turing ?”
2.3 A programmer from a big computer company attended a software seminar . When he came back, he reported to the manager that :“ What are the programmers who work for other companies ? They behaved badly , Regardless of your appearance . Their hair is long and messy , The clothes are wrinkled and old . They broke into our reception group , There was rude noise when I was speaking .” The manager said :“ I shouldn't have asked you to attend the meeting . Those programmers live outside the material world . They think life is absurd , An unexpected coincidence . They come and go freely . They live only for their program , Live carefree . Why should social customs be used to restrain them ? They live in this way .”
2.4 An auditorium man asked the master :“ There's a programmer , Never conceived 、 Document or test his program , But everyone who knows him thinks he's the best programmer in the world . Why is that ?” The master replied :“ The man has the way . He doesn't need to conceive in advance , When the system crashes , He won't be unhappy about it , But to accept the whole truth calmly . He also took a break from the need to document programming instructions , I don't care if anyone looks at his code . He doesn't need to test either . Every program of his is perfect . Quiet and elegant , The purpose of the program is also obvious . really , He has entered the magical realm of Tao .”
The image of hackers in movies and TV series is usually long hair , The appearance of the beard with many immortal edges . Speak frankly , There are not many euphemistic words , Because hackers put their energy into program design , It seems to be unreasonable , In fact, he is too focused on his own work . Try to design a perfect program .
Part III design
3.3 Once a programmer was sent to IBM Of the military aircraft ministers . The Military Secretary asked the programmer :“ Design a financial package , And designing an operating system , Which is easier ?” “ operating system .” The programmer replied . There was an instant exclamation of distrust in the Minister of war ,“ With a complex operating system , A financial software package is nothing .” He said . “ Is not the case, ,” The programmer said ,“ When designing a financial package , Programmers act as intermediaries between people with different ideas : How does the software have to operate , What form must its report form be , How it has to be consistent with tax laws , wait , An operating system is not limited by its appearance . When designing an operating system , Programmers just need to find the simplest harmony between machine and human thinking . That's why operating systems are easier to design .” The minister nodded , smiled .“ So it is . But to detect and correct the mistakes , Which is easier ?” The programmer didn't answer .
Designing applications requires thinking about user experience 、 Business logic and necessary external constraints , And can make full use of computer principles 、 Information processing methods and computational thinking , The process is more complicated , The skills required are also very comprehensive .
Part IV code
Programming masters say so : “ A perfectly written program is its own paradise , And a poorly written program is its own hell .”
4.1 A program should be light 、 agile , Its subroutines are connected like a string of pearls . Its spirit and intention should run through . In the program , It should not be too much , It shouldn't be too little ; There should be no unnecessary circular structure , There should be no redundant variables ; No lack of structure , Not too rigid . A program , No matter how complicated , They should all work in a holistic way . Procedures should be guided by their inherent logic , Not the external form . If a program fails to meet these requirements , It will be in a state of confusion and confusion . The only way is to rewrite the program .
4.4 A programmer under a project manager is writing software . His fingers are flying on the keyboard , There is no error message during the compilation of the program . The program works like a breeze . “ Great !” The manager cried out happily ,“ Your skill is perfect .” “ Skill ?” The programmer said and turned around from his terminal ,“ I follow the way -- All the skills are far beyond ! When I first started programming , What I see in front of me is a mess of the whole problem . After three years, , I can't see this mess any more . contrary , I use all kinds of subroutines . But now , I can't see anything . My whole body and mind exist in an invisible void , My perception is empty . My spirit moves with its instinct , Not without principle plan can work freely . To make a long story short , It's my program that wrote itself . indeed , Sometimes there are some problems . I saw the problems coming to me , So I slowed down , Watching them in silence . Then I changed a line of code , Those problems will disappear . Then I compile the program . I sit quietly , Let the joy of work spread all over my body . I close my eyes , Take a break , Then exit the system .” The manager said ,“ I hope all my programmers are so smart !”
Design and develop elegant programs , Need to reduce the complexity of the program , Balance structure and flexibility , Ensure the integrity of the program .
Chapter V maintenance
Programming masters say so : “ Even if a program has only three presidents , One day it will have to be maintained .”
5.1 The hinge of a door that often opens does not need lubricating oil . A fast river doesn't get dirty . Neither sound nor thought can spread in a vacuum . Software will rot if not used . It's a wonderful world .
Programming masters say so : “ Let more programmers and less managers -- And then productivity will be high .”
The program needs to be used frequently and upgraded according to the specific situation , You also need to optimize the program in use .
Part VI Management
6.1 When the managers meet endlessly , Programmers write games to play ; When financial executives talk about quarterly profits , The development budget will be cut soon ; When senior scientists talk about the blue sky , It's going to be stormy . Actually , This is not the way to program . When managers are devoted to their duties , The game will be put aside ; When treasurers make long-term plans , Harmonious order will soon be restored ; When senior scientists set about the immediate problem , These problems will soon be solved . Actually , That's the way to program .
Program design needs the planning, management and support of enterprise technology management and financial management , To establish an external environment for excellent program design .
Chapter 7 knowledge in the company
7.2 In the East , There is a big fish , Bigger than all the other fish . It became a bird , Its wings are like clouds that fill the sky . When the bird flies over the land , It brings “ Company headquarters ” The news of , Like a dragonfly skimming the water, I left this news among the programmers . Then the bird is driving in the wind , Carrying the blue sky , Back home . The novice programmer stared at the bird in surprise , Because he can't understand ; Mediocre programmers are afraid of the bird , Because he's afraid of the news from the birds ; And the programmer is still working in front of his terminal , Because he didn't know that the bird came and went .
Work in the company , Focus on programming , Don't care about those irrelevant things .
Part VIII hardware and software
Programming masters say so : “ No wind , The grass is still ; No software , Hardware is useless .”
8.4 On the way to Silicon Valley , Hardware meets software . Software theory :“ You are Yin , I am Yang . If we go hand in hand , We Will be famous in the world , And make a lot of money .” therefore , This pair of yin and Yang will go forward together , Thinking about how to conquer the world . After a while , They ran into firmware (firmware, The combination of hardware and software , Such as IC card -- Translation notes ), He is in rags , With a stick with a thorn in his hand , Hobbling along . Firmware says to them :“ Tao exists in Yin 、 Beyond Yang . It's unknown , Serene Waters . It does not seek fame , So no one knows it exists ; It does not seek wealth , Because of its completeness . It exists outside space and time .” Software and hardware , Feel ashamed , Turn around and go home .
Understand the essence of programming Tao , One day I can experience and skillfully use it .
The end of Chapter 9
Programming masters say so : “ It's time for you to graduate .”
Thinking practice , Practical thinking , One day, I can deeply experience , And teach others .
Designing and developing programs is a skill , I hope we can all reach the highest level ,“ Skill is close to Tao ”.
边栏推荐
- Flink并行度和Slot详解
- pom.xml 配置文件标签:dependencies 和 dependencyManagement 区别
- equals 方法
- 9 atomic operation class 18 Rohan enhancement
- Open source heavy ware! Chapter 9 the open source project of ylarn causal learning of Yunji datacanvas company will be released soon!
- CSDN语法说明
- pom. XML configuration file label: differences between dependencies and dependencymanagement
- Make this crmeb single merchant wechat mall system popular, so easy to use!
- Automatic classification of defective photovoltaic module cells in electroluminescence images-論文閱讀筆記
- 开源重器!九章云极DataCanvas公司YLearn因果学习开源项目即将发布!
猜你喜欢

Open source heavy ware! Chapter 9 the open source project of ylarn causal learning of Yunji datacanvas company will be released soon!

How to cooperate among multiple threads

School 1 of vulnhub

华南X99平台打鸡血教程

The state cyberspace Office released the measures for data exit security assessment: 100000 information provided overseas needs to be declared

mock. JS returns an array from the optional data in the object array

论文解读(ValidUtil)《Rethinking the Setting of Semi-supervised Learning on Graphs》

openEuler 资源利用率提升之道 01:概论

数据孤岛是企业数字化转型遇到的第一道险关

多个线程之间如何协同
随机推荐
【Auto.js】自动化脚本
力扣 1232.缀点成线
Force buckle 674 Longest continuous increasing sequence
R language ggplot2 visualization: use the ggqqplot function of ggpubr package to visualize the QQ graph (Quantitative quantitative plot)
开源重器!九章云极DataCanvas公司YLearn因果学习开源项目即将发布!
[sword finger offer] sword finger offer II 012 The sum of left and right subarrays is equal
9 atomic operation class 18 Rohan enhancement
vulnhub之school 1
力扣 2319. 判断矩阵是否是一个 X 矩阵
Sword finger offer II 013 Sum of two-dimensional submatrix
一键部署Redis任意版本
线性基
Data island is the first danger encountered by enterprises in their digital transformation
Chapter 20 using work queue manager (3)
R language uses ggplot2 function to visualize the histogram distribution of counting target variables that need to build Poisson regression model, and analyzes the feasibility of building Poisson regr
【STL】vector
编译器优化那些事儿(4):归纳变量
Compiler optimization (4): inductive variables
8 CAS
CUDA versions are inconsistent, and errors are reported when compiling apex