Yet another programming language popularity list

When discussing programming language popularity, most people point to the tiobe index. But personally I think there are some serious flaws to their method, the main thing being that they arbitrarily decide which languages to track and which to ignore. I've been playing around on stackoverflow lately and noticed today that if you hover on a tag, the site tells you how many followers that tag has. You can also see how many questions are asked under a partucilar language tag. So I decided to create a list of popular languages (or dev environments) on their site and how many followers and questions each languauge has. I included ColdFusion at the bottom for reference.

Name
Questions
Followers
C#
149,600
23,015
Java
100,276
19,136
PHP
89,720
17,279
Javascript
77,954
13,432
jQuery
66,446
13,618
iPhone
64,943
11,086
ASP.Net
64,426
12,812
C++
59,445
13,983
Python
49,209
16.142
Android
43,304
9,983
...
...
...
ColdFusion
1,906
1,202

Is this scientific? No, but it's interesting. That said, I do think it's more scientific that tiobe's, which is based on a secret search results based algorithm. This at least is based on data from a real programmer Q&A community, and a very popular one at that.

JavaScript calculator

A few years ago when I was bored I created a simple calculator (you know, the kind you use to do math problems) in Javascript. I was recently cleaning out an old hard drive and found it, and I thought I would share this Javascript calulator for anybody that might have a use for something like this in your web apps. I don't care to dump all the code in this post, you can view source on the page to see how it works.

Warfish bookmarklets

One thing that has long bothered me while playing warfish is that when creating a tournament (or joining one that lets you invite players), they don't have an option to select all players with zero boots on their record. Well, I finally decided to write a JavaScript bookmarklet to accomplish this. If you drag the one or both of the links below into your bookmarks, when playing warfish and inviting players, if you click these bookmarks all of the players with zero boots (or less than 3) will be selected.

I know most of my readers won't care about this, but I wanted to post it here for future reference.

Warfish: 0 boots

Warfish: >3 boots

Embrace JavaScript and SQL

I have always been puzzled by many web developer's reticence to learn and fully take advantage of JavaScript and SQL in their applications. I know many people are comfortable with these languages and use them frequently, but I often run into people that say something like this: "I HATE JavaScript and I avoid it at all costs", or this: "I never really learned SQL, and anytime I need to do anything complex I ask my SQL guru friend."

[More]

Deselect all items in a Select List

Say you want to have a "unselect all" button for a select list, how would the JavaScript work? I just spent too long trying to figure out how to do this in IE. As usual, I got it to work in Firefox right away, but IE doesn't work the same way.

[More]

Speed up page loads, defer your JavaScript

A coworker of mine showed me something today that looks interesting. Say you've got a page with a lot of client site JS code that runs AFTER the page is loaded. Things like form validation, Ajax functions, stuff like that. Well, apparently you can add a defer attribute to your script tag, and the browser will not load the JS file until AFTER the page has been fully loaded and displayed to the user. With JavaScript heavy sites, this could dramatically decrease page load times. Here's an example:

I am not sure if this works in all browsers, and I'm not sure if it causes any problems. If anybody has any experience with this, please drop me a comment.

You can do that with JavaScript?

I saw this blog entry today on digg that highlighted 5 cool apps written entirely in JavaScript. There are 3 games, including an FPS engine demo (without any shooting or enemies, but still very impressive). Also, a cool soccer game. I had no idea this kind of thing was possible with JS. I thought you'd need something like Flash or Java. This makes me much more excited about some of the ideas I've had lately, but I still don't know if I'll have enough ambition to do them...maybe I'll stick with my simple ColdFusion projects. :)

See what server software any site is running

Often times I wonder what web server and/or operating system a website is running. I usually just go to Netcraft and use their "What's that site running?" tool. But since I'm lazy, I decided to write a bookmarklet to make this easier. Now I just have to click my Scope Server bookmarklet when on the site in question, and I get Netcraft's site report.

This doesn't always work. The reason that Netcraft's spiders can find out what software a server is running is because the data comes back in the HTTP headers. But the server admin might chose to turn that off, in which case Netcraft returns 'Unknown'. But in my experience, 99% of the site's I try return the data I'm after (using Netcraft's tool).

If you want to do this yourself, just drag this link up to your tool bar, or bookmarks folder: Scope Server, or right click it and add it to your bookmarks.

By the way, Netcraft also publishes a monthly web server survey that I like to watch. Right now Apache is at about 61% while MS IIS is about 30%. One thing that bothers me about Netcraft's survey's is that they don't do any data cleaning. There are millions of sites parked at hosts like GoDaddy, with no web site. Netcraft counts these, and if I were making these reports I'd try to filter that kind of stuff out.

JavaScript isNumeric function

The other day I needed to check a value to make sure it's numeric, using JavaScript (it was an Ajax app). I poked around online and a few sites said that JS doesn't have such a function. I also found a few sites that offered an isNumeric function, but most of them didn't check for decimals and/or negatives. So I created my own using a Regular Expression:

function isNumeric(x) {
// I use this function like this: if (isNumeric(myVar)) { }
// regular expression that validates a value is numeric
var RegExp = /^(-)?(\d*)(\.?)(\d*)$/; // Note: this WILL allow a number that ends in a decimal: -452.
// compare the argument to the RegEx
// the 'match' function returns 0 if the value didn't match
var result = x.match(RegExp);
return result;
}