FYI, folks.

---------- Forwarded message ----------
From: Sumana Harihareswara <suma...@wikimedia.org>
Date: Tue, Dec 11, 2012 at 4:40 AM
Subject: [Wmfcc-l] A Wikipedia Mini-hackathon in Delhi (CIS India)
To: Communications Committee <wmfc...@lists.wikimedia.org>


User:Yuvipanda led this event.

http://cis-india.org/openness/blog/mini-hackathon-delhi

"A Wikipedia Mini-hackathon in Delhi"
Posted by Yuvraj Pandian at Nov 11, 2012 06:00 PM | Permalink
Filed under: Access to Knowledge, Wikimedia, Wikipedia, Workshop, Openness

Wikipedian Yuvaraj Pandian visited the CIS office in Delhi and helped
the Access to Knowledge team conduct a super-ad-hoc mini-hackathon with
two other volunteers, Sheel from Delhi and Harsh from Ahmedabad. The aim
was to get them a kickstart in developing userscripts/gadgets, and get
them to a point where the prior existing documentation makes sense to them.

The ad-hoc plan had three parts:

    The execution environment (Concept of userscripts vs gadgets,
ResourceLoader)
    The API concepts (Special:ApiSandbox, concept of 'actions' in the API)
    Accessing the API from JS (mediawiki.api module, concept of AJAX)

Here is the account of what they did, written by Yuvi:

"We covered all parts of them slowly, with both Harsh and Sheel working
at things until they fully understood what they were doing and why
whatever they were doing was working.

I introduced them to the environment first by having them execute code
in Chrome's JS Console, and then in their own common.js. Once they
understood the context in which the code was getting executed, the
'ResourceLoader default modules'[1]documentation started making sense to
them, and they could pick up other modules from there.

We then explored the API via the API Sandbox[2], which is a relatively
new (and not very well known) way of letting people play around with the
API. It is a massive improvement over the older, non-interactive
docs[3], and both Harsh and Sheel were very excited about being able to
discover all the things they could do with the API. A fair amount of
time was spent messing around with it on different wikipedias (en, hi
and gu) and reading bits of the API Documentation[4] to understand the
concepts behind the actions - and for filling in the gaps.

Finally we had them use the API from a userscript to make calls. I went
through the entire process line by line, explaining how AJAX works and
how asynchronous programming works. We traced the flow of code together
to understand how the seamingly nonlinear asynchronous programming model
works. Then we dug into a bit of how to use the mw.loader module to make
dependencies work, and why the same code that was working in the chrome
js console was not working in their common.js.

It ended with them trying to port HotCat to their native language
wikipedias. Harsh started to explore more about getting started with
MediaWiki dev itself (rather than just gadgets), but the clone took a
looooong time and we had run out of time by then. I directed him to a
WMF tech open chat happening today, and hopefully that could help!

[1].https://www.mediawiki.org/wiki/ResourceLoader/Default_modules
[2].https://en.wikipedia.org/wiki/Special:ApiSandbox
[3].https://en.wikipedia.org/w/api.php
[4].https://www.mediawiki.org/wiki/API:Main_page

--
Sumana Harihareswara
Engineering Community Manager
Wikimedia Foundation

_______________________________________________
Wmfcc-l mailing list
wmfc...@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wmfcc-l
_______________________________________________
Wikimediaindia-l mailing list
Wikimediaindia-l@lists.wikimedia.org
To unsubscribe from the list / change mailing preferences visit 
https://lists.wikimedia.org/mailman/listinfo/wikimediaindia-l

Reply via email to