Testing in Horizon Unit testing for the Openstack Dashboard

Belatedly, here are the notes for the design session/tutorial I gave about testing in Horizon at the OpenStack Summit in Portland, back in April. The etherpad is available over there. Session description:

The main aspect: the Horizon unit tests can be quite complex for new contributors and people extending Horizon to wrap their head around. Mocking with mox, the django unit testing framework,the openstack specific parts of the testing framework, selenium, fixtures/test data handling, qunit...This session could work as a tutorial/tips and tricks on the different testing components. Common errors being thrown and how to debug them. If people could bring up their pain points, that would also be useful.

If there is time, it would be interesting to also address the issue from another angle and think on how to improve what we have, particularly on the Selenium front which has been quite unstable.

General structure

There are 3 main parts to Horizon testing (4 if you include the bits that come from the Python unit testing framework, but we won't get into it here. If you've done unit testing before, it's the usual set of assertions and scaffolding that come with any unit testing framework).

As an example to map to what this is all talking about, I recommend keeping InstancesTest.test_index in the background.

Django unit testing

Docs: https://docs.djangoproject.com/en/1.4/topics/testing/

At the moment Horizon is compatible with 1.4 onwards. The django documentation is excellent and I recommend having a look. Thanks to django we get a lot of goodies for free to help with testing a web application. Among other things:

  • A test client, which mimics a very simple browser (no Javascript) to do GET and POST requests, and built-in tooling to have interesting interactions with the responses.
  • A bunch of additional assertions, to check the HTML, templates, etc., all documented in the link above.

If you're familiar with django already, or while you're reading the django docs, there are a couple of things to watch out for:

  • Horizon does not use models.py, and does not have a database
  • Horizon doesn't use fixtures either (actually it does, but they're very different since they're not done the django way - cf. no models)

Horizon unit testing

Docs: http://docs.openstack.org/developer/horizon/topics/testing.html

Helper classes: https://github.com/openstack/horizon/blob/d4b0ab4aa395bf4df2964efcc358100117efdaa0/horizon/test/helpers.py#L65

There are some docs for testing in Horizon, which contain useful advice for writing good tests in general. A few sections only are specific to Horizon:

Now let's have a look at helpers.py, where the TestCase classes we extend in Horizon tests are defined.

The setUp() and tearDown() methods do the housekeeping for mox/mocking so that we don't have to worry about it when writing tests. The aforementioned Horizon-specific assertions are also defined in this class. It extends the django TestCase class thus all of the django unit test goodness is available.

In general, this class is the best documentation available of what happens in the tests and how they are set up.

Openstack Dashboard unit testing

APIs: https://github.com/openstack/horizon/tree/d4b0ab4aa395bf4df2964efcc358100117efdaa0/openstack_dashboard/api

Test data: https://github.com/openstack/horizon/tree/d4b0ab4aa395bf4df2964efcc358100117efdaa0/openstack_dashboard/test/test_data

Helper classes: https://github.com/openstack/horizon/blob/d4b0ab4aa395bf4df2964efcc358100117efdaa0/openstack_dashboard/test/helpers.py#L98

The Horizon tips and tricks mentioned earlier also apply, but there are no specific documentation page about the topic.

A quick overview of openstack_dashboard/ and the sections that matter to us in the context of unit testing:

  • APIs

The API directory is the only place that talks directly with the outside world, that is, the various openstack clients. This is why Horizon doesn't have a database, because it doesn't store any data itself.

  • Test Data

The test data is also stored in a single directory, and contains the fixtures, that are used to represent (mock) the data returned by the different clients.

  • Helper classes

Like in the "framework" part of Horizon, a helpers.py file defines the TestCases we extend later in the unit tests. This is where a lot of the magic happens: the TestCase extends the Horizon TestCase helper class described earlier, loads the test data, sets up mox, creates a fake user to log in. There's also a couple of useful assertions defined that are used all over the place.

There are other TestCase classes in there, for tests that may require an Admin user, testing the APIs, or Selenium.

A quick look at the example

The flavours returned by self.flavors.list() come from the test data.

We'll look at the mocking stuff in the Tools section. The APIs being mocked all live in the API directory, so this is the only place that needs to be mocked.

self.client() is the default django client, reverse() and assertTemplateUsed() also come from django.

self.assertItemsEquals() is a Python assertion.



In Horizon, mocks are used a lot, everywhere or otherwise running the unit tests would require a fully set up, running Openstack environment.

I found mox a bit difficult to get used to. There's a specific terminology, that translates to a different set of steps than is common in other mocking tools like mock.

First you record. That's the part in the tests where you create the stubs (in a decorator in the example) and "record" what you expect will happen (that's the place in the example that says: "when api.nova.flavour_list() is called with these exact arguments as described, return self.flavors.list()").

Then you replay, with self.mox.ReplayAll() which will make sure the rest of the test will get the data it expects, that you just mocked.

Finally, the reverify step is done in the parent TestCase class' tearDown() function, which calls self.mox.VerifyAll() and ensures the functions recorded were all called, and in the order defined.

There are lots of catches in mox, it's quite strict. Order matters. By default it assumes the mocked function will only be called once and fails otherwise (that's a big one that can be difficult to track down). MultipleTimes() will save you if a function needs to be called more than a couple of times.

Stubbing can be done via a decorator (which is the favoured way going forward) or a StubOutWithMox function, which can still be found in places.

Mox errors can be confusing and I recommend reading the Horizon docs about understanding mox output, which have a couple of paragraphs explaining different errors that may be encountered, the dreaded Expected and Unexpected calls.


Helper classes: https://github.com/openstack/horizon/blob/d4b0ab4aa395bf4df2964efcc358100117efdaa0/openstack_dashboard/test/helpers.py#L326

We use Selenium for testing Javascript interactions. It's a bit heavyweight since it requires starting a browser, so Python unit tests are preferred when possible.

It's more stable now (thanks Kieran), so hopefully we can write a few more tests for the places where it's needed.

qUnit (briefly)

qUnit is used for some of the pure Javascript tests.

It's not used a lot in Horizon. The handmade fixtures take a lot of effort to make so maybe it's better to use Selenium in most cases.

Tips and tricks

  • See the Tips and tricks from the Horizon testing topic
  • Use pdb to check the environment status
  • Anything else? From the session:
    • Mock everything, and if it doesn't work mock it again.
    • Selenium tests: having a flag to turn off/on mocking? So we can run them as integration tests when needed and make sure we still match the correct APIs - cf. blueprint
    • Using Selenium tests as integration tests: build more tests (start a VM, ssh into it)


Unfortunately, the day was running late (and I was speaking at the very next session) therefore the discussion part didn't have time to happen.

I'm disappointed about that and would welcome people discussing their experience and pain points, particular from a newcomer's perspective.

Fortunately when it comes to discussing the Selenium issues, Kieran Spear had successfully fixed it right before the Summit :)

Leave a comment

Evolving Open-Source Night Open-Source Night - June

The monthly Open-Source night experiment continues. On Wednesday, June 19th we had the June edition of Open-Source Night. Rory gave us a slightly-longer-than-15-minutes talk on OpenStreetMap, and the kind of contributions the project welcomes (data data data, really!). I was the only one to volunteer for a lightning talk, in stark contrast with the last event where we had multiple ones both by people attending open-source night and network people who happened to be visiting the hackerspace at the time.

Rather than doing an on-topic talk about an open-source project, I did a meta-talk about Open-Source Night itself and different ways in which it could evolve.

I make no secret that I don't think open-source night works very well in its current format. My goal (and measure for success) is to help people actually get started contributing.

Note: if you were at my deep dive on contributing to open-source and planning on attending the next open-source night, please do come!! This all just means that I think there are things that can be improved :)

Reminder: The current format

We're currently meeting on the 3rd Wednesday of the month. The event usually starts with two 15 minutes talk, ideally one on the life of open-source (e.g. licences, version control, IRC, using the command-line...) and one on how to contribute to a specific project. Then there's a number of 5-minutes-long-or-less lightning talks where people can introduce the project they will be working on during the evening. Then people break into groups or independently work on an open-source project of their choice.

Or that's the idea anyway. The talks usually work well and are inspiring, though they tend to run overtime and then people have trouble sitting at a table and doing things.

The future

These are my thoughts and ideas as to where open-source night might go in the future. These are not plans. I would like to hear feedback from interested people - attendees, would-be attendees, other organisers and thoughtful passerbys.

Topics: General open-source vs Project-specific

I see value in both topics, but perhaps attendees and would-be attendees favour one or the other, both, or neither? I haven't really heard much on this, what people find most useful. I think the project specific talks at least are interesting for both newcomers and established contributors, to see how other projects do things.

I believe 15 minutes is a good amount of time to get an overview, get inspired and get ideas. And not get too bored if already familiar with the topic.

I could see the value and how efficient it would be to focus on one project for a full session and guide people through contributing to it. However I can also see how it could be offputting to people not particularly interested in the project (e.g. "I don't use that distro, why should I bother attending?"). Perhaps as separate, off-shoot events if people are interested in leading that kind of session (get in touch!).

Topics: All kind of contributions vs Focusing on code

At the moment, I try really hard to emphasise (and encourage speakers to do the same) all the kinds of contributions that can be made - and are well needed! - even though my own experience lies in code-based contributions. Maybe I should give up on being inclusive and focus on what I know best, rather than try to be all things to all people? Code-focused open-source events could go from learning to program to fixing a bug.

Initially I was hoping people would step up to talk and encourage people to join their area of interest (I think we have e.g. experienced open-source translators around...) but that hasn't happened.

This is actually a point where someone came up to me after the talk and said straight off they really liked the breadth of contributions demoed during the talks, in particular mentioning last month's talk by Guilherme on OpenMandriva that did a great job showing how someone can help, in a multitude of ways, even if they're not all that confident in their coding skills.

Format: More course-like?

A couple of days before the June OSS Night I was pointed to this article on a really, really interesting summer course on learning to program the open-source way. That's a really cool concept. Should we entertain the thought of doing something similar during open-source night? e.g. A session on learning how to use version control with exercises, very workshop like, one month, some other topic the next one, etc.?

Probably not, but something to consider as a separate course with a shorter timeline. A course with one session a month will lose people and have little momentum. Is this the kind of things people have an interest in learning?

Format: Doing vs Listening/Talking

My goal with this event is still to get people started contributing. I'm not interested in organising a monthly night of talks. Finding speakers is stressful. If the talks aren't followed by some contributing action, to me the event is failing and I'm not interested in continuing to organise it. There are plenty of events around Dublin already where people can meet, talk tech and shoot the breeze.

With regard to open-source related talks, I think that's already handled well by the ILUG folks, who are now keen to set them up regularly again under the new chairmanship :) And we can join forces if that's the most attractive part of the event to folks. If your main interest is in having a regular night of open-source talks, get in touch and I'll be happy to help you have this in Tog. I'd attend with pleasure anyway, I'm just not interested in organising it and go speaker-hunting every 3 weeks.

I still believe we can make something really cool happen by putting in the same room people experienced in open-source together with newcomers interested in contributing. So I'm not giving up yet!

There's of course also the timeframe issue: with or without talks, an evening of maybe 3 hours is not a lot of time to accomplish something. Maybe we could (also/instead?) have events on Saturdays? And/or week-end workshops, Friday eve to Sunday?

HOWEVER, in any case an evening is still enough time to accomplish something, get started, get the momentum going, get unblocked and finish your contribution later at the week-end, in your own time.

You: Why are you here anyway*? ;)

* Or why weren't you? :) I'm just as interested in the answer to that!

Are you interested in learning how to contribute? Interested in helping and mentoring newcomers? What were you hoping this evening would be about?

