Slashdot videos: Now with more Slashdot!

View

Discuss

Share

We've improved Slashdot's video section; now you can view our video interviews, product close-ups and site visits with all the usual Slashdot options to comment, share, etc. No more walled garden! It's a work in progress -- we hope you'll check it out (Learn more about the recent updates).

magicmat writes "UC Berkeley EECS graduate researchers Leo Meyerovich and Ari Rabkin have compiled an interesting data set on the sociological aspects of programming language usage and adoption. 'Socio-PLT' is the result: compiling survey results from Berkeley's recent 'software engineering' massive online open course, SourceForge, and two years of The Hammer Principle online surveys, they have discovered some interesting phenomenon about what we, as programmers think about our languages, and why we use them. You can head over and explore the data yourself using cool interactive visualizations, and even fill out a survey yourself to have your say."

Lisp is very powerful. So it is a good language for all the code that you write.

However I don't use Lisp. I actually prefer stuff like Perl. Why? Because Perl is good for all the code you don't have to write! aka CPAN.

All that code in CPAN that you don't write, is code that you don't have to document, and typically don't have to debug and fix.

Most programmers in the world aren't really writing code where most of the lines of code are "new", revolutionary or innovative. You might write a few innovative things here and there, but the rest? Don't reinvent the wheel - use good libraries/modules.

In areas where nobody else in the world has ever done what you are doing, then it makes sense to use stuff like Lisp or whatever super powerful language that some genius has come up with.

Otherwise if you need to parse and build DHCP packets, perl/CPAN has modules for that. If you need to parse and build a webpage and post a webform, perl/CPAN has modules for that. Talk to DB servers, handle SNMP, SMTP over TLS, ssh, write Excel files, create images, etc they're all on CPAN.

I like CPAN. I really do. But, I have had to debug several modules. Its not always perfect. You do actually have to test them to see if they meet your usecase. Point in case: the excel module. XLS is pretty complex, it doesn't do everything correctly.

Yeah, I had to debug and fix some stuff too. If the module is not too crap, fixing it is usually still faster than writing it from scratch in Lisp. Add in the OK modules that perl has and lisp doesn't and it still could be faster.

Even so many of the modules are written by programmers who are better than I am. That's how I improve the code quality of my program - most of the code is written by better programmers:).

Very good point. The quality of CPAN is much better than some thing like PHP's PEAR. I haven't had as much experience with Ruby Gems or Python's what ever. Often, If a library isn't good enough in the language I'm using I'll port a CPAN module.

Just started a new project which required an API to essentially pass information from a database and CSV files to an HTML client in JSON. Broke out the basic script I wrote in Perl circa 2002 to do just that. Since 2002 I've made two major changes to the script: added JSON support (originally it returned XML because back then it was all about XML) and replaced some rather nasty els if statements with switch statements when that became standard in Perl 5.10. The sub routines vary from project to project

Hmm, I never use CPAN. I tried once, but it was more work to look through the thousands of packets and find the right one and then integrate it than it was to actually write my own small module. But I use Perl for simple scripts and utilities, one-off things, not production code that gets shipped to customers or put into production.

I do occasionally use Lisp. It's what's in Emacs after all. It used to be more common as a scripting or configuration language but over the years there are now other simple i

1. Why is a programming language successful? - Because programmers use it, or don't.2. Why do programmers use it? - Because it does what they want.3. What do programmers want from a language? - For it to do what is required, quickly and easily.4. Why do programmers want to do things quickly and easily? - Because programmers are lazy.5. Why are programmers lazy? - Because they want to get their work out of the way as quickly as possible so they can get back to doing things they really enjoy.

1. Why is a programming language successful? - Because programmers use it.
2. Why do programmers use it? - Because it provides paying jobs.
3. Why does it provide paying jobs? - Because it is possible to economically do useful things.
4. Why makes a programming language economical? - Terse efficiency, not obtuse coolness.
5. Why do programmers choose a particular language? - They want to use a programming language that is successful.

That last one isn't that hard to explain though, because it usually comes down to a few factors:A. Easy to learn.B. Easy to write highly functional code.C. Easy to understand what someone else has written.D. Easy to integrate with components written in other languages (via libraries, compatibility layers, etc)

