ClojureBridge Edinburgh

Developer Joe Wright teaching Clojure

On September 27th 2014 Girl Geek Scotland held the first ClojureBridge event in Europe was in CodeBase, Edinburgh. This was a one day coding workshop introducing women to the functional programming language Clojure.

The event broke new ground for Girl Geek Scotland, which has previously run talks, dinners, networking events and business development workshops across Scotland. Like other chapters of the Girl Geek Dinners organisation worldwide, Girl Geek Scotland has responded to the changing needs of women in technology careers.

As the word got out about the workshop, we recruited both enthusiastic volunteers and sponsors. Thanks to GitHub, ScotlandIS, Entrepreneurial Spark, Scott Logic, NCR, LispCast, and Tommy Hall, we were able to cover the costs of the event, and give all the participants Clojure e-books and videos to continue learning after the event. We found eager teaching assistants from the local programming community, and further volunteers to help with organising and running things on the day.

Things went pretty smoothly at the installfest (where learners set up the software required), and at the main workshop the next day. Over 20 women came along to learn Clojure, and the teaching assistants alternated between presenting programming concepts and coaching learners through the exercises. Food and drink was served, and all participants left with a stylish tote bag as a souvenir of the event, and advice on local programming groups where they could continue learning.

Following the success of ClojureBridge Edinburgh, there are further European workshops planned in London, Solingen and Berlin, with more in the pipeline. Girl Geek Scotland is also planning further coding workshops introducing other programming languages, which will be announced in the coming months.

AdaCamp Berlin

AdaCamp Model Release

This month I had the privilege and the pleasure of participating in AdaCamp Berlin, a weekend-long unconference of women in open source software and open culture, held at Wikimedia Deutschland. The event brought together women from all over Europe and beyond, from a variety of different backgrounds. There were developers and other specialists working on open source projects, women running hackerspaces and coding education events, and writers and academics working in open information and fan culture. I attended as an open source contributor and organiser of coding education events (ClojureBridge, Learn Tech Edinburgh), and I’m grateful for the support of Wikimedia UK to do so.

The sessions developed by the delegates covered topics of culture, diversity and safer spaces in open source, feminism, activism, careers, and privacy and security. It was this last topic which I found most interesting, particularly in the context of the doxxing and other harassment of women in GamerGate, and the decision of Kathy Sierra and Julie Pagano to withdraw from engagement with the tech community. Securing your online presence to minimise these risks is a reasonable precaution in a world where being a woman in tech (with opinions!) can attract some very unwanted attention, and has the added benefit of protecting you from financial crime and other exploits. I would like to run a workshop on privacy and security in the future, so please get in touch if you’d like to help.

There was some criticism of the event in the wider open source community for ‘solving sexism with more sexism’ (by excluding men). It can be hard for people who have not experienced being in the minority to understand the reasons for having safer spaces and events where a group can discuss the unique issues they face. I know many good men in the tech community who make good contributions to discussions concerned with gender equality, but there are opportunities elsewhere to do that. The presence of people who do not share a common experience can deter those present from fully sharing their stories, so events for minority groups (gender/race/sexual orientation etc) are needed in addition to inclusive events open to all.

AdaCamp Berlin was a fantastic experience, and I’d recommend it to any woman interested in open software and culture. The Ada Initiative plan to run more of the events next year, and I hope that one of these will be in the UK (Scotland please!). I’m also keen to bring what I learned to making the tech scene in Scotland more welcoming to women and other under-represented groups, so very happy to speak to anyone who organises events and meetups.

A Different Kind of Nationalism

We’re now into the final week of campaigning for the Scottish independence referendum. Polls are showing it’ll be very close, and no-one really knows which way it’ll go, not least because the turnout will be higher than other elections. I agree with many others that the level of political engagement has been amazing, and I hope that this keen interest in our futures continues afterwards, whatever the result.

