The Art of Readable Code (Paperback)

Dustin Boswell, Trevor Foucher

買這商品的人也買了...

相關主題

商品描述

As programmers, we've all seen source code that's so ugly and buggy it makes our brain ache. And let's be honest, we've all written code like that. With this book, you'll learn to write code that's easy to read and understand. You'll have more fun and your coworkers will love you.

The Art of Readable Code focuses on the nuts and bolts of programming, with simple and practical techniques you can use every time you sit down to write code. You'll find tips throughout the book, with easy-to-digest code examples, helpful illustrations, and cartoons for fun.

  • Learn to pick variable names that are "dense with information"
  • Organize your loops and conditionals so they're easy to understand
  • Make your comments short and sweet
  • Recognize when your code is doing too many things at once
  • Write tests that are concise, but thorough
  • Master the art of breaking hard problems into many smaller ones

商品描述(中文翻譯)

作為程式設計師,我們都見過那種又醜又有錯誤的原始碼,讓我們的大腦痛不欲生。坦白說,我們自己也寫過那樣的程式碼。透過這本書,你將學習如何撰寫易於閱讀和理解的程式碼。你將更享受寫程式的過程,同事們也會喜歡你。

《可讀程式碼的藝術》專注於程式設計的基礎,提供了簡單實用的技巧,每次你坐下來寫程式時都可以使用。書中提供了許多提示,並附有易於理解的程式碼範例、有用的插圖和有趣的卡通。

你將學會選擇「充滿資訊的」變數名稱、組織迴圈和條件語句,使其易於理解、撰寫簡短而有力的註解、識別程式碼同時執行太多任務的情況、撰寫簡潔但全面的測試、掌握將困難問題分解為多個較小問題的技巧。