From 658aacd93bf60e37e1cc282df3033e91ce186c4c Mon Sep 17 00:00:00 2001 From: Jeremy Kahn Date: Fri, 6 Jul 2012 09:21:12 -0500 Subject: [PATCH] Adds link for 80 char limit info. --- ...-01-treating-javascript-like-a-30-year-old-language.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_posts/2012-07-01-treating-javascript-like-a-30-year-old-language.markdown b/source/_posts/2012-07-01-treating-javascript-like-a-30-year-old-language.markdown index 1b9639b6759..5d0ee1ed18b 100644 --- a/source/_posts/2012-07-01-treating-javascript-like-a-30-year-old-language.markdown +++ b/source/_posts/2012-07-01-treating-javascript-like-a-30-year-old-language.markdown @@ -16,7 +16,7 @@ Much of my style is rooted in the [Google JavaScript Style Guide](http://google- There's nothing more irritating when trying to grok code than scrolling around to see the entire line. It's a mental context killer. While any text editor worth its disk space has the option to wrap text automatically, chances are your code will be read in an environment that doesn't. This includes CLI programs (like diff and less) and web-based source viewers like Github. Don't make people scroll, it's mean. -At some point in computer history, somebody (arbitrarily?) created an 80 character line limit for code. It's formally documented in the [Python Style Guide](http://www.python.org/dev/peps/pep-0008/#maximum-line-length), and I think it's totally awesome. This has two benefits. First, as I mentioned, you eliminate the need to horizontally scroll. More substantively, this promotes code simplicity. When you restrict yourself to 80 characters before a line break, you're more likely to break statements up into smaller chunks. I don't like clever code that crams a bunch of nested function calls into lines like this: +At some point in computer history, somebody ([arbitrarily?](http://programmers.stackexchange.com/questions/148677/why-is-80-characters-the-standard-limit-for-code-width)) created an 80 character line limit for code. It's formally documented in the [Python Style Guide](http://www.python.org/dev/peps/pep-0008/#maximum-line-length), and I think it's totally awesome. This has two benefits. First, as I mentioned, you eliminate the need to horizontally scroll. More substantively, this promotes code simplicity. When you restrict yourself to 80 characters before a line break, you're more likely to break statements up into smaller chunks. I don't like clever code that crams a bunch of nested function calls into lines like this: ```javascript setTransformStyles(context, buildTransformValue(this._transformOrder, _.pick(state, transformFunctionNames)));