Python or Ruby: 6 Months on Hacker News

Front-page presence of Python and Ruby articles on Hacker News for the last 6 months.

Front-page presence of Python and Ruby articles on Hacker News for the last 6 months.

I teach high school math and science, and over the last couple years I have started to teach an Introduction to Programming class.  This past spring I decided to reassess whether I should continue to base this class in Python.  I wrote a script to examine the presence of Python and Ruby on the front page of Hacker News, and the results of this investigation led me to stay with Python.  The script I wrote has been running for six months now, so I decided to take a look at the results once again.

I want to make sure I continue to teach a language that gives students a solid grounding in modern programming concepts and practices, not just whatever language I know best.  I was originally prompted to reexamine my language choice after noticing a bunch of job postings for Ruby developers.  I wondered if I would be giving my students better career prospects if I started them off in Ruby.  After the original investigation, I decided to stay with Python for a variety of reasons.

Python dominates Hacker News

If we look at the hourly graph of Python and Ruby articles, we can see that Python has consistently been more present on HN than Ruby:

Front-page presence of Python and Ruby articles on Hacker News for the last 6 months.

Front-page presence of Python and Ruby articles on Hacker News for the last 6 months.

The biggest spikes in presence are Python-related articles, and overall the most present articles are Python-related.  Ruby is not disappearing, but Python articles continue to generate more interest and more discussion on HN.

The daily graph of Python and Ruby articles also shows how much more interest there is in Python.  During the initial four-week period, two of the top five articles were about Ruby.  Over the last 6 months, however, all of the top 10 articles were about Python.

The daily graph of all articles is really dense over this time frame, but it is at least interesting to look at visually.  In this representation, the most significant articles on any topic appear at the bottom of the graph each day.  We can easily see that Python articles (in green) appear more often and closer to the bottom of the graph than Ruby articles.  This graph would be more meaningful to do with a weekly grouping of articles, but I will leave that as an exercise for the one-year mark.

Conclusion

I learned enough from the original four-week investigation to be confident in basing my Introduction to Programming class on Python for the foreseeable future.  I will continue to read about trends in programming languages and be open to re-evaluation, but Python has so much momentum in so many significant fields, that it is hard to imagine it being a less worthy starting language in the near future.

I will probably revisit this project once more at the one-year mark, and play around with the visual representations one last time.

Advertisements

About ehmatthes

Teacher, hacker, new dad, outdoor guy
This entry was posted in programming and tagged , , , , , , . Bookmark the permalink.

2 Responses to Python or Ruby: 6 Months on Hacker News

  1. Lincoln says:

    There may not be an engineering shortage if people like you were common. A large percentage of experienced developers think younger developers should “apprentice” with them and learn whatever technology they employed for maximum success (no matter how long ago). This level of outlook on what truly benefits a student programmer is remarkable. Starting out – they will not be able to appreciate much “syntactic sugar”, not having suffered through C and Java. Also consider Javascript (easiest to run and jump into interativity, color, events and games. also becoming more popular in intro and Community College level introduction I here) and Lisp-like languages (similar to Algebra) I have seen these used with great success by http://www.bootstrapworld.org/

    • ehmatthes says:

      Thanks for the kind words! You might be surprised to hear how much students do appreciate being exposed to Python. My most interested students have recognized on their own, usually sometime in middle school, that they were more interested in creating games than playing games. So they begin trying to learn programming on their own, and they find things like javascript and c++, and they make some progress but don’t end up completing anything. Then I introduce them to Python, and in about two weeks they are having more fun with programming than they’ve ever had.

      Thanks for the other suggestions as well.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s