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.

Thursday, 16 May 2013

Rants Against Religion

Its been  a long time since I visited my blog! The last time an issue was so important to me that I wrote about it somewhere, it was concerned with the issue of objectification and degradation of women( http://qr.ae/Tq7UR ). For a change, this time I am not dealing directly with feminism. This time it is religion.

Religious books are not a new entity. A book cannot do much wrong if people have brains. I might sound arrogant but people today are dumb. Why do you need a book to tell you that it is not okay to hit your wife or why it is improper to be cruel? If the only thing that stops you from going on a killing spree is a goddamned book that tells you about heaven and hell, then you have a serious morality issues.

What a religious book tells you:
1. There is a guy( God ) who is invisible to everyone and omnipotent. He was bored so he created the universe.
2. Then Adam or some other guy( like Manu in Hindu mythology ) was created and he alone or with his consort was responsible for creating the human race.
3. Then another guy came along because humans became big time sinners. eg. Jesus came once but Hindu Gods keep taking avatars.
4. You have to follow these rituals, you have to fast during this duration or on particular days, you have to pray everyday or the guy will get angry and send you to hell.
5. So this is a set of values which should basically be common sense but only I can decide what is right and what is not and you all are too dumb to realise humanity.
6. Know what I am not awesome so I will just create a few differences and discrimination. So, you guys become Shudras, you guys become Brahmins blah, blah.. Kill the infidels.
7. I am not a woman and I fall for women too easily so I will dictate how a woman's body should be proportioned so that she looks good to me. Oops, another problem, I don't want women to be equal to men so I will ask them to cover up every last nanometer of their body. Yeah, tresses seduce me, so cover that up.
8. You must believe that I will help you. I know I am invisible but manipulative.
9. Kiss my feet.

Most people will find this offensive but this is what the religious books really are. The sad thing is even though they were written centuries ago people believe lies to be still relevant and follow it to their graves.

No book should ever assume that its readers are dumb and cannot decide for themselves. Of course, people are ignorant about certain things till they read a book. No book or person should decide for someone else until the person is not equipped to think. This is exactly what these books do.

When you read these books you tend to give up your belief in science and go looking for this mysterious guy. Yes, all religions have fundamentalists and moderates but the moderates did not stop the fundamentalists. Fundamentalists are a nice example of what happens when you read religious books blindly and too often.
Some people are religious and nice but most of the religious people are not what a human should be. They are blinded by religion and reason is their enemy. Why? Because God likes it this way.

Religion is a thousand minds gripped by the same idea.
- Author unknown to me.

Thursday, 25 April 2013

Stepping Into the Mediawiki Community

Does this really need an introduction? I don't think so. After all, Wikipedia saved our day in high school and continues to help us out of situations when we forget a few terms. Some of us help in improving the articles available on Wikipedia, while some of us don't care to do so.

       It is actually very beautiful to see a community whose aim is "free knowledge for all" when everyone is busy with copyrights. No, I am not totally against copyrights( a topic for another post ). I tried entering the Mediawiki developer community in November 2012. It feels good to enter a community of developers who are ever-ready to help each other and newbies.

     I would like to thank Mark Holmquist( http://wikimediafoundation.org/wiki/User:MHolmquist ) for being the initial contact point with the huge community of developers. It can get confusing for a newbie to understand how things work in the bigger picture. He, definitely is one of the most patient programmers I have met till date. You enter the community and realise "Woah! This is huge!". People do not give much thought to the behind the action scenes. I have come to believe that behind the scenes work is usually more interesting.

     I can continue talking about the awesome people I come across everyday in the Mediawiki community but I am really short of time because of the approaching exams. I still can't help mentioning Sumana Harihareswara( http://www.mediawiki.org/wiki/User:Sharihareswara_(WMF) ) because anytime you need help she is there to clear your queries.

     If someone wants to improve the quality of one's own code, he/she must enter the beautiful and smart world of FLOSS. I must stop now so that I can go back to my academics or I might end up helpless for the approaching exams. Good luck.

Tuesday, 15 January 2013

Can't Control Randomness Anymore...

"A woman's heart is a deep ocean of secrets". -Gloria Stuart
We have a tendency to lose friends as we grow up. We start keeping a lot of secrets. It starts to dawn upon us that growing up does not necessarily mean that you are free and relaxed just because you no longer have to do compulsory home work just because you dread punishment your teacher might give. Some of us feel sorry for growing up. Some of us feel that it was bound to happen and react to adulthood as if it was just sulfuric acid reacting with potassium permanganate to give magnesium pentoxide.
 
   Personally I feel overwhelmed by the number of emotions and thoughts I realize each day. As a school girl I loved science, had strong opinions about various social issues but never imagined myself debating technical issues or protesting against Microsoft's plans of disbanding Linux based operating systems. I thought I was meant for handling social issues and curing people. Every time some one asked me "What do you think you would be doing at the age of 20?" I would imagine myself at AIIMS ( the only medical college I knew back then ) and reading about the human organ system voraciously. Sadly because of several issues, mainly lack of confidence, I did not end up where I would be in peace. I always wanted to know the intricacies of the nervous and circulatory systems. India lacks neurologists and I wanted to reduce the deficit, even if it was just one person. I hate to people suffer just because they do not get the kind of neurological care they need. (I know it looks out of context, so I would call that an RTFact).

    I came to Roorkee and got introduced to feminism and realized the sleeping feminist I always carried. "When sleeping women wake up, mountains move."-Anonymous. All my words which I had considered to be rude or against society slowly started making sense. Why shouldn't they? After all, they are fighting for a section that has been oppressed for more than a millennium  I have come to realize that feminism is the best ideology any person can choose because feminism is no longer just about females. Its about everyone. You can't call yourself a feminist if you discriminate against homosexuals or choose to believe that people with dark skin are ugly and need to be pitied and consoled. Feminism sensitizes you towards everyone in your society. If you believe that you could help the victims by appealing to the moral sense of oppressors then you can try doing that but a lot of feminists do not believe in it. The only reason is that we have tried and tested it and we did not get our freedom by doing so. We got our freedom by revolting against the existing social order. We chose to defy social norms. We did not take up arms to demolish the existing patriarchal society.

    Although I never imagined myself to be involved with tiny quarks, now I cannot imagine myself without quantum physics. Life would suddenly be so boring for me. Physics gives you consolation and sympathy which no one can provide. It gives you love, desire, addiction, fascination and an escape. It can sneak anywhere. People might have never expected the nuances of quantum physics to sneak into bits and bytes of computer memory. The best thing about physics is that it lets your imagination loose but constraints you using its laws. You cannot defy them. You love to follow them. I still imagine an alternate universe that split at the point when I decided that I wasn't good enough for medical sciences. I know that in some other universe I am the girl I always wanted to be. A girl using the AIIMS library as her second home, a girl well versed with the various areas of the human brain. And in that universe I am  the chosen one.