The art of readable code
As programmers, we've all seen source code that's so ugly and buggy it makes our brain ache. Over the past five years, authors Dustin Boswell and Trevor Foucher have analyzed hundreds of examples of "bad code" (much of it their own) to determine why they're bad and how they...
Autor principal: | |
---|---|
Otros Autores: | , , , |
Formato: | Libro electrónico |
Idioma: | Inglés |
Publicado: |
Sebastopol, California :
O'Reilly
2011.
|
Edición: | First edition |
Colección: | Theory in practice (Sebastopol, Calif.)
|
Materias: | |
Ver en Biblioteca Universitat Ramon Llull: | https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009627999606719 |
Tabla de Contenidos:
- Code should be easy to understand
- pt. 1. Surface-level improvements. Packing information into names ; Names that can't be misconstrued ; Aesthetics ; Knowing what to comment ; Making comments precise and compact
- pt. 2. Simplifying loops and logic. Making control flow easy to read ; Breaking down giant expressions ; Variables and readability
- pt. 3. Reorganizing your code. Extracting unrelated subproblems ; One task at a time ; Turning thoughts into code ; Writing less code
- pt. 4. Selected topics. Testing readability ; Designing and implementing a "minute/hour counter."