Cover of The Pragmatic Programmer by Andrew Hunt, David Thomas - Business and Economics Book

From "The Pragmatic Programmer"

Author: Andrew Hunt, David Thomas
Publisher: Addison-Wesley Professional
Year: 1999
Category: Computers

🎧 Free Preview Complete

You've listened to your free 10-minute preview.
Sign up free to continue listening to the full summary.

🎧 Listen to Summary

Free 10-min Preview
0:00
Speed:
10:00 free remaining
Chapter 3: The Basic Tools
Key Insight 1 from this chapter

The Power of Plain Text

Key Insight

For programmers, knowledge serves as the fundamental raw material, manifesting in requirements, designs, implementations, tests, and documentation. The optimal format for storing this knowledge persistently is plain text. This choice grants the ability to manipulate knowledge both manually and programmatically using nearly any tool available. In contrast, most binary formats separate data from its essential context, rendering it meaningless without specific application logic for parsing. Plain text, however, enables a self-describing data stream that remains independent of the application responsible for its creation.

Plain text encompasses printable characters arranged to convey information, ranging from simple shopping lists to complex source code like that of this book. Crucially, it must be human-understandable, unlike obscure codes or unintelligible character sequences. The inherent power of plain text, even when structured (e.g., HTML, JSON, YAML), stems from providing insurance against obsolescence, leveraging existing tools, and facilitating easier testing. Human-readable and self-describing data forms inherently outlast all others and their creating applications, allowing partial format knowledge for parsing where binary files demand complete detail. For instance, extracting '123-45-6789' is straightforward from '123-45-6789' but challenging from 'AC27123456789B11P'.

The widespread applicability of plain text means virtually every computing tool, including version control systems, editors, and command-line utilities, can operate on it. This principle underpins the Unix philosophy of small, specialized tools, enabled by the line-oriented, plain-text file format used for system administration databases. Plain text simplifies system restoration in minimal environments and facilitates searching, such as finding configuration files with `grep`. Placing plain-text configuration files under version control allows change history tracking, comparison with `diff`, and integrity monitoring with `sum`. Furthermore, using plain text for synthetic data in system tests simplifies creation, updates, modifications, and trivial analysis of regression test output with shell commands or scripts. In heterogeneous environments, plain text acts as the lowest common denominator, ensuring communication through a universally understood standard.

📚 Continue Your Learning Journey — No Payment Required

Access the complete The Pragmatic Programmer summary with audio narration, key takeaways, and actionable insights from Andrew Hunt, David Thomas.