Thursday 30 August 2012

GSoC Concluded


This week Google Summer of Code concluded. It was great learning experience working under openSUSE and getting to know people here especially my mentor Michal Hrusecky, whose brilliance helped me sail through GSoC. But unlike GSoC, the Karma plugin still has a long route to travel before it approaches completion. I have chalked out the following things to work upon in the coming weeks.

  1. Talk to the artwork team and improve upon the badges and come up with cooler and more creative ones. ;)
  2. Karma user rank Calculation does not fare well with current elgg and PHP version, so find out a better way to calculate ranks.
  3. Karma OBS implementation is not very clean. Run some tests to improve it. Also it takes a whole lot of time to complete searching for packages that have been updated latest, so, find out a better plan.
  4. The twitter implementation is not able to reward protected users on Twitter, try to fix that.
  5. Work on allowing people to iframe their karma stats on their blogs like on Ohloh suggested by Michal.

Till then you can review Karma on Connect and let me know how you feel about it. You can also find the documentation here.

Thursday 16 August 2012

Karma weekly report and minor fixes.


This is my report for the last week, developing the Karma plugin for Connect.

There are 2 things I have added to karma in the last week. First off, Karma widget shows who all gave away kudos to you. For each kudo, there is one extra point added to your score. Also, each user can give away only a limited amount of kudos in a day, which is maximum of, 2 or whatever multiple of 500 your total score is.


Next, Karma widget also shows user rank. This is the rank of a user based on total karma score attained. This rank is purely score based irrespective of whether karma is developer or marketing type. I have kept the Rank calculation also a part of the cron script, so that means ranks are calculated every 5  minutes.


Also, during this time Marguerite Su, chinese wiki admin pointed out that wiki score calculated during karma score updation didn't include localed wikis. So I corrected the wiki and planet openSUSE part to include localed wiki and global posts.


I also fixed some minor bugs with wiki score calculation and kudos calculation.

I have started off with the documentation, though not much has been done, I  will now concentrate solely on that.

Saturday 4 August 2012

Karma statistics available through Connect's API


In my previous post, I mentioned about allowing karma statistics to be available through Connect's API.  So, that is done. The method karma.details which requires a GET call, passing the username of the user, called only after authenticating with the api, returns user score in each respect, i.e score on fixinng bugs, making posts, tweeting, build service commits and wiki edits. It also returns user badge and the last karma update time of the user.


I plan to deploy the second version of the Karma plugin as soon as my mentor Michal Hrusecky, who is away currently, gets back. Also, if you have any ideas to give across or want to comment on how you liked or disliked the karma plugin, do leave a comment, I will work on it and improve it in the second version itself.


Next, I am starting off with the documentation. Hope to finish this asap, not much time left for the pencils down date. 

Friday 3 August 2012

Karma rewards Wiki Edits


This my report of the work done in the past few days.


Another feature that has been added to the karma plugin is rewarding people on making Wiki edits. Karma fetches all wiki edits made by each user on Connect using their username and rewards them. Starting from the last 10 wiki edits, all are rewarded. For now there isn't any criteria to judge the significance of each wiki edit, because since openSUSE wiki is aimed at providing information regarding openSUSE and its distribution so each one is important to openSUSE and deserves to be rewarded.


During the past few days I also played with the existing karma widget a little, now it gives more information regarding the user's score, why a certain badge is awarded to you and what percentage of the maximum score is your score. I realized all these details wouldn't be of any use to others who are viewing your profile so I have segregated who sees what and made these details available only to the owner of the Karma.


After my mentor reviews the work done till now,  next I'll work on documentation and allow karma statistics to be available through Connect's API.  

Tuesday 17 July 2012

Midterm completed


I successfully completed my midterm evaluation, its awesome! I just can't stop staring at that figure in my account :D


Till now, I have completed integration of Karma with Twitter, Bugzilla, planet openSUSE and Build service. The Build service part though complete, still needs modifications due to some troubles in the approach that I am following. Using the api and getting commit history or parsing the changes file associated with each package both have some side effects. So I'm still looking for a better solution.


Then I also have plans to reward people on forums. People providing technical help to others deserve to be rewarded I think. Though I haven't researched on how to go about it, so I won't commit anything but lets  hope it works out.


And karma plugin is deployed on Connect and working, so pull in that widget on your dashboard or your profile and have fun. I made a post about the karma widget not working but I completely forgot to post about the issue being resolved, my bad :)


So try it out, and please let me if you like it or dislike it even or leave any suggestion for me, if you think I can make it better in any way.


You can even check my code at Karma. Let me know what you feel.

Tuesday 26 June 2012

Karma version 1 released


The first version of Karma plugin is out on Connect. Users can add the karma widget from the widget gallery, it might take a minute to load, because karma updates if you view your widget the first time or every hour after that.


Also, Karma fetches your activities on twitter, planet openSUSE and Novell's Bugzilla. Starting from now, Karma rewards you for your previous 5 tweets, and each of your posts that appear on planet openSUSE in the last 3-4 days and then onwards and all of your resolved bugs on Bugzilla.


There are certain things that you might notice when using the plugin, first as I wrote it might take a minute to load if karma was updated more than an hour ago. Then, only your previous 5 tweets are rewarded for, so If you tweeted about opensuse way back in the past, I'm afraid it might not be counted.   Also do not forget to use the hashtag (#openSUSE) for tweets to be rewarded, and its case insensitive :D


Those of you who have aggregated their blog feeds on Planet OpenSUSE but haven't mentioned their blog url on their Connect profile, will not be rewarded, same goes for Lizards blog. Though rectifying this is in the pipeline, but not now.


