Recent blog entries for orique

20 Feb 2006 (updated 20 Feb 2006 at 20:28 UTC) »

Back to the University
The last crusade :P

After the exams period, I'm back to the University. I hope that's my last semester, at least as an ETIS student. Now I'm learning Network Programming and Data Structures.

$here and $there

That returns true. I finish working at 2 pm and Tuesday, Wednesday and Thursday I start classes at 3'10 or 3'15 pm, so some days I arrive late at class...

DFP (or Degree Final Project)

Finally I earned enough credits to ask for a Degree Final Project. I have chosen Automatic java swing form generator using APT and reflexion technics, but until this Friday I won't know if I can do it. Other choices (we can request up to 5 DFP's) were Online Shop implementation with J2EE, Project Time Manager Distributed Application, Game for Symbian systems and Bidimensional and multiplatform game development

Didn't pass it
Yesterday was published the qualifications list for "Ampliació de Bases de Dades" (databases subject at UB). I knew it wasn't my best exam, but at least I expected to pass it.

Never expect.

Next Monday I'm going to an interview with the teacher, at least to know where I failed. Moreover, it's curious I passed the Communications & Networks exam, which supposedly was harder than the other.

Work
This week they made a mistake paying a supplier's invoice to me!... but I'm honest and I returned them all the money. I was rich for some days, now I'm poor back :P

However, today hasn't been a nice day at work.

J2ME
I bought a little guidebook to learn the basics of J2ME (Java for mobile devices) programming; right now just for fun, but it's a very interesting area and I think I could use it professionally in a future.

From this newspaper printed edition:

Darkness is faster than light. When light arrives somewhere darkness was already there.

19 Dec 2005 (updated 19 Dec 2005 at 22:33 UTC) »
Firefox random redirects

salmoni, I have a similar issue with Firefox. If I misspell a web address e.g. http://http://www.google.com Firefox takes me to El País (spanish newspaper). Other people got redirected to Microsoft's website (!). I wonder why it's happening this. I thought that could be somewhat related with cache pages, but I had never visited El País before!

(This line has been added some hours later) sneakums, thanks for your reply :)

17 Dec 2005 (updated 17 Dec 2005 at 18:27 UTC) »

Getting usergroup in PostgreSQL
I'm building with a classmate a console application (written in Java) which connects to a PostgreSQL database.

Eventually we wanted to know in which user group was the user trying to connect to the database. Looking for some information about this, we found there's a table called pg_group where for each group we have a field with users' id (grolist). Then the problem was to know where a concrete id was present. We thought grolist was a plain string, so we had to code a StringTokenizer to get the id's, and then test if it was the one wanted. That resulted in an ugly, unefficient code which I wanted to rewrite.

Fortunately, we misunderstood the type of data stored in the field grolist. It's an array of id's instead a string. So, and after visiting this page :P, I finally could solve our problem like follows:

private static void setGroup() throws SQLException {

ResultSet rs2;
String myGroup,query;

query = "SELECT groname FROM pg_group WHERE "+idUser+" = ANY(grolist);";

rs2 = DBConnection.execQuery(query);
rs2.next();

myGroup = rs2.getString(1);

...
}

Ruby
Today I went to esteve's talk about Ruby, RoR and AJAX. It was an open talk, so all people who wanted to be there could come. Next to me was sitting a really young boy, so Ruby's future is assured :P. I learned some new things that can be useful and some practices to create more accessible web pages.

I think these contents are worth a subject at UB.

Here's an example of what you can do if you like to waste your money (or if you want to suicide in a geeky way).

I have been tidying up and cleaning my IRC hangman bot's code. I removed ~15 lines, so now it has 315 lines of code and comments. I'm considering to support multilanguage gaming, so anyone can choose (if present) his favourite language.

Yesterday I received an e-mail from fxn. Thank you for your comments and advices. As you can see, I followed them :P

haruspex, sorry, I was using a catalan wordlist file. Your word could be encanyonis (means somewhat as "aim to something/someone") or ensangonis (could be used to politely say "to leech"). Now (15:30 GMT+1) the bot is running an English wordlist downloaded from here. Thanks for playing :).

9 Dec 2005 (updated 9 Dec 2005 at 23:30 UTC) »
My first post

I just joined advogato, set up my account and now I'll try to write a little post.

BTW, I finished my perl project yesterday. It's an IRC bot whom you can play hangman. You can test it if I'm online :) at server irc.freenode.net, channel #lds-orique. My girlfriend and some classmates tested it, and it seems to be bug-free... Time to add some extra capabilities :P

I'm sorry if I make mistakes writing... I hope writing at advogato helps me to improve my English too...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!