Saturday, October 31, 2009

Thunderbird Bug fixed !! :)

hey,..
despite the failure and frustration that i faced, during my several attempts to build the thunderbird project,the idea of me getting a sight into the project's code never vanished completely. :)
Through the code search agent MXR (here) i managed to take a look into the code.The MXR is a code search enginr that understands the semantics of your query (more or less =) ) . Anyway, Thunderbird suffers from a serious bug,while typing in the mail editor,the " automated hyperlink detector" mis interperts some of the written text.
For example,writing " S@Y...where" would be interpreted as a valid mail address. This is a brief description for the problem, a more detailed one could be found here.
Using MXR the following code segment was found and was observed to be of special interest to solve the bug mentioned above:
 if (aInString[pos] == '@')
195 {
196 // only pre-pend a mailto url if the string contains a .domain in it..
197 //i.e. we want to linkify johndoe@foo.com but not "let's meet @8pm"
198 nsDependentString inString(aInString, aInLength);
199 if (inString.FindChar('.', pos) != kNotFound) // if we have a '.' after the @ sign....
200 {
201 aOutString.AssignLiteral("mailto:");
202 aOutString += aInString;
203 }
204 }

Clearly the code doesn't handle the special cases as the one mentioned above.
So,as part of my this week's assignment,as well as part of my duty towards the open source comunity ( :D ) modification to the current code segment had to be implemented.
The following modification was the result of some searching problem solving techniques:
Substituding line 199 in the previous code with :

if ((pos!=0)&& (inString.CharAt(pos+1)!='.') && (inString.CharAt(inString.length()-1)!='.') (inString.FindChar('.', pos) != kNotFound) && (inString.Find("..",0)==kNotFound))

As it is obvious,each condition handles different case.
1.pos!=0: An email address cannot start with the "@" symbol
2. inString.CharAt(pos+1)!='.' : An email address cannot have a dot right after the @ symbol
3.inString.CharAt(inString.length()-1)!='.': An email address cannot end with a dot.
4.inString.FindChar('.', pos) != kNotFound : An email must contain at least one dot(but not in the previous positions)
5. inString.Find("..",0)==kNotFound : An email address cannot contain two consecutive dots.

The previous modification was developed with the help of the c++ tutorial that could be found here . (as i am no c++ expert myself :) )

Unfortunately,i wasn't able to patch my modification,and get it reviewed,since i failed to build thunderbird for this reason.
Hopefully,the problem with building will be solved,and i will tell you all about it in my next post :)
Cheers,
Mina

Friday, October 30, 2009

Mozilla,Bugzilla,Chatzilla..... The Zilla life =)

Hey :),
This post is a little bit related to the previous post.As mentioned before, due to my enrollment in the Open Source Development course at my university,i'm being faced with new challenges every week. Today's challenge is pretty similar to the previous week's dilemma. Am having the hardest time trying to build a certain project on my machine locally. last week i was trying to build the BesPin(here) project,but only disappointment and failure were the result of enormous time and effort spent :S .
However and being totally honest, last week i was a little lost,and didn't quite understand what a "build" of a project meant.
fortunately this week's assignment is also related to "building" the source code of another project,so i didn't really miss the chance to learn what that means and how it could be done. The project is well known for most tech-related people, and also for regular computer users. Mozilla Thunderbird is the project that i tried to build this week .Although i have paid my dues in reading and searching and getting sufficent information before doing it, i didn't get the result is was hoping for :S . During the lab we were introduced to the whole MOZILLA world, where almost every single entity ends with "zilla" :D:D. We were introduced to Mozilla (the whole structure), Bugzilla(reporting Bugs Agent) ,Chatzilla (IRC client) and Thunderbird,on which i am supposed to work for next week's assignment.
The major problem that faced me while trying to build the project was while checking out....
I followed this tutorial while trying to build,and here is the error that occur

Traceback (most recent call last):
File "client.py", line 403, in
do_cvs_checkout(LDAPCSDK_DIRS, LDAPCSDK_CO_TAG, options.cvsroot, options.cvs, '')
File "client.py", line 257, in do_cvs_checkout
cwd=os.path.join(topsrcdir, checkoutdir, parent))
File "client.py", line 75, in check_call_noisy
check_call(cmd, *args, **kwargs)
File "/usr/lib/python2.6/subprocess.py", line 457, in check_call
retcode = call(*popenargs, **kwargs)
File "/usr/lib/python2.6/subprocess.py", line 444, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.6/subprocess.py", line 595, in __init__
errread, errwrite)
File "/usr/lib/python2.6/subprocess.py", line 1092, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

I wish anyone who sees this post,would be able to help :)

PS:Unable to build the project,doesn't mean that there is no access to the project code. You can still access it through the MXR for Thunderbird under the following link

Sunday, October 25, 2009

BesPin Setup??????

Looking at the title one may think i didn't formulate a question correctly,... however it IS well formulated indeed =),and the story behind it goes as follows :
In the previuos session of our Open Source development course
Link(click here),we were introduced to a new tool called Bespin.Bespin is an online editor that is mainly used as a build tool for bigger projects.Through the nature of BesPin and being an ONLINE editor,it provides it's users with the ability to interact,share and work on the same code,even though they might be continents far away. Which of course enhances the efficeny of thw work process,and speeds up the whole Software Engineering process. However,Bespin is not as "pink" as it seems to be ... the source code of BesPin is still under heavy development (which eliminates the possibility of working on it as my major project for the open source development course :S ). The source code is rapidly changing and there is no stable version available yet. Due to this major unstability in the source code of the BesPin projct,i faced some abnormal difficulties while trying to set the system up on my local machine :S:S . I followed all possible online tutorials,and even some combinations of those,none of them met success :S . I even wasted nearly half a day (literately 12 hours) trying to set the system up on the machine..but again with no success.
Anyway,enough for now about the current progress in the BesPin project....and who knows,maybe after today's class some positive changes to the progress might be posted on this very same blog :D!!!
Link

Monday, October 19, 2009

Ubiquity:Check your score and rank !!! :)

My first Ubiquity command :D .... and my first REAL open source experience.
Today i submitted my firt ubiquity command,in a nutshell the command allows the user to view his/her score and rank among the G-OSC community. The brialliance of ubiquity in being able to do things "on the air" or "on the fly" is emphasized in the usage of the command.There is no need for the user to open the wiki and navigate through it, he/she can simply check thier rank and status while surfing on any other page :)
I liked the idea of being able to come up with some new and innovative features,being enrolled in a community where all participants are involved within the same problems and thier solutions and finally being able to APPLY it on a real world example. :)

here is the link for the command,hope you will like it :)
link: http://se.bigbuddysociety.net/wiki/index.php?title=G-osc_ubiquity_commands#g-osc-check-scores


Screen shot of G-osc-check-scores

Sunday, October 18, 2009

My first open source experiment :)!!

Hey,..
i know it has been short since i last posted... (2 mins ago :D:D )
but i just had my first open source experience :D !!!
well i was expecting it would be a code-sharing sort of experience,but apparently this open-source world can be expanded to more than that :).
Sharing is not only restricted on code and programming sharing( as i had in mind first before actually being involved in it) it could be rather be expanded to include in general KNOWLEDGE sharing... which honestly amazes me,how people could be beneficial to each other :)!!!!
Enough talking,... here is the link if anyone is interested to have a look on the "problem" i posted the solution for,it is a rookie mistake actually not a problem :)

the link:http://getsatisfaction.com/mozilla/topics/control_space_doesnt_trigger_the_ubiquity_command_window_to_pop_up

hope it's useful to u all :)

Ideas Source

Hey guys for all those who are enrolled in the 914 course at the GUC,there is a very nice website for getting ideas to work on for assignment 2 :
http://getsatisfaction.com/mozilla/products/mozilla_ubiquity

hope it's useful to u all :)
Hey,
First of all let me start by introducing myself. My name is Mina Metias,I'm a computer science graduate (from the German University in Cairo) and currently I'm doing my pre-masters courses in the GUC as well. I am a DEO (Deutsche Evangelishe Oberschule in Kairo- German School in Cairo) graduate.
This is my first time to have a post on a personal blog,it is in fact the first time to have a personal blog at all. It might seem wired that i am a a computer science graduate and i don't have a personal blog yet. Actually what motivated me to have a personal blog, that it was the main task in one of the courses i'm currently enrolled in, namely the Open Source Development course. Well that is enough for now, and wait for more posts,as i'm really liking the idea of posting "whatever comes into my mind" =) .