Please check it out, let me know if you like it or even if you dislike it completely, I think I can do something about that. :)

Monday 25 June 2012

Karma update on Widget view


Weekly Report (14 june - 21 june)

In my last report I mentioned about having separate developer and marketing Karma, as I had problems comparing tweeting with Bug fixes or commits. Well, I have accomplished that. We have separate Developer karma for score achieved on fixing bugs or making commits on OBS, Marketing karma for score achieved on tweeting  and posting on Planet openSUSE. Appropriate badges are awarded on securing a higher developer or marketing karma.


During this time  Michal my mentor, tried deploying Karma on the Connect website, but the karma cron script would not run to completion for all Connect users due to certain limits on server or gateway or both. So the idea was to reorder the query and run cron script more number of times with less users each time.


Within the cron script, I save the time of the last run as metadata belonging to a user entity. Then use this metadata to order the query and get 5 users who have been the longest without updating. Cron script now runs every five minutes for 5 users who have remained longest without updating.


This would work with users who already have the karma last update time saved in the database somewhere, so the cron script also assigns this metadata to all users to whom it has not been assigned yet.

 
Then I also worked out the updation of karma on widget view (this is not a part of the cron script). If karma was updated more than one hour ago then karma details are updated on widget view. Assuming Connect has 2000  - 3000 users it would take 33 - 50 hours to update for all users and come back to the first one, if we relied only on the cron script.


Hence, this suffices for situations when karma has not been updated in time by the cron script.

Tuesday 12 June 2012

Integration of Karma Plugin with Twitter


This is my report for the last week and a half(1st june - 11th june).


Firstly, the integration of Karma plugin with Twitter has been accomplished. It fetches tweets of Connect users and those which are intended towards promoting openSUSE are rewarded with Karma points.


Then I also finished off the integration of Planet openSUSE. For all those users whose blog feeds are aggregated on Planet openSUSE and who actively post are rewarded with karma points, provided they have specified their blog in their profiles on Connect.


Karma pluigns now has the ability to update user score and keeps track of when it last updated so as to avoid duplicacy when it  again fetches user activities.


It also shows exactly how many bugs a user fixed, tweets and posts they had put up, for which they are being rewarded.

Now the problem that I am facing currently and on which I am going to work next is that tweeting and posting cannot be logically compared to bug fixing but can be compared to each other. So, there needs to be separate developer karma and marketing karma so that their is logical comparison of scores and appropriate badge distribution.

Also there are certain Connect users who haven't specified their blogs in their profile but their blog feeds are aggregated on openSUSE and openSUSE members who blog on Lizards blog also deserve to be rewarded.




Thursday 31 May 2012

Cron Script for Karma plugin

In my last post, I wrote about the integration of Karma Plugin for Connect, with Bugzilla. Since then, I have progressed onto developing a cron script for the plugin which fetches user activities from various sources like Bugzilla, Twitter, Planet OpenSUSE etc and calculates score based on that . So now, Karma details are  fetched for every user on Connect regularly and stored in the database.

Previously, details were fetched on every view of the widget, which was a gross mistake on my part and my mentor Michal suggested that rather than fetching details on every view of the widget, some caching would be a better idea.

The best solution to that was coming up with a cron script. That solved out two purposes, one, karma details could now be fetched from the database, so there was no need to make a call to Bugzilla or other sources on every view of the widget, second, we always wanted score to be calculated on a regular basis rather than only when the user logged in, so we needed a cron script anyway :)

I am still thinking of other sources that I could use for fetching karma details apart fron Twitter, OBS, Planet OpenSUSE and Bugzilla. If any great idea stikes you, do let me know, I'll be most happy to incorporate it. 

Saturday 26 May 2012

Integration with Bugzilla Complete!

After my last post, I worked on the integration of Karma plugin with Bugzilla. Karma plugin now assigns to users of Connect, Karma points based on the severity of the bugs they fix. And that's not it, you get a  "Bug Squasher" badge for attaining a  high score.

The best part, Bugzilla uses the same email id for registration that users register themselves with on Connect. Extracting a list of resolved bugs by a user linked with the email id of user on Connect was pretty simple :)

Others on the list are integration with Twitter for tweets about OpenSUSE, OBS activities, planet opensuse posts. I plan to distribute karma based on user activities on these, but I would really encourage people to come with ideas and let me know if I could use other sources too, to assign Karma points. 

Sunday 20 May 2012

Coding period starts!

I have finally started working on my GSoC project now, that is the Karma plugin for OpenSUSE Connect. Since Connect is developed under the Elgg framework, hence, my project requires me to work with Elgg.
Elgg which is extremely powerful(which i realize now :) ), is totally new to me.
Still stuck up, trying to figure out why the plugin displays default Elgg icons on calling getIcon(), even when I try registering plugin hooks for entity:icon:url or using the setIcon() method to change the default url for locating entity icons!
Time to hurry up now, I guess.

Wednesday 25 April 2012

Accepted to GSoC 2012

I got selected for GSoC 2012 to work with OpenSUSE. I will be mentored by Michal Hrusecky and my project involves developing a Karma plugin for OpenSUSE Connect.

This Plugin will reward people with Karma points on reporting bugs, making bug fixes, Wiki entries, posts on OpenSUSE planet, promoting OpenSUSE events on twitter etc. People will also be rewarded with badges on attainment of specific levels of Karma points, and they can also send across positive Karma to others, to show appreciation towards their work.

Have a look at my proposal:http://www.google-melange.com/gsoc/proposal/review/google/gsoc2012/priyankam/18002#

This summer will be a great experience with GSoC and OpenSUSE.