Saturday, August 15, 2009

StackOverflow Experiment Results

Thanks to many of the StackOverflow.com users for pointing me to the official data dump, available here, I was able to complete my experiment.

I measured, using the number of questions asked containing a specific tag, the activity of various programming languages throughout the week. My hypothesis is: Newer dynamic languages like Ruby and Python will see a rise in questions ask
ed on the weekend while more corporate languages like C# and Java will see a dropoff in activity on the weekend.

My theory is that programmers choose to use languages like Python and Ruby for their personal projects, despite their weaknesses, because these languages are more fun to program in. Since programmers tend to work on these projects at night and on the weekends, they will probably be asking questions related to their projects during these times.

Fortunately, the results supported my hypothesis. A plot (made u
sing Python) of the relative number of questions asked per day of the week is shown below. The values were computed by calculating the percentage of questions asked for each topic relative to the total number of questions being asked. This controls for the overall drop in traffic to Stackoverflow.com on the weekends.

Python and Ruby both have a sharp rise on the weekend, while C# and Java both fall off. The fall of C# is quite a bit more pronounced than that of Java, but the effect is still clear. Another interesting note is that the two "workweek languages" both have a rise in activity on Mondays. Maybe programmers leave work Friday and continue to mull over problems at work during the weekend, then ask their problems early Monday morning.

Even though the relative activity of Python and Ruby rises on the weekend, it is still important to note that C# still sees activity around three times higher. This shows that there are still more people using C# than Python on the weekend, just not as many as during the week.

I'm not too sure exactly what the implications of these results are. Let me know what you think.

50 comments:

Gian said...

(I already posted this on the thread on HackerNews, but I decided to add it here as well for the purposes of discussion):

This seems to assume a fixed number of programmers, all of whom program during the week and at the weekend.

My guess would be that it's much more likely to be two largely disjoint sets:

Professional programmers at work during the week, and amateur programmers who have other day jobs (e.g. school or non-programming jobs) who are more likely to be programming during the weekends.

If we assume that this is the case, then the data simply suggests that professional programmers are more likely to use C# and Java, whereas hobbyist/amateur programmers are more likely to use Python or Ruby.

This is just a hypothesis, but it is equally well supported by the data as the article's hypothesis:

"programmers choose to use languages like Python and Ruby for their personal projects, despite their weaknesses, because these languages are more fun to program in"

Which assumes that all professional programmers are also hobbyist programmers in the weekends, and that the numbers of amateur programmers are not significant enough to make an impact on search statistics.

Benjamin Nortier said...

I would like to disagree partly with the statement that "programmers choose to use languages like Python and Ruby for their personal projects, despite their weaknesses, because these languages are more fun to program in"

Firstly, which "weaknesses" are being referred to?

Secondly, I think weekend programmers prefer languages such as Python and Ruby because they are more powerful and more productive. If you're using your free time to program, you are more likely to use something that gets you to your goal more quickly, because you're not being paid for it and your spare time is more precious than work time.

Gian said...

"I think weekend programmers prefer languages such as Python and Ruby because they are more powerful and more productive"

Oh dear. That's rather fuzzy. By what metric?

Unknown said...

there seem to quite a large set of assumptions built into your analysis here. But others here and on HN have commented on that. I'm just amazed at some of the data choices in the dump, Tags especially.

Jeff said...

I think weekend programmers choose Ruby or Python because they get to choose what they want. In the "enterprise" world, programmers don't usually get to make their own choice. Managers assume Java or C# is the only answer.

Unknown said...

Hi Dan,

Here's another factor:

Seed-stage and angle-funded web startups often use PHP, Python, and Ruby. The folks involved frequently work through weekends. This is also often true of VC web startups, though there are fewer of them.

Also, weekends are the time when curious developers invest personal time to learn new things. We should expect to see an uptick in "alternative" (from the perspective of corporate software work) language use.

Benjamin Nortier said...

Thanks for pointing that out.

What I was trying to say is that the users may *perceive* them to be more powerful or productive, hence part of the reason for using them in their spare time.

Perception is fuzzy by nature.

Dan Lorenc said...

Thanks for the comments everyone. I also agree that there are many other factors to consider here, I was just pointing out a couple possibilities.

@jamew: What would you suggest doing differently, instead of measuring tags?

Unknown said...

+1 @jocknerd I agree here, it has little to do with the "strengths" of the languages as much as managers and the target audiences of the projects. Hobbyists use what they prefer at home. I, for instance, work in a C# company that uses WPF because for the history of our company we've always written in the C family and primarily for MS based platforms. I however use Python for my home projects for similar reasons others have made. I do not find it l weaker than C# so I am also curious on your basis for this claim.

Unknown said...

Benjamin@
By a "weakness" probably is a performance. Python is very slow in compare to Java and is bloated, taking lots of memory at runtime. It is fun to have Python's syntax sugar, but not fun when the at final result the thing does not scales (remembering Zope-2 and Zope-3 nightmare)...

