From 0801d31bf2c401204ef0008a4a8119b1335c56bb Mon Sep 17 00:00:00 2001 From: Aleksandr Hovhannisyan Date: Sun, 23 Jun 2019 13:01:59 -0400 Subject: [PATCH] Clean up quote formatting --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cfffeca..f01d216 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This document is a reference for the Go community that aims to help developers write cleaner code. Whether you're working on a personal project or as part of a larger team, writing clean code is an important skill to have. Establishing good paradigms and consistent, accessible standards for writing clean code can help prevent developers from wasting many meaningless hours on trying to understand their own (or others') work. -
We don’t read code, we decode it – Peter Seibel
+> We don’t read code, we decode it – Peter Seibel As developers, we're sometimes tempted to write code in a way that's convenient for the time being without regard for best practices; this makes code reviews and testing more difficult. In a sense, we're encoding—and, in doing so, making it more difficult for others to decode our work. But we want our code to be usable, readable, and maintainable. And that requires coding the right way, not the easy way. @@ -75,7 +75,7 @@ for i := 0; i < 10; i++ { This is what I like to call a tutorial comment; it's fairly common in tutorials, which often explain the low-level functionality of a language (or programming in general). While these comments may be helpful for beginners, they're absolutely useless in production code. Hopefully, we aren't collaborating with programmers who don't understand something as simple as a looping construct by the time they've begun working on a development team. As programmers, we shouldn't have to read the comment to understand what's going on—we know that we're iterating over the range 0 to 9 because we can simply read the code. Hence the proverb: -
Document why, not how. – Venkat Subramaniam
+> Document why, not how. – Venkat Subramaniam Following this logic, we can now change our comment to explain why we are iterating from the range 0 to 9: