Thursday, 13 March 2014

The Fog

The fog refuses to go away,
The sun can’t find its way,
The sun isn't mine,
The fog isn't mine either
But has found its way into my soul.


The sun is knocking,
On the doors of my heart,
Ouch, fog and sun are fighting,
Hurting and knocking down my heart.


See! fog is waning,
Sun is winning,
But it hurts me,
Yet, I just watch while they hurt me,
Yes, I will just watch.


The hurt is nice,
Like the bitterest elixir,
Spreads through me,
Altering me, Controlling me.


One little push,
And the sun will win,
And the fog is grumpily retreating,
Now, yes, now the sun is in.


Is my heart too small,
For you, oh sun?
Can you not just fit in there?
Oh yes, you are just sitting in there.
Uncomfortably, but waiting.


Will you just hang in there,
Oh I see, your heat expands my heart,
I see your trouble
Some day, it would be me in you.
A heart in the sun,
Not a sun in the heart.

Thursday, 3 October 2013

GSoC Wrap-Up

In case you missed my previous posts, I was working with Wikimedia on the project "Refactoring of ProofreadPage extension" as a Google Summer of Code 2013 intern. Do I have a word for the experience I've had in the last 5 months? Yes, stirring. My mentors Thomas and Thibaut have been the most wonderful mentors you could have expected. And I have fallen in love with the ProofreadPage extension and Wikisource. Well, I can go on and on about how good Wikisource and the experience was but I would prefer talking about the project here.

    The aim of the project was to refactor the code so that it was written in a more modular and cleaner way. We had aimed at separating the various components and actions as much as possible. Also, we tried to reduce the Javascript code to a bare minimum so that even if a user has disabled Javascript execution in his/her browser, the extension does not face any severe handicap and provides all the functionality.

    So, here is a recap of what has been done in the project:
1. The handling of Index and Page pages have been separated.
2. The editing system has been separated from the reading system.
3. The setup of editing system has been removed from Javascript and shifted to PHP.
4. The image on the read page which was being rendered using Javascript was also shifted to PHP.
5. The process of getting data from the database was separated from the processing of data itself.
6. The Javascript was almost completely rewritten. A lot of Javascript was rendered redundant when a       few things were moved to PHP. Also, we started using a new zooming library for the zooming               functionality in the extension.

I plan to stick to the project and integrate VisualEditor with ProofreadPage.

Friday, 20 September 2013

Winter of Death

An attempt at a poem after a long time. It's not very nice but one has to pick the fallen things some time.

No muffled cries of pain,
No tears with the rain,
Her attempts at winter went in vain.

The summer does not end,
She yearns not for the summer,
She wishes for the winter,
As cold as her heart.

The autumn in your heart
keeps the winter away,
Yet the winter doesn't keep away the summer.

She sought to destroy the winter,
Yet the summer wasn't strong,
It sweltered,
Peaches and melons burst,
Not her heart.

Life was as much of a traitor as ever,
Loyalty was loved,
Death would be her friend,
For she was also hated by everyone.

Death vowed to protect her,
For She was the only one,
The one whose desire for her was unruly,
She was the only one docile to her,
The only insatiable seeker.

As death departed with Her,
Life found the next one,
And danced to the maddening songs of life.

Death, the one who kept her promise,
Life, the one She hated,
Summer, always around, never in Her,
Winter, unflinchingly in Her heart.

Death, the one with Her,
The one who brought Her desired Winter
Around Her and filled Her with Summer.

Please pardon the excessive use of cliches.

Saturday, 10 August 2013

ProofreadPage extension: Mid-term Reports

Hi!
 Sorry for not-so-frequent updates. Well, my project successfully passed the mid-term evaluation. I've already talked about the need for refactoring of the extension in the last post. A few things have already been moved from the client side to the server side. We are shifting to a new zoom library jQuery-Pan-Zoom. The editing system of "Page" pages is a change not only in the aspect of being shifted to PHP from JS but also reflects a change in the way a "Page" page is stored. Earlier, while displaying the text for editing we would just use a big blob of Wikitext. There would be no differentiation between the various parts of the body like header, body, footer. ProofreadPageContent class makes these differentiations. It is organised into the main attributes of a "Page" page i.e., header, body, footer, last proofreader, proofreading level.

    The things that have been moved to PHP from JavaScript are:
1. Setting up of the editing system for Page and Index pages.
2. Display of image on the 'read' section of a "Page" page.

The major problem with the JavaScript of ProofreadPage extension was that instead of just adding functionalities on the client side, it was being used to glue the various pieces of ProofreadPage extension together. I've tried to reduce the use of JS to a minimal level except in places where it obviously needs to be there. This was done by separating the rendering, parsing and editing system into different modules so that it becomes a bit more clear as to how the various parts of the extension work together.

The classical Wiki editor and VisualEditor are organised in very different ways. The interface is the obvious difference. I am not yet decided on where to put the quality buttons when it has been integrated with VisualEditor.

    Another project that is related to WikiSource is BookManager extension. After a chat regarding how ProofreadPage and BookManager extension should work together, I have two more things in front of me:
1. Providing a nice interface to add page ranges from DjVu.
2. Switching to JSON instead of Index template that is currently being used.

The only problem with JSON is that there will be too much data and processing time would be huge for large books. The integration with VisualEditor is about to begin. <can't wait>

Wednesday, 10 July 2013

ProofreadPage Extension: The Immediate Goals and Reports

The extension I am refactoring: ProofreadPage- MediaWiki extension

Tl;Dr: Separated data fetching from manipulation and presentation, separated the setting up of editing system for Page pages and began the refactoring of Page pages.

The coding period was supposed to begin from June 17th, but once I got familiar with the codebase, the wait did not seem worthwhile.

The aim of the ongoing refactoring is to make the code more modular and bug free.
I could see why the extension needed refactoring. Oh, before I forget, I would like to thanks Thibaut, one of my mentors, Abhay( Capt. Nemo ) and, Shashank( Kumar, Microsoft ) for the initial help on how to get started with refactoring. ) There was one BIG class which had loads of functions. There were functions which were unnecessarily huge. So, I did what anyone would have done to be safe. I separated the DB queries to a separate class. Things worked fine, to my relief. It did include a little regression which was pointed out by Thibaut. This reminds me that I need to go for regression testing as well.

The aim of the ProofreadPage class should be to just 'proofread' and not worry about getting data or setting up of the editing system. Separation of editing system had already taken place for Index pages.
I did it to some extent for the Page pages. Today itself, I pushed the remaining part of editing system for Page pages.

The immediate goal is to have the code for Page pages cleaned up. This is for two main reasons:
1. A lot of bugs are caused in the extension because not everyone allows JavaScript to be executed in their browsers. Moving a few functions to PHP would solve a lot of these bugs.
2. The ProofreadPage extension needs to be integrated with VisualEditor. ( Create an account on Mediawiki and try editing an article to see VisualEdtior in action ). The integration can't be done until Page page has a nice editing system based in PHP itself.

I thought it would be nice to blog about what I was working on. In case someone would like to be updated more regularly about the extension please watch this page.

Monday, 10 June 2013

Proofread Page Extension( Mediawiki )Install Hitch

Although the extension page on Mediawiki lists pretty much everything that you need to have in order to install the Proofread Page extension, I ran into tiny bits of problem with my local install. So, it would be a nice to document the trivial errors.

1. If you visit a page and you don't find an option to edit it, then login as root.
2. If you don't see thumbnails appearing when you are browsing through djvu files, you would also see the error 'ppmtojpeg: EOF / read error reading magic number'. NO need to panic. Just add $wgMaxShellMemory = 302400 to your LocalSettings.php.

Happy coding!

Monday, 27 May 2013

Opening Blog for GSoC 2013

HI!

    I am too euphoric right now to tell you that I got selected for Google Summer of Code 2013.
I shall be working on 'Refactoring of Proofread Page Extension' which is a Wikimedia project.
The best part is that I met some really wonderful people during the application process.

    I must thank Thibaut Horel, Thomas, Sumana Harihareswara and Quim Gil ( obviously all of them are Wikimedians ) for their support and guidance. If not for SDSLabs, I might not have been in the list of selected candidates. I can't mention everyone here so 'Thanks a lot SDSLabs! \m/'. This would have been much more difficult if I didn't have a friend like Shubhechyya.

Imp: Richa Jain, Abhishek Das also got selected for GSoC. So don't miss an opportunity to ask them for a chapo.

PS: I was a bit euphoric because of the news and made the mistake of writing 3013 instead of 2013. So, please excuse my mistake.