Canonical Voices

Posts tagged with 'development'

pitti

I released PyGObject 3.3.4. This is mostly a bug fix only release to fix existing API. Highlights are that lists of GVariants and other corner cases are now working correctly when being passed from C to Python, and that calling help() on a GI module now does something sensible.

Thanks to all contributors!

Complete list of changes:

  • pygi-convert.sh: Drop bogus filter_new() conversion (Martin Pitt) (#679999)
  • Fix help() for GI modules (Martin Pitt) (#679804)
  • Skip gi.CallbackInfo objects from a module’s dir() (Martin Pitt) (#679804)
  • Fix __path__ module attribute (Martin Pitt)
  • pygi-convert.sh: Fix some child ? getChild() false positives (Joe R. Nassimian) (#680004)
  • Fix array handling for interfaces, properties, and signals (Mikkel Kamstrup Erlandsen) (#667244)
  • Add conversion of the Gdk.PropMode constants to pygi-convert.sh script (Manuel Quiñones) (#679775)
  • Add the same rules for pack_start to convert pack_end (Manuel Quiñones) (#679760)
  • Add error-checking for the case where _arg_cache_new() fails (Dave Malcolm) (#678914)
  • Add conversion of the Gdk.NotifyType constants to pygi-convert.sh script (Manuel Quiñones) (#679754)
  • Fix PyObject_Repr and PyObject_Str reference leaks (Simon Feltman) (#675857)
  • [API add] Gtk overrides: Add TreePath.__len__() (Martin Pitt) (#679199)
  • GLib.Variant: Fix repr(), add proper str() (Martin Pitt) (#679336)
  • m4/python.m4: Update Python version list (Martin Pitt)
  • Remove “label” property from Gtk.MenuItem if it is not set (Micah Carrick) (#670575)

Read more
Marcin Juszkiewicz

Day has started as usual. Looked at my Google+, Facebook and Twitter streams and noticed new toy: ODROID-X developer board from HardKernel.

Is it interesting board? Yes, it is:

  • Quad core Exynos4412 CPU (ARM Cortex-A9)
  • 1GB ram
  • 6 x High speed USB2.0 Host port
  • 10/100Mbps Ethernet with RJ-45 LAN Jack
  • Audio codec with headphone jack and microphone jack
  • (micro)HDMI output with audio

Open Exynos4 Quad Mobile Development Platform

As usual some things to complain about:

  • 1.8V serial console with own connector (15USD for cable)
  • microHDMI connector when normal HDMI would fit
  • no Serial ATA (Exynos 4210 has controller, no docs for 4412)
  • 2GB ram would be lovely (Samsung Galaxy S3 has it in Korean version)

Anyway looks like during month I will check does someone from friends wants to buy it and get one for myself. May be good replacement for Pandaboard and/or MX53 Quickstart.


All rights reserved © Marcin Juszkiewicz
ODROID-X developer board was originally posted on Marcin Juszkiewicz website

Read more
Laura czajkowski

Location: Flexible. If home based, reliable broadband connectivity required.

Role Summary

Do you want to be one of the engineers building the infrastructure at the heart of the cloud revolution?

At Canonical we’re developing technologies that are key to the transition to the cloud, with Ubuntu as the number one cloud operating system. We are looking for a fun, talented software engineer whose ingenuity, self-motivation and engineering skill have contributed to a shining track record of successful projects.

Alongside four or five other engineers, you’ll be part of an agile engineering squad, in Canonical’s Launchpad team, working in either a new development or maintenance role on a different cloud-related project every six to nine months. Your work will touch projects such as OpenStack, MAAS, AWSome and the Launchpad SaaS developer tools platform.

To succeed you’ll need to share our love of hard work and our passion for free software, Ubuntu and the cloud.

Your energy and enthusiasm will be key to delivering the project, and to making the squad fun to be a part of.

Key Skills and Accountabilities

  • Develop new features in existing web or cloud applications or even start new ones from scratch.
  • Participate in the maintenance of the portfolio of applications maintained by the Launchpad team (a group of six development squads).
  • Collaborate within a small team of four to five engineers to design and deliver agreed features on an established schedule.
  • Ensure high quality results from across the team by participating in established team practices such as code review and testing.
  • Maintain readable developer-oriented documentation.
  • Coordinate regularly with the rest of the Launchpad team.

Required Skills and Experience

  • You have extensive experience in development of web applications using a major object or oriented application framework
  • You are proficient with the technologies powering the web such as Python, HTTP, HTML, CSS and JavaScript
  • You live and breathe open source technology.  You know the industry, understand the community and share the ideals.  You know your OpenStack from your intel, your ARM from your aaS and your Bugzilla from your Git
  • You are well experienced with at least one web application framework, such as Rails, Django, Zope/Plone, Pyramid, Turbogears, Web Objects, etc
  • You are well experienced with at least one JavaScript library/framework such as YUI 3/2, jQuery, Dojo, MooTools, or Prototype
  • You love easy to use software and pay particular attention to making your applications a joy to use
  • You have created stellar user interfaces using JavaScript, HTML and CSS
  • You’re skilled in object-oriented programming in the Python language
  • How people solve complex problems in software fascinates you.  You also know that reliable and maintainable code are essential to long-term success.  You’re familiar with writing about what needs to be done, as well as test-driven development and other “agile methods
  • You have strong spoken English communication skills, and can communicate clearly in writing, including email and IRC environments.
  • You have a good sense of humour and enjoy building a fun working environment with your colleagues.
  • You are willing to travel internationally, for periods of one or two weeks and occasionally longer, for conferences, developer-oriented meetings and sprints

Desired Skills and Experience

  • You are familiar with interaction design and have contributed to the user interface of a leading web application.
  • You have built and managed a community around an open source project
  • You have contributed code to an open source project
  • You understand the basics of one or more of the following:
    • laaS platforms such as OpenStack, AWS, Eucalyptus
    • Ubuntu Server, particularly in cloud contexts
    • ARM server
    • Services Oriented Architecture
    • Message-passing systems
    • Distributed version control systems
    • A form of Linux packaging, such as .deb or .rpm
  • You are familiar with Agile/Lean development practices
  • You enjoy exploring new languages like Go, Haskell or Clojure
  • You have system programming experience in C
  • You worked as part of a distributed software engineering team and can demonstrate the self-motivation and discipline required in such an environment

Apply online, or talk to us in #launchpad-dev if you want to see what we do!

Read more
pitti

I just received confirmation that my request for a PyGObject hackfest has been approved by the GUADEC organizers.

If you are developing GObject-introspection based Python applications and have some problems with PyGObject, this is the time and place to get to know each other, getting bugs fixed, learn about pygobject’s innards, or update libraries to become introspectable. I will prepare a list of easy things to look into if you are interested in learning about and getting involved in PyGObject’s development.

See you on July 30th in A Coruña!

GUADEC Badge

Read more
pitti

I released PyGObject 3.3.3.

The most notable changes are that you can now access methods (and other identifiers) which are Python keywords, PyGObject automatically escapes them now by appending a ‘_’. For example, you can now call myGdkWindow.raise_() or GLib.Thread.yield_() instead of having to resort to the previous workaround getattr(myGdkWindow, 'raise')().

This version also restores the deprecated get_data() and set_data() methods. They were never really meant to be used from Python programs, they can potentially mess up your program and cause crashes, and do not give you anything that regular Python object properties would not already provide in a much safer way (i. e. just write my_obj.foo = 'bar' instead of my_obj.set_data('foo', 'bar')). Apparently some software projects are using them, so they will now raise a deprecation warning and be removed for the GNOME 3.8 cycle instead.

Thanks to all contributors!

Complete list of changes:

  • Remove obsolete release-tag make target (Martin Pitt)
  • Do not do any python calls when GObjects are destroyed after the python interpreter has been finalized (Simon Schampijer) (#678046)
  • Do not change constructor-only “type” Window property (Martin Pitt) (#678510)
  • Escape identifiers which are Python keywords (Martin Pitt) (#676746)
  • Fix code for PEP-8 violations detected by the latest pep8 checker. (Martin Pitt)
  • Fix crash in GLib.find_program_in_path() (Martin Pitt) (#678119)
  • Revert “Do not bind gobject_get_data() and gobject_set_data()” (Martin Pitt) (#641944)
  • GVariant: Raise proper TypeError on invalid tuple input (David Keijser) (#678317)

Update:Just released 3.3.3.1 to fix a regresssion from the keyword escaping patch. It also escaped enum and flags names, but as they are translated to upper case they are never keywords.

Read more
pitti

I just released PyGObject 3.3.2, (almost) in time for tomorrow’s GNOME 3.5.2 release. No API breaks or new features this time, just lots of bug fixes and some minor API completions. My personal favorite is making closure calls work with GVariant arguments, which I finally figured out after over half a year; this finally unblocks making GDBus fully introspectable with not too much additional work, only that in the meantime dbus-python was ported to Python 3 so that the need for it is actually a lot smaller now.

Thanks to all contributors!

Complete list of changes:

  • foreign: Register cairo.Path and cairo.FontOptions foreign structs (Bastian Winkler) (#677388)
  • Check types in GBoxed assignments (Marien Zwart) (#676603)
  • [API add] Gtk overrides: Add TreeModelRow.get_previous() (Bastian Winkler) (#677389)
  • [API add] Add missing GObject.TYPE_VARIANT (Bastian Winkler) (#677387)
  • Fix boxed type equality (Jasper St. Pierre) (#677249)
  • Fix TestProperties.testBoxed test (Jose Rostagno) (#676644)
  • Fix handling of by-reference structs as out parameters (Carlos Garnacho) (#653151)
  • tests: Add more vfunc checks for GIMarshallingTestsObject (Martin Pitt)
  • Test caller-allocated GValue out parameter (Martin Pitt) (#653151)
  • GObject.bind_property: Support transform functions (Bastian Winkler) (#676169)
  • Fix lookup of vfuncs in parent classes (Carlos Garnacho) (#672864)
  • tests/test_properties.py: Fix whitespace (Martin Pitt)
  • gi: Support zero-terminated arrays with length arguments (Jasper St. Pierre) (#677124)
  • [API add] Add GObject.bind_property method (Simon Feltman) (#675582)
  • pygtkcompat: Correctly set flags (Jose Rostagno) (#675911)
  • Gtk overrides: Implement __delitem__ on TreeModel (Jose Rostagno) (#675892)
  • Gdk Color override should support red/green/blue_float properties (Simon Feltman) (#675579)
  • Support marshalling of GVariants for closures (Martin Pitt) (#656554)
  • _pygi_argument_from_object(): Check for compatible data type (Martin Pitt)
  • pygtkcompat: Fix color conversion (Martin Pitt)
  • test_gi: Check setting properties in constructor (Martin Pitt)
  • Support getting and setting GStrv properties (Martin Pitt)
  • Support defining GStrv properties from Python (Martin Pitt)
  • Add GObject.TYPE_STRV constant (Martin Pitt)
  • Unref GVariants when destroying the wrapper (Martin Pitt) (#675472)
  • Fix TestArrayGVariant test cases (Martin Pitt)
  • pygtkcompat: Add gdk.pixbuf_get_formats compat code (Jose Rostagno) (#675489)
  • pygtkcompat: Add some more compat functions (Jose Rostagno) (#675489)
  • Fix tests for Python 3 (Martin Pitt)
  • Fix building with –disable-cairo (Martin Pitt)
  • tests: Fix deprecated assertions (Martin Pitt)
  • Run tests with MALLOC_PERTURB_ (Martin Pitt)

Read more
Daniel Holbach

This morning I woke up and found the sponsoring queue at 103 items! I mailed the ubuntu-devel and ubuntu-motu lists and the current count is down to 81. This is great, but I’m sure we can get it down to 0.

Jani Monoses also filed these bugs to discuss how we can improve our sponsoring strategy:

You might want to join the conversation.

What we need most though is that if you can review code and upload changes, you head over to the sponsoring queue and help reviewing. It’s understandable that after UDS everybody is busy doing merges or jumps head-first into work items, but we also need to help newcomers get their changes reviewed. If you need some help, review our sponsorship best-practices.

If you should want to help on a regular basis, ping me or drop me an email and I’ll add you to the patch pilot schedule and you’ll get monthly reminders.

Rock on everybody! We can be happy we have so many new contributors, let’s don’t let them down! :-)

Read more
Jussi Pakkanen

Today’s API design fail case study is Iconv. It is a library designed to convert text from one encoding to another. The basic API is very simple as it has only three function calls. Unfortunately two of them are wrong.

Let’s start with the initialisation. It looks like this:

iconv_t iconv_open(const char *tocode, const char *fromcode);

Having the tocode argument before the fromcode argument is wrong. It goes against the natural ordering that people have of the world. You convert from something to something and not to something from something. If you don’t believe me, go back and read the second sentence of this post. Notice how it was completely natural to you and should you try to change the word order in your mind, it will seem contrived and weird.

But let’s give this the benefit of the doubt. Maybe there is a good reason for having the order like this. Suppose the library was meant to be used only by people writing RPN calculators in Intel syntax assembly using the Curses graphics library. With that in mind, let’s move on to the second function as it is described in the documentation.

size_t iconv (iconv_t cd, const char* * inbuf, size_t * inbytesleft,
 char* * outbuf, size_t * outbytesleft); 

In this function the order is the opposite: source comes before target. Having the order backwards is bad, but having an inconsistent API such as this is inexcusable.

But wait, there is more!

If you look at the actual installed header file, this is not the API it actually provides. The second argument is not const in the implementation. So either you strdup your input string to keep it safe or cast away your const and hope/pray that the implementation does not fiddle around with it.

The API function is also needlessly complex, taking pointers to pointers and so on. This makes the common case of I have this string here and I want to convert it to this other string here terribly convoluted. It causes totally reasonable code like this to break.

char *str = read_from_file_or_somewhere();
iconv(i, &str, size_str, &outbuf, size_outbuf);

Iconv will change where str points to and if it was your only pointer to the data (which is very common) you have just lost access to it. To get around this you have to instantiate a new dummy pointer variable and pass that to iconv. If you don’t and try to use the mutilated pointers to, say, deallocate a temporary buffer you get interesting and magical crashes.

Passing the conversion types to iconv_open as strings is also tedious. You can never tell if your converter will work or not. If it fails, Iconv will not tell you why. Maybe you have a typo. Maybe this encoding has magically disappeared in this version. For this reason the encoding types should be declared in an enum. If there are very rare encodings that don’t get built on all platforms, there should be a function to query their existence.

A better API for iconv would take the current conversion function and rename it to iconv_advanced or something. The basic iconv function (the one 95% of people use 95% of the time) should look something like this:

int iconv(encoding fromEncoding, encoding toEncoding,
  errorBehaviour eb,
  const char *source, size_t sourceSize,
  char *target, size_t targetSize);

ErrorBehaviour tells what to do when encountering errors (ignore, stop, etc). The return value could be total number of characters converted or some kind of an error code. Alternatively it could allocate the target buffer by itself, possibly with a user defined allocator function.

The downside of this function is that it takes 7 arguments, which is a bit too much. The first three could be stored in an iconv_t type for clarity.

Read more
pitti

As I wrote two weeks ago, I consider the QA related changes in Ubuntu 12.04 a great success. But while we will continue and even extend our efforts there, this is not where the ball stops: it’s great to have the feedback cycle between “break it” and “notice the bug” reduced from potentially a few months to one day in many cases, but wouldn’t it be cool to reduce that to a few minutes, and also put the machinery right at where stuff really happens — into the upstream trunks? If for every commit to PyGObject, GTK, NetworkManager, udisks, D-BUS, telepathy, gvfs, etc. we’d immediately build and test all reverse dependencies and the committer would be told about regressions?

I have had the desire to work on automated tests in Linux Plumbing and GNOME for quite a while now. Also, after 8 years of doing distribution work of packaging and processes (tech lead, release engineering/management, stable release updates, etc.) I wanted to shift my focus towards technology development. So I’ve been looking for a new role for some time now.

It seems that time is finally there: At the recent UDS, Mark announced that we will extend our QA efforts to upstream. I am very happy that in two weeks I can now move into a role to make this happen: Developing technology to make testing easier, work with our key upstreams to set up test suites and reporting, and I also can do some general development in areas that are near and dear to my heart, like udev/systemd, udisks, pygobject, etc. This work will be following the upstream conventions for infrastructure and development policies. In particular, it is not bound by Canonical copyright license agreements.

I have a bunch of random ideas what to work on, such as:

  • Making it possible/easier to write tests with fake hardware. E. g. in the upower integration tests that I wrote a while ago there is some code to create a fake sysfs tree which should really go into udev itself, available from C and introspection and be greatly extended. Also, it’s currently not possible to simulate a uevent that way, that’s something I’d like to add. Right now you can only set up /sys, start your daemon, and check the state after the coldplugging phase.
  • Interview some GNOME developers what kind of bugs/regressions/code they have most trouble with and what/how they would like to test. Then write a test suite with a few working and one non-working case (bugzilla should help with finding these), discuss the structure with the maintainer again, find some ways to make the tests radically simpler by adding/enhancing the API available from gudev/glib/gtk, etc. E. g. in the tests for apport-gtk I noticed that while it’s possible to do automatic testing of GUI applications it is still way harder than it should and needs to be. I guess that’s the main reason why there are hardly any GUI tests in GNOME?
  • I’ve heard from several people that it would be nice to be able to generate some mock wifi/ethernet/modem adapters to be able to automatically test NetworkManager and the like. As network devices are handled specially in Linux, not in the usual /dev and sysfs manner, they are not easy to fake. It probably needs a kernel module similar to scsi_debug, which fakes enough of the properties and behaviour of particular nmetwork card devices to be useful for testing. One could certainly provide a pipe or a regular bridge device at the other end to actually talk to the application through the fake device. (NB this is just an idea, I haven’t looked into details at all yet).
  • For some GUI tests it would be much easier if there was a very simple way of providing mocks/stubs for D-BUS services like udisks or NetworkManager than having to set up the actual daemons, coerce them into some corner-case behaviour, and needing root privileges for the test due to that. There seems to be some prior art in Ruby, but I’d really like to see this in D-BUS itself (perhaps a new library there?), and/or having this in GDBus where it would even be useful for Python or JavaScript tests through gobject-introspection.
  • There are nice tools like the Clang static code analyzer out there. I’d like to play with those and see how we can use it without generating a lot of false positives.
  • Robustify jhbuild to be able to keep up with building everything largely unattended. Right now you need to blow away and rebuild your tree way too often, due to brittle autotools or undeclared dependencies, and if we want to run this automatically in Jenkins it needs to be able to recover by itself. It should be able to keep up with the daily development, automatically starting build/test jobs for all reverse dependencies for a module that just has changed (and for basic libraries like GLib or GTK that’s going to be a lot), and perhaps send out mail notifications when a commit breaks something else. This also needs some discussion first, about how/where to do the notifications, etc.

Other ideas will emerge, and I hope lots of you have their own ideas what we can do. So please talk to me! We’ll also look for a second person to work in that area, so that we have some capacity and also the possibility to bounce ideas and code reviews between each other.

Read more
Marcin Juszkiewicz

During my stay in Oakland, CA (due to Ubuntu Developer Summit) I decided to attend also Tizen Developers Conference. Not that I have any relations with this platform — just wanted to meet some friends from Maemo times. And I did not had plans for Tuesday evening while Tizen visitors had social event planned in The California Academy of Sciences.

For those which do not know what Tizen is a bit of history. Years ago Nokia made few internet tablet devices (770, n800, n810) and phone (n900) which were running Linux distribution named Maemo. It was loosely based on Debian. In meantime Intel created Moblin which was their distribution for mobile devices. Few years passed and they joined forces and MeeGo was born. Nokia released N9 phone with it, ASUS had netbook running MeeGo and maybe few other devices appeared on market. Then history repeated: MeeGo merged with LiMo and they created Tizen project.

It is hard to tell was conference success or not because I did not attended any sessions there — just opening keynote by Jim Zemlin. On first day I also came for technical showcase and partner demos. But they were squeezed in very small room so it was hard to discuss with people showing their work. Maybe next time organizers will give at least 4m² per demo — this should be a minimum.

But today I got Tizen Developer Platform device and thumbdrive with SDK on it. So decided to play a bit with it. It was not enjoyable experience.

First ugly part was Tizen SDK “so-called” installer. 823MB shell script… I thought that those times passed long time ago. Anyway tried to run it. All I got was message that 64bits systems are not supported. Good to know that, but my x86-64 systems are able to run x86 binaries without problems. Ok, I made workaround and then got message about missing qemu, rpm, libsdl packages. No, I will not install rpm on my Ubuntu systems.

So I decided to cut that crappy shell script and take a look at tarball. Fast “tail -n+122 tizen-sdk-0423.bin >tizen-sdk.tar.gz” and I was able to extract SDK. Got 26 zip archives.

One of them contains rootfs created from packages based on Debian/Ubuntu packages. Some are from times when dinosaurs ruled the Earth (debianutils 2.17 was released in 2006), some are more fresh (like gcc-4.5 based on version from May 2011). In other words tradition started by Maemo is continued in Tizen and developers are given mix of fresh tools with long time forgotten ones. And Scratchbox 2.

To connect with device there is “sdb” tool. It introduces itself as “Smart Development Bridge” but in past it was named “Samsung Development Bridge” (run ‘strings’ on binary). And it’s father has a name “Android Development Bridge” and has some more options.

Anyway if you want to connect to device then few steps are required:

  1. On device go to settings and set USB to ‘USB debugging’ mode. This will switch it into cdc_ether gadget.
  2. On host do “sudo ifconfig usb0 192.168.129.1″ to configure networking.
  3. Connect to device: “ssh root@192.168.129.3″

And then you can enjoy system which is a mixture of few Debian/Ubuntu versions. And forget about updates — unless you know how to get to 165.213.180.233 and know password of “kb0929.kim” user there (taken from /etc/apt/sources.list file).

Device uses Linux 2.6.36 kernel with unknown patches on top including CMA and Android ones. Quite old one but works. Hope to get newer one from someone.

What I do not like is availability of sources. There is review.tizen.org website with git repositories but I want to vomit when I see commits like “let’s add 2.6.36 kernel in one commit”. Lovely lack of ideas how to help developers.

What I will do with device? Not decided yet. Waiting for instructions how to get into bootloader to boot own kernels. Then who knows… replacing Tizen with Android or Ubuntu?


All rights reserved © Marcin Juszkiewicz
Tizen: first impressions was originally posted on Marcin Juszkiewicz website

Read more
Daniel Holbach

Congratulations everyone, we got a fantastic LTS release out, some of the reactions of our users you can see here. Well done! :)

At the same time understandable, but also worrying is the look at our sponsoring page:

Silently with all the release freezes in place, the number of open sponsorship items has crept up to ~70 again.

If you are an Ubuntu developer or can help out with reviewing patches, please head to the sponsoring queue and help out. Many contributors and Ubuntu users are going to appreciate it. (Docs can be found here.)

Read more
Daniel Holbach

Jono blogged about the importance of application developers to Ubuntu earlier and I wanted to echo some thoughts and add some of my own.

I have been in the Ubuntu Developer camp for most of Ubuntu’s life as a project, so the mindset of “App developers? Why don’t they just set up an open source project and get it packaged?” or “Apps? We have packages.” is what I have heard a couple of times already and is what I would probably have answered some years ago myself.

The power of the Open Source community and having open projects is immense. We all have seen it many times: a thought, a great idea, some dedicated contributors, good communication and a friendly community can achieve amazing things. This happens every single day.

We are well aware of how things work in the Open Source world and we have recently seen the success of our great work: millions of users, who have never dabbled in Open Source before, today enjoy Ubuntu (or other pieces of Free Software) and rely on it. We have managed to reach out to an entirely new demographic and continue to grow our user base.

With new demographics there are new expectations and new responsibilities. Consider my father for example. He follows what’s going on in the Ubuntu world, but will occasionally point out to me that an app he’s interested in buying does not exist for Ubuntu. The last I remember him talking about was a good language learning course.

With new form factors and devices running Ubuntu (you know, TVs, tablets, phones, watches, cars, coffee machines, hoverboards and the like), there are going to be thousands of useful helper tools out there which might not be available for Ubuntu yet. Add to that the growing number of content providers (magazines, books, maps, music, etc.) which users yet can’t easily get “for Ubuntu”.

This is the world we are looking at today and it becomes obvious that apps should be a first-class citizen in Ubuntu. Don’t get me wrong. I’m all for making everyone who shows the slightest interest in working on Ubuntu itself an Ubuntu developer and member of our community, also because I feel that everyone who is part of this has a lot to gain, personally and for their particular project. It just shouldn’t be a strict requirement because it won’t scale.

A number of teams have been working very hard on making seamless apps in Ubuntu a reality and that’s just great to see. It’s a hard problem to solve because it involves so many different important pieces. Keep up the good work everyone!

At UDS I’m definitely going to (among other sessions, I’ll blog about later on) attend these sessions to see what we can do about making apps in Ubuntu more exciting and something that just works:

Hope to see you there!

Read more
Jussi Pakkanen

We all know that compiling C++ is slow.

Fewer people know why, or how to make it faster. Other people do, for example the developers at Remedy made the engine of Alan Wake compile from scratch in five minutes. The payoff for this is increased productivity, because the edit-compile-run cycle gets dramatically faster.

There are several ways to speed up your compiles. This post looks at reworking your #includes.

Quite a bit of C++ compilation time is spent parsing headers for STL, Qt and whatever else you may be using. But how long does it actually take?

To find out, I wrote a script to generate C++ source. You can download it here. What it does is generate source files that have some includes and one dummy function. The point is to simulate two different use cases. In the first each source file includes a random subset of the includes. One file might use std::map and QtCore, another one might use Boost’s strings and so on. In the second case all possible includes are put in a common header which all source files include. This simulates “maximum developer convenience” where all functions are available in all files without any extra effort.

To generate the test data, we run the following commands:

mkdir good bad
./generate_code.py --with-boost --with-qt4 good
./generate_code.py --with-boost --with-qt4 --all-common bad

Compilation is straightforward:

cd good; cmake .; time make; cd ..
cd bad; cmake .; time make; cd ..

By default the script produces 100 source files. When the includes are kept in individual files, compiling takes roughly a minute. When they are in a common header, it takes three minutes.

Remember: the included STL/Boost/Qt4 functionality is not used in the code. This is just the time spent including and parsing their headers. What this example shows is that you can remove 2 minutes of your build time, just by including C++ headers smartly.

The delay scales linearly. For 300 files the build times are 2 minutes 40 seconds and 7 minutes 58 seconds. That’s over five minutes lost on, effectively, no-ops. The good news is that getting rid of this bloat is relatively easy, though it might take some sweat.

  1. Never include any (internal) header in another header if you can use a forward declaration. Include the header in the implementation file.
  2. Never include system headers (STL, etc) in your headers unless absolutely necessary, such as due to inheritance. If your class uses e.g. std::map internally, hide it with pImpl. If your class API requires these headers, change it so that it doesn’t or use something more lightweight (e.g. std::iterator instead of std::vector).
  3. Never, never, ever include system stuff in your public headers. That slows down not just your own compilation time, but also every single user of your library. The only exception is when your library is a plugin or extension to an existing library and even then your includes need to be minimal.

Read more
Daniel Holbach

One class of new contributors has always been successful: self-starters who knew what they wanted to do, where to get involved, with possibly some already existing experience or knowledge. For others it’s been a tougher ride.

To remedy some of this, we set up the Developer Advisory Team. We figured that (among other things) reaching out to new contributors who just got their first fix into Ubuntu to thank them, encourage them and ask for their feedback would help us a lot in terms of bringing them into the fold and finding out what current stumbling blocks are.

The team consists of Andrea Colangelo, Andrew Starr-Bochcchio, Bhavani Shankar, Christophe Sauthier, Evan Broder and myself. We’ve been working together for a few weeks now and been reaching out to many contributors to Ubuntu development.

We collected the feedback and put together a report which summarises the experience of new contributors. If you’re in the thick of process definitions, documentations, backlog of review queues and the like it’s very easy to only concentrate on things which are broken or could be improved.

I’d like to take the time to quote a few of the super positive responses we received:

  • “Developers always respond very friendly.”
  • “I’m also very much impressed by the smoothness of online collaboration through launchpad and bzr (wow, would not have thought I’d be praising bzr at some point ). Branching a project to fix a bug and getting that visible to the project’s developers is effortless and lets me concentrate on the actual work.”
  • “Had heard about reviews taking a long time, but didn’t find it to be the case.”
  • “I really enjoyed getting to see my contributions go through the whole cycle from inclusion to available update. Seeing the process was interesting, as I had not known the different stages previously, and it was exciting to realize that a bug fix (simple, but there nonetheless) could go from a proposed fix to being available for installation in just over 24 hrs.”
  • “Much easier than I had expected. I had always assumed that one had to be an official packager to apply a patch to a package and submit it. Overall, it was a surprisingly painless process.”
  • “I think the most positive part of the experience to date has been the realization that the Ubuntu community cares enough to engage in this kind of feedback solicitation. That is simply unparalleled in other projects, and a testament to the many solid reasons so many prefer Ubuntu.”
  • “Overall, the entire was quite enriching and engaging. To be frank, I was desperately waiting for an opportunity to fix an easy bug for quite some time. And, so when I eventually found one, I was overly joyed. Given another opportunity, I will surely contribute again to Ubuntu development.”
  • “The people. Good response from other people, great impression about the whole community.”
  • “Contributing to free and open source projects makes me excited. It is great that I can paticipate and improve Ubuntu. I feel awesome when my work is released. Also I was glad when people found out their problem doesn’t exist in new release.”

Everybody who helps make this happen on a daily basis: give yourself a pat on the back. I’m proud of what we achieve together, and so should you! :-)

Check out the full report if you want to get into the details of the feedback.

If you have comments yourself or suggestions for improvements, leave your comment below.

Read more
Daniel Holbach

I just went over the soon-to-be-released report of the Developer Advisory Team, where we sum up feedback from first-time contributors to Ubuntu Development and many noted that they found developer documentation easily and things generally worked out for them, but they struggled finding stuff to work on.

The Ubuntu Development team has always been good at creating new TODO lists (merges, Debian RC bugs, build failures, heaps of different bug lists and much much more), but you need to know what you are looking for.

Enter Harvest. We created it so it merely aggregates opportunities for Ubuntu developers in a simple web interface. You can select opportunity types and specific sets of packages to narrow down opportunities based on your interests.

If you got some spare time, are interested in Ubuntu development and would like to help, you would do the Ubuntu world a great favour by doing one of the following:

If you are an Ubuntu developer or would like to become one: trying it out and commenting below with your experience. (Bugs can be filed here.)

If you have a great idea on how it could be further simplified, extended or improved, write up your idea and link to it in the comments.

If you are a web developer: please get in touch. Harvest is written using Django and Python and it’s super-easy to extend, improve and fix it – so if you are looking for something to help out with, this might be a great opportunity for you.

Please consider helping out, your contributions will not only help you make better use of Harvest, but many other developers and new contributors as well. :-)

(If you tried it out and it works perfectly for you, let us know too. :-) )

Read more
Daniel Holbach

New contributors who don’t have upload rights to Ubuntu yet get their code reviewed and their packages uploaded by Ubuntu developers. This process is called “sponsoring” and our current process has been in place since pretty much forever. It has even gotten easier over time, so new branches or patches show up on our review queue.

Two years ago when we were struggling with getting code reviewed, we put in place “patch pilots”, a great concept we borrowed from the Bazaar team. We set up a monthly schedule and Canonical provided 4 hours per month per engineer with upload rights to make sure code gets reviewed. This has helped a lot.

Getting closer to the 12.04 release, it looks like we need to put some extra effort in and need some help.

Sponsoring Stats

That’s right we have been hovering around 50 for a while now, dealt with many incoming new requests, but still we don’t get down to 0. If you can review code, please help out.

We all are interested in getting new developers on board. This only works if we review each other’s work, gain each other’s trust and give each other advice.

The Sponsorship queue is where a lot of exchange about this happens and where knowledge is passed on. Help out by reviewing today and help grow our community this way.

This is one of the most valuable contributions to Ubuntu! This matters to all of us.

If you want to see at once glance how we are doing and who’s all helping out, head over to our one glance sponsoring page. (Patches to make it look more Ubuntu-y are very welcome!)

Check the instructions for code review (with lots of tips and tricks) and get your name on the page as well!

Read more
Daniel Holbach

Many engineering teams in the Ubuntu world have made extensive use of User Testing in the last years. This is an important reality check for everyone defining the experience of users. Do my assumptions still hold true? What do users expect? Are there use-cases we never considered? Which steps confuse our users?

The Ubuntu developers, so everyone who builds Ubuntu, integrates pieces to work nicely with each other, maintains packages and produces the distribution we all love, everyone is interested in this kind of feedback.

User testing of the Ubuntu Development process has, if it happened, always been ad-hoc and isolated. This is the reason why we want to look into this again and figure out which parts of the work-flows need to be improved.

Have you thought about contributing to Ubuntu Development before? Did you like the thought of helping improve the distribution millions of users love? If you did, you might be interested in this User Testing initiative. You will only have to read our documentation and send your feedback to Ubuntu Dev email. We in turn will make sure your feedback is put up for discussion and fixed eventually. Also will we will help you on your way if you should get stuck.

This initiative is not to be confused with mentoring. We are not going to do your homework for you or package your app. :-) Instead this will provide a great way for you to get started where you can share your experience with Ubuntu developers, who can help you along, while you provide valuable feedback. Your feedback will be treated confidentially and only published in an anonymised and summarised fashion.

What you need to do? Simple:

This is an experiment we will do until the release of Ubuntu 12.04 (April 26th). This should give us food for thought for the upcoming Ubuntu Developer Summit and depending on the success of the initiative, we will continue it.

Follow @ubuntudev on twitter.com, identi.ca, Google+ or facebook.com to find out more about this initiative and others.

Read more
Daniel Holbach

I’ve been using Google+ Hangouts for a while and some of you might have seen that Jono posted some evidence of these. Mostly I just used them for team calls with a fixed agenda or to keep in touch with friends.

Yesterday I did a free-for-all hangout, using the new “named hangout” feature of Google+. It’s basically like a chat room with a fixed URL, where you can discuss whatever is on your mind. The idea was to create an opportunity to ask and answer questions in a more personal way without having the feeling of interrupting “more important” discussions.

This was a great experience! I didn’t count all nationalities, but I picked up we had people from South Africa, India, Taiwan, Bulgaria, USA at the same time. This was simply awesome.

Ubuntu Developer Hangout

Above it looks like I was hanging out with 35 people at the same time. This wasn’t the case. Unfortunately the hard limit is still 10 people at a time. There are “celebrity hangouts”, where you can record the event and have more people listening in, but unfortunately this takes away the opportunity to get involved.

Sometimes I did have to mute people whose microphone was not set up properly (one time I think heard a rooster in the background), but generally I feel we fared very well.

Many of the people in the hangouts were great Ubuntu fans and thanked for the work Ubuntu developers and contributors in general are doing. It was really heart-warming. Some had programmed before, even in Open Source projects and were keen to help out. So with the screen-sharing functionality I was able to demo how to fix a simple bug which was great.

Thanks also to Evan Broder and Andrew Mitchell who jumped in and answered a few questions as well.

I think I will keep these as an institution for now and announce events over the @ubuntudev twitter/identi.ca/facebook/google+ accounts. If you should ever want to do a hangout session, use the ubuntu-dev hangout, do it and let me know in advance, so I can post this more publicly.

If you have any experience with events like this and have some new ideas, please comment below!

Thanks again every one – this is just a great way to be in touch with the world-wide community of Ubuntu lovers!

Read more
Daniel Holbach

Today is a good day to join Ubuntu development. Here’s your own, personal checklist:

  • You like doing some detective work.
  • Reading some docs or using the terminal does not scare you.
  • You might have tinkered with some source code before.
  • You love Ubuntu and want to help improve it!

Here’s how we are going to help you:

  • We have a bunch of friendly people on #ubuntu-motu on irc.freenode.net who are going to answer all your questions.
  • We have prepared a list of easy tasks for you.
  • We are going to review your changes and help you when you might get stuck.

What you need to do:

It’s a great feeling to fix bugs for millions of users, especially in this release which will be an LTS and used on lots of new devices.

We are looking forward to seeing you there! Just join the channel and say Hi!

 

Read more
Daniel Holbach

As part of our Fix-It Fridays we saw many many new faces joining the #ubuntu-motu IRC channel which always has many helpful developers who are there to answer questions and help if you should get stuck. Still it seems like some feel uncomfortable asking questions or getting their feet wet in this forum.

After some discussion we thought it might make sense to have an additional low-key event where you can show up, get to know everyone and ask whatever you have on your mind. With Google+ Hangouts becoming more and more popular, we will offer a couple of hangouts tomorrow where you can get easily involved and in touch with us.

Daniel hanging out

Building up to this week’s Fix-It Friday, we will be there for you tomorrow, 8th March 2012 at:

in the ‘ubuntu-dev’ hangout.

We are looking forward to seeing you there to give you a warm welcome to our Ubuntu development community. To get an idea of how things work, you might want to check out the first few articles of our Ubuntu Development Guide.

Read more