In its heyday, PHP's advantages were: (A) It was easy to learn for those familiar with Javascript because it was kinda similar syntax, and (D) Extremely easy integration with HTML and Javascript, especially once mod_php got going. Basically, it meant that any damn fool web designer could throw a little bit of PHP into their pages.

Once people started writing more complicated stuff in it, its limitations became clear, which is a big part of why its popularity is waning in favor of Python, Ruby, etc for web de

I agree that integration with HTML is good, the code being enclosed in a processing instruction marker, it easily made a PHP script a well-formed XML document, which made debugging easier, at least on a structural level. On this respect, it was way better than JSP and its absurd <%...%> marker.

But you stated the real selling point of PHP: "any damn fool web designer could throw a little bit of PHP into their pages." No need to engage in extensive learning, someone who only knew HTML could manage to ob

(D) is probably the critical one. Languages, at this point, are all pretty similar in what they can do, how easy they are to learn, and readability really just depends on what you are used to.. The thing that tends to separate them is what other components exist for them to link into, i.e. how popular they are among the programmer's target community.

So it is probably more accurate to say 'programmers use languages because other programmers are using them'.

That is about the size of it. I know a bit of perl because I wanted to do some web scripts, and at the time, perl was the best language. I know a bit of Java because I wanted to write some mobile phone apps and Java's the only properly supported language for Android.

I don't know Haskell because nobody uses it so I've had no need to learn.

I don't know Haskell because nobody that I personally know uses it so I've had no need to learn

FTFY

Please say what you mean next time... unless you are genuinely meaning to infer that everyone who knows a particular language must be a "nobody", as in nobody who is important or worthwhile... which is a rather tactless thing to say, if you ask me.

Nobody I personally know uses Java, or at least nobody did until I got a job in it.

What I mean is nobody uses Haskell for any area of software development, to a substantial degree that learning it makes any sense. There's essentially no community development support for it in any field.

I do mean nobody important or worthwhile. I apologise if this offends you.

From my own experience (I really hope this has changed or changes), there is no support in terms of debuggers, tracers, etc. It is horrible in that regard, you are left with using print statements...in a functional language. Great, I get a linear stream of crap from a computation that has a lot of internal structure. Just the type structure error messages alone are enough knock a dead buzzard off a shit wagon at 20 paces. Would it kill the developers to at least display why something doesn't type-check rath

I came in here to post that we can expect to see programming explosively progress relative to previous craft professions, because unlike other professions that disdain introspection, our field practically requires it, and teaches very early and very harshly that absolute intellectual honesty is the only way to move forward.

And then... this. +5, Insightful. A post that is the equivalent of the middle-management meme that made the rounds a few years ago, "It is what it is." Absolutely meaningless, utt

But even then this doesn't mean much. Ie, Ruby was a minor seldomly used language for a long time until suddenly it took off because of Ruby on Rails. Python is very popular now but it used to be something not used much except in Red Hat. Lua was similary uncommon until some games picked it up and used it, increasing the popularity.

Simiarly, some things that people think are fail are not. Smalltalk is still actively being developed and used, with new commercial and free versions. COBOL is _still_ being

Objective-C is horrible. I wouldn't wish it on my worst enemies. It hasn't gone off the rails? It's never been on the rails to go off of to begin with! It's a series of kludges tacked on to a terrible core.

Formatted code is brilliant. Code that can't be copy and pasted reliably is still something only an imbecile could like.

if something:
do something
a bunch of stuff goes here
blah blah blahand this is after the if clause... for now

is not easier to read than

if (something){
do something
a bunch of stuff goes here
blah blah blah}and this is after the if clause... and will reliably stay that way

And if the code with {} gets mangled by some editing, you just highlight it and reformat, and its back as it should be. Mangle the indenting/formatting in python, and you have to re-validate the semantics of the code.

A few {} do not make it harder to read, the code is trivially easily to prettify with automatic formatting (nobody has to look at unindented or all-on-one-line code in a {} language even if it was originally written that way), and I have found the structure is much more resilient to editing. If I'm editing away in something like notepad and delete the "blah blah blah" line in python there are good odds the "and this is after the if clause" will end up appended to the "a bunch of stuff goes here line" and then I'll hit return and have to think about whether its part of the if clause or not.

