Connecting The Opportunistic Dots

46

 

Something I havetalked aboutextensively recently has been my passion to see opportunistic developers served well on the Linux desktop. These kinds of programmers are people who want to write small, focused, fun little applications that scratch an itch, even if that itch is to have fun. These kinds of developers are having a whale of a time filling the iPhone App Store with scratch-your-itch type of applications, and I am really keen to see more of these kinds of applications on the Linux desktop, and making Ubuntu the perfect platform to develop them on.

We have been seeing a growing movement inside the Ubuntu community in helping to make Ubuntu a rocking platform for opportunistic developers. While all the components are Open Source and can be shipped on any distribution, I am really keen for Ubuntu to really optimize and integrate around the needs of opportunistic programmers and I just wanted to highlight some of the work that has happened here.

In much the same way that Linux/Apache/MySQL/PHP (LAMP) became a popular arrangement of tools for web development, we have been seeing a similar scenario in Ubuntu too, in which a set of tools work well together and are often preferred by developers. These are:

  • Python – a simple, easy to learn, flexible and efficient high-level language.
  • GTK – a simple, comprehensive and powerful graphical toolkit for creating applications.
  • GNOME – the desktop environment that ships with Ubuntu, offering many integration facilities.
  • GStreamer – a powerful but deliciously simple framework for playing back and creating audio, video and other multimedia content.
  • Glade – an application for creating user interfaces quickly and easily, which can then be loaded right into your Python programs.
  • DesktopCouch – a framework for saving content in a database that is fast and efficient, hooks neatly into Ubuntu One and is awesome for replication.

In Ubuntu land we love this framwork. Many of our applications are written using them and this helped make it simple for others to get involved and contribute patches and bug fixes. It has been interesting seeing many folks settle on the same set of tools.

There are of course may other tools and facilities that can augment this list, but this is a common foundation in many applications. Fortunately, all of these ship with an Ubuntu system except Glade, but you can install Glade 3 by using Applications->Ubuntu Software Center.

Many of you will have heard of Quickly which provides a devilishly simple way of generating a new application, hacking on the code, changing the GUI and saving it to bazaar. Quickly also provides some awesome features for uploading the code to Launchpad and releasing your program to others in a Personal Package Archive.

What I like about Quickly is that it automates much of repetition surrounding software development and it ultimately allows you to deploy software to a PPA which people can then download and use. Now, PPAs are a little more complicated to install right now: you need to know what a PPA is, know where to find it, and click a few things or enter some commands to switch it on. Fortunately, the rather awesome Ubuntu Software Center which everyone’s favourite Vogt…Michael Vogt…is developing, is going to be extended with functionality to better support PPAs. This, combined with the ratings and review features coming to the Ubuntu Software Center is pretty rocking. I am not sure of the specifics of how PPAs will be supported, but I believe they will first begin on visibility and then follow up with integration features later. If you want to get started with quickly take a look at this entry.

With Quickly able to get folks up and running with development, I wanted to make it easier for opportunistic developers to get their hands on code snippets and examples to learn from. As such, I created the Acire and Python Snippets* projects. These projects provide a simple means in which you get access to a freely available regularly updated library of examples, across a range of different areas. With Acire you will always have a growing knowledge base of real code that you can read, run and share, and the community works together to regularly add to and support that knowledge base. The response so far has been great and you can read more about this in my previous blog post.

So, at this point we have all the tools needed to build applications, learn from code examples, and publish packages that ultimately will be visible in the Ubuntu Software Center. The one area that neither Quickly nor Acire has particularly served well is improving on how we collaborate together on software. Few Open Source projects have one sole developer, so we really want developers work well together, in conjunction with translators, documentation writers, bug triagers and more.

To do this we have the rather awesome Launchpad and Bazaar which are a doddle to use. Launchpad provides everything you need to work together on a software project and I have become a bit of a Launchpad fan as I have got used to using it. In my earlier days I tried Sourceforge, Trac and other systems, but Launchpad is rocking it for me.

While I love Launchpad and Bazaar, their integration in Ubuntu could have been better. As an example, to get code in and out of Launchpad so you can contribute to a project, you use the bzr command and the process typically works like this:

  • You download some code from the Launchpad project with bzr.
  • You branch the code: this effectively means making a duplicate directory of the code.
  • In that duplicate directory you add a feature, fix a bug or make some other kind of improvement.
  • You then commit your changes to your local branch: this effectively tells Bazaar of the changes you have made.
  • You then upload your branch to Launchpad (this is called pushing a branch).
  • The final step is to propose a merge. This is when you offer your branch and it’s changes to the project maintainer to merge into the main codebase. Launchpad ties together nicely with bzr to handle this process and has a web front end for doing code review.

Now, understanding how all this works and doing it a few times takes a little getting used to, and much of it is learning how to use the different bzr commands and how they hook in with Launchpad. Well, very recently my friend and yours Martin ‘doctormo’ Owens has released his Ground Control project which provides a graphical interface to the whole process by building it into the file manager in Ubuntu. I cannot tell you how bloody cool this is. It works a little like this:

  • You create a Projects directory in your home directory.
  • Click Places->Home Folder and go to the new Projects folder.
  • In there you can see a button to login to Launchpad. Click the button, enter your username and password. Job done.
  • You now see a a button where you can select a project to work on. Click on it, enter a project name, select it and it creates a new folder.
  • Now go into the folder and there is a button to download the code. Click it, select a branch and the code is downloaded.
  • You can now hack on your feature and a button will appear to commit your changes.
  • Finally, you will then see a button to propose a merge. You enter some text to describe your change, and it is uploaded.

No commands. None. What I love about Ground Control is that it is highly contextual: it is built into the file manager and it only ever shows you a button for what you can do at that time. It is simple, quick and Martin has done a wonderful job with it. Go and see a video demo of Martin showing Ground Control here.

Ground Control is still very very new so expect bugs, but do give it a go, report bugs, and importantly, he is looking for help to make sure it has full translations support. If you have done this before, drop him a line. The Ground Control Launchpad project is here.

With each of these components we are seeing more and more gaps in the integration and ease of the development process getting filled. I am hugely excited about this and I am excited about it bringing more and more people to Ubuntu as a development platform and it ultimately generating more and more Free Software for us all to use. We still have a long road ahead though and plenty of good work yet to do. If you think there is a gap you can fill, come and help us rock it.