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:
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.
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.