In C worst case, the } gets appended to that line and I press return to pop it down again, knowing that its closing the block.

Ya, I never got the hang of Java. Everytime I started a new project with it the language had fundamentally changed so that what I knew was obsolete. Today it's mostly just used as duct tape to attach different modules together rather than being used to actually write the underlying code.

Python was ok at the start. I didn't like the white space much because I had used Occam in the past and white space caused all sorts of troubles (editors insist on putting in tabs, every programmers had a different idea o

Programming languages must have a certain elegance, a flow or symmetry that entices the mind. Pascal/Delhpi have always done that for me. She's not the hottest girl at the dance, a little older and not dressed to the 9's, but she's the one I'm taking home that night. It's entirely personal, and I could'nt care less what others use.

Programming languages must have a certain elegance, a flow or symmetry that entices the mind. Pascal/Delhpi have always done that for me. She's not the hottest girl at the dance, a little older and not dressed to the 9's, but she's the one I'm taking home that night. It's entirely personal, and I could'nt care less what others use.

Much like Ruby is called "Perl's younger, much prettier sister".

Dear Perl,

Look, I know that we were an item for quite a few years.

You were my one and only. My true love.

But I've gotta admit, when I saw your younger sister Ruby a few years back... well, I thought she was hot. But of course, she was too young then so I stayed away from her.

Now, more recently I have to confess that I went out with Ruby for a few dates and believe me, she is plenty mature now!

Not only that but her library seems somehow more complete than yours and certainly better organized. And her object oriented features - OO la la! Look, you're a great gal, but you're certainly not anywhere near as well endowed in THAT department.

And now that Ruby's got transportation (ok, so she likes to ride the rails) we're really getting around.

So, dear Perl, I have to tell you that it's over between you and me. From now on it's me and Ruby.Please don't take it too hard. Maybe you'll find someone else after you're makeover.

Programming languages must have a certain elegance, a flow or symmetry that entices the mind. Pascal/Delhpi have always done that for me. She's not the hottest girl at the dance, a little older and not dressed to the 9's, but she's the one I'm taking home that night. It's entirely personal, and I could'nt care less what others use.

Much like Ruby is called "Perl's younger, much prettier sister".

Dear Perl,

Look, I know that we were an item for quite a few years.

You were my one and only. My true love.

But I've gotta admit, when I saw your younger sister Ruby a few years back... well, I thought she was hot. But of course, she was too young then so I stayed away from her.

Now, more recently I have to confess that I went out with Ruby for a few dates and believe me, she is plenty mature now!

Not only that but her library seems somehow more complete than yours and certainly better organized. And her object oriented features - OO la la! Look, you're a great gal, but you're certainly not anywhere near as well endowed in THAT department.

And now that Ruby's got transportation (ok, so she likes to ride the rails) we're really getting around.

So, dear Perl, I have to tell you that it's over between you and me. From now on it's me and Ruby.Please don't take it too hard. Maybe you'll find someone else after you're makeover.

After a few go-rounds, you then discover she has 6 different STDs and is intellectually about as deep as a summer puddle in a Florida parking lot.

I thought Ruby was Smalltalk's less elegant sister but easier to pick up if you're poor and don't have a workstation. Of course once you don't notice all the quirks until the windows start fogging up but by then it's too late to back out.

I'm going to go with professors trying something and liking it, passing it on to their students, and the rest following from there. I realise this isn't a complete explanation, but I does help explain the momentum some languages have gained (looking at you, Python, Matlab, QT4/C++, VB).

Unlike a girl, a good programming language is good for more than one thing.

If you have more than one girlfriend, then you run into the same problems as SMP and multi-threaded programming: resource contention, careful locking, semaphore signalling overhead, etc. Woe betides you if one finds cosmetics stuff from another on the wrong stack in the bathroom.

And then there's assembly, where everything depends on vintage. There are some seriously inspiring architectures like my fave XMOS XS-1 with its hardware resource management in old mainframe style, but all packaged in a limber teenage body.

