r/javascript • • Sep 12 '16

JavaScript Standard Style Guide

https://github.com/feross/standard
0 Upvotes

29 comments sorted by

View all comments

9

u/ghostfacedcoder Sep 12 '16

God I hate this jerk off. If my name is Bob and I make a style guide it's "Bob's Style Guide". If an international consortium of web developers agrees on a style guide, then that is a "Standard Style Guide".

But you don't just get to declare yourself the standard.

-1

u/Klathmon Sep 13 '16

Nobody tell him that manual transmissions are called "standard" in some parts of the world. Or that the "US Units" are often called "standard". Or that the word standard can mean other things, like how this guide lets you follow some basic "standards" to prevent bugs in your code and to make it more readable.

0

u/[deleted] Sep 13 '16

[deleted]

1

u/Klathmon Sep 13 '16

Well, the idea was to make a "standard" that wasn't up for modification by the person using it. To perhaps eventually get some consistent code across more than one project. To stop the bikeshedding about if you should use X vs Y, or how to style this or that. And I personally think it's doing a pretty good job.

Now you can get your panties in a bunch and complain about how it's wrong that he's "misleading people" or something, but I just can't believe that anyone out there thinks that this is an "ECMA standard" (especially because the only mention of ECMA is in the FAQ header called "But this isn't a real web standard!"). It's not like the author gets anything by getting people to use his style guide. It's not like you need to pay him $20 every time you use it, it's a FOSS style guide and associated tools, linters, formatters, and plugins.

You can write it off because of a cheeky name if you want, but it's improved consistency in our code, stopped bikeshedding, and enough of some pretty big projects have started using it that i'm pretty sure aren't being "swindled" that i'm happy to use it (some of those projects include karma, fs-extra, yargs, npm, nyc, and - in a bit of an ironic twist - semistandard)

1

u/ghostfacedcoder Sep 13 '16

Well, the idea was to make a "standard" that wasn't up for modification by the person using it.

Words in English (well, in any language) have meanings. Standard doesn't mean "something that's not up for modification made up by one person." It means (according to Miriam-Webster at least) "something established by authority, custom, or general consent as a model or example".

The author was not an authority, and there was no established custom or general consent to use his personal style. So it's simple: he deliberately mis-used English get popularity for his project.

0

u/Klathmon Sep 13 '16 edited Sep 13 '16

Kind of funny that you took the time to look up the definition of the word 'standard' on merriam-webster and just so happened to look over the first 2 definitions. I'll put them here:

  • a level of quality, achievement, etc., that is considered acceptable or desirable

  • something that is very good and that is used to make judgments about the quality of other things

By those definitions, "Standard JS" is definitely a standard. It brings a level of quality to the code that makes it desirable.

But even if we decide to use your definition (which was weirdly 4th in the list...), I'd argue that "Standard" fits because the person installing it is acting as the authority. The "user" is standardizing on standard. Just because it's not your standard doesn't mean it's not a standard.

Either way, i'd prefer to go with the 3rd definition:

  • a conspicuous object (as a banner) formerly carried at the top of a pole and used to mark a rallying point especially in battle or to serve as an emblem

It's a flag!

0

u/ghostfacedcoder Sep 27 '16 edited Sep 27 '16

Words also have different meanings in different contexts. Normal human beings understands this, but if you try to argue like a robot and blindly follow the highest dictionary definition ... well you're going to have a much success communicating with other human beings as a robot does (a modern robot; I'm not talking sci-fi).

If you're playing baseball it doesn't matter if "you're out" normally means "leave", even if that's the #1 dictionary definition, because in the context of baseball "you're out" just means you go back to the club house and your team has one less "out" left in the inning.

Same thing with standard: there's the clear, obvious definition of the word in a programming (or indeed any technical) context, and there's a bunch other definitions. You can use those other definitions if you want, or make up your own definition for the word, but if you don't use the proper definition for a word given the context it's used in, you're not speaking English.

1

u/Klathmon Sep 27 '16

Hey dude whatever you say, I'm not a linguist.

But by that line of thinking, gulp, grunt, broccoli, node, react, angular, backbone, ember, and most other names are just as bad...

I'll just keep referring to standard js as the fancy banner that denotes that style, and you can continue on your crusade against names.