Thursday, February 26, 2009

Setting up JADE in Netbeans... Extention: starting up agents.

So today a very quick technical post. This is intended as extra information on:
setting-up-jade-in-netbeans
So if you want to run the agents when the platform begins it is quite simple and it would be step 11.

Step 11. On the arguments where you have "-gui" add "NameForYourAgent:packageName.AgentClass". So my agent name is pedro, in "project" package and helloAgent class this would look something like "-gui pedro:project.helloAgent"

Step 12. Run and test.

Next post I'll describe how to interface with Protégé, I just don't do it here, for title purposes and also lack of time today. Hope this is somewhat useful.

Wednesday, February 25, 2009

University challenge...

This is a post I and intended to write yesterday but got delayed, anyway on Monday I caught on TV this show called University challenge. Until here nothing strange besides the fact that I normally don't watch regular TV.
So this a quiz show where teams from different universities battle out their knowledge. My first reaction to this was nice idea, but what sort of questions do they ask? Well from my brief understanding all sorts, including things like who won the silver medal on the 84 Olympic games for darts or whatever. The funny thing is that the freaks on the game show actually know this shit :P.
I mean who know this stuff, you can know one or two trivia for whatever reason but these people seem they memorized the whole encyclopaedia. Like someone in the room said they don't have a life.
This was a very humbling experience, since I actually felt quite stupid while watching. Which raises the question why do people watch it? To know how dumb they are? Seems stupid... Then again I also watched it so what does that say about me :P.
Nevertheless on the following day, I notice by watching it online that the speed of the questions is one of the issues, the guy speaks quite fast, and the tension, so well I am posting also a video, you make up your own mind. Are they freaks with no life, or just fast thinking regular university people. Honestly I am doing a PhD and it was humbling, but scary ;P...


Friday, February 20, 2009

Perpetual associative movement (Movimento Perpétuo Associativo)

I was told there was a very good band with a Fado style, but I just checked it out during this week. This is a awesome song that captures the inertia concept for staying still. IN fact one might say that whole nations have this behaviour. I like the contradiction in the song, it is just so true ;). I translated it but it really doesn't give it justice, so if you are not Portuguese you will just have an idea of what it is ;)



Agora sim, damos a volta a isto!
Agora sim, há pernas para andar!
Agora sim, eu sinto o optimismo!
Vamos em frente, ninguém nos vai parar!
Yes now, we'll turn this around!
Yes now, we have the legs to walk!
Yes now, I feel the optimism!
Let's move forward, nobody will stop us!

-Agora não, que é hora do almoço...
-Agora não, que é hora do jantar...
-Agora não, que eu acho que não posso...
-Amanhã vou trabalhar...
Not now, it is lunch time...
Not now, it is dinner time...
Not now, that I think I cannot...
Tomorrow I'll go to work...

Agora sim, temos a força toda!
Agora sim, há fé neste querer!
Agora sim, só vejo gente boa!
Vamos em frente e havemos de vencer!

Yes now, we have all the strength!
Yes now, there is faith in this belief!
Yes now, I only see good people!
Let's move forward and we shall win!

-Agora não, que me dói a barriga...
-Agora não, dizem que vai chover...
-Agora não, que joga o Benfica...
e eu tenho mais que fazer...

Not now, that my belly hurts...
Not now, people are saying it is going to rain...
Not now, that Benfica is playing.
And I have other stuff to do...

Agora sim, cantamos com vontade!
Agora sim, eu sinto a união!
Agora sim, já ouço a liberdade!
Vamos em frente, e é esta a direcção!

Yes now, we sing with will/feeling!
Yes now, I feel the union!
Yes now, I can hear the freedom!
Let's move forward, because this is the direction!

-Agora não, que falta um impresso...
-Agora não, que o meu pai não quer...
-Agora não, que há engarrafamentos...
-Vão sem mim, que eu vou lá ter...

Not now, a form is missing...
Not now, my farther doesn't want to...
Not now, because there are traffic jams...
Go ahead without me, I'll meet you there...

Wednesday, February 18, 2009

A life update...

A life update... Sounds like something boring, well hopefully it is not, it is because I want to talk about several different topics and I couldn't find a better title.
I'll start with my lecture, just gave it, it went well, at least from my point of view (the students might disagree :P). I tried to make it interactive, not just tell them things, I asked questions even though I got little feedback, but I did get some which I liked. At one point I was just chatting with them about things that I didn't include in the slides, just to give them different perspectives and I got at least some of them to think about things (or so it seemed). The material was not enough for a 2 hours lecture, either that or I gave it too fast, but considering I added a lot to the original material I got for the lecture I assume it is the material :P. I finished roughly after an hour, then took some of the students to the lab (the ones who where interested, so half :P) to see some of the things that I spoke about, namely a nano precision assembly platform we have there. All in all I got good feedback, and I actually like the talk style lecture, getting them to tell me stuff instead of me just stating stuff. Always wanted to try this style of lecture, I did not do it completely this time, but I tried it at certain times of this lecture, and I honestly think it is the best way to teach. I might post something latter on this class, I am finding out that work related posts attract some visitors, which means people are in need for posts about what I do.
On a completely different level, on Sunday I managed to speak with an old friend, the one I've talk about before, the one I tried to get in contact with after the MSN adding thing. Well, is answer to the email is not negative, meaning he does want to talk to me about stuff and try to figure things out, but it is hard to do so. Time is a weird thing, this is the person I was closest to 5 years ago, but time produces a awkwardness, I know so little of who he is now, and the same is true. I have come a long way since those days, I got to think about it because of this realization, in so many ways I am different and so many ways the same, makes you wonder what time does to you. Well, on this case not sure of anything, but I would like to try and go beyond breaking the ice, as he put it, the ice is broken but that is really nothing on the scale of things, a first step is an important step, but at the end of the day it is just one of many, or few, the question is how many steps in one direction you take. On a personal note, I liked talking to him, despite of the amount of things that are still unsaid, well it seemed natural in a very awkward way, if that makes sense. Also I found out that my friends surprise over Christmas (Which I will post here as soon as I get the video in this computer) was supposed to involve this old friend of mine, one of the ribbons was intended for him. One of the organizers of the suprise told me this, and said it seemed natural since he was a big part of your life when you where at university. This make me think of how that was true, but in the end, he didn't write it, thus he didn't took part of the surprise, which is a shame and makes me think that the current status quo is really not appropriate. Sorry this part of the post is probably understood by people that know the matter.
Another matter is the house, still haven't move in, still waiting on the process, bahhh. So basically everything is OK with the application, credit checks are fine, so what is taking time? Well the house was missing a sofa and a table with some chairs, so the agency said that would be put in, which is fine, but apparently the landlord is taking is time to do this. How thick can this person be, I mean we will pay a first rent and deposit as soon as we get the contract, so he takes his time and loses money because... Well I also don't get it, but it does piss me off, like I said before. I really want to move so I can settle down, and be able to decide things, I want to be able to plan holidays, work, weekends off, etc, and this is in the way, like something that has to be done before. Really just annoying.
Valentines day, this is one of those days that I consider to be a private day, but still worth mentioning. It was awesome, my girlfriend is awesome, so just putting that for the record :P.
Much more to mention, just got a very interesting mail about something I wrote in the past, that might be a good post, if I get around to translate it :P. I will try ;).
Setting up ubuntu, was also fun, and you can expect a post on that. It looks quite nice now.
Agent posts are to be expected, and the robot actuators post, so some posts about work.
Also I want to start posting on social considerations, I have been a bit away from the social scene, this is bound to change ;).
Pretty much it for this post, hopefully I will post more frequently and thus have more dedicated posts that allow me to write more about things ;P.
Lastly a brilliant song, in a brilliant album, but I have to put in enjoy the magic lyrics, and sound...



Just because I'm losing
Doesn't mean I'm lost
Doesn't mean I'll stop
Doesn't mean I would cross

Just because I'm hurting
Doesn't mean I'm hurt
Doesn't mean I didn't get
What I deserved
No better and no worse

I just got lost
Every river that I tried to cross
Every door I ever tried was locked
Ohhh and I'm...
Just waiting 'til the shine wears off

You might be a big fish
In a little pond
Doesn't mean you've won
'Cause a lonely con
A bigger one

And you'll be lost
Every river that you tried to cross
Every gun you ever held went off
Ohhh and I'm...
Just waiting until the firing stopped
Ohhh and I'm...
Just waiting 'til the shine wears off

Ohhh and I...
Just waiting 'til the shine wears off
Ohhh and I..
Just waiting 'til the shine wears off

Friday, February 13, 2009

Robot actuators...

Well this is the topic for my lecture next week. Since today I had a teaching dedicated day with a practical class/lab demonstration and preparing this lecture. The good news is I have all of it planed out, so I have all the skeleton slides with all the images and diagrams, I also have in my head all I want to teach. The bad news, well still need to put meat into the bones, text and bullet points about it plus the notes for myself, so I don't forget to teach something. So a day of robots, sensors, programing and actuators. Seems nothing much? Well actuators means loads from several types of electrical motors to pneumatic and hydraulic shit. Electromagnetic fields and shit bahh.
So I just wanted to share this frustration of preparing slides for which you already know what you want to say but it still takes a hell of a long time to prepare. For those of you who don't understand, well what can I say, it is not like I can put just what I like, I have to talk about all the shit. And in the end it is all shit, right? Well one can hope not...

Thursday, February 12, 2009

Catch 22!

Hi there, sorry for the absence but it has been truly busy days, although that doesn't really work as an excuse. I have been a bit off to actually be able to write something, but I am begining to feel bad that I don't. Thus a catch 22 situation, what is a catch 22? Well it is a non-win situation, feel bad if I do and feel bad if I don't.
Since I tried not writing, today I decided to write :P. So a lot has been going on, migrating my system into Linux at work, setting everything up, which might be an interesting post. Also the conference paper, some editing in it, hopefully it will be off my desk soon (although there is already another on the forge). Working on my PhD, meaning programing software agents to communicate, after which I need to make them collaborate. Preparing a lecture that I am giving next week on Robot Actuators, so basically revisiting my electrical engineering background, and being amazed of the things I still know and disappointed at the things I don't (Catch 22 :P). Waiting to hear the green light to move into the new house, I really want to move. I mean after something is decided it just pisses me off to drag it, but maybe it is just me... And a couple of other things also I had to deal with...
So as you can see the busy is clear :P, I really wanted to write the post about my Christmas surprise, but the video is in my Portuguese mobile, so it will have to wait. Nevertheless it is on the pipeline with high priority.
Well today is dedicated to create the slides for the lecture, so I guess this is it for today...

The prototypical Catch-22, as formulated by Heller, involves the case of John Yossarian, a U.S. Army Air Forces bombardier, who wishes to be excused from combat flight duty. In order to be excused, he must submit an official medical diagnosis from his squadron's flight surgeon, demonstrating that he is unfit to fly because he is insane. In order to get the diagnosis, he must approach the surgeon to ask for one.

Here some Wiki trivia :P

However, “catch 22” — the twenty-second of the guidelines used by military surgeons to “catch” those falsely claiming to be insane — is that an insane person should not believe or suspect that they are insane. Thus, to be recognised as insane, a person must not ask for an evaluation, because doing so implicitly shows that they suspect themselves to be insane. But, if a person does not ask for an evaluation, they cannot be recognised as insane because the evaluation is the method by which such recognition would occur. Thus, nobody can ever classify themselves as insane (even if they genuinely are), and thus nobody may ever use an insanity diagnosis to escape flying combat missions, ignoring the possibility of someone else recommending an evaluation for a peer.

A logical formulation of this situation is:

1. (Premise: If a person is excused from flying (E), that must be because they are both insane (I), and request an evaluation (R));
2. (Premise: If a person is insane (I), they should not realise that they are, and would thus have no reason to request an evaluation)
3. (2, Definition of implication: since an insane person would not request an evaluation, it follows that all persons must either not be insane, or not request an evaluation)
4. (3, De Morgan: since all persons must either not be insane, or not request an evaluation, it follows that no person can be both insane and request an evaluation)
5. (4, 1, Modus Tollens: since a person may be excused from flying only if they are both insane and request an evaluation, but no person can be both insane and request an evaluation, it follows that no person can be excused from flying)

The above describes the concept commonly referred to by the phrase “Catch 22”. The book adds an element of complete absurdity to the situation, adding that the same regulations also stipulate that (because flying combat missions is so dangerous) any sane person would not willingly fly combat missions. Thus, any person who flies missions must be insane and thus should only need to be evaluated in order to be excused from flying. However, because requesting an evaluation is a sign of sanity, no pilots are grounded for insanity. The “catch 22” statement is the only reason anyone is in the air at all.

Thursday, February 5, 2009

Blindness

Today I was going to shed some light into the terminology of my previous post, so that people that aren't from the field understand it. But yesterday I saw the movie Blindness and it screams for a review...
This movie is based on a book from a the Nobel prize winner José Saramago. This might be relevant if the movie is faithful to the book, for this review I will assume it is, if it is not please tell me. So if this assumption is false I would consider reading the book, if not NO CHANCE.
The movie is based on a good idea, which had potential or so I thought, but I am getting ahead of myself. So in the idea is what if a strange illness started to infect everyone in the world, and turning almost everybody blind. What would happen? How would people react towards the infected? How would society react to this lack of vision? How would the non-blind use their non-blindness? What about the ones that were blind to begin with, would they adjust better? Well if you feel puzzled by this questions, you understand how I felt when I first heard about the movie, thus I wanted to watch it.
The problem was I didn't give a second thought to who wrote the story, and basically I ended up watching a idiotic view of what would happen, based on the preconceptions of a very left wing mind. Yes this author is a communist, I have a lot respect for him because I heard his writing is quite good, but fuck are the concepts stupid. The absence of the individual from the whole story, this view of the group without the understanding of the individual. The story is random, you find yourself questioning the mind of the author, isn't it obvious what the person should do? Well apparently not, you see people doing things that they don't need to do, things happen with no explanation, I mean a really bad movie. I had a lot of respect for this director, but honestly I was shocked with the whole thing, mostly because the potential for a very good movie was there, the idea is good the execution is a utter waste of time. As a simple example of the stupidity of the movie, in one scene the guy just saved his wife from a mob of people, they got away with food, they hadn't eaten in days, and he goes back for clothes that he forgot, bear in mind half the people in the city where dead and their house was nearby. How stupid can you be I thought, and then she stays behind and gets in the church because it started raining. And then, she sees (yes she is one of the people that can see) all the saints were blindfolded, which is utterly stupid just by itself, I mean I am blind what can I do, lets put blindfolds on the saints? Why? And most importantly how? You are fucking blind! But the icing on the cake was even the glass images in the windows also had the eyes of the saints covered. WHAT THE FUCK. Anyways, I don't advise this movie, unless for demonstrating how you destroy a good idea.

Wednesday, February 4, 2009

Setting up JADE in Netbeans

Well today a very geeky post and irrelevant for most of you, but I didn't find a quick fully description for this online, and it was a while since the last time I set this up. So as you would expect you tend to forget some steps, so here goes mine minus the use of google :P.

1. Have Netbeans installed, I think that is pretty straightforward so I am skipping the details.

2. Download JADE, just the minimum if you want, but I recommend all of the packages because if you are going to use JADE you will probably end up using them.

3. Extract the files into a folder, if you have all of the packages I suggest different folders.

4. Run Netbeans, create a project, etc. Again this is quite straightforward and if you are using JADE in Netbeans you should have basic knowledge of the tool.

5. Right click on Libraries, Add Library.

6. Create Library.

7. I would suggest the name to be JADE

8. Add the .jar files contained in the "bin" folder that you created (In the minimum JADE package you only have this folder), the files should be the folder you created + "/jade/lib/".

9. Right click on your project, Set Configuration, Customize...

10. Write on the main class "jade.Boot", and on arguments "-gui".

Now if you run the program it will launch the GUI that allows you to run agents.
Hope this is clear I could have used some screen shots, but I think this is quite straightforward, or at least I hope. In the unlikely event of a blog reader using these steps and have some questions, please fell free to leave a comment, and I'll get back to you.

Tuesday, February 3, 2009

From ideas to developments...

After a meeting targeting the development of a breakthrough platform this thought came into my head. Good ideas are commonly associated with great things, but the fact of the matter is ideas are the easiest thing to come by, at least for some, the hard part is putting these ideas into practice. There are two difficulties, one might be technical, lack of knowledge to proceed with the idea or even the infeasibility of the idea. The second one is the most common one for me, the inertia to actually start moving with the idea further. This happens more on a personal level than at work since at work there is a overall drive from the boss. Nevertheless this is a key point, when you are OK in life, the will to aim at better is a bit blurred. The effort to have good ideas is pretty close to zero the effort of the development, well... Like Edison said a genius is 99% hard work and 1% of geniality, how right this is. I meant before I thought well he would say that since he wasn't a Newton or Einstein, from a guy that did loads of things to manage to create the light bolt, he couldn't consider himself a genius on a regular genius quote. But now a days I mean you can figure out the best thing in the world, if you don't develop it, it is lost to the world, as such it is as if it never existed.
I saw this TV program over the weekend about Darwin, and apparently he was not the first one to argue evolution, but in fact he was the first one to try and do something about it. Didn't manged to do much, but he started what he could at the time, thus he is recognized as one of the great visionaries in human history.
So to the point, talk is cheap, put your money where your mouth is. So work on what you think is a great idea, and see it through to verify that it is...