FUDCon KL 2012 Day 1

I arrived at Hotel Sri Petaling at around 3 AM on May 18, 2012. After very less sleep, I woke up at 6:30 AM. After having our breakfast at the hotel, we left for UCTI (the venue for FUDCON KL) in a bus arranged by the FUDCON KL organizers. After reaching the venue, we got ourselves registered at the registration booth for FUDCON and we received our coupons for lunch and tea. It didn’t take long for the other attendees to arrive at the venue.

The first day of FUDCON began with a key note speech by Christoph Wickert on “Leadership in leaderless organizations” and how this is in action in Fedora.

Christoph Wickert speaking on “Leadership in leaderless organizations”

Christoph Wickert with his key note

After the keynote, it was time for the  bar camp. Although, many were skeptical about barcamp in the 1st day of a FUDCon, it turned out to be awesome. Many a people pitched their topics for the bar camp. Among others, I also pitched two topics:

  • Transifex: A developer’s perspective
  • Agile system tests in Django

FUDCON Attendees

Since there were a lot of topics proposed and there was limited time, the topics were shortlisted based on votes by the attendees. One of my pitched topics: “Agile system tests using Django” finally made it into the shortlist. The bar camp sessions were scheduled to start at 2:30 PM. Over lunch, I was having some nice conversation with Kushal, Michel and Soumya on various topics related to Open Source and the LUG related activities in our places.

Among the many interesting lighting talks I managed to attend some (though not all) talks: Improving collaboration with other open source projects, Fedora for students, Git, Fedora and packages, etc. I had my talk at 4 PM. I spoke on:

  • System tests are needed
  • Why we need fast system tests?
  • How the Django test framework makes system tests slow?
  • How can we remove unnecessary overheads?
  • How we run faster system tests at Transifex?

For this, I used this post from blog.transifex.com.

It was an awesome 1st day of FUDCON KL. I participated in my first bar camp and it turned out to be a lot of fun and exciting. We had some post-event chats and discussions while leaving the venue. I also had some long conversation with Joshua Wulf while heading back to the hotel on matters related to spirituality. This was an eye opener and I had many of my doubts resolved by the grace of an elevated devotee like him.

So, it was an enlightening day for me, both in terms of FOSS and spirituality.

Create a dummy Fedora repository (for Dorrie)

I have been fiddling with Dorrie lately. Dorrie is a web interface to create Fedora spins, remixes and installation media. But working with Dorrie requires one to have a Fedora repository at disposal if one has to build Live ISOs. I rule the possibility of downloading packages from the internet for testing. You need to have a local repository for testing it in a nice and efficient way. I tried to create a dummy Fedora repository with 0-byte .rpm files and tried to mock livecd-creator, but I failed. I forgot that livecd-creator installs the packages during the process of creating a Live ISO. Nevertheless, this attempt was not without any result. I fixed and updated Dorrie’s code to handle offline repositories.

Now, we (I and sayan) are working on another feature for Dorrie: building installation media (just like Fedora installation DVD). We are using pungi for the purpose. If my calculations are correct, then building an installation media leaves an option to use 0-byte .rpm files. But, this is not the topic of this post ;). I will talk on how to create a dummy Fedora repository.

Fedora repositories mainly have two important components for a Fedora version: releases and updates. All files in the dummy repository can’t be fake, the metadata files have to be there for real, otherwise the packages names won’t be found. I have devised a shell script for creating such a dummy repository.


#!/bin/bash
# Destination directory
DESTDIR="dummy_repo/"

# RSYNC URL
URL="rsync://fedora.c3sl.ufpr.br/fedora/linux/releases/16/"

#file extensions to be touched
FILE_EXTENSIONS_PATTERN=".*\.rpm$\|.*\.iso$\|.*\.img$"

#patterns to exclude from rsync
EXCLUDE_PATTERN="--exclude=source/ --exclude=debug/ --exclude=repoview/
--exclude=x86_64 --exclude=Everything/ --exclude=Live/"

#This will create only the directories and 0-byte .iso and .rpm files
#Since the files created will have newer timestamp, when we run
#rsync for real, the .iso and .rpm files won't be downloaded
rsync -auvr $URL $DESTDIR --dry-run $EXCLUDE_PATTERN |
while read line; do
 if [ `expr match "$line" ".*/$"` -ne 0 ]; then
 echo $line
 mkdir -p $DESTDIR/$line
 elif [ `expr match "$line" "$FILE_EXTENSIONS_PATTERN"` -ne 0 ]; then
 echo $line
 touch $DESTDIR/$line
 fi
