代码整洁之道——童子军军规
美國童子軍一條簡單的軍規:讓營地比你來時更干凈。
清理代碼也許只是改好一個變量名,拆分一個有點過長的函數,消除一點點重復代碼,清理一個嵌套if語句。
這是讓項目代碼隨著時間流逝而越變越好的最專業的做法。
持續改進也是專業性的內在組成部分。
The boy scouts of America has a simple rule: make the camp cleaner than when you arrived.
Cleaning up the code might be as simple as changing a variable name, splitting a function that is a little too long, eliminating a little bit of duplicate code, and cleaning up a nested if statement.
This is the most professional way to make your project code better over time.
Continuous improvement is also an integral part of professionalism.
轉載于:https://www.cnblogs.com/stephen-java/p/10533926.html
總結
以上是生活随笔為你收集整理的代码整洁之道——童子军军规的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 反射就是获取该类的.class文件里面的
- 下一篇: 从源码来理解slf4j的绑定,以及log