By saying "Python and Ruby more powerful and more productive than Java/C#" — is a plain BS and I don't buy it, sorry. Java — is a C++ done right. If you talking about syntax, I could agree: using VIM/Python you will be nearly as same productive as someone with NetBeans/Java. However, again, the final result will be very different: apart regular mainframes and huge clusters, Java may also run embedded in a smart card or your dishwasher, while Python looks quite ridiculously by a performance, possibilities and resource consumption. I would say Java just simply misunderstood and also bastardized by stupid heavy frameworks, where lots of them are not fun, but a nightmare.

At enterprise I used Python for a core part and the thing is online for 7 years with no major problems. I think, hobbyists taking Python mostly because you can toss up a shoddily done result per 20% of week time, that also satisfies 80%. When fun is over, you do your job which brings you money: Java.

Besides, I am pythoneer for a long years and probably may write a book about it, using it since very old 1.5 version, so no holywar here, please. :-)

Benjamin Nortier said...

@Bo
I don't want to start a flamewar here so please excuse me if I don't reply directly to some of your statements :)

I regret using the word powerful now, since it is very subjective. It can mean so many things in so many different situations.

But I will stick to my assertion around productivity. I believe spare time coders would choose a language that (they believe) will get things done as quickly and efficiently as possible. I don't think it would be more "fun" to use something that actually takes you longer than you would expect from your working-week experience.

Some more data would be useful.

@Dan
Perhaps StackOverflow could do a survey around programming languages? It would also be quite interesting to compare results with and without weighting results according to reputation...

UberTeorist said...
This comment has been removed by the author.
UberTeorist said...

A few points you might want to consider

Assuming the number of page views per day represents the number of programmers per day seems dangerous!

Secondly, there are too many factors to consider for the data to be significant in showing any correlation (much less causation) in any of them.

Some questions the data might raise:

Is the content of the site homogenous for all languages? (probably not)

Are all languages prone to the same kind of questions that find answers in the site? (probably not)

Are the programmers' programming experience similar across languages? (probably not)

Is google ranking the results to questions in the same way for all languages? (no idea)

The only thing the data tells you is that on weekends the number opened pages concerning java and c# drops a bit and the number of opened pages concerning python and ruby goes up.

That is already interesting but any other inference from this data alone looks a lot like speculation.

Anyway, raising more question is already pretty good!

ET said...

People who ask questions are typically the beginners. Having more questions about Ruby and Python at the weekend probably just means that people are spending their free time trying out new languages that aren't officially taught.

You can get no conclusion about fun, because most likely people who find a certain language fun are already familiar enough with it to ask few questions.

Unknown said...

@Benjamin
Yes, been also a python hacker, I agree that Python syntax is way more simpler than verbose Java. This was one of the main kicks I used 8 years ago against Java. However, time changes and now having awesome NetBeans IDE and Java 6, I can not say anymore that Java is sluggish crap, requiring tons of XML. Not anymore: you have annotations and you can do things with literally zero of XML and productivity basically same.

The only value Python has over Java — syntax. It is really neat and sweet. Thus I think Python is a perfect match to replace fugly Perl. Python is fast enough, understandable and has enough libs to do so.

But why I do reject code in Python web stuff? Because I believe WSDL rules over REST, especially at enterprise. Try do WSDL in Java or C# (piece a cake) and Python (a true hell in its hardcore). OK, try to write MP3 or video player in a pure Python. D'oh!, look at performance TTF fonts parsing in ReportLab!.. So that's why Python is completely different than Java: Python does more like a glue between C/C++ libs (hence is hardly portable), while Java tries to do everything by itself (very easily portable at result).

An example: you wrote your PyQT stuff as twice faster as I did. OK. Now look what you've got: Py2App or Py2Exe made a 100M program!!! While I can get a GNU/Classpath, take a CacaoVM and still get smaller than you do!

Python is also more bloated: it is as twice as bigger at footprint by default in Mac OS X, because they simply add all the required features, like wxWindows (forget tkinter crap), Twisted etc. Don't forget that Java comes with multimedia/sound/video, 3D, 2D support, GUI (swing) and your socks washer. :-)

Unknown said...

what, no perl?

Gary S. Weaver said...

Indeed.com job trend comparison of Java vs. C# vs. Ruby vs. Python

Ankur Kapil said...

thanks a lot.....
http://www.indian-premier-league-2010.blogspot.com

Ankur Kapil said...

thanks a lot........
http://downloadfreemoviefree.blogspot.com

Pradeep said...

nice its is.
download latest 2011 hollywood movies free from freemovietag.com

Curruption said...

nice blog.....u can Movies Download Free form mine site.... http://a2zhollywoodmovies.blogspot.com

Anonymous said...

Thanks, this is generally helpful.
Still, I followed step-by-step your method in this Java online training
Java online course

Techystick said...

modular lab furniture
world777 agent
class 9 tuition classes in gurgaon
Ajmer road best Project
cloudkeeda
what is azure
azure free account
azure data factory

Tech Bharat said...

