Book description
Many programmers know how to write correct code - code that works. But not all know how to craft great code - code that is well written and easy to understand. Code Craft teaches programmers how to move beyond writing correct code to writing great code. The book covers code writing concerns, including code presentation style, variable naming, error handling, and security; and the wider issues of programming in the real world, such as good teamwork, development processes, and documentation. Code Craft presents language-agnostic advice that is relevant to all developers, from an author with loads of practical experience. A Q&A section at the end of each chapter helps readers to review the material and makes the book suited for academic use as well.
Table of contents
- Code Craft
- ADVANCE PRAISE FOR CODE CRAFT
- Dedication
- PREFACE
- ACKNOWLEDGMENTS
- About the Author
- ABOUT THE AUTHOR
-
I. AT THE CODEFACE
-
1. ON THE DEFENSIVE
- Toward Good Code
- Assume the Worst
- What Is Defensive Programming?
-
The Big, Bad World
- Techniques for Defensive Programming
- Employ a Good Coding Style and Sound Design
- Don’t Code in a Hurry
- Trust No One
- Write Code for Clarity, Not Brevity
- Don’t Let Anyone Tinker with Stuff They Shouldn’t
- Compile with All Warnings Switched On
- Use Static Analysis Tools
- Use Safe Data Structures
- Check Every Return Value
- Handle Memory (and Other Precious Resources) Carefully
- Initialize All Variables at Their Points of Declaration
- Declare Variables as Late as Possible
- Use Standard Language Facilities
- Use a Good Diagnostic Logging Facility
- Cast Carefully
- The Fine Print
- Constraints
- What to Constrain
- Removing Constraints
- In a Nutshell
- See Also
- Get Thinking
- 2. THE BEST LAID PLANS
- 3. WHAT’S IN A NAME?
- 4. THE WRITESTUFF
- 5. A PASSING COMMENT
- 6. TO ERR IS HUMAN
-
1. ON THE DEFENSIVE
-
II. THE SECRET LIFE OF CODE
- 7. THE PROGRAMMER’S TOOLBOX
- 8. TESTING TIMES
- 9. FINDING FAULT
- 10. THE CODE THAT JACK BUILT
- 11. THE NEED FOR SPEED
- 12. AN INSECURITY COMPLEX
-
III. THE SHAPE OF CODE
- 13. GRAND DESIGNS
- 14. SOFTWARE ARCHITECTURE
- 15. SOFTWARE EVOLUTION OR SOFTWARE REVOLUTION?
-
IV. A HERD OF PROGRAMMERS?
- 16. CODE MONKEYS
- 17. TOGETHER WE STAND
- 18. PRACTICING SAFE SOURCE
-
V. PART OF THE PROCESS
- 19. BEING SPECIFIC
- 20. A REVIEW TO A KILL
- 21. HOW LONG IS A PIECE OF STRING?
-
VI. VIEW FROM THE TOP
- 22. RECIPE FOR A PROGRAM
- 23. THE OUTER LIMITS
- 24. WHERE NEXT?
-
A. Answers and Discussion
- Chapter 1: On the Defensive
- Chapter 2: The Best Laid Plans
- Chapter 3: What’s in a Name?
- Chapter 4: The Write Stuff
- Chapter 5: A Passing Comment
- Chapter 6: To Err Is Human
- Chapter 7: The Programmer’s Toolbox
- Chapter 8: Testing Times
- Chapter 9: Finding Fault
- Chapter 10: The Code That Jack Built
- Chapter 11: The Need for Speed
- Chapter 12: An Insecurity Complex
- Chapter 13: Grand Designs
- Chapter 14: Software Architecture
- Chapter 15: Software Evolution or Software Revolution?
- Chapter 16: Code Monkeys
- Chapter 17: Together We Stand
- Chapter 18: Practicing Safe Source
- Chapter 19: Being Specific
- Chapter 20: A Review to a Kill
- Chapter 21: How Long Is a Piece of String?
- Chapter 22: Recipe for a Program
- Chapter 23: The Outer Limits
- BIBLIOGRAPHY
- COLOPHON
- Copyright
Product information
- Title: Code Craft
- Author(s):
- Release date: December 2006
- Publisher(s): No Starch Press
- ISBN: 9781593271190
You might also like
book
Students' Guide to Program Design
Students’ Guide to Program Design is a textbook on program design. This textbook approaches program design …
book
Software Maintenance Success Recipes
Software Maintenance Success Recipes identifies actionable formulas for success based on in-depth analysis of more than …
book
Building Parsers with Java™
Parser building is a powerful programming technique that opens a world of opportunity for designing how …
audiobook
Transformed
Help transform your business and innovate like the world's top tech companies! Transformed: Moving to the …