The story of today is about the idiot who worked silently like if he is the only one who needs to know about the progress he made.
Once upon a time there was a guy called Ziko who had a final project in a course called advanced SE about the open source software. He chose 2 bugs to repair for the final project, they were irrelevant and one of them was so tiny, and actually the tiny one was repaired before he ever touches it.
He worked on the bug remaining and started looking on the MXR for the file concerning the bug (enhancement). He found the file, it was a JavaScript file. So he started to think whether JavaScript can write to disk. That looks like an easy think to know, but believe me it wasn't. There was lots of people writing how to write to disk using JavaScript, but none worked for him. On the other hand there were people saying that JavaScript has no disk write access. Seeing more people saying it is possible to write and saying how made him believe that it's possible. He asked some of his friends and who knew of them told him it's not possible. hmmmm that sucks. Anyway he asked a friend of his called Saher and he told him that he knows JavaScript has no disk access (as his other friends told him), and that he thinks it's a Mozilla component called from JavaScript that saved the files.
A new phase of search started looking for the Mozilla component that saves files on disk, and here useful links were found. And as his lecturer doctor told the students in the lab, there is a useful addon for mozilla firefox called XPCOM viewer that can help a lot in finding and trying out mozilla components. ouch...that was an old addon that can't be added to the new "Namoroka" formerly "firefox". But he found that he had an old installation of firefox where he can add the XPCOM addon. Anyway he didn't use it that much.
mmm Ubuntu would like to update, OK let it go ahead.
oOo oOo......Now the compile takes an hour again as if it's the first time compile. aaaah Namoroka updated,... that is really stupid, how did I not check for it in the update. Anyway it rolled back to the previous release.
Now we come to where he tries to write a code and see if it works. He used a very simple way to debug, anything he would like to see he "alerts" it using alert(string). And here comes some strange output. Something strange happened, which is that nothing happened. So now he doesn't know what happened. But the obvious thing is that when there is an error nothing happens. He later noticed that only when there is a syntax error nothing happens, i.e the function doesn't work at all.
Now is a historical moment in the history of this project. He found how to write to a file using a link he found while searching with his friend Atef for how to write to a file. Now he has something good happening.
The problem now is that he can't get the directory of the file or its name in the same function as the URL of the file, since the function that has the URL doesn't send it to the function that saves the file on disk. There were a lot of ideas like writing to the file on 2 steps, looking for the URL as an attribute for an object being passed, and passing the URL as an extra parameter in the function. Ziko chose this last option. Actually he was helped by Atef here too.
The next problem he is facing is that the directory is an object that can't read, meaning that the string representation of this object is in the only harder language than Chinese. So he asked his friend Saher about what could be its meaning, he told him this looks like an array, and when he tried to loop on it to see its elements he found it functions and variables. So it's not an array, it's another object. Actually it represents a file, a little later he found the interface of this object and found the directory as an attribute. Yaaaaay now he can complete coding in peace.
On this day he knew that the next day he has an evaluation, what good luck made him finish the project on the day just before the evaluation. So he went the next day expecting that there is no big deal since he finished the project and only a few things remaining that are needed after the project.
A Shock happens. The doctor almost blew his head by a nuke. She said he was so careless that she was shocked, and that he didn't work at all. She is right since she saw nothing from him concerning the final project. But now learnt something, when the doctor asks him to work in a certain way, he shouldn't working in his own way. Anyway he is almost done, and only hopes that the doctor may see his work now.
I've a surprise for you
I'm this guy
Ziko :D
Monday, January 18, 2010
Wednesday, November 11, 2009
Thuderbird "Construction Complete"
Thunderbird is one of the applications that need to be built for the open source course, some of those applications build turned into a nightmare, but this one is just a problem"much better that a nightmare".
I tried to build it for the 1st time more than a week ago, but didn't try anything, not even run it. When I started to use it recently in the mini project I found out that more than a week ago the build failed & I didn't notice. Then I tried to build it again & it failed again, then I found out about the required dependencies that are required but not resolved by the apt-get build dependency resolution and are the reason of the build failure the 1st 2 times. I installed those dependencies separately and rebuilt Thunderbird and this took about half an hour or more only building. & guess what, it worked.
I tried to build it for the 1st time more than a week ago, but didn't try anything, not even run it. When I started to use it recently in the mini project I found out that more than a week ago the build failed & I didn't notice. Then I tried to build it again & it failed again, then I found out about the required dependencies that are required but not resolved by the apt-get build dependency resolution and are the reason of the build failure the 1st 2 times. I installed those dependencies separately and rebuilt Thunderbird and this took about half an hour or more only building. & guess what, it worked.
Monday, October 26, 2009
Bespin Installation Experience
Bespin is a cool online editor, I was interested to participate and work on it. The first thing to do is to install it locally on my machine in order to be able to edit it and test it. The first time I tried to install it was in the university lab, and it was a great failure, the cause of this failure was that the university IT department didn't trust the students enough to let them install something on the the computers of a lab they use in their course. The second try was at home on my laptop. I downloaded the tar.gz source of bespin, extracted it, and installed it, and guess what...mission succeeded. I trilled and almost made a party celebrating the successful installation after the great failure happened in the lab. Then I tried to create the database to get it ready to work, and when comes trial comes failure. It couldn't find something called "path in path", and when I went to the .py file and commented the line it is complaining about, it returned something else it can't find. So I uncommented it and "tried" to install some packages to OpenSuse and then tried to create the database again, but also failed. Then a friend of mine came and "did" install it and created a database successfully although he followed the same steps I followed, but he was working on Ubuntu instead of OpenSuse which I was working on. So I took his installed version of Bespin and tried to run it on my machine, it didn't run. So I tried to create a new database but also failed. So I gave up and decided to install Ubuntu on my desktop computer to know if it's something with my machine or it's a problem or a misfortune with me.
Tuesday, October 20, 2009
Ubiquity Exercise
Ubiquity is a great tool, it makes everything easy even when you are implementing new commands.
However I went crazy & started to scream out of anger in my room when I was doing the Ubiquity exercise because at some point everything went against me. I had a lot of things to search, don't know how to post authentication, cannot install a sniffer I needed to read what the browser sends to authenticate, time is running away, I need to sleep. For instance I still need to sleep. Good night.
However I went crazy & started to scream out of anger in my room when I was doing the Ubiquity exercise because at some point everything went against me. I had a lot of things to search, don't know how to post authentication, cannot install a sniffer I needed to read what the browser sends to authenticate, time is running away, I need to sleep. For instance I still need to sleep. Good night.
Monday, October 19, 2009
Ubiquity Feedback Command
My experience in Ubiquity is nice. We had a task in the lab to add an Ubiquity command that takes another command as an argument and sends a feedback to the author of the command. Taking a command as an argument and being able to operate on it looked very tricky at the beginning, and I kept looking with a friend for a way to do that, and access the variables inside the command. We first looked at all the commands available trying to find a similar one, but that didn't work. Then we though about some naive methods, till we reached to the Go7a way of thinking by thinking about reading the documentation webpage and processing it to find the author through the web.
Finally a friend of ours told us about the function CmdUtils.getCom mand(cmdName); however it didn't work for him, and didn't work for us either. Finally another friend told us that this command works only with the new Ubiquity that's not yet finally released. By that time the lab time was almost done and we didn't finish the command, and never tried again.
Finally a friend of ours told us about the function CmdUtils.getCom
Subscribe to:
Posts (Atom)