C# and Java, being popular among professional programmers, often find their place in enterprise environments, where performance, scalability, and strict coding practices are crucial. These languages offer a robust framework and a wide range of applications, making them ideal for large-scale projects like Visit King Exchange!
and established organizations.

Tech Bharat said...

C# and Java, being popular among professional programmers, often find their place in enterprise environments, where performance, scalability, and strict coding practices are crucial. These languages offer a robust framework and a wide range of applications, making them ideal for large-scale projects like King Exchange
and established organizations.

Tech Bharat said...

The recent release of the StackOverflow Experiment Results has shed light on the remarkable power of collaboration within the programming community. This groundbreaking study not only reaffirms the significance of StackOverflow as a go-to platform for developers but also provides valuable insights into Tiger Exchange!
and of knowledge sharing and problem-solving in the digital age.

techburner said...

What a fascinating read! This article had me hooked from the very beginning. The way the information was presented made it such an enjoyable experience. Well done! our website is silver exchange signup

Akanksha Gaur said...

Superb post! Your observations are insightful and clearly stated. I appreciate you offering such thought-provoking material. Continue your fantastic effort! If interested look into Power BI Training

techburner said...

I can't express enough how much I enjoyed reading this article. The author's writing style is engaging, and the content is informative. I'm definitely coming back for more! vist at taj777

techburner said...

Thank you for shedding light on this important issue. It's encouraging to see more people speaking out about topics that are often overlooked.make id in sky exchange id

taj777 casino said...

Your post has not only educated me but also inspired me to take action. Thank you for empowering your readers and reminding us that we all have the power to make a difference.
radheexch

taj777 casino said...

I am truly thankful for the professionalism and commitment to excellence that you exemplify in your blogs. Your dedication to delivering comprehensive and insightful content is truly appreciated. visit at radheexch

techburner said...

Your blog consistently delivers high-quality content. I'm always excited to see what you'll write next! play one season at Matchbox9 Betting

techburner said...

I admire how you inject creativity into every piece you write. Your unique voice sets your blog apart and makes it a joy to read. create it from Silver Exchange Create Account

James Millere said...

Hi,
This is really informative article thanks for sharing this Salesforce Admin Course

Rudraksh Joshi said...

"Your blog has given me such insightful information on the subject that it has deepened my understanding. Thank you for sharing!"
Mulesoft Certification

Rudraksh Joshi said...

"I really enjoyed reading your blog post; it was very well-written and extremely informative."
Mulesoft Training

Rudraksh Joshi said...

I adored your blog post very much! Your observations are so insightful and energizing. It's obvious that you spent a lot of time and effort writing and researching this essay. Your writing is interesting and simple to read, making even difficult subjects seem understandable. Readers like myself who are looking for insightful and well-informed information appreciate you sharing your expertise and viewpoint on this subject. Hopefully you'll write more informative stuff in the future. Continue your excellent job!
CCSP Course

Rudraksh Joshi said...

We appreciate your commitment to producing informative and thought-provoking content. I now consider your blog to be a wonderful resource, and I anxiously anticipate your upcoming posts. Continue your excellent work!
CCSP Training

Rudraksh Joshi said...

I appreciate you spending the time to share your knowledge and skills. You have not only increased my knowledge of [subject] but also my interest in it. Keep up the great work, and I'm looking forward to your upcoming posts!
CCSP Certification

Rudraksh Joshi said...

Great great post; it definitely improved my understanding of the subject.
SAP Analytics Cloud Certification

Rudraksh Joshi said...

This blog definitely opened my eyes to new perspectives, and I couldn't agree more with what you said.
SAP Analytics Cloud Training

Rudraksh Joshi said...

This blog piece was well-written and really interesting, and it made me hungry to check out more of your stuff.
Salesforce CPQ Course

Rudraksh Joshi said...

"Great post, I found it to be really insightful and stimulating!"
Salesforce CPQ Training

Go India Tour and Cabs said...

Go India Tour and Cabs leads in providing Taxi service in Jaipur that offers the most luxurious and reasonably priced taxi trips in world-class vehicles. We offer cab in Jaipur travel, outstation trips, weddings, corporate events, airport services, and sightseeing in Jaipur.

funexcrypto said...

supportfly
leasepacket

reddyannaexchange said...

This platform consistently delivers remarkable insights! Each blog post showcases a profound understanding and genuine enthusiasm for the subject matter. Keep up the outstanding work. Moreover, for an exhilarating experience, I recommend checking out Reddy Anna Club , an online investment platform that adds a thrilling dimension to your entertainment. Take a leap and discover where opportunity leads you!

king exchange id said...

C# and Java are frequently favored by professional developers, particularly in enterprise settings where performance, scalability, and adherence to rigorous coding standards are paramount. These languages boast robust frameworks and versatile application possibilities, rendering them well-suited for expansive projects such as Visit King Exchange! and within well-established companies.

king exchange id said...

Your dedication to creating informative and stimulating content is truly valued. I now regard your blog as an invaluable resource, eagerly anticipating your future posts. Keep up the outstanding work! betbhai9

king exchange id said...

Hi,
This is really informative article thanks for sharing - ( D247 )