I then invited people to have a productive discussion with me about this should they wish to, somewhat contradicting my own doing vs talking rant :-)

Please feel free and welcome to continue the discussion in the comments or by email, I would love to pick more brains and exchange ideas about this.

Django challenge

To avoid the talk being entirely meta (and in case people didn't care that much about all the blah blah blah and more about the doing!), I issued a challenge to attendees as well: this evening, run the Django unit tests suite. If that's something you're set up for, it'll take 2 minutes. If you're familiar with the concept but don't have all the dependencies set up yet it'll take 20 minutes. If this is all new to you it might take 2 hours, but what you learn you'll be able to reuse when you start working on a project you care about in the future, and it means it'll take less long then.

One person took me up on it and it took them 10 minutes. This shows how possible it is to actually get the ball rolling during open-source night, get people to realise they're not that far away from a first contribution.

I feel I should give the disclaimer that since the last time I talked about how to contribute to Django, the Django folks added to their docs a tutorial on how to make your first contribution, which just makes the project that little bit more awesome (and this challenge, easier to solve!)

Next Open-Source Night: July

So next month. That'll be on the 17th of July. Are you interested in giving a talk? :)

If no one volunteers we'll have a session similar to the first event except with more lightning talks. Lightning talks don't have to be prepared, there's no need for slides or anything you don't fancy. It's as simple as chatting about what you plan on doing or would like to do during the evening, inviting others to join you if they'd like.

It can be like:

"Hello, I'm Chris, a contributor to AwesomeProject which is a project that does this and that and also that thing. At the moment we're looking for help in $area1, $area2, $area41, if you think that's cool and you'd like to help, I'll be sitting at that table over here, come and chat with me. Maybe I can help you find a good first task. Otherwise I'll be working on the defroglirnator for the project -- er if you have any experience in that area I'd love to chat to you too."

or maybe

"Hey, I'm J. Bloggs, I've been using Wordpress for a few years, I think it's an awesome project and I'd like to start giving back. Tonight my plan is to figure out the new contributor process - if you're interested too, we can do this together. Come and chat with me."

It doesn't matter if there is no existing contributor to the specific project in the room. Since there are people familiar with the way open-source projects and communities usually tick, they will be able to help you if you get stuck.

Ok, that's it! I'm hoping to also have the time to find a few good first tasks in a new project, maybe LibreOffice. If not, then we can figure it out together on the day :)

I'm very much looking forward to hearing your thoughts, suggestions and ideas about all this, and perhaps also see you on the 17th.

Leave a comment | 2 so far

