Friday, August 27, 2010

My happy Gsoc with PhotArk

Every dawn of summer blooms with expectations of laughter and enjoyments, and this summer for many students in Computer Science was the time to make their dream come true; To do a project and walk home with money.

I as a student very much interested in Open Source, this summer was so amazing. My third year at university started with Industrial Training, and as a part of it I started my intern-ship at WSO2, one of the organizations which give all its products under Apache Licence. This intern-ship gave me a very good exposure to Open Source, and this exposure greatly encouraged me to participate in Google summer of code (Gsoc)



I was also doing CIMA as an additional qualification apart from my university studies, and I thought of pausing CIMA for a year as I have to ensure my maximum contribution on computing. This sacrifice really worked out, I got a chance to work at WSO2 and also to participate on Gsoc.  I'm happy that I had enough time to sail both the boats, where I worked for WSO2 in weekdays, and also concentrate on Gsoc during nights and on weekends.

My search for a Gsoc project started well ahead of the proposal date, I had a solid one month time to look into all the projects and select one that suits me. First I went through the last year projects and after going through several mailing lists, the projects on Apache Wookie and Apache PhotArk seemed pretty cool for me.


I thought to concentrate on both, but then I found, standing on two boats with a day job in my hand is going to kill me. When time progressed I get more involved in PhotArk and finally I got selected to the project on "Integrating OpenID with PhotArk".

This interesting project was proposed by Avdash Yadav, here my task  is to implementing authentication through OpenID integration, and to provide authorization through Role Based Access Control with User Management.

As my first step towards Gsoc I started checking out the project source code, and building it. Then I started fixing some small issues reported in the Jira issue tracking system, and submitting patches. The PhotArk community got more interested in me, and gradually started applying my patches. Then they gave me some complicated tasks, where I implemented new features such as adding album descriptions, deleting pictures and albums, and so on. Then I also started writing some test-cases for PhotArk.

When proposal deadline approaches, I wrote a proposal, got it approved form my mentor, and submitted that on time. My proposal got accepted, and I finally got selected to Gsoc among 1026 students all around the world. That’s one of the happiest days in my life.

I started my project with a small research on OpenID libraries where we selected dyuproject for our implementation. During the first half of Gsoc I implemented authentication to PhotArk. Here I integrated dyuproject, and tomcat's FORM based access control to PhotArk.

At this time my mentor proposed me as a committer for PhotArk. My ambition to become an Apache committer finally became true on 10th May 2010 - just some days after the beginning of Gsoc. Because of this I also got an email id as suho at apache dot org.

After the successful midterm evaluation I implemented authorization by implementing Role Based Access Control to PhotArk. This gave me a very good experience, where we handled some problems on user friendliness based on the design and implementations of authorization. I was force to redo the implementation in-order to minimize user issues. By fixing this issue I successfully finished my Gsoc for the year 2010. This optimization of user friendliness is very important to PhotArk as this is a photo gallery application, and its user’s wont necessary have much computer literacy.

Since I was handling security I had the chance to work in almost all PhotArk modules, this greatly help me to get myself familiar with PhotArk code base. Through this now I have become an active contributor in PhotArk, Thanks for Gsoc. I like to invite every one to try PhotArk and manage your photos with it.

The detail information, and the project description can be found at the project's wiki page.

I would like to thank all who made my Gsoc a reality, and a happy one. I also request all students to take part in future Gsocs and to get the greatest experience on Open Source and some good money ;)

Friday, August 20, 2010

Forgot your password...! This is how you reset in Ubuntu.

It's a common case that when you have not used your Ubuntu machine for some time you may have forgotten your password.
If you want to reset a new password instead of your old one,
and don't want to loose any of your date this is the coolest way to do.

But for this your computer need to have a CD ROM and you need to have a Ubuntu Live CD with same(preferred) or fairly close version.

Step 1.
Insert the Live CD and boot the computer in the Live CD mode.

Step 2.
Open the terminal and change to the root user

sudo su

Step 3.
create a directory
e.g.
mkdir foo

Step 4.
Find your Linux partition.
e.g. using the command
fdisk -l

by this you will get all the partition in the computer, and by looking at them you can find out your Linux partition.
e.g.
Device    Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       18710   150288043+  83  Linux
/dev/sda2           18711       19457     6000277+   5  Extended
/dev/sda5           18711       19457     6000246   82  Linux swap / Solaris

here the Linux partition is /dev/sda1

Step 5.
mount the partition the the newly created file.
e.g.
mount /dev/sda1 foo/


Step 6.
Use chroot to access the partition as its root
e.g.
chroot foo/

now you have all the root permission to the mounted hard-disk partition.

Step 7.
Use the file etc/shadow to find out the users of the system
e.g. if the user name is bar,
use the commands
passwd bar

to change user password
and
passwd root

to change the root password

that's it! all done.
Now restart the computer and login to the system with the new password.

Thursday, August 19, 2010

Write Unmaintainable Code & Ensure a job for life ;-)

"In the interests of creating employment opportunities in the Java programming field, I am passing on these tips from the masters on how to write code that is so difficult to maintain, that the people who come after you will take years to make even the simplest changes. Further, if you follow all these rules religiously, you will even guarantee yourself a lifetime of employment, since no one but you has a hope in hell of maintaining the code. Then again, if you followed all these rules religiously, even you wouldn't be able to maintain the code! 

You don't want to overdo this. Your code should not look hopelessly unmaintainable, just be that way. Otherwise it stands the risk of being rewritten or refactored."

by "Roedy Green"

To write Unmaintainable Code, go to...