The results were a bit of a pain to find on my phone, and took a while to load, but if you are looking for them, you can mostly skip the methodology and go to the bottom of the page
where there are a handful of not well separated links.

The results didnt seem too surprising, other than that under their questions, Visual Basic and Assembly ended up clustered together.

The results didnt seem too surprising, other than that under their questions, Visual Basic and Assembly ended up clustered together.

Odd things seem to happen when you change the number of clusters.
There seem to be too many cases where you start with N clusters and pick a pair of languages.
Then go to N+1 clusters and the pair is split between two clusters.
Then go to N+2 clusters and the pair is back in the same cluster.
While k-means is often the first tool one grabs for clustering analysis,
it isn't th

One distinction is whether the language was designed to meet a practical need, or to prove an abstract point in computer science. Plus, these days, the API is probably more important than the language - its certainly more work to learn a new API than a new language.

PHP is a crap language, but it gets the job done, makes it easy to programatically generate HTML and comes with a humungous library of useful functions. Plus, its widely available on commercial web-hosting services. When I tried some Python (after forcing myself to stop worrying and get past the 'significant whitespace' thing) , I found I wanted an XML/XPath/DOM library but all I could find were several half-finished attempts and a lot of discussion about what would be a suitably "Pythonesque" XML API (the well-defined standard DOM API sounds good to me). Maybe I was unlucky (Python isn't exactly unsuccessful) but that would have been a no-brainer in PHP, Java or C.

Likewise, Javascript is the only game in town for scripting web pages and has become almost platform-independent. It also became joined at the hip with the HTML DOM.

Java also had the big practical plus of being almost platform independent - and again now has a huge array of APIs that programmers have spent time learning.

Or look at C vs Pascal. VAX Pascal, Turbo Pascal, Delphi et. al. were quite successful because they each extended the language in proprietary ways, but standard Pascal was useless for anything other than teaching algorithms because it didn't have any practical API to speak of (you couldn't even open a named file within a Pascal program - that had to be done externally). C, on the other hand, always had a "de facto" standard library consisting of the subset of the Unix API described in "The C Programming Language", full of really useful utility routines for strings, file handling, output formatting, searching etc. You could do a lot in standard C without tying yourself to a particular dialect or platform, and the pre-processor let you #ifdef your way out of any incompatibilities that you did encounter.

C++ - a can of worms which only a language lawyer could love - probably hit the big time because of MS Visual C++ and the MS Foundation Classes. That and the fact that C programmers didn't think they had to learn a whole new language (see earlier comment about cans of worms).

Basically, don't expect your mathematically elegant new language (with no variables, who's only operator is 'is a subset of' and which uses UNICODE accents and ligatures to increase its expressivity) to take off unless it has POSIX regexps, bindings to MS Access and a WIndows application framework.

C++ - a can of worms which only a language lawyer could love - probably hit the big time because of MS Visual C++ and the MS Foundation Classes. That and the fact that C programmers didn't think they had to learn a whole new language (see earlier comment about cans of worms).

Or maybe C++ became popular because it introduced the object-oriented paradigm while retaining compatibility with C.

Can of worms? You know you don't have to get into template programming and other complex C++ STL guts, right?

Template programming isn't hard. The stuff that's useful 95% of the time is not hard to understand.
The metaphor for me is: mention a real type (like vector<Foo>) or function, and it magically appears an instatiation
of a template, if it's at all possible. The instantiation is like search-and-replace, except with some minimal sanity checks applied.

C++ - a can of worms which only a language lawyer could love - probably hit the big time because of MS Visual C++ and the MS Foundation Classes. That and the fact that C programmers didn't think they had to learn a whole new language (see earlier comment about cans of worms).

Or maybe C++ became popular because it introduced the object-oriented paradigm while retaining compatibility with C.

Can of worms? You know you don't have to get into template programming and other complex C++ STL guts, right?

You don't have to get into template meta-programming or STL/Boost or RTTI to see it can become a can of worms very quickly. It is true of all languages, but from my experience, C++ can get you there very quickly.

Despite fanatism for a lot of languages, I believe languages catch on when they are easy to understand by others and have an easy to understand syntax or interfaces. Plenty of times you see announcements of new languages which claim experimental or higher level syntax abstractions or constructions that allow the programmer to write less code, or claim to resemble human language more.
Yet in practice, I don't think programmers spend most of their time actually writing the code but thinking what to write, so

Despite fanatism for a lot of languages, I believe languages catch on when they are easy to understand by others and have an easy to understand syntax or interfaces. Plenty of times you see announcements of new languages which claim experimental or higher level syntax abstractions or constructions that allow the programmer to write less code, or claim to resemble human language more.
Yet in practice, I don't think programmers spend most of their time actually writing the code but thinking what to write, so making an algorithm or behavior as clear as possible should be preferred to writing unnecesarily shorter code that does the same.

Yes, clarity is important. That's why we value higher-level abstractions; why did you dismiss them above?

I agree about "claim to resemble human language", but noone's used that argument for at least 30 years.

The reason C syntax is popular is because C is a very good language for learning serious programming skills, as it will obediently perform any awful shit you ask it, then fling it back into your face harshly. It's the fucking drill of programming skills. It has got other qualities, but this one is very important for academical circles.

As a result, most if not all serious programmers had to go through it at some point in their education, and end up reusing its syntactic elements in the event that they design

Otherwise it fails. Two of the most popular languages in existence are Visual Basic and PHP. Math folks and programmers tormented by the hobgoblin of consistency hate both languages. Guess what? It doesn't matter.

Sure, they're inconsistent, oddly constructed and don't support polymorphism (which describes many programmers too, for that matter). Nevertheless, you can get something *done* in jig time and move on with your life. They are languages that are not about the language but the task. In that sense, they perfectly suit the human mind and so they get used again and again.

The big fail of programming languages generally is that nobody thought to combine ease of use with scalability. A programming language should make the most frequently done things trivially easy (e.g. file i/o) and less frequently done things (e.g. serializing and deserializing) possible.

My favorite example of a programming language fail is Powershell. The language is very consistent. It's a consistent pain in the ass. It's picky, prissy and everything has to be done "just so." I use it every day, and I'd like to condemn the developers to a hell where they had to do real system administration with it for eternity.

Two of the most popular languages in existence are Visual Basic and PHP. Sure, they're inconsistent, oddly constructed and don't support polymorphism (which describes many programmers too, for that matter).

Two of the most popular languages in existence are Visual Basic and PHP. Sure, they're inconsistent, oddly constructed and don't support polymorphism (which describes many programmers too, for that matter).

In the beginning it sounded the "the Smalltalk for the rest of us", i.e. objective oriented programming for the UNIX/C crowd. But ObjectiveC was a proprietary language and did not catch with university types. Somewhat open C++ quickly eclipsed it. But the faithful at NeXT, then Apple held on. Now its considered on the most popular develop languages, mainly for iPhone apps.

Some languages fail simply because the creators have chosen stupid names in the age of Internet searches: try searching for one liners or tutorials in 'R' or 'Go' or 'D' and you'll find tons of irrelevant links. I'll make an exception with C since there's simply more stuff out there about the language than about any other use of the letter. Now Brainfuck [wikipedia.org], that's a perfect name for a language.

Except that R is the most popular language for statistics. So the name hasn't been a hinderance at all. And it's pretty easy to find documentation for R. Guess what you get if you search google for "R tutorial" or "R one liners"?

Did you have to go to work with a maths degree to programme your computer?
Did the language get.gov or.edu support e.g. Ada?
Can you do anything you like and zoom ahead or fail depending on your skills? e.g. C
Now you have you Lua, OCaml and MS efforts.
Everyday some gifted project person tries to impress their friends or make a tool just to see if they can in some obscure, free, fast language.
Why do they fail, ahead of their time like Ada or without the awesomer speed and freedoms for C.
Or its just not what all your BBC/Windows/ios using friends had and could help you will, i.e. the herd is fun.

