Naturally Occurring Standards 295
An anonymous reader writes "The phrase 'de facto standard' can denote anything from proprietary tyranny to a healthy, vibrant, market. What makes a standard viable without the formal blessing of a standards organization? Should you use such informal standards, or ignore them?"
Formally informal (Score:5, Interesting)
Just remember: Microsoft Office is an informal standard, as is Microsoft Windows. Of course, if you ask Microsoft, it's all "the industry standard".
(Which reminds me of an amusing story. My company had a third party do a web video for us at one point. The third party then asked us what format we wanted it in. I replied "MPEG2" because it's the most portable and is a cross-platform standard. We then got back a WMV file with a note about Windows Media being "the industry standard". Apparently the only reason they asked was that they wanted to know if we wanted the file coded as VBR or not.)
Standard... (Score:3, Interesting)
What makes [or should make] something standard is the wide acceptance from the population. And after all, that is a standard. As an example (trying not to flamebait) Microsoft could try to standaraize his
True standards qualify both ways (Score:2, Interesting)
Microsoft Word *.doc is not open. -> not standard
HTTP is open and common. -> true standard
Analogy: urban architects, folksonomy (Score:5, Interesting)
Folksonomies[1] are hot these days, and they go against the rigid a priory classification that has been standard so far. That's another example of a shortcut. Because it's better (easier, faster, more natural, etc.) people are adopting it, and it's becoming a de facto standard. That's the new shortcut, and pavents are being built to facilitate this new route.
[1] simpy [simpy.com] (use demo/demo for a demo)
Acceptance (Score:2, Interesting)
I guess it depends on what you mean... (Score:5, Interesting)
Perhaps it's useful to discuss what the difference is between a de facto standard and a convention. If there is none, then I'd say conventions evolve through traditions established by whomever pioneered a given technology/idea, and those conventions can and do change over time (Liebniz notation in calculus comes to mind as a mediocre example) as better ideas come up. But usually over a long period of time.
I mean, we had damn near purged the world of programmers who put their opening brace for a new code block on the same line as the conditional statement, and then that Gosling dude from Java went and set us back 20 years.
Only design them when you really need them (Score:3, Interesting)
However, you should still do so openly - build interfaces that people can use, and document them so people can figure out how to use them, and if you're lucky, people will use them for things you've never thought of, so try not to prevent that.
Time! (Score:4, Interesting)
Then look at gun manufacture that introduced 'standards' to make parts that all fit no matter where that part was made.
Now look at the software state. Companies deliberately adopting the 'standard' that every agree on to make it all work, then once in common usage, change it slightly (privately) to break the standard and have their own monopoly.
Standards -- "Best Practices" (Score:2, Interesting)
In sciences like chemistry or physics, or other disciplines, knowledgeable people peer-review ideas before they get published, or widely at least. Those ideas are more measurable or provable, and seem to amount to more than a heap of words without any mathematical basis. The same is mostly not true in computing.
Instead, I think what defines standards have little to do with technical merit, and much more to with money. If you want to know what's a standard, look towards how much money companies have spent either creating, promoting or using it.
If the idea is bad enough, it'll probably be financed by someone.
De Facto Standards (Score:4, Interesting)
You're using one right now (Score:4, Interesting)
Re:Formally informal (Score:3, Interesting)
Which it is - it's a standard that's used in the industry. That's de facto standard rather than official standard, of course, but standard nonetheless.
Re:I guess it depends on what you mean... (Score:4, Interesting)
To answer your question, nothing is strictly wrong with it, it's a matter of preference. I can give you my reasons for disliking it but it's just garbage to justify an opinion I can't otherwise explain.
Those are my reasons, but I suspect that, as with most programmers, the real reason I dislike that style is that I didn't learn to code using it, and so it looks "funny" to me. Being a rational person, I've tried to justify my preference with logic, and I think I do a good job of it, but I'm willing to accept that it's just stubborn adherence to how I learned it.
I also find the BSD style ("my way") to be far more common than the K&R-style, which means I more easily read more code that I run into "in the wild". K&R didn't even use their own style consistantly. As I mentioned, they failed to use that style on function definitions.
I like the orthogonality of the braces lining up, it just looks clean and organized to me. However, in Perl, where I cannot omit braces for single-line code blocks after a conditional, I use K&R style for brevity, so I'm guilty of the very inconsistance that I claim to dislike!
Re:I guess it depends on what you mean... (Score:2, Interesting)
Whitespace if your friend. If your code is too dense it actually becomes harder for the next guy to figure out. If you find yourself with massive code files that require you to make the code denser so that you don't get lost, then you need to check your design. Java encourages the use of large numbers of classes and packages for a reason.
increasing readability
When the braces line up, readability increases as the eye will naturally follow the brace down to its partner. Moving the brace on the same line produces asymmetric code that is rather unnatural for humans to read.
In addition, having the braces on separate lines helps if your formatting ever gets screwed up. It becomes much easier to slam the whole chunk of text to the left, then indent section by section. Just line highlight the inner-most braces and tab. Chose the next inner-most and repeat. Within a few seconds the entire chunk of text will be properly formatted.
avoids this horrible bug
That is a rather annoying bug. However, I have to say that I've lost far more time trying to read the same-line brace code (especially when idiots mix tab and space indents) than I have ever lost to the semicolon typo. I did the semi-colon two or three times, then I learned.
Re:Formally informal (Score:2, Interesting)
Re:Tests (Score:3, Interesting)
Great Britain and Australia have seen their violent crime rates soar [tripod.com] since revoking the right of ordinary citizens to own guns.
Over 50 million people were murdered by their own governments during the 20th century, and the first thing these governments did to start their cleansing programs was outlaw guns for ordinary citizens [jpfo.org].
So tell me exactly why the Second Amendment makes no sense?
Standard == Flag To Rally 'Round (Score:3, Interesting)
Literally or figuratively, a "standard" is a flag that the troops rally around as we head into battle.
If we're lucky, we rally 'round because the standard inspires us and represents something we love.
If we're unlucky, we rally 'round because the Commissars are standing behind us with sidearms ... literally or figuratively.
Re:True standards qualify both ways (Score:3, Interesting)
Re:Formally informal (Score:5, Interesting)
Re:Tests (Score:3, Interesting)
A flag, banner, or ensign, especially:
The ensign of a chief of state, nation, or city.
A long, tapering flag bearing heraldic devices distinctive of a person or corporation.
An emblem or flag of an army, raised on a pole to indicate the rallying point in battle.
The colors of a mounted or motorized military unit.
vs.
Indeed, that's what the word "standard" meant of old. A standard is a pole, a stick -- such as a flagpole, hence the term "standard-bearer".
So you're saying a flagpole is called a standard bearer because it.. bears a stick, rather than bearing a flag?
My OED is upstairs, but according to NOAD it's a shortening of Old French estendart, from estendre 'extend'.
Standards are about interoperability (Score:2, Interesting)
Wine (Score:1, Interesting)
Re:I guess it depends on what you mean... (Score:2, Interesting)
}
else
{
when they could get along perfectly fine with:
} else {
Why waste all that space?
Re:I guess it depends on what you mean... (Score:2, Interesting)
Whitespace if your friend.
Not in excess, it isn't.
If your code is too dense it actually becomes harder for the next guy to figure out.
And if it isn't dense enough, it also becomes harder.
When the braces line up, readability increases as the eye will naturally follow the brace down to its partner.
I don't see the advantage here. Your eye is going to see the indentation and naturally follow the indentation down to where the indentation stops. You don't need a brace to do that.
Moving the brace on the same line produces asymmetric code that is rather unnatural for humans to read.
It's not any more or less natural to put the brace on the other line. You're just not used to it. If you were, you'd find just the opposite.
In addition, having the braces on separate lines helps if your formatting ever gets screwed up.
There are plenty of programs out there that will reformat your text for you in this (extremely rare) situation.
However, I have to say that I've lost far more time trying to read the same-line brace code (especially when idiots mix tab and space indents)
Is it so hard to change your tab spacing to match that of the "idiot"? Alternatively, you could go ahead and run indent or some similar program. Neither take very much time.
Re:Driving on the Right Side (Score:1, Interesting)
Housebricks (Score:2, Interesting)
Abe Lincoln and the 4'8" gauge railroads (Score:4, Interesting)
The history is interesting, and demonstrates the power of an established de facto standard. (I don't recall the source for this, but I think it was a PBS TV show.) When the very first railroad cars were built, they were built by wagon makers, who used the same jigs and fixtures they used for wagons. Wagons had a de facto standard track width of four feet eight inches.
This track width dates back to Roman times. Roman chariots had this track width, because it worked correctly for the horses that they used. So for roughly 2000 years, wagons were generally made that size.
As railroads began to expand, they used a variety of gauges up to seven or eight feet. (The famed Orient Express had a seven foot gauge, IIRC.) Some early railroads used different gauges as a competitive measure, to prevent competitors from running trains on their track and requiring customers to change trains, often several times within a short trip.
Abraham Lincoln was President when the first transcontinental railroad was to be built, which would require that the different companies involved would have to use the same gauge. He actively questioned the "odd" 4'8" gauge, and after some discussion, signed a Presidential edict that all railroads henceforth must have a gauge of five feet. The railroads proceeded to totally ignore this law, and built everything in 4'8" gauge, thus demonstrating the power of de facto standards. So today, we (mostly don't) ride in railroad cars whose dimensions are descended directly from the width of a Roman horse's behind.