The Most WTF-y Programming Languages 254
itwbennett writes "A couple of years ago, developer Sammy Larbi undertook a project to identify which languages had the most instances of the string 'WTF' in their GitHub code repositories. At the time, Objective C topped the list. ITworld's Phil Johnson has updated Larbi's research using GitHub data from the last 21 months, but instead of screen-scraping GitHub search results as Larbi had done, he queried the GitHub Archive for stand-alone instances of 'WTF' in the comments attached to GitHub commits to weed out cases where the string 'WTF' was legitimately used in the code. The three most baffling languages for 2012/13: C++, Lua, and Scala. Objective C comes in at #16."
That's easy. (Score:5, Informative)
Re:Bad statistics are bad (Score:5, Informative)
those conclusions are drawn without controling for a language usage. Since c++ is widely adopted so there will be more instances of a comment where "WTF?" is used.
Why don't use a percentage at least? Even if that was the case, the problem remains... a wtf-y language may be the most avoided and/or not present in github
Well, they DID account for it, but they did it all wrong. They counted WTFs *per repository* ...but that makes the assumption that all repositories are of equal size, which they are not. If C++ repositories have more code on average, then that simple fact could account for the increased WTFs per repository, even if everything else was equal.
Oh good grief. (Score:2, Informative)
All of us develop according to the platform. In other words, you want to make a living coding apps, code in Objective -C, C# or Java.
What's the issue here?!
I mean if I had to make a living coding COBOL, I'd do it!
Languages are irrelevant. You want to develop iOS apps - Objective-C. MS apps? Well, you get a break here C# (Java Clone), VB, C++, C, etc ...
Android - C++ and they push you to Java.
Languages are just Syntax - get over it.
Stuck on a language because it's the "best" tool? You are a hack. A computer scientist KNOWS that languages are just syntax and anyone worth their salt can implement their algorithm in ANY language.
Morons.
C++ (Score:3, Informative)
The problem is, most programmers don't. So often, I end up working on spaghetti code written 5 years ago by someone who, for example, thinks inheritance is the solution to all problems, and that private member variables are for sissies.
Also, I wonder how many of those "WTF"s were from people trying to use Windows APIs (don't you just love COM?). That's what consistently causes me the most frustration.
Re:What's wrong with Lua? (Score:2, Informative)
LUA is the scripting language for World of Warcraft.
WoW stores addon data files in the "WTF" folder.
This is more-than-likely due to that.
Re:One for one (Score:4, Informative)
Re:One for one (Score:5, Informative)
PHP is actually a pretty nice language.
No it isn't.
It could have been, if the people who created it had known what the hell they were doing. And it has gotten a lot better in recent years (for example register_globals has actually been removed from the language now), but where they started from was so mind-numbingly stupid that I don't see how they could ever make it actually good, without also breaking it in ways that would make everyone stop using it.
Here's a general rant about how stunningly awful PHP is: http://www.codinghorror.com/blog/2012/06/the-php-singularity.html [codinghorror.com]
And here's a specific and detailed side-by-side comparison between PHP and Perl: http://www.tnx.nl/php.html [www.tnx.nl]
But you're spot-on about the "meta problem": most people who write in PHP have no idea what they're doing, so most PHP code out there is badly written, so if you're learning the language, there's a very good chance that you're learning from someone who didn't know what they were doing.