Why Language Advocacy is Bad
richw showed us
an excellent story talking about why language advocacy is bad. Its an excellent piece, and although many of the points he writes about are specifically related to Perl Programming, many of them can be equally applied to the irrational ways that people approach things like politics or Slashdot discussions.
The author is restating an extremely valid point that is realized by most decent programmers: use a language where it is appropriate.
I learned python before perl, and thought it was one of the coolest languages around (still do), and for about a year, did all my scripting in it. Then I had to debug some perl code, and doing so, managed to teach myself some perl. After learnign a bit more, I said to myself "hey, perl rocks!", and then proceeded to script solely in perl for the next 6 months or so.
Then I started noticing how each had advantages in certain domains. Doing any sort of work with serious data structures in perl is annoying. Perl's pseudo-typing, and automatic flattening of lists (because lists can only hold scalars.. dontcha know), really makes it annoying to handle heirarchical data. You have to start using references, which makes code ugly and hard to read. Python is much more suited for that sort of thing.
On the other hand, doing stuff like traversing the the filesystem quickly, munging text, ad-hoc parsing, is extremely sweet in perl. Python is just too verbose when it comes to those kind of things. My home machine is littered with perl scripts that automate administrative tasks.
Use a language where it's fit, and dont take it personally when people point out that a language is not fit for particular task (they're usually right).
-Laxitive
I've always felt that the solution to all the language wars would be if people learned different programming languages preferrably from different programming paradigms. A Perl bigot wouldn't go on and on about how truly OO Perl was if he knew about SmallTalk and neither would a C bigot rhapsodize about C's text-handling abilities if given Perl.
The problem is narrow-minded programmers who learn 1 langauge or 1 paradigm (functional, Object Oriented, procedural, etc) and refuse to open their minds to any alternatives no matter how well suited they would be to solving the task at hand.
Remember people, programming languages are merely tools and like most tools they are good at performing specific tasks and not-so-good at performing other. A hammer is great at removing nails stuck in a wall but would be useless at unscrewing the back of your VCR. Use the right tool for the job and keep in mind that your favorite tool is not always the right one.
Grabel's Law
You know, the same can be said for operating systems. Replace the bit about strong typing, etc. with scheduling, etc. and it should sound familiar. I guess the point is that everybody's going to have a certain way about solving a task and they're going to have prefered tools for doing it. Suggesting alternatives or comparing the way one tool works to another often leads to feelings of criticism, even where none was intended.
Funny that scientists are supposed to be logical and objective when engaged in their work but I guess programming always has been a mixture of science and art.
-Jennifer
If English was good enough for Jesus, it should be good enough for everyone!
(I think it was some governor from about 30 years ago... can't remember his name - at any rate, it is funny.)
If it weren't for language advocacy, I wouldn't find out nearly as many cool things about programming languages.
:)
Everyone has their pet peeves, and their favorite features, and usually they have reasons for it. For instance, I don't like Java; I think it's unnecessarily bloated, contrived, and non-intuitive. So when someone showed me how simple it was to make a little GUI app, (far simpler than the text version, I might add) I was suitably impressed. I still hate Java, but I have a better idea of where it should be used, and what it can do, thanks to that advocacy.
When it comes to type systems, I like Scheme; it has a nice, clean type system. Perl can accomplish all the same nifty tricks as Scheme can, (it has closures, yay!) but you have to at least use a lot of references, and the syntax can get pretty grotty.
I used Pascal for a long time, and a decent programmer often spends a lot of time getting around the Strong Typing--it interferes with what they actually want to do a *lot*, like when they want to create a dynamic arry, for example. C at least doesn't bug you about it, but they can both pretty much accomplish the same things. I can't stand the Java type system; they definitely broke the notion of what should be an Object or not.
But that's just my opinion, and it doesn't stand in my way when I'm looking for a tool. Lately, I've been writing in C, because I've been doing Operating Systems programming for class, on Unix, in C, and it works quite well. But when I was doing web development and system administration this summer, I learned Perl and PHP, and it was far less work for what I was doing at the time. I also got to see how much work it is to implement a complex CGI in C, and although I think it'd be a neat experiment, I'd start out writing it in Perl, thankyouverymuch. I haven't had to use Java because I haven't done any real GUI programming, but I might try it out just because the API looks a little cleaner than some other GUI APIs I've seen. (I'm not about to write in straight XLib yet; even "Hello World" is huge!)
So yes, do your advocacy. Tell people which tools you like, and tell them why. Pick the right tool for the job. I don't think these things have to be incompatible. Just try to stay rational about it; that's why Linux has an Advocacy-HOWTO. When done right, it really isn't bad at all, it's quite informative, actually.
---
pb Reply or e-mail; don't vaguely moderate.
pb Reply or e-mail; don't vaguely moderate.
(I wonder in how many years will "vote out of tribe" not be recognizable in the same way that "drink the Kool-Aid" is not recognizable by people who don't know the news story behind it)
I'm seeing a common misconception of the article in a lot of posts here: that all advocacy is bad.
The author says, at the end of the article:
I don't really hate advocacy. I just hate the way we do it most of the time.
The article is not against advocating things. The article is about people's bad "discursive habits" -- the way we tend to discuss things. The author, for example, is not against discussing the advantages of the typing system in Standard ML. What the article *is* about is the curious fact that most people can't seem to do advocacy right.
We do it in a dumb way. And I think the discoursive habits we pick up as a result are going to impede the progress of programming languages for a long time.
And the progress of a lot of things. I wish more people understood this.
Tweet, tweet.
There's an recent article on Kuro5hin about fear of XHTML. The most relevent thing in it is how people will violently stick to what they know. They learned to use font tags instead of CSS, and so they like it that way. They fear that their pages will not work in the future, and they fear that they can't do the same things in XHTML as in HTML.
This is an example of how advocacy (in this case HTML over XHTML/CSS) is very bad for everyone involved. People do not want to leave HTML, so parsers will have to continue to be complex. Browser incomatibilities will widen even more.
I often see this kind of thing. A new standard comes out, and it solves more problems than before, but there is this inertia on the existing standard. It's almost as if people decide that they have learned enough for them to retire on.
-no broken link
I think Mr. Dominus hit the nail on the head when he said, "the root of the problem is that we tend to organize ourselves into tribes."
I suspect this is a deeply rooted social instinct to become part of a group, support the group and have the group support you. Possibly, from the time when humans associated themselves with a family unit and vied for resources among other such units. And attacking other groups meant a greater portion of the pie for your own group, more support for yourself, and more acceptance from within your own group.
Slashdot is one such group. Why do the Microsoft-related stories routinely attract postings that number in the five or six hundred range? It all has to do with how we define our tribe.
Is it a bad thing? I think it is, when it starts to obscure the fact that we are all part of a tribe called "the human race."
--
Accountability on the heads of the powerful.
Power in the hands of the accountable.
This article touches on a number of good points. A read all the way will do all of us good. I like to think of the problem as a toolbox. You can get a screw in with a hammer, but a screw driver will do a much better job. Just as you can get a nail in with a screw driver (by bashing it in with the handle... which I've done when there IS no hammer around), but a hammer will do a much better job.
I like to think of programming languages in much the same way. The best programmers have many tools they can draw from and understand the strengths and weaknesses of each for a given task... making it alot easier to use the best tool for a particular job.
The best programmers don't think of themselves as VB programmers or Perl programmers or the like... they just think of themselves as programmers.
Portable versions of Firefox, GIMP, LibreOffice, etc