I will be voting Yes on September 18th, and strongly encouraging others to do so. I’m English by birth and Scottish by choice – I’ve lived here all my adult life. I believe that Scotland will be better off having the power to make its own decisions in all areas, as its economic, social and political makeup is significantly different to the rest of the UK. A country with a similar population to Denmark and Norway, with vast amounts of land and natural resources, can certainly thrive as an independent nation. That’s not to say that it will be a smooth and easy journey, of course, but it’s impossible to achieve your potential without taking a few risks. Indeed, the greater risk might be to stay as part of the UK.

The grassroots Yes movement which has overtaken the country in recent months has little in common with the xenophobic nationalisms of continental Europe. I have heard reports of individuals supporting the Yes side engaging in anti-English abuse, but people have also been physically attacked by No supporters (some of these incidents may be sectarian-related). Neither camp can choose who backs them, and if the Yes campaign has the unwanted support of a few anti-English racists and other undesirables, Better Together are busy distancing themselves from the Orange Order, UKIP and BNP.

A driving force behind many swings to Yes has been immigration, and the ability of an independent Scotland to welcome more migrants. The UK’s tightening immigration policy has long been unpopular in Scotland, a country in need of an influx of younger people to balance its ageing population. It’s currently difficult for skilled people from outside the EU to stay in the country (unless they’re wealthy, of course), and this is damaging the economy and breaking families apart. The Yes campaign has strong support from a number of groups rooted in diaspora communities in Scotland, such as Africans for Independence, whose supporters well understand the challenges faced by countries post-independence.

I was talking to a No-voting friend, and one of the few things we could agree on was that the Better Together campaign has been terribly misjudged and mismanaged. There are few better ways to encourage support of the other side in a dispute than to patronise them, accuse them of being overly sentimental and irrational, and deny them fair representation in mainstream media (I think there’s a feminism joke in there somewhere!). This shouldn’t be the reason behind someone’s decision, but it appears the campaign’s conduct has changed many people’s minds in an unintended direction.

The End of an Internship

I’ve now come to the end of the internship period with Wikimedia as part of the FOSS OPW scheme.  It’s been an intense three months, during which I’ve learned a lot about software development and about myself – I intend to write more about lessons learned in a future post.  I’ve not quite achieved as much as I hoped to, but I’ve released software, picked up a lot of new skills, and gained a definite enthusiasm for participating in open source projects.

I’ve put out an improved minor release (1.9.6), and the major one is under development, with release planned for early September.   I’d also like to continue work on other enhancements to RDFIO in future – this includes implementing a triple store shared between wikis, possible improvements to the RDF library used, and other changes for improved interoperability.

My internship with Wikimedia through FOSS OPW has been in turns challenging, rewarding, frustrating and enlightening.  It has opened up new career possibilities, taken me to new places (geographical or otherwise), and given me an improved confidence in my abilities.  I’m currently looking at job opportunities in relation to open source, and planning to attend the next SMWCon in Vienna this October.  I’ve also been accepted for AdaCamp Berlin, which takes place the following weekend at the offices of Wikimedia Deutschland.

I’d like to thank the people who has made this possible – the GNOME foundation, Wikimedia, my mentors Samuel Lampa and Joel Sachs, and everyone who contributes to the software which makes the world go round.  I’ll do my best to spread the word, and help more people towards making their first contributions to open source.

RDFIO 1.9.6 Released

I’ve now completed and released an update to RDFIO, version 1.9.6. Much of the changes here are under-the-hood refactoring and laying the groundwork for features in the full template-handling version to come. The changes visible to the user are:

  • New expanded admin page, now including tables of data sources and templates associated with pages
  • Data source wiki page created for each URL used for importing data (RDF or SPARQL). This will be used later for source management and provenance tracking
  • RDF import page now shows whether import was successful and the imported triples, in the same way as the SPARQL Import page
  • Better indication of whether ARC2 store was successfully set up

Meanwhile on the development Git branch, I’m working on replacing the Wiki Object Model (WOM) extension in order to remove it as a dependency.  This is particularly important as it is no longer actively maintained.  An additional complication is that WOM’s documentation has been removed from the external website where it was hosted, and the extension’s developers have so far been unable to supply a copy.  This  means having to deduce what the extension’s functions and objects do by observing their behaviour through debugging in the IDE!

The new way of extracting facts from the page and templates uses regular expressions to parse the wikitext.  As well as replicating the existing WOM functions, the parsing process gets the names of the templates used within the page, the parameter names used within the template, and then extracts the property-parameter pairings from the wikitext within the template page itself.  I’ve already developed the extracting part, so next is the comparison of properties and categories to the existing page and rewriting the page wikitext.

The Lure of Lua

One of the key questions to consider in the RDFIO project was the use of the programming language Lua. It’s the scripting language of choice within large Wikimedia projects (Wikipedia, Wikidata etc), and I had positive feedback from people I asked about the possibility of using it. I researched its usage and syntax, and found it interesting and potentially exciting to work with, However, as with any design decision, I needed to consider both sides.

The case for using it was that it’s a powerful scripting language which can be used to write more elegant and faster code than the equivalent in PHP. The Scribunto extension within which it is used is well-maintained and stable, and used by major Wikimedia projects in production.

The primary use of Lua elsewhere in Wikimedia is for writing flexible and often complex templating functions, able to deal with wide variations in input parameters, or dynamically create content from data stores.  My initial intention was to use Lua to parse wikitext templates and carry out other data manipulation functions. However, Lua would also bring an additional dependency of the extension Scribunto.

Ultimately, I decided that the use of Lua in this context was not warranted. The potential benefits in terms of performance and code clarity are not great enough to justify adding another dependency. This may change if Scribunto is added to the standard MediaWiki or Semantic MediaWiki installations in future, in which case the more processing-intensive parts of the extension could be rewritten.

Taking the Mic

An important part of working as a developer (and in many other careers) is being able to talk about your work in front of an audience. It provides visibility for you and your organisation, and can open up opportunities for future work and collaboration. If you belong to underrepresented groups in tech, stepping up to the mic can help people like you to see a career for themselves, and also change the attitudes of others. I have now given two talks on RDFIO, and plan on more, learning as I go.

My first experience of public speaking on this project came within the first week of the internship. I had traveled to Montréal to attend SMWCon, and my mentor Joel and I had proposed a short talk on RDFIO as part of the schedule. We worked together on it in Ottowa on the Tuesday, and tried out a very rough cut on Joel’s colleagues at Agriculture and Agri-Food Canada. When the time came on Friday morning, I was pretty nervous, and Joel took over the introduction. However, I soon recovered and managed to deliver an overview of the project and what I was hoping to accomplish. However, I knew I could do better, so started thinking about how to improve for next time.

In preparation for my next talk, I had an online meeting with Jen Myers, an experienced conference speaker and instructor at Dev Bootcamp and Girl Develop It. Jen runs a weekly office hours for women who are beginner tech speakers. We had a very useful chat on Skype covering talk structure and performance tips, leaving me feeling a lot more confident about preparing for my next speaker slot.

When giving a talk, I prefer to improvise rather than stick to a strict script. However, that doesn’t mean that preparation isn’t required – freewheeling takes practice. One of the best tips Jen gave me was to develop a mental map of the path of the talk, so that if you meander off at any point (which is fine), you can find your way back to where you were going. I spent a while running over the content, finding where I was liable to stray that bit too far and where there were dead ends.

My presentation was at the Open Knowledge meetup, which this month was held at the Scottish Parliament in Edinburgh. We went through airport-style scanners, and then I chatted to some of the other people attending whilst I waited. After a couple of talks and a break, it was my turn, and I cued up my slides on the touch-sensitive projector screen (which was fun to use!). This time I felt far more confident and assured, and ran through the content with a clear idea of where I was going and little hesitation. It just goes to show that the right preparation can go a long way, and most things get easier with practice.

There’s no video this time, but I did get to pose with a parliamentary mace:

mace

Changing a Special Page Name in a MediaWiki Extension

As part of the redevelopment of RDFIO, I needed to change the name of one of the Special pages for the extension, due to its usage broadening from ARC2 setup to more general admin for the extension.  For the benefit of anyone else looking to do this, I’ve produced a short guide.

Files to change:

  • /extensions/[ExtensionName]/specials/Special[OldPageName].php
  • /extensions/[ExtensionName]/specials/Special[OldPageName]_body.php
  • /extensions/[ExtensionName]/[ExtensionName].alias.php
  • /extensions/[ExtensionName]/[ExtensionName].i18n.php
  • /extensions/[ExtensionName]/[ExtensionName].php

Rename the files Special[OldPageName].php and Special[OldPageName]_body.php, substituting the new page name into the title.  You now need to amend all the places within these files and the rest of the extension which reference the page.

Most of the changes can be done using a text editor’s Find and Replace command.  It’s a good idea to check and approve each replacement individually to make sure you don’t change any longer strings which include the page name but are not related.  In Vim, the command to do this would be:

%s/[OldPageName]/[NewPageName]/gc

The most difficult part of the process is dealing with localisation in the alias and i18n files.  As the English page title and possibly the page contents have changed, this affects the accuracy of the translated page titles and information messages displayed in other languages.  Some parts (e.g. acronyms and product/brand names) are used intact in the translated text, whereas other words require a new translation.  This can be done via TranslateWiki – if there is not already a translation for the term available, a speaker of that language can provide one.  It’s worth evaluating the likely user base of the extension and whether the target languages are adequately covered.

Development Begins in Earnest

A little later than scheduled, I’m all set up to start development on RDFIO.  The main reasons for delay are that I have needed to spend more time than expected doing research and troubleshooting development environments.  There’s certainly been a lot to learn, and it’s easy to underestimate how long it takes to find and assimilate all the information needed.  However, I’ve revised the schedule and am very keen to get stuck in.

The current version of RDFIO is 1.9.5.  The plan is to produce 2 releases during the project.  This allows for a ‘trial run’ of the main release, while producing output which adds to the software functionality and reliability.

  • 1.9.6 – adding a configuration page for data sources and type-page matching, plus minor refactoring and general code tidy
  • 2.0.0 – implementing template manipulation and optionally shared triple store (time permitting)

The project is using a popular Git branching model, creating a main develop branch from master, plus release and feature branches as needed.  The main development environment is a local LAMP installation on an Ubuntu laptop.  I will be using Vim for general editing, with the PHPStorm IDE for troubleshooting and in-depth analysis.  Changes will be pushed to my copy of RDFIO on GitHub, from where pull requests can be made to the original on Samuel’s repo.

There are a few other environments which I have access to for development and testing purposes.

  • Biowikifarm, where the test environment is part of the development of a Botanical Knowledge portal.  Installing the software in this setup revealed an issue with database permissions, where a user who does not have database administrator permissions is unable to set up the ARC2 data store.  This has been flagged and added to the development schedule.
  • Wikimedia Labs, where I requested to set up a project with a single-instance Wikimedia host.  This gives the opportunity to test performance in an environment more like Wikimedia production servers, in case of the extension being considered for use in Wikimedia projects.
  • A virtual machine which might be used later to give users the chance to try out RDFIO before installing it.  Samuel made a screencast of the installation process for RDFIO and all its dependencies while setting up this machine.

WikiApiary – A Hive of Information

As part of the requirements gathering for the RDFIO project, I needed to find out a bit more about websites currently using Semantic MediaWiki.  One of the presentations at SMWCon was by Yolanda Gil, on the subject of Provenance Bee, an extension of WikiApiary.  This pointed me towards a useful source of data on wiki usage.

The WikiApiary project offers fascinating insights into websites which use MediaWiki software, from the sheer breadth of subjects covered to the variety in the use of categories and the dynamics of editing activity.  As well as being able to view the details for each individual wiki, there are aggregated statistics and graphs on extensions, skins, wikifarms, hosting providers and software versions.

The page on the Semantic MediaWiki extension had some useful information on the versions in use on the tracked sites.  The main statistics page had information on the versions of PHP and MySQL in use, but this was for all wikis, so the site didn’t seem to have the information I needed.

However, WikiApiary is itself a semantic wiki, so I just needed to ask it the right question.  With a few changes to the #ask semantic queries from the main statistics versions, I was able to add information on the software versions used specifically for semantic wiki websites.  Hopefully this will be of use to other developers on SMW-related projects.