git diff showing a weird output ^[[1;33m^[[mmmmh?!

I came back to an old project on another machine only to find that the git diff command did not behave as expected anymore:

^[[1;33mdiff --git a/myproject/myapp/models.py b/myproject/myapp/models.py^[[m
^[[1;33mindex 0216829..d9e1637 100644^[[m
^[[1;33m--- a/myproject/myapp/models.py^[[m
^[[1;33m+++ b/myproject/myapp/models.py^[[m
^[[1;35m@@ -87,6 +87,12 @@^[[m ^[[mclass DoomDoomDoom(models.Model):^[[m

Instead of showing the colours defined in ~/.gitconfig, it was displaying escaped sequences in black and white, as well as a "(stdin)" prompt at the bottom of the page.

At first I thought it was a difftool issue but actually it relates to the pager, i.e. with either of these commands things works well:

$ git --no-pager diff # No paging
$ git diff --color | less -R # With paging

The default pager in git is supposed to be 'less'... Still, making sure it actually is fixed this for me:

$ git config --global core.pager 'less'

I'm still annoyed. Why was a different pager being used (and not showing in git config --list) and what tool was it?

Leave a comment | 2 so far

Open-Source Night #2: March 2013

On Wednesday the 20th, we had the 2nd edition of Open-Source Night in Tog. I think it went well. Once again there was about a dozen attendees, many of whom have never contributed to open-source before. A third of them were also in Tog for the first time. It might be too early to matter but there was also very little overlap with the audience from last time.


We started the evening with 2 talks, meant to be about 15 minutes long each. Mark started the evening telling us about open-source licences and the philosophy they encapsulate/were born from. Then I walked through how one would go about contributing to Django, basically clicking through the Django website and explaining different tasks the project needs help with, particularly for bug fixing contributions.

After this, we had 2 lightning talks that were meant to last 2 to 5 minutes, to give people a chance to talk about a project they contribute to and get people to join in. This time the talks were more about ideas, which is fine, but both also ran overtime, which is less cool. I'm not sure if either found additional contributors/would-be contributors out of it for the evening.


The second part of the evening, the part that should be hands-on, didn't go so well. After the talks (which lasted for 1h30 instead of 45mins) and a tour of the hackerspace for the new people, most continued chatting instead of sitting down and getting things done. This especially saddened me for the ones who had never contributed before. The goal of the event is to help newcomers get started contributing, when they have experienced people at hand to ask questions to.

Next time

I'm not sure how to improve this next time and help attendees get started actually doing stuff. Running overtime for the talks really hurt for the rest of the evening, which is already such a short time to accomplish something. An idea: after my talk I was asked "How long would it take for someone to start from nothing to being able to run the Django unit test suite?" and maybe this kind of well-defined, self-contained task would be good to help people get started. It's not a contribution yet, but it's a first, necessary step toward it (for code contributions in any case), and it could be fun to try and mix this with some sort of open badge.

Somewhat related announcement: open-source night won't happen on April 17th next month but probably on April 24th instead. Check the tog.ie calendar for confirmation. If you're interested in speaking on a topic relating to the life of open-source or a project in particular, please get in touch :)

Leave a comment

Open-Source Night: Event #1 February 20th

On Wednesday, Tog hosted the first monthly Open-Source Night.

It's an event I'd been wanting to organise for a while, with an eye on it being hands-on and slanted toward helping interested people get started in open-source, but I wasn't sure what format would work best. I'm still not sure, but in the spirit of release early, release often, I thought I'd give it a shot for a few months and iterate.

For the first event, about a dozen people showed up. About 7-9 of them had already made some kind of contribution, most people had a clear idea of the project they wanted to contribute to for the evening, and 3 were hesitant and not sure what they wanted to do.

Blackboard with project names

We started with 2 super short talks, an ill-prepared one from myself about what to do tonight: basically find the contributor's guidelines for the project you're interested in and speak to the person next to you for help, since we had such a skewed ratio of experienced contributors. Triona followed with a talk on what she planned to do in the evening with Free Penguin, an open-source sewing pattern for Tux plushes. The maintainer hasn't updated nor responded to emails in years, so it seems it will need to be forked in order to start improving the documentation. Open-source projects aren't all about code! :)

I directed the hesitant project-less people toward Cheryl and the Dreamwidth project, which has an excellent reputation for being friendly to newcomers. Even without an experienced contributor around, I thought figuring things out together would be a fun learning experience. It may not have been that effective though, people were interested and looked around but nothing got accomplished (perhaps that is to be expected for a first couple of hours getting acquainted with a project and open-source?). Then further efforts were thwarted by technical problems (bugzilla down). Cheryl's thoughts abut this is that it's difficult to get into a project one doesn't feel strongly about (a similar downside applies to projects discovered via OpenHatch, as someone else mentioned to me).

There were a couple of serendipitous meetings, like the person wanting to get started with Debian packaging who happened to be sitting besides a Debian Developer.

But overall, I think having encouraged people to come along already having a project in mind made it difficult to form groups and encourage collaboration, because people ended up working on the project they had planned to alone. It may not have been a great experience, particularly for people who didn't know anyone or hadn't been in Tog before.

I also need to become more familiar with projects who have good, specific non-programming-related tasks for newcomers. I had a general idea but wasted time trying to find the details. We had a graphic designer interested in either contributing his design skills, translating or participating in testing efforts but I wasn't able to quickly find a good "Here's a concrete task you can do now" for some of the better known projects. He did discover InkScape and became eager to learn it, so I hope to see him again in Tog in a few weeks for teaching an intro workshop to InkScape :-) (Thanks Borud!!)

Ideas on how to evolve the format for next time:

Choose one project and make it the main focus of the evening, at least at the start. Meaning only one presentation, that is a bit longer (ideally 20 minutes, max 30 -- we still need time to actually do stuff!) and give specific, step-by-step instructions on "this is where you go to find something to work on, this is how you choose a task" and afterwards have the people interested in working on the project do so together - several people to one task can work, to encourage learning together and avoid getting stuck. People are still welcome to work on whatever else they want to of course. This was suggested by Ulrich based on the recent Debian Bug Squashing Parties he attended.

Becky said there was an interest in a GitHub pair programming type of exercise. People upload code on GitHub they never touch again. Working on someone else's code with the help of the author could turn into an instructive experience. It would also be cool to see what a pull request looks like from both sides.

I think we can try both these things for next time, the GitHub pair programming could start after the presentation for people not interested in working on the highlighted project.

Now. The next step is to find a project to highlight and a willing contributor who'd like to present and guide, for the next session on March 20th. Ideas, volunteers? :)

Feedback and general thoughts on evolving the format are warmly welcome as well.

Leave a comment

Talk transcript: Making your first open-source contribution

Slides available on SlideShare (I need to fix an embedding bug on the blog, oops).

Most of you know what Open Source Software is and hopefully think it's awesome. Have you ever contributed a patch? A translation? A bug report? Would you like to do any of this?

(If this is the first time you hear the term, roughly open-source is software for which the source code is freely available, that can be redistributed and modified.)

This talk is for people who like open-source and would like to give back, but are not sure where to start, or if they're smart enough or if their skills would be valued.

And my goal is to encourage you to make the jump from 0 to 1 contribution (or one more!) :)

Because I'm a software developer, this talk focuses a bit more on code contributions. (Don't think this means other types of contributions aren't needed, help is always welcome everywhere!) For many years, I wasn't strongly attached to any particular project but got patches in here and there (Sugar, Gnome, Django...) Nowadays you're more likely to find me in the land of OpenStack.

First, let's clarify something important: you don't need to be a genius to contribute. It's not as difficult as it may initially appear. All skill levels and all types of skills are needed and appreciated.

As to where to start, first I'm going to tell you about a wonderful shortcut, and then I'll go through how it usually works.

OpenHatch is an organisation whose mission statement is: "helping newcomers find their way into free software projects." They aim to bring together all the simple bugs, help requests and help wanted, documentation, all sorted by project and by language. It's a great way to get started.

Now, the way it usually works. When you're looking to contribute to a project, you should first look around for contributor guidelines. If a project has contributor guidelines, it's an excellent sign. It means that they care and that they've thought about it, which is very important when it comes to first contributions.

Read them! You don't have to remember it all. It will give you a sense of direction and an idea of what matters for the project, what to watch out for too (patch format, coding conventions, where/who to talk to, etc.)

As an example, here's a screenshot of the Gnome documentation for new contributors. There's a lot in there! They care a lot about welcoming new people.

In any case, whether a project has contributor guidelines or not, the workflow tends to be the same. Read the guidelines if they exist :) From then on, look at the bug tracker to find something that you'd be interested in working on. Now that you know which part of the project you will be working on, build it. Find the bug, fix it and submit your patch!

I'm going to be using the first contribution I made to Gnome as an example throughout this presentation. The Gnome folks are a very friendly community, and have a special tags for bugs that are good for newcomers called "gnome-love". In other projects this may be called "easy picking", "bite-sized", "low hanging fruit", etc... It should be mentioned in the contributor guidelines.

Look at the list of bugs tagged with that keyword and find one you like that is easy. (Avoid choosing a big feature as a first contribution. You need to earn some trust first, as well as pick up the project technical and cultural conventions.)

Once you know what you will be working on, it's time to build the software. This is very important, you will be learning new tools, perhaps even new languages. For instance I chose a bug from gnome-terminal which is written in C and uses autotools, which I wasn't very familiar with. This is why it's important to select a small first bug, because you have a lot more to learn to get there.

If you can't find instructions to build the software, you have a couple of solutions. Sometimes a mentor comes together with the "easy pickings" tag, or the community has its own mentorship program. You can also go back to the magical portal mentioned earlier, OpenHatch, where "training missions" are available to get people up to speed with some of tools commonly used in open-source.

People forget they had to learn all this in the first place. Don't sweat it. This is a stepping stone.

Once you have a working build, it's time to reproduce the bug, find it and fix it! If you're lucky, the location of the bug may have been mentioned in the bug report. As said earlier, the person who marked the bug as an easy task may be willing to help mentor you through it. It's ok to ask for help if you're having trouble.

As an example of a first task, I was lucky, and I indeed picked a very simple one - changing a colour in the gnome terminal!

Once your fix is ready and tested (you have rebuilt the software with your fix in it), it's time to submit the patch. Now is a good time to refer yourselves to the contributor guidelines once again, it will be useful to find out what your patch should look like (coding guidelines), what command you should use to create the patch, and where you should send it. If there are no such instructions, the safest path is to attach the patch to the bug report in the tracker.

And... congratulations! You've made your first contribution to open-source. Take the time to pat yourself in the back and be proud, you deserve it.

The process isn't quite finished yet: the next step is to wait. Perhaps your patch will be accepted since it's a small contribution. It's just as likely you might get some feedback on how to improve it - everybody wants to make their project better so don't take it personally, take the feedback on-board and resubmit the patch. If your patch gets lost in the ether, you should consider pinging the component or project maintainer.

In my case... I was lucky :) The patch was accepted and merged in the main codebase about an hour later!

If the only answer you get is silence - don't take it personally, really. People want you to stay, a healthy project know they need new people in order to stay alive. Open-source projects are always short in resources.

If the people involved in the project you contributed to have a bad attitude, don't be discouraged. And don't stick around either, there are a ton of cool, useful projects with friendly communities who could use your contributions. Life's too short.

If you've done your research, read the guidelines, there won't be any dragons. Most people are very nice! It's great to become part of a community that cares about creating the most awesome project they can.

And as a closing word before opening for questions: remember OpenHatch.org. They are people dedicated to helping newcomers find their way.

Leave a comment | 5 so far

"Making your First Open-Source Contribution" Ireland Girl Geek Dinners

Hello good people who attended my talk on "making your first open-source contribution" for the January edition of the Girl Geek Dinners in Dublin. I hope you enjoyed it!

The slides are available on Slideshare - this version is actually missing a couple of recent updates, the main one being the mention of the Open-Source Night starting in Tog on Wednesday, February 20th. Come make your first contribution or help others get there!

If you're looking for a copy of the hand-out, you can download it here.

I'll be posting a transcript of the talk in the next couple of days. It still needs a bit of proof-reading :-) (It's posted now)

Many thanks to Christina for organising GGD!

Picture of the talk
(Thanks to @Imisaninja for the picture)

Leave a comment

Interested in open-source? Come to Tog!

Are you an experienced open-source contributor interested in recruiting new people for your project?

Are you a fan of open-source who would be interested in contributing at any level but isn't sure how to?

Come to Tog's first Open-Source Night on February 20th!

These hands-on sessions aim to bring together experienced open-source contributors with people who would like to get started but aren’t sure where to start or would generally benefit from having someone to ask questions to.
Every month we will start with a couple of people speaking for 5-10 minutes, to introduce the project they are working on, what is the usual path for contributing and where they are currently looking for help. Then we will form groups and work on making a contribution for the rest of the evening.

I'm hoping to make this into a regular monthly event. The current plan is to try it for a few months and see what it becomes. This will heavily depends on who attends so, help me recruit lots of interested people from both side of the contributor spectrum in Dublin :)

Leave a comment

Friendliness in open-source

The general view of open-source communities when standing at the edges is probably a vision of endless flames, strong personalities clashing, patches being ripped to shreds on mailing-lists, RTFMs, and the general need to have a thick skin when going in there or being crushed to pieces. The high-profile projects where one might think to contribute first like the Linux Kernel can have quite an intimidating culture, keeping lurkers looking out from stepping in.

I rarely read stories about the really friendly projects that do their best to mentor newcomers.

I'm currently mentoring for the OpenStack project as part of the Gnome Outreach Program for Women. Everyone I see talking to the interns, whether or not they're directly involved with or even aware of OPW, is helpful and makes the time to be friendly and answer questions ; what they see is new contributors interested in helping out and it's in their own interest and the project's to give a hand at the start, when it is most needed.

If you like open-source and sometimes think you'd like to contribute if you could: explore the community for the project(s) you're interested in. Most of them are really nice places to be. Have a look. Ask someone on IRC or on a mailing list for where to find directions on how to get started. Healthy communities are concerned about being welcoming and attracting new blood, because they know they need it to survive and be sustainable.

And if you're still hesitant about jumping in and have a specific question I might be able to help with, get in touch :)

Leave a comment

Python meet-up, November 2012: DevOps 101 DevOps 101

Shame on me for not blogging about PyCon Ireland this year, another success where I happily spent a big chunk of time greeting attendees at the registration desk and attended some interesting talks.

The stylish volunteers:

PyCon Ireland 2012 Volunteers

In the meantime, I took better notes at the November Python Ireland meet-up, where Ulrich took us through DevOps 101, going from the basics of what it is and all sort of related tools to help, mostly Python-based.

I thought interesting that Ulrich worked from a specific definition of DevOps that differs from the ones I heard. There was a time when I used to call myself "a devop" because in addition to development work I was also maintaining production and test servers and handling deployments, etc. However at the time I learnt from other sources that "a devop" was actually a system admin who also writes code to make their job easier... so I just stopped using the word ;) Ulrich based his talk on the premise  of development and operations working together.

Development tends to move fast while operations are more stable and conservative, why would you put these groups together?

The need to scale is an important one. You need the knowledge that the developers have of the application itself, but you also need to understand infrastructure. For instance if you deploy something and suddenly the number of requests spikes, you want devs and ops to be close together to solve the problem.

Following a "release early, release often" principle where you might deploy several times a day makes that collaboration important.

Environments are complicated and it's important for people to integrate ; if the departments remain separate people tend to stick only with the same group of people.

Devops enable better communication and understanding. Developers can move fast and deploy faster as they know what ops need. This also helps mitigate risk thanks to the regular deployments: fewer changes are deployed at once (helpful to determine what breaks) and it becomes easier to do.

The talk then moved on to tools, including advice on how to create a simple django app to keep track of which versions of software are deployed where -- very simple and yet usually enough.

Some of the projects that were mentioned:

  • Using Sword instead of puppet (...which is still best, apparently) if you want to stick to Python, though it's a very young project. Using such tools you can start versioning your configuration and environment, and store reasons for changes in commit messages.
  • Fabric for ssh the Python way :)
  • Virtualenv to isolate Python and manage dependencies
  • Buildout is like Maven for Python projects. It's used to maintain dependencies and deploy, though it can be overkill for many projects...
  • Augeas is not Python specific and supports many configuration formats

Ulrich then went through some of Martin Fowler's principles for refactoring among other things, and also talked about Jenkins, not Python but known as the "Wordpress of Continuous Integration" because it has so many plugins. Sonar can be used for code quality.

We tried something different for the second part of the evening and watched a video of a Pyramid talk. I don't think it quite worked, even at 30 minutes it felt too long. Perhaps we should try again with a video more likely to appeal to a wider range of people, or simply shorter talks. Fair play to Diarmuid for standing up and taking the heat of answering questions afterwards ;)

Leave a comment

<~ Older posts Newer posts ~>