Just finished preparing a presentation on Dreamwidth. I guess Dreamwidth will be the best project to start with. Since it has a lot of support from its community.. 
I couldn't do any stuff in dreamwidth for last two days. Hope I will be able to start it again with in a few days. I think I will go back to college within four days. Thinking of doing some other bug fixes.
Today I could submit my first patch to dreamwidth. Now I'm waiting for someone to review it and give some useful suggestion. Also I'm ready to make any other redirections like mobile.dreamwidth.org to dreamwidth.org/mobile, etc. Since its really easy to make such improvements on that. Now thinking of doing some other bug fixes by the time it gets reviewed.
After working for a fews days on the bug - 1059 bugs.dwscoalition.org/show_bug.cgi , I could make some fixes on dw/cgi bin/Apache/LiveJournal.pm. I checked it my dream-hack account which worked well. Thus I could submit my first diff to bugzilla which is still to be reviewed. I actually thought of making it in some more general way so that other redirections like mobile.dreamwidth.org to dreamwidth.org/mobile ,etc could also be implemented. But I could find that since all reserved usernames need not be redirected, it is of no use. Since there exist a lot of reserved usernames which does not have any page to be redirected to. I could get this useful information from the IRC of dreamwidth which is very helpful as usual. So I hope my fixes can fix this bug.. Hope it will be reviewed soon...

Dreamwidth

May. 30th, 2010 06:34 pm
Updating my dreamwidth after long one month. Now all exams and other duties over. I came back to college. I never knew that its really so nice to work in college during vacation. I learned some new language "Perl" which is required for dreamwidth. I didn't find it much difficult to learn it. May be because I had some basic knowledge in Python and other programming languages. Now busy with dreamwidth. Trying to do some bug fixing. Found some bug like redirecting "shop.dreamwidth.org to dreamwidth.org/shop" as interesting. Just looked around and heard from IRC that all redirections are referred in redirect.dat. Then I started searching for redirect.dat. I found that it is present in /dw/cgi-bin. Then I looked around and found something named Livejournal.pm in /dw/cgi-bin/Apache. I found some code like this as something related to my bug..That stub is :
my %REDIR
# redirect data.
foreach my $file ('redirect.dat', 'redirect-local.dat') {
open (REDIR, "$LJ::HOME/cgi-bin/$file") or next;
while () {
next unless (/^(\S+)\s+(\S+)/);
my ($src, $dest) = ($1, $2);
$REDIR{$src} = $dest;
}
close REDIR;
}

My understanding :-
Here REDIR is a hash. There are two two possibilities for using foeeach function.
One for looping through all elements in an array and the other for manipulating the values of each keys in case of a hash..
So if it has been for the first purpose, 'redirect.dat' and 'redirect-local.dat' should be some array..
But which is of very less chance since it should have an '@' symbol at its head if it had been one..
So the foreach function should have been used for the second purpose.. that is for hash...
If it had been for hash, 'redirect.dat' and 'redirect-local.dat' should be the keys of some hash which has a higher chance than being an array..
So
Now after further thinking I could understand that the redirections described in redirect.dat is from dreamwidth.org/somefile to dreamwidth.org/somefolder/somefile or something similar....

When I go through little depth of Livejournal.pm, I could understand that when shop.dreamwidth.org is taken in a browser, it is showing something like an unknown user. I found the code which is displayig this. "Unknown User. There is no such user shop at dreamwidth studios."
The code is :-
elsif ($opts->{'baduser'})
{
$status = "404 Unknown User";
$html = "

Unknown User

There is no user $user at $LJ::SITENAME.

";
$generate_iejunk = 1;
}

So if some checking of $user is done and if it is found to be shop. I guess it
can be redirected to dreamwidth.org/shop by calling the sub_routine redir
defined in line 174.

I think this can also be done in a more general way so that other redirections
like mobile.dreamwidth.org can also be performed. As in redirect.dat, If we
declare the reserved usernames and the correspong links to which it should be
redirected in some other file and if we could redirect to corresponding links
according to the username, I think this bug could be fixed. I am not sure
whether what I felt is correct. I could very well be wrong.

Perl

Apr. 20th, 2010 11:29 pm
Having some basic knowledge in PHP and Python, hope learning perl won't be a very big task. Now very busy for next two days. Also end-sem exams approaching, now its time to brush up class portions.
Thinking of doing some contributions to Dreamwidth. I was asked the difference between dreamwidth and a blog. I couldn't explain it in a good manner. So as usual googled and found something which I should have already known.

Profile

Sreenath T.V

January 2011

S M T W T F S
      1
234567 8
9101112131415
16171819202122
23242526272829
3031     

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Apr. 23rd, 2025 12:13 pm
Powered by Dreamwidth Studios