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).


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.

Tuesday, June 19, 2007

Relaxng @ Ciric

on Sunday I went to a team building party (organized by Synygy) at Ciric, which is a wonderful place to go this time of the year, so if you have a spare weekend, use it wise ;).

It was a nice day, a little cloudy, ergo not as hot as Saturday (though at some point I wished it had been :D )

We had some nice barbecue, lots of beer, team building talks and, most important, football!!! It was a pleasant surprise to see that girls also played football along with the guys so I decided to join:

I almost forgot the taste of it: indeed, team games are so fine!

Because there were three teams, whichever lost more than two goals was kicked out, leaving the winner to play with the spare team. My team was the loosing team though we had a very good goalkeeper (Andrei), a nice (surprisingly nice, for some) defender (Petru) and some good attackers (amongst which I dare to count myself – except for the moments when I totally missed the ball :D ).

This competition for the field pushed me to an unconscious move: we desperately needed the goal and I was attacking: only two defenders to pass, both girls! Yeeeaaaah, I can do it! But seemingly, I played too many football computer games because I thought I can stop the running ball suddenly (and leave the defenders behind) like I'm doing with my console when controlling Ronaldinho. Guess what? Noooot so! (to quote Borat) So my right knee had an unpleasant meeting with the asphalt and my jeans doubled their value (that's how some of the guys expressed the fact that they were torn by the contact).

(No, no pictures of that – but you wouldn't want to see blood on the blog, wouldn't you?)

As if this wasn't enough, a terrible muscle pain haunts my body since yesterday morning (because of the sudden decision to practise some sports).

But all this is nothing compared to the wonderful Sunday afternoon...

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[";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) {
var newValue = path + ";" + dir;
colUsrEnvVars("PATH") = newValue;

called from this bat:

set DIR_NAME=%1
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...

Monday, June 4, 2007

Fredo & Pid'jin

It was about time...

Fredo & Pid'jin are two little pigeons (well, Fredo is not that little) set up to destroy the world (I have no bloody clue about why they want to do this but they seem pretty determined). In the mean time they hang around with women, kill Gugustuck and do all sorts of stuff non related to world destroying. This week they celebrate their 2 years / 100 episodes anniversary and all the web is there singing 'happy birthday' so I thought I should join:
Haaaapy birthday tooooo youuuuuuu, haaaaappy birthday toooo youuuuuu, haaaapppy biiiiiirthday dear Fredo & Pid'jiiiiiin, haaaaappy birthdayyyy tooooooo yoooouuuuuuu!

Sunday, June 3, 2007

Graduating (II)

Yep, I've managed to take some time to post about this: the graduation fest@UAIC and the graduation party – actually, all the time I needed was for the pictures sort :).


graduation -- official last course & fest

are the pictures from the closing ceremony and the graduation fest oganized by the university, and

graduation party

are some pictures from the graduation party.

Have fun!

P.S.: yeeeey! Now the 'S' key doesn't publish the post anymore, it saves it as draft! thank you a million times, blogger!