done

#Download metadata files
rsync -auvr $URL $DESTDIR $EXCLUDE_PATTERN --progress

This is just a sample code. The above code can be customized to do more versatile dummy cloning of Fedora repositories.

Updating all your fedora package git directories

Originally posted on Ankur's Tech blog:

Most package maintainers already know this (or use something way easier), but this is how I go about updating all my fedora package git folders:

 [ankur@ankur ~]$ cd Documents/work/repos/others/fedora-packages/ [ankur@ankur fedora-packages]$ ls aeskulap dcm4che-test fpaste hiran-perizia-fonts libmpd memaker OpenNL python-hl7 subversion trash-cli cmake detex freemedforms Inventor libtorrent mpdas OSGi-bundle-ant-task rssdler suitesparse vtk comps django-authopenid gdcm klt libtpcimgio nifticlib pyclutter rtorrent toothchart xmedcon curlpp evolution-rss gnumed libgexiv2 libtpcmisc oldstandard-sfd-fonts pystache scout transmission zlib [ankur@ankur fedora-packages]$ for i in `ls`; do cd "$i"; git pull; cd ..; done remote: Counting objects: 5, done. remote: Compressing objects: 100% (3/3), done. Unpacking objects: 100% (3/3), done. remote: Total 3 (delta 2), reused 0 (delta 0) From ssh://pkgs.fedoraproject.org/aeskulap * [new branch] f17 -> origin/f17 ca0fa88..ef4f943 master -> origin/master Updating ca0fa88..ef4f943 Fast-forward aeskulap.spec | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) remote: Counting objects: 20, done. remote: Compressing objects: 100% (17/17), done…

View original 12 more words

Ouch! My Bad

Originally posted on Subhodip's Blog:

JavaScript is powerful and Backbone.js is a nice small utility that makes it even more powerful. I was playing with Backbone and Open layers thrown over a Django system.
However there is something weird that I faced and took a good amount of my time to figure out the problem.
This blog post is kind of self note so that I notice this the first place when I face such problem again.

What was I trying to do : Write a small backbone code to display Open layers(OSM) Map.
How was I trying to do :

(function($) {
var Map = Backbone.Model.extend({});

var MapView = Backbone.View.extend({

initialize: function() {
_.bindAll(this, 'initMap');
this.initMap();
},

initMap: function() {
// Initialize Basic Openlayers;
var center = new OpenLayers.LonLat(8110203.9998955, 2170000.4068373);
map = new OpenLayers.Map(this.el, {
projection: new OpenLayers.Projection("EPSG:900913"),
displayProjection: new OpenLayers.Projection("EPSG:4326")
});
var layers = [];
layers[0] = new OpenLayers.Layer.OSM(); //some more layer will…

View original 183 more words

Dear Turkish translators

Transifex usually defines plural rules for languages according to http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html. So, the plural rule for Turkish language in Transifex is other → everything. However, lately there has been some requests that the Turkish language should have two plural forms:

nplurals=2; plural=(n>1)

The requests have been with reference to http://translate.sourceforge.net/wiki/l10n/pluralforms.

Here is a quote from a user at https://bitbucket.org/indifex/transifex/issue/26/turkish-plural-forms:

Turkish behaves like Akan for example. The rule should be:

One: 0, 1 Other: 2-999

It is only when including a count that there are no plural forms. For example:

“You posted a photo”, “You posted several photos”

is correct in Turkish, as is:

“You posted 1 photo”, “You posted 6 photo”.

So, dear Turkish translators, please share your opinion on this issue. This will help a lot to resolve this issue at Transifex and fix plural translations in Turkish language.

rtnpro @ Mukti 2012

Mukti is the annual FOSS festival organised by the GNU/Linux Users Group of NIT Durgapur. Mukti 2012 was held on 3-5th February 2012. I have attended every Mukti in NIT Durgapur from 2008 to 2011 as a student and this time (in 2012) as a speaker. My talk was on Localization and Transifex. NITDGPLUG, as always, put a lot of effort in making Mukti a grand FOSS event in the region. It was a packed with a plethora of events and had a large number of participants. Mukti serves as a great means to get together people interested in FOSS in the Eastern and North Eastern part of India. It helps newbies get more insight into FOSS.

Day 1, February 3, 2012

The first day of Mukti began with an inauguration programme. After the inauguration programme, students queued at the registration desk for registering themselves. Sayan and Gaurav came there with a small group of 1st year students (interested in FOSS) from Dr. B. C. Roy Engineering College. I spoke to them for a 1-2 hours on FOSS, how to contribute, my experience with FOSS and how I made to Transifex. After bidding good bye to the 1st year students from BCREC, we (me, Sayan, Gaurav and a few others) settled in my room at the Guest House, NIT Durgapur and started discussing on various stuff like Transifex, Django, unit testing, some college news, etc. There was also a workshop on KDE development that day by Smit Shah. After the workshop was over, the Transifex community guys from Durgapur crashed in my place and we kept hacking till late night.

Day 2, February 4, 2012

For the 1st half of the day, I came to BCREC to talk with the students on FOSS and meet my teachers and other friends. After returning to NIT Durgapur, I had a discussion with some folks interested in web development and Transifex. I discussed with them about Transifex, what it is, why it is created, how it works and how it is written. Also, we discussed on other stuffs like contributing to FOSS, python, Django, etc.  We spent the entire evening hacking on Transifex. We fired our local Transifex instance and started discussing about bugs and areas of improvement. I also explained in details to the Transifex contributors on how to write unit tests for Transifex. I also showed to them how to write a handler for a file format in Transifex.

In between, I had a good conversation with Smit Shah. We shared our views on FOSS and contributing to it, and also our experience and excitement in working for a startup. We also discussed on Manga: Naruto, Fullmetal Alchemist Brotherhood and One piece ;-) Even after dinner, we kept hacking, till midnight. The day was quite eventful. We triagged some tickets at trac.transifex.org, fixed some bugs, found new bugs to work on, etc.

Day 3, February 5, 2012

This was the final day of Mukti and my talk on Localization, Transifex and FOSS contribution in general was scheduled for this day. In this talk, I started with “What” and “Why” of localization and how it helps the global usage of a software. Also, I explained that localization is one of the easiest way to start contributing to FOSS and get the feet wet in community, learn new technologies, etc.  Then, I discussed the workflow of localization and its pros and cons.

Then, I came to Transifex, why was it needed, how and when did it start, and how it takes localization to an all new level. I discussed the technologies used behind Transifex and gave the audience a tour through Transifex. Transifex is no small thing now. It has grown over the years and it takes a lot to explain its features. Enough with technical jargon. To make it interactive, I called Sayan to share his experiences about his contribution to Transifex. Also, I shared our story that how a group of 3 newbie translators made http://www.transifex.net available in Hindi just in a few days.

Then, I told the people that how they can start contributing to Transifex and any open source project in general. But, still there was the impression that contributing is a VERY DIFFICULT task. So, I decided to hack live in front of all the audience and fix a few Transifex bugs (bugs on which we worked on the previous day, during the hackfest). I fixed 2-3 small bugs, showed what is a patch and how to commit a patch. The patches had just 1-2 lines of change. I hope the audience got my point, that fixing bugs is not a very difficult job.

Then, I shared my experiences with FOSS, how I came into the FOSS community, how I started contributing and how I made into Transifex. With this, I concluded my talk. After the session, a few students came to me with queries and we had a kind of group discussion with them.

You can find the slide deck I used for my talk at http://rtnpro.fedorapeople.org/Transifex-Mukti2012/presentation.pdf

After the talk, we headed back to the guest house and had some gossip and masti with my college juniors. In the evening, we attended the prize distribution function and then headed back to the guest room. After dinner, we started discussing about things like how to boys should proceed in their open source endeavours, brainstormed some crazy project ideas, etc.

It was an awesome experience at Mukti this year. Met with many people, made new friends, had lots of fun and a lot of hacking.

#Transifex now supports comments in Apple .strings i18n files

#Transifex now supports comments in Apple .strings i18n files. Only /* foo */ style comment in the line preceding the key value pair in the source file is saved as a comment for the key. The example below will explain this in a better way:

/*Comment for key1*/
"key1" = "value 1";

/* This comment will not be
included in key2*/

/* comment for
key2*/
"key2" = "value 2";

/* this comment will not be included in key3*/

"key3" = "value 3";

Well, I’m pretty sure that the above snippet explains which comments from source Apple .strings file are saved by Transifex. You can see the comment for a source string in its “Details” section in Lotte.

Comment for a source string imported from a source Apple .strings file