Self-Expressive Code
$15.00
Minimum price
$20.00
Suggested price

Self-Expressive Code

A handbook of write readable code.

About the Book

While reading source code, readers will have feelings. If the source code has lower readability, the reader will feel not good.

This book focused on the readalibity of source code, provided suggestions from the following sides:

Architecutre, Structure, Naming, Comments and Style.

And provided suggestions about the readability of script, configuration files.

Also have some suggeestions about how to use symbols, algorithm to improve readablity of source code.

This way of improve readability is called 'self-expressive code', which is named by the author of this book.

Not only non-native speakers, even native speaker will have some trouble about improving readability.

Good readability leads source code to have good extensibility, good changeability, and good quality.

This book is a translation into English of 自表达代码 which was originally written in Chinese (Simplified).

About the Author

Stephen Wang
Stephen Wang

Speaks both of Chinese, Japanese and English.

Table of Contents

  • Introduction
  • Acknowledgement
  • What Is Self-Expressive Code
  • Part I Readability
    • Chapter 1 Annoyance of Lower Readability
      • 1.1 Annoying Bugs
      • 1.2 Hard To Understand
      • 1.3 Hard To Change Or Extend
      • 1.4 Easy To Make Bugs In.
      • 1.5 Hard To Refactor
    • Chapter 2 What Makes Readability Lower
      • 2.1 English Skills
      • 2.2 Programming Language Grammar
      • 2.3 Naming
      • 2.4 Architecture
      • 2.5 Structure
      • 2.6 Comment
      • 2.7 Style
      • 2.8 Restrictive Rules
      • 2.9 Manager’s Misguide
    • Chapter 3 An Unreadable Experience
      • 3.1 Usage Of Words
      • 3.2 Style
      • 3.3 Algorithm
      • 3.4 Revise
  • Part II Readability Improvement
    • Chapter 4 Use English Properly
      • 4.1 Frequently Found Mistakes
      • 4.2 Prefix, Suffix
      • 4.3 Pair Words
      • 4.4 Abbreviation
      • 4.5 Word Class
      • 4.6 Grammar
      • 4.7 Tense
      • 4.8 Negatives
    • Chapter 5 Use Programming Language Features
      • 5.1 Annotation ${#chapter5-1}
      • 5.2 Exception
      • 5.3 Reflect
      • 5.4 Generic
      • 5.5 Lambda Expression
    • Chapter 6 Naming Improvement
      • 6.1 Package
      • 6.2 Interface
      • 6.3 Class
      • 6.4 Enumeration
      • 6.5 Annotation
      • 6.6 Method
      • 6.7 Variable
      • 6.8 Constant
      • 6.9 Similarities
      • 6.10 Keywords
      • 6.11 Other Improvements
    • Chapter 7 Architectural Improvement
      • 7.1 Task Split
      • 7.2 Inner Classes, Interfaces and Enumerations
      • 7.3 Anonymous Class
      • 7.4 Relationship
      • 7.5 Limited Values
      • 7.6 Avoid Class Explosion
      • 7.7 Abstraction
      • 7.8 Responsibility
    • Chapter 8 Structural Improvement
      • 8.1 Shorten Long Method
      • 8.2 Reduce Parameter Count
      • 8.3 Reduce Nested Depth
      • 8.4 Eliminate Duplications/Similarities
      • 8.5 Decouple
      • 8.6 Reduce Influence of Multi-Factors
      • 8.7 Avoid Class Cast
      • 8.8 Shorten Long Conditions
      • 8.9 Eliminate Useless Codes
      • 8.10 Remove Temporary Variables
    • Chapter 9 Commentary Improvement
      • 9.1 Java Doc
      • 9.2 FIXME, TODO, XXX
      • 9.3 Copyright
      • 9.4 Class Explanation
      • 9.5 Method Comment
      • 9.6 Process Comment
      • 9.7 Comment Out Source Code
    • Chapter 10 Stylish Improvement
      • 10.1 Indent
      • 10.2 Alignment
      • 10.3 Space
      • 10.4 Code Region
      • 10.5 Line Length and Tab
      • 10.6 Line Change
      • 10.7 Braces, Brackets and Parentheses
      • 10.8 Length and Depth
  • Part III Readability Exploration
    • Chapter 11 Scriptic Improvement
      • 11.1 Object Oriented JavaScript
      • 11.2 HTML
      • 11.3 JSP
      • 11.4 SQL
      • 11.5 Other Scripts
  • Appendix I Frequently Used Pair Words
  • Appendix II Frequently Used Abbreviation
  • AppendixIII Frequently Wrong Used Word

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earnedover $13 millionwriting, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub