You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
今天我想说的最最的核心思想就是KISS, Keep it simple, stupid. 这个观点来至 Unix编程艺术, 在不断的编码中越来越认可这个概念.
Hello guys, today i want to talk about a book i already read before, The Pragmatic Programmer
From Journeyman to Master, Its like philosophy of how to write good and maintainable codes,i won't discuss all of them today, just three points, Software entropy, Refactor, Code reading, after this presentation, i hope you guys can remember something, these three points, but three points i also think they are too many, i think one is enough, the key of these points are KISS, This KISS is not KISS , its Keep it simple, stupid(This concept is from another), I love this concept very much as years passed.
软件熵, 熵的概念来至物理领域,谈的是一个系统里无序的量,软件熵是指一个软件系统里无序的的量,对我们来说就是一个项目里无序的量, 熵越大我们的项目就越不好管理,当需求增多的时候,代码量肯定会上升几个level,代码量的上升本来已经使软件的熵开始不可避免的上升,如果我们写的代码还不好的话,将会使本来呈线性上升的熵变成几何级的上升,因而我们应该从代码的书写上去尽量缩小熵的增加量,
书上有说一个大家熟知的概念: 破窗理论,当一扇窗户坏后不及时修好的话其他的窗户也会很快就坏掉,如果能即使修理好,那其他窗户坏的几率就会比较小,写代码也是一样,当我们在代码中闻到坏味道时一定要立马停下来,修好它,然后再做接下来的工作,什么是bad smell, 重复的, 没有遵守最佳实践的,不可阅读的,到处都是bug.
(这个就像人生一样,随着我们的长大,读书,工作,结婚,孩子,父母渐老,一件件的接踵而来,如果我们先前的没处理好,新的麻烦有出现,一件赶着一件,最后我们自己都会乱掉)
Okay, let's go to the first point, software entropy,its the amount of "disorder" in a system, what's this? think about our life, as we grow up, there are many things come to us in every period, study, work, marriage, children, older parents, which will make our life hard. Coding is the same,when the project become bigger and bigger, there will be more pages, more complexity, more codes, then bugs are coming very soon if you can't organize them.
当发现我们的代码有问题的时候怎么做呢?重构,使用有意义的名称,函数的长度尽量控制在一个屏,大于一个屏的时候就需要去检查是不是需要拆分成小函数.就像有 很多方法去达到目的一样,我们要找的是最佳方法,写代码也是一个道理,这对于后期bug的修复以及项目的维护都非常有帮助.
(这个就像处理我们生活中的麻烦事,每当遇到麻烦时我们就要找相应的方法去处理)
when these happened, what should we do? In life, I think everybody has his/her rule to handle this, otherwise we can't stand here, In coding, we can do refactor, which can help us to control the software entropy, let it increase not too fast and in our control, for example, make the code readable and maintainable, something like this.
怎么做好重构呢?懂得一些原则,然后阅读源码,阅读源码,阅读源码,talk is cheep, show me your code, 很多好的开源项目都值得我们去阅读,能在开源社区的众多项目中脱颖而出说明肯定是有很多可取之处,当阅读的源码多了写代码就会有顿悟的感觉,其实就是之前的阅读累计下来的那些好的规范的体现,读吧。
(生活中也是一样,You can find gold and beauty in books, 通过读书你可以发现很多好的方法去解决你以前不知道怎么解决的问题)
In life, how could we make us to handle these problem easier and better. as the saying goes in china, you can find gold and beauty in books, reading is a good way to get methods and thoughts.In coding, we should read other guys codes. we can find what we miss in ourself code and make it better.
回到我们最终的i原则,KISS. 希望大家写代码的时候都可以做到keep it simple, stupid, 控制软件熵,重构有坏味道的代码.并通过阅读代码去提升重构的技巧.
That's all, if you don't understand these content, it's okay, just remember one thing, KISS, keep it simple, stupid, all things should be around this center.
The text was updated successfully, but these errors were encountered:
最近需要对这本书做一个展示,所以想在这里将其梳理一下.
主要想讲的有3个点:
今天我想说的最最的核心思想就是KISS, Keep it simple, stupid. 这个观点来至 Unix编程艺术, 在不断的编码中越来越认可这个概念.
Hello guys, today i want to talk about a book i already read before, The Pragmatic Programmer
From Journeyman to Master, Its like philosophy of how to write good and maintainable codes,i won't discuss all of them today, just three points,
Software entropy
,Refactor
,Code reading
, after this presentation, i hope you guys can remember something, these three points, but three points i also think they are too many, i think one is enough, the key of these points areKISS
, ThisKISS
is notKISS
, its Keep it simple, stupid(This concept is from another), I love this concept very much as years passed.软件熵, 熵的概念来至物理领域,谈的是一个系统里无序的量,软件熵是指一个软件系统里无序的的量,对我们来说就是一个项目里无序的量, 熵越大我们的项目就越不好管理,当需求增多的时候,代码量肯定会上升几个level,代码量的上升本来已经使软件的熵开始不可避免的上升,如果我们写的代码还不好的话,将会使本来呈线性上升的熵变成几何级的上升,因而我们应该从代码的书写上去尽量缩小熵的增加量,
书上有说一个大家熟知的概念: 破窗理论,当一扇窗户坏后不及时修好的话其他的窗户也会很快就坏掉,如果能即使修理好,那其他窗户坏的几率就会比较小,写代码也是一样,当我们在代码中闻到坏味道时一定要立马停下来,修好它,然后再做接下来的工作,什么是bad smell, 重复的, 没有遵守最佳实践的,不可阅读的,到处都是bug.
(这个就像人生一样,随着我们的长大,读书,工作,结婚,孩子,父母渐老,一件件的接踵而来,如果我们先前的没处理好,新的麻烦有出现,一件赶着一件,最后我们自己都会乱掉)
Okay, let's go to the first point, software entropy,its the amount of "disorder" in a system, what's this? think about our life, as we grow up, there are many things come to us in every period, study, work, marriage, children, older parents, which will make our life hard. Coding is the same,when the project become bigger and bigger, there will be more pages, more complexity, more codes, then bugs are coming very soon if you can't organize them.
当发现我们的代码有问题的时候怎么做呢?重构,使用有意义的名称,函数的长度尽量控制在一个屏,大于一个屏的时候就需要去检查是不是需要拆分成小函数.就像有 很多方法去达到目的一样,我们要找的是最佳方法,写代码也是一个道理,这对于后期bug的修复以及项目的维护都非常有帮助.
(这个就像处理我们生活中的麻烦事,每当遇到麻烦时我们就要找相应的方法去处理)
when these happened, what should we do? In life, I think everybody has his/her rule to handle this, otherwise we can't stand here, In coding, we can do refactor, which can help us to control the software entropy, let it increase not too fast and in our control, for example, make the code readable and maintainable, something like this.
怎么做好重构呢?懂得一些原则,然后阅读源码,阅读源码,阅读源码,talk is cheep, show me your code, 很多好的开源项目都值得我们去阅读,能在开源社区的众多项目中脱颖而出说明肯定是有很多可取之处,当阅读的源码多了写代码就会有顿悟的感觉,其实就是之前的阅读累计下来的那些好的规范的体现,读吧。
(生活中也是一样,You can find gold and beauty in books, 通过读书你可以发现很多好的方法去解决你以前不知道怎么解决的问题)
In life, how could we make us to handle these problem easier and better. as the saying goes in china, you can find gold and beauty in books, reading is a good way to get methods and thoughts.In coding, we should read other guys codes. we can find what we miss in ourself code and make it better.
回到我们最终的i原则,KISS. 希望大家写代码的时候都可以做到keep it simple, stupid, 控制软件熵,重构有坏味道的代码.并通过阅读代码去提升重构的技巧.
That's all, if you don't understand these content, it's okay, just remember one thing, KISS, keep it simple, stupid, all things should be around this center.
The text was updated successfully, but these errors were encountered: