Social programming should be a feature of a language

Social programming

In this blog post I will argue that future programming languages should focus on the social aspects of programming and be more democratic (especially when it comes to the standard library).

History and trends

In 1995 Perl launched CPAN, which is a Perl repository that holds thousands of Perl modules and their documentation. CPAN is a great success and one of Perl's greatest strengths. It even holds some "social" aspects such as rating modules.

Python and Ruby have tried to copy CPAN, but their attempts are not that social in nature and not that good overall, but they do enable developers to quickly push out their packages and for developers to quickly install packages.

In the recent times we have seen the rise of GitHub, BitBucket, Google Code and lots of other projects that make programming more social and that enable easier collaboration between developers.

The bottom line is that programming is getting more social, it's relatively easy to push out packages and Perl, Ruby and Python have great success with their packaging platforms.

Lacks of the current platforms

I'll take Python as an example of the current problems. Python lacks can be applied to other languages as well. In my example I want to find a template library for Python.

I search for "template" on Python Package Index:

The results as you can see are mostly useless. Mako, which is one of the great template systems, has a score of 1. Jinja, another great template system, a score of 3. Other unknown template libraries and tools a score of 5+. Useless!

But that's really the beginning. PyPi is pretty horrific for any kind of collaboration. If I fetch a package I don't have a clear path on how to send back my patches, patches that could be useful for other developers. I don't have a clear path on how to report bugs, bugs which other developers might be experiencing. I don't have an overview of what current patches there exists or what bugs are currently present or have been fixed.

The general presentation of the system is pretty bad as well. Why not keep a track of which developers maintain which packages? Or have a reputation system? So if Joe is really active and really helpful, then the system should figure out that Joe should have a high reputation - others can then judge projects based on the reputation of the project and its developers. A reputation system would also introduce a competitive aspect, which could fuel innovation and improve quality.

The social platform

The idea of the social platform is to create a platform where developers can collaborate and a platform that promotes quality software. CPAN, Ruby Gems and Python Package Index are early versions of this vision and they need to become more social to become more useful. The social platform should be applied to the core libraries as well and not just be used for the external libraries. A language's standard library should be a democracy where the best and most used libraries win - and not like now, where libraries win by being selected by a few dictators!

Essentials of this platform are:

  • Easy distribution: It should be easy to push out modules to the platform.
  • Easy forking: It should be easy to fork modules, to apply patches and to send patches back. Using something like git or mercurial is a must.
  • Reviews and a reputation system: The platform should have reviews, but also reputation, something like Stack Overflow's excellent reputation system. I.e. a system where helpful developers are rewarded for their hard work.
  • Search and discovery: It should be easy to find modules you are looking for and to compare modules. If I am looking for a template library, then I might want to sort template libraries by how many others are using them.
  • Fully integrated into the language: This platform should be fully included in the language and ship with the language. The signup process to get on the platform should be very easy.
  • Trac like features included: This platform should include tickets, timeline of changes and a basic wiki.

Most of these pieces are partially implemented, especially in products like GitHub and BitBucket. What is needed is a much better integration with the languages. The bottom line is that languages should embrace "social programming" and implement a platform similar to GitHub/BitBucket that enables developers for easy collaboration.

Code · Design · Python · Stuff 28. Oct 2009
7 comments so far

You might also want to check what we're doing in Haskell land, with the meritocracy-based Haskell Platform http://hackage.haskell.org/pla... , the free-for-all centralized library system http://hackage.haskell.org/pac... - (1600 libraries in 2 years!) and the distribution and resolution system, Cabal: http://haskell.org/cabal/

The underlying philosophy, to ensure maximum sharing of resources, and merit-based use, was discussed recently at the implementors' workshop: http://www.vimeo.com/6571975

The final piece will be to merge http://patch-tag.com with Hackage to allow easy forking.

Note, making installation easy was the key, with an apt-like dep resolver, so that, e.g.

cabal install xmonad

will find all dependencies, build and install them, on any OS or distro.

I agree, the Python community should just pick GitHub, BitBucket or even Google Code as the official PyPi replacement and start putting all actively developed libraries there.

Don:
Haskell's system seems to be very similar to Perl's CPAN, Python's PyPi and Ruby Gems. In Python the installer is called easy_install and in Ruby it's called gem, one can install packages by doing following (this will handle dependencies and build C-extensions etc.):

  • easy_install mako
  • gem install rails

What I am arguing in this post is to take it a step further and make package platform more social and more collaborative. In Haskell's case it would be to:

  • create a reputation system
  • make it possible to review packages
  • make it possible to easily fork modules, GitHub/BitBucket's fork implementation is brilliant
  • make it possible to report bugs and to see reported bugs
  • have a documentation system (something similar to CPANs)

Having a basic packaging system is good, but having a packaging system that fuels collaboration and competition is even better.

@amix

Yep, I agree with you. The video I linked to is a discussion of the future of Hackage, in particular, reputation/ratings/a wiki system and reviews.

Don:
Great. Looking forward to read and see more of Haskell's platform! :)

I've started working on a Python package management tool called Gorilla and it hits some of the points you mention (it uses Mercurial (for now) to pull down packages, for example).

The BitBucket pages have a lot more information if you're curious.

Post a comment
Commenting on this post has expired.
© 2000-2009 amix. Powered by Skeletonz.