: Segundo o autor, um comentário geralmente indica que o código não foi claro o suficiente. Tente renomear variáveis ou extrair funções antes de comentar. Por que ler este material?
Do not just read the book. Live the book. The next time you ship a feature, ask yourself: If the author of Código Limpo saw my pull request, would he nod in approval or cry in despair?
Qual você utiliza no seu dia a dia? Qual o seu nível de experiência atual na área? codigo limpo epub
The answer is timelessness. Código Limpo does not teach you a specific framework or language that will be obsolete in two years. It teaches you . It teaches you that you are not writing code for machines; you are writing it for the poor soul who has to maintain it at 2 AM—which is often your future self.
: Disponível no formato Kindle (compatível com o app Kindle em qualquer dispositivo). : Segundo o autor, um comentário geralmente indica
Pegue um repositório pessoal antigo no GitHub e aplique as lições do capítulo lido.
Uncle Bob introduces a simple yet profound rule: "Always leave the campground cleaner than you found it." When applied to code, this means that every time you touch a function, a class, or a file, you should improve it slightly. The version of this book is the manual for that boy scout. It is portable, searchable, and always within reach. Do not just read the book
Este é um dos capítulos mais impactantes. Tio Bob argumenta que nomes devem revelar a intenção. Um nome de variável como d não diz nada, mas diasDesdeModificacao diz tudo.
Se você quer expandir ainda mais suas habilidades, posso te ajudar. Diga-me:
<h3>Rule 1: Use intention-revealing names</h3> <div class="bad"> <code>int d; // elapsed time in days</code> </div> <div class="good"> <code>int elapsedTimeInDays;</code> </div>