The Art of Readable Code by Dustin Boswell & Trevor Foucher
Author:Dustin Boswell & Trevor Foucher
Language: eng
Format: mobi, epub
Tags: COMPUTERS / General
ISBN: 9781449314170
Publisher: O'Reilly Media
Published: 2011-11-02T20:00:00+00:00
if (indent === undefined) indent = "";
// Handle (non-null) objects.
var str = "{\n";
for (var key in obj) {
str += indent + " " + key + " = ";
str += format_pretty(obj[key], indent + " ") + "\n";
}
return str + indent + "}";
};
This covers the shortcomings listed previously and produces output like this:
{
key1 = 1
key2 = true
key3 = undefined
key4 = null
key5 = {
key5a = {
key5a1 = "hello world"
}
}
}
Create a Lot of General-Purpose Code
The functions ReadFileToString() and format_pretty() are great examples of unrelated subproblems. They’re so basic and widely applicable that they are likely to be reused across projects. Codebases often have a special directory for code like this (e.g., util/) so that it can be easily shared.
General-purpose code is great because it’s completely decoupled from the rest of your project. Code like this is easier to develop, easier to test, and easier to understand. If only all of your code could be like this!
Think about many of the powerful libraries and systems that you use, such as SQL databases, JavaScript libraries, and HTML templating systems. You don’t have to worry about their internals—those codebases are completely isolated from your project. As a result, your project’s codebase remains small.
The more of your project you can break away as isolated libraries, the better, because the rest of your code will be smaller and easier to think about.
Download
The Art of Readable Code by Dustin Boswell & Trevor Foucher.epub
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Coding Theory | Localization |
Logic | Object-Oriented Design |
Performance Optimization | Quality Control |
Reengineering | Robohelp |
Software Development | Software Reuse |
Structured Design | Testing |
Tools | UML |
Deep Learning with Python by François Chollet(12583)
Hello! Python by Anthony Briggs(9919)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9798)
The Mikado Method by Ola Ellnestam Daniel Brolund(9781)
Dependency Injection in .NET by Mark Seemann(9342)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8304)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7767)
Grails in Action by Glen Smith Peter Ledbrook(7699)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7561)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(7121)
Microservices with Go by Alexander Shuiskov(6880)
Practical Design Patterns for Java Developers by Miroslav Wengner(6797)
Test Automation Engineering Handbook by Manikandan Sambamurthy(6743)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6420)
Angular Projects - Third Edition by Aristeidis Bampakos(6153)
The Art of Crafting User Stories by The Art of Crafting User Stories(5679)
NetSuite for Consultants - Second Edition by Peter Ries(5611)
Demystifying Cryptography with OpenSSL 3.0 by Alexei Khlebnikov(5421)
Kotlin in Action by Dmitry Jemerov(5070)