English isn't the world's most spoken language (when you include secondary speakers) for its elegance, consistency or expressiveness. It's a combination of history and politics and power and isolation and culture and grabbing concepts and words and pronunciation from other languages. Languages are the same, some exist practically by being first. Some exist only because they've had large companies like Sun or Java backing them. Others survive because they've been isolated cornering a specific need in finance or science or academia. I remember Java 1.0 and very early Javascript, that the world is now full of Android and AJAX apps is nothing short of a freak of history. Trying to analyze it from the language's qualities alone is never going to give meaningful results.

You got it spot on. One thing you didn't mention was critical mass - once enough people are using a language others will come along and try it (or be forced to use it at work) no matter how good or bad it is and once they're comfortable with it they'll probably carry on using even if there are better alternatives because a learning curve is always more hassle than staying with what you know.

A language succeeds or fails because the company building the language and/or the tools put on a dog and pony show for your company executives. They buy into whatever crap is being sold and programmers wanting a job learn that language.

I wish it was based on merits and how a languages performs certain tasks, but unfortunately the above is true more often than not.

A language succeeds or fails because the company building the language and/or the tools put on a dog and pony show for your company executives.

If that were true, PL/1 would have been a huge success. It had the backing of IBM, which was at the time, the computer company, and was heavily promoted by them, but it was rejected by the market as being too complex and hard to understand. (Ironically, by the standards of today's languages, it was remarkably straightforward, clean and elegant, and if anything, too simple.)

Programming languages succeed or fail by word of mouth and their resulting popularity.

Contrary to what some say, most programmers don't pick a language because it's elegant or simple to use, but because it fits they way they think about programming. And there are as many different ways of thinking about programming as there are programmers.

Some languages like Ruby achieve a critical mass and become "mainstream" languages. Others are equally innovate and capable, but do not achieve that mass, like Erl

Key example: Try converting an array manipulation algorithm to efficient Erlang. It flat out can't be done: Erlang has no good syntax for indexed access of it's lists, forcing you to do a tail-recursive iteration counting through the list elements to get to the one you want. (This fundamental flaw killed the last project I worked on, so it's a pet peeve of an example.)

I have no Erlang experience, but I have experience in other functional languages. A quick Google suggests you should probably have used the 'array' module: http://www.erlang.org/doc/man/array.html [erlang.org]

It doesn't matter what language you're using, you can't make a linked list (for that is what an Erlang list is) have the same performance characteristics as an array. It's not a fundamental flaw. You just refused to adopt the language's core paradigm.

A language generally succeeds if both of those are true. Now ease of use is a moving target; if you're writing system level code, you're not going to want to use a dynamic interpreted language, if you're writing some throw-away script however, dynamic interpreted languages become attractive.

I'm not sure why we even need to ask/answer this question. Languages are just like products of technology. People use them based on their requirements and how po

Doesn't include LISP, which is, of course, the correct answer for everything except serious number crunching.

Not sure if serious...

If you are, then why hasn't lisp taken over?

And the serious number crunching could probably be faster piloted in LISP, at that.

I doubt that. Serious number crunching usually involves lots of simple for-loops which are easy to code in C and often even easier in C++. Infix notation really helps here because then the code looks like maths.

C took off because it allowed imperative programming more easily (and portably) than assembler

Also because its use in the development of Unix meant that it had a huge (by the standards of the time) body of existing code and libraries by the time it was sprung upon an unsuspecting world. The very fact that you could use this portable, (moderately) high-level language for writing a complete OS without abandoning performance was a revelation. And the fact that Unix began invading universities shortly thereafter helped as well.

Since the rise of C, some loose compatibility with C has been a major factor too. When it came to powerful scripting languages, we had Rexx and Perl--and which one had a more C-like syntax? That's right, the one that succeeded, Perl. And Java is notable for it's C(++)-ness too.

It's rarely one or two simple factors, but usually a whole mess of things.

(As for functional programming, I think that's pretty much been a non-issue the whole time.)

I think Perl succeeded because it combined the capabilities of shell and awk into the same language. Before Perl a lot of the scripted utilities people would write were composed of several different scripts combined together; sh, awk, sed, tr, etc.

I think most people with a broad background in different programming languages didn't see Java as anything special. It was just the same old thing with slightly different syntax. Whereas people with basically only a C/C++ background saw Java as enlightenment.