Showing posts with label bsc. Show all posts
Showing posts with label bsc. Show all posts

Thursday, June 21, 2007

Anca Luca, B.Sc.



It's all gone: yesterday I presented my BSc paper to the examiners, got my final grade and celebrated.


waiting to get in

It was a little easier than I expected, the examiners were even more biased than I thought they would be :), I was a little more nervous than I thought I would be (I wouldn't have realized it if my mouth didn't get very dry – that's how I know I'm nervous and I hate it because I can't speak properly). Anyway, the smiles I received all morning helped a lot, and I want to thank all the people that produced them: either face to face, either online (the instant messaging hugs), either on the phone. I managed to insert my usual jokes & smiles in the examining room so I biased the examiners a little more (oh, the priceless smile of the commission head, that made me realize that everything will be fine, though I kind of "missed" a couple of questions). The presentation was far more important than the actual work (at least, that's my opinion in my case), but it couldn't have been done without it.


waiting for the results

Then our BSc supervisor told us the final results, after a half an hour of waiting: I got the maximum grade (as everyone besides myself expected it).

Phones to friends & family, congratulations, etc, etc.

And then, in the afternoon a nice beer and chat between us, the winners (clockwise, from the top right corner of the table): Augustin Ciubotaru, Cati Valica, Sergiu Pantiru, Stefan Vrabie, Andrei Zanoaga, Amariei Ciprian, Andreea Pantescu, Adina Aniculaesei, Sabin Buraga, Radu Munteanu, Andrei Mihaila (two more winners, not present, were Adrian Duhnea and Cristian Luca).


celebrating

Now I'm searching for something to do, maybe I'll clean up the computer a little (uninstall the useless stuff, free some disk space 'cause I badly need it, etc), or maybe I'll clean up the house, or maybe I'll cook something: though at some point I doubted it, it really is UNcool not to have anything to do, not to have a project that would keep you up in the night or give you codeful dreams.

Saturday, June 16, 2007

Changing the PATH from a Firefox extension



Since (almost) everything is ready (even my new cool XUL sidebar for recommendation list), I must deal with the install process, don't I?
Everything's ok, all the things are in their place (thanks to the .xpi packaging) except for the BDB XML dlls that have to be visible to the jvm in the browser. We have two options: either we copy the dlls to Program Files/Mozilla, either we set the PATH environment variable to extension directory, where Firefox unzips the .xpi.
Yep, I chose the second...
It's easy to execute a batch file from a firefox extension, you just use a

Components.classes["@mozilla.org/process/util;1"] .createInstance(Components.interfaces.nsIProcess)


initialize it with your script and then run it! (actually, if it wasn't for the extension developer's extension code, I wouldn't have known that now...)

But... how should we write the script? Since I couldn't find out how to execute a script at the moment of the extension install (that is, only once in the lifetime of the extension), I had to run it every time I open the browser so the script is a little more complicated: it must check the PATH for the existence of the directory path I want to add, and, if it's not there, put it. I found out from Merlyn that I can write a batch file in Javascript and, with a little help from Microsoft Tech Net I managed to produce this file:

//command line arguments
var args = WScript.Arguments
var dir = args(0);
//get the env vars
var objShell = WScript.CreateObject("WScript.Shell");
var colUsrEnvVars = objShell.Environment("User");

//TODO: test if path exists, else, create it
var path = colUsrEnvVars("PATH");

//TODO: should use regular expressions
var pathToSearch = ";" + path + ";";
var dirToSearch = ";" + dir + ";";
var index = pathToSearch.indexOf(dirToSearch);

if (index < 0) {
WScript.echo("update...");
var newValue = path + ";" + dir;
colUsrEnvVars("PATH") = newValue;
}

called from this bat:

set DIR_NAME=%1
set SCRIPT_PATH=%2
cscript //nologo "%SCRIPT_PATH%" "%DIR_NAME%"

with DIR_NAME and SCRIPT_PATH passed from the firefox code to match the firefox extension installation paths and the path to the js script.

All fine, until I got the wonderful error:

Execution of the Windows Script Host failed. (Not enough storage is available to complete this operation. )

but thanks God, other people got it too, before myself.

Now it sets the PATH but I still have some issues: the update takes oooooh so long (I kind of stare at the bloody console waiting for it to finish) and, at the first run (when PATH gets actually set), the jvm does not 'see' the PATH, it still fails (maybe it loads before I get to set the path)... A browser restart does it, though, so, until I have some spare time, I guess it's ok in the current state...

P.S: ignore all the "we"'s in this post: I'm actually alone in this, but I got used to the "we" from writing the paper associated to this work.

Wednesday, June 13, 2007

How to shoot yourself in the foot...



How to shoot yourself in the foot in a browser extension environment (let's say... Firefox)?
You first device a niiiice gun overlay, in XUL, styled with CSS, with a trigger interface in like 346524563425 languages using the wonderful firefox i18n mechanism, you connect your gun to some serious killing machine (preferably written in Java) and then, when you're finally done with all these and you shoot your gun:

Security check failed: permission denied to access 'body.lowerbody.foot&side=left' from content at "chrome://gun/content/bigshotgun.xul".

Sunday, June 10, 2007

On my way...



Yeey, I sent it!


The almost-final version of the BSc paper is now on its way to being reviewed, after a couple of days in hell, trying to write my best...
I never thought it would be that hard to write things (not necessarily a scientific paper – though it's reaaaaly hard to name my creation a 'scientific' paper): I always thought that writing about things you produced should be easy; explaining how you created an application, an idea, a formula or anything must be a piece of cake, after all, you KNOW what you're talking about, don't you? Well, it's NOT! (and now my BSc supervisor would say: "I told you!" :) )


Because you just know too much on the matter, you 'miss' stuff: everything seems obvious or natural to assume, to you, everything's connected, class diagrams are clear as daylight, you have no clue about what references to quote because you 'just know' the stuff and, most of all, the purpose of the paper is like "d-ooh!"... Well, I'm pretty sure I screwed it in all matters and, what's worse, I don't know what to do about it! I guess that if I asked my mother to read it and tell me what she understood of it, I would get a clearer picture... But, until my mother learns English, I can only rely on my own (fuzzy, these days) judgement and on my supervisor's constructive critique...

Friday, April 27, 2007

Microformatted week



First of all I must mention that last week I was pleasantly surprised to see the reactions to my post about Summer <Web /> online.
I must thank Edward and Neil for their immediate responses (changed markup on eventful and added summer web on upcoming). Also, I was surprised (and happy) to notice that the class=url's on upcoming are now attached only to the right elements, yeeeeey!

(I also noticed that Tantek Çelik was wearing an upcoming T-shirt at the microformats dinner at web 2.0 expo. I want one too!)

Second of all, I've just started v0.3 pre-alpha of my Bsc project. I also have a print screen of v2.0 "in action". I was just browsing microformateurs.org (using the dev firefox profile by mistake) and it highlighted the microformats dinner event:



Now don't get enthusiastic, it's just the urlRecommender outlier there... :), no 'smart' predictions yet.

I also thought of some things to mention in my microformats presentation at summer <Web /> to make it cool and attractive for everyone and to tease the developers.

And, I almost forgot to mention, I am now a very happy listener of Queen - Greatest Hits, volumes I, II and III.

So it's a joyfull, microformatted lunch I'm having right now:
<div class="hLunch">
<span class="mainCourse">
<a href="http://www.epicurious.com/recipes/recipe_views/views/230458" rel="vote-for">Yummy potato moussaka</a>
</span>
with
<span class="drink">sparkling water</span></div>.