News for hackers. Stuff that matters.
Re:Programming is a Pop Culture by crusso on Thursday November 01, 2012 @12:37PM (#4728363)
Many things in programming are like that. Why do you use CamelCase in JavaScript but underscores_in_ruby? Because everyone else does, and that’s the language’s "style."

By that logic, driving on the right side of the road in the US vs driving on the left in the UK is "pop culture".

The reasoning in the article didn't improve as I read on...

Re:Programming is a Pop Culture by dbh937 on Thursday November 01, 2012 @01:34PM (#4728685)
>>>By that logic, driving on the right side of the road in the US vs driving on the left in the UK is "pop culture"

Well, if using the definition of pop culture described in this article, pop culture evolves. Where countries drive on the road can be related more to how programming languages define blocks of code. C-like languages use curly braces to define blocks. This can be related to how since medieval times, horses rode on the left side of the road. More modern languages use different ways to define blocks of code. For example, Python uses tabbing and whitespace, Ruby uses the `end` keyword.

Continuing to use the traffic analogy, you don't have to use cruise control while driving on a long stretch of highway, but it's a lot easier to, and everyone else does. In the article, raganwald is talking about how coding conventions and techniques evolve over time. The analogy about driving in the UK vs the US is more equivalent to the syntactic rules of the specific language you are working with; it's the law which side of the road to drive on. You'll get penalized if you do otherwise. Using or not using cruise control is your choice, and so are naming conventions in different languages. Conventions evolve, even when the specific "laws" of the languages don't change as quickly, or at all.

Re:Programming is a Pop Culture by ricardobeat on Thursday November 01, 2012 @01:05PM (#4728519)
CamelCasing is not enforced, while driving on the right side is.
Re:Programming is a Pop Culture by crusso on Thursday November 01, 2012 @01:13PM (#4728567)
I've driven in countries where no traffic laws are enforced. People still pick a side of the road to drive on.

And it isn't because it's superficial and fashionable. It's because there are underlying logical reasons for doing what the rest of the herd is doing.

Likewise with sticking to coding conventions for a language.

Re:Programming is a Pop Culture by nickik on Thursday November 01, 2012 @05:34PM (#4729842)
Laws in any given system are a process of Spontaneous order (http://en.wikipedia.org/wiki/Spontaneous_order).

The performance of every given actor in the system is inhanced by everybody else adopting the system. Its absolutly normual and good. Thats how our social liver works in general, the state mostly only comes in later and writes stuff down.

Re:Programming is a Pop Culture by fghh45sdfhr3 on Thursday November 01, 2012 @01:47PM (#4728757)
The article makes some good points, but I think they apply almost equality to both science and engineering, and frankly everything else.
Re:Programming is a Pop Culture by papsosouid on Thursday November 01, 2012 @01:09PM (#4728540)
>By that logic, driving on the right side of the road in the US vs driving on the left in the UK is "pop culture".

Not at all. I don't drive on the right side because "everyone else does" and "that's the style". I do it because its the law, and because I would be risking my life and the lives of others to do otherwise. Having a function with an underscore in its name isn't breaking any laws, and isn't risking any lives or anything even remotely analogous. It is entirely based on subjective whims.

Re:Programming is a Pop Culture by pjscott on Thursday November 01, 2012 @02:35PM (#4728980)
You risk confusing and annoying other people who read your code. It's a non-lethal risk, to be sure, but still a reason to follow the local naming customs.
Re:Programming is a Pop Culture by papsosouid on Thursday November 01, 2012 @03:14PM (#4729192)
You risk confusing and annoying other people who read your code if you do follow convention also. I hate camelCase just as much in languages where it is customary as I do any other time. It is just a question of how many people you expect to annoy, which is precisely choosing it by popularity.
Re:Programming is a Pop Culture by zerostar07 on Thursday November 01, 2012 @03:14PM (#4729189)
There are 2 factors that would keep you from switching styles: inertia, and symmetry. The benefit from keeping the code looking good usually outweighs the gratification of "going on your own". And frankly if you 're changing coding style in your contribution you look like a prick. The OP's point is valid: it's not popularity that leads to standardization it's because of the initial standardization that it is later adopted.

Case in point: i don't know any major project that does not follow the style conventions of the framework it's built upon.

Re:Programming is a Pop Culture by bmelton on Thursday November 01, 2012 @06:07PM (#4729984)
With Python at least, it's effectively the law, or at least is defined in PEP8.

PEP8 is tricky because it's technically a "style guide", but heaven help you if you're trying to get your code into somebody else's repository and aren't abiding its tenets.

http://www.python.org/dev/peps/pep-0008/