Ubiquity was big news last week, the new Firefox feature which opened a whole new world of possibilities for what can be done in the browser. As usual, I'm not going to take your time explaining what it is, so if you want to know more about it, check Ubiquity's homepage.

While I was reading some blogs of the portuguese aggregator Prt. Sc. my attention was caught by a post by Rui Moura, which had created an Ubiquity script that could give a definition of a portuguese word based on the portuguese only Priberam's dictionary. This was kind of nice, because it was something a lot of us use, not only as a definition system but also as a word corrector (if a word is miswritten a definition won't appear).

Anyway, the plugin required that you typed Return to view the definition of a word, and by that time you would be redirected to the default Priberam's homepage. I thought this was useless, since you can do exactly the same with the Live Search Box of Firefox, which is, getting some site's search box in Firefox and being able to search from there, but always being redirected to the host site to view the result.

I thought this was not the kind of behavior Mozilla wanted us to adopt in Ubiquity, so I tried to create a new plugin that would give the definition on the fly. If you don't care about how it was done, just follow the link to install it.

How was it made, though? Well, fist off, I'm not some kind of pro in Javascript, so I'll try to explain the best I can the code used.

CmdUtils.CreateCommand({

makeSearchCommand({
  name: "dic",
  url: "http://priberam.pt/dlpo/definir_resultados.aspx?pal={QUERY}",

  takes: {"palavra": noun_arb_text},
  author: "Miguel Pais www.miguelpais.com",

  author: "Miguel Pais www.miguelpais.com, special thanks to Sofia Cardita @ http://pencilcode.com/",  

  icon: "http://www.priberam.pt/favicon.ico",
  description: "Define a palavra dada segundo o dicionário da Priberam",
  preview: function(pblock, directObject) {
    var searchTerm = directObject.text;
    var pTemplate = "Procurando a definição de <b>${query}</b>";
    var pData = {query: searchTerm};
    pblock.innerHTML = CmdUtils.renderTemplate(pTemplate, pData);

    var url = "http://miguelpais.com/ubiquity/priberam/" + searchTerm;

    jQuery.get( url, function(data) {
      pblock.innerHTML = data;
      });
  },

  execute: function( directObj ) {
      var word = directObj.text;
      Utils.openUrlInBrowser( "http://priberam.pt/dlpo/definir_resultados.aspx?pal=" + escape(word) );
      }

});

EDIT: Green means changes that occured in code strikethrough. This script had a change due to a post by Sofia Cardita in which she presented her version of this plugin which did some things better than this one, mainly in the escaping of characters, so I updated the code. The rest of the post will remain equal to its original version.

Let's see.

 makeSearchCommand({

Is what defines a new command, while I was reading Ubiquity's developer guide I noticed there were other ways you can achieve this, so you may want to check it.

  name: "dic",
  url: "http://priberam.pt/dlpo/definir_resultados.aspx?pal={QUERY}",
  author: "Miguel Pais www.miguelpais.com",
  icon: "http://www.priberam.pt/favicon.ico",
  description: "Define a palavra dada segundo o dicionário da Priberam",


These lines are quite trivial. First defines the name the command will use, which you might want to change, the second defines where we'll get redirected to when Return is pressed.

This was what Rui Moura's script did. But we want to define what preview shows, so we have to create a function to preview.

  preview: function(pblock, directObject) {
    var searchTerm = directObject.text;
    var pTemplate = "Procurando a definição de <b>${query}</b>";
    var pData = {query: searchTerm};
    pblock.innerHTML = CmdUtils.renderTemplate(pTemplate, pData);

This is what defines what is showed as a preview while we're typing an word. Everytime we change pblock we're changing what is being previewed, so we render a template for it saying we're searching for some word and then showing the word itself.

But we have to get the result from Piberam's dictionary. As the website doesn't have an API I had to create one in ruby, stored in www.ubiquity.miguelpais.com/get/word/. This link receives a word parameter and returns a page with the definition parsed from Priberam, for example, www.ubiquity.miguelpais.com/get/word/some.

So in Ubiquity I just had to do:

    var url = "http://miguelpais.com/ubiquity/priberam/" + searchTerm;

    jQuery.get( url, function(data) {
      pblock.innerHTML = data;
      });
  }
});


Which passes the word typed to the url, gets that url and changes pblock to the data retrieved.

And that's all. Now you might ask how's the /get/word script done. That was just a couple of lines of ruby using Hpricot for parsing the webpage and getting the desired elements. If someone is interested, I don't bother showing the source code.

I hope you like it and use it.




You probably heard about Mojave, a fake new Windows operating system that turned out to be Vista in a experiment conducted by Microsoft with persons that didn't quite like it, so they could catch their reaction after saying how bad Vista was and how good Mojave was. I'm not really interested in talking about the Mojave Experiment itself in this post, so I will say only a few words about it.

First, I don't think it was fake has many bloggers do. It may be an ad, but that doesn't mean the experiment was all acted. I believe Microsoft is already in trouble because of Vista's bad reputation and doesn't really need more stuff that can be criticized at the same level. However, the way the experiment was conducted was far too wrong to get conclusions out of it (that is the meaning of the quotes in the word real in the title, I think it was, but not well conducted).

Second, the website is pretty bad designed. Without Silverlight I, on my Mac, wasn't able to see much (the videos didn't load for example), and with Silverlight the design shows a cloud of movies difficult to manage that will make a normal user see only the first and greater ones, which can also be the ones Microsoft wants us to see. In the videos of the sales guys from Microsoft showing what was showed to the people and how the experiment was conducted,  one can see that they showed them stuff like gadgets, instant search, backup utilities, flip 3d, and few more. If what they showed to people was in fact what one can view in those videos then the experiment is completely bullshit, for everyone can see that it is Vista and just someone that never used it can not see that. Also, they were only showing the cool features of Vista, the ones that everyone likes, and no product is used for the cool things it has, it is used because it can solve our everyday problems, because it can really do the simplest things simply, and also the advanced things easily, which is something largely criticized on Vista. This makes me think the people they choose were really below the normal computer user, or never caught a glimpse of Vista, or the video featured a pretty camouflaged version of it. Also, I don't think those HP Pavilions used for the test were really a normal desktop for Vista, since I don't think 2 GB of Ram and Core 2 Duos are that mainstream (they said it has a Windows Vista rank of 3.5/5. What kind of computer gets a 5 after all?).

Bottom line, there can really be no conclusive fact out of this test, but this not the main point I want to talk about so don't bother argue with me it was acted, I'm not that interested in it, but admit it could have been.

The truth is Mojave Experiment has a valid point behind it. The point is valid not only to Vista but to everything in this computer world. In it, there's a lot of people that know about something and give their opinion, people that don't know about something and remain quiet, and people that don't know but talk like they do. Unfortunately, these later ones are the majority and almost everyone commits this mistake several times in their life. With Vista the amount of persons judging it without even having used it exceed the line of what would be normal.

That could have many reasons but most of them result from the fact that a good part of our own knowledge comes from persons which we trust, if we trust someone its easier to take their word as the truth, and we don't bother having an opinion based on our own experience. We just act passive, receive info, accept, and pass it to more people but, and this is important, in the same way that we'd do if we've had in fact experience in the subject. This appeal to authority fallacy is one of the most common, being constantly committed in advertisement, but in this computer world, in the internet, this fallacy starts being equally common. Bloggers and respected users of online communities are great mind making agents, if they've succeeded proving us in the past their opinions about something were relevant, more probable is that in a future subject we will trust them. This is not bad, it's normal, but what if they start somehow judging something without proving to us their opinion or judging based on their own preferences, will we take the opinion as ours, or try to find the truth for ourselves?

This is mainly what happened with Vista, and what's constantly happening with other operating systems and products, people get into discussions and flamewars, people argue, but don't usually realize maybe none of the participants may in fact have experience in what is defending. There is almost a public belief that Vista sucks and there's a lot of people that never even used it thinking they have the obligation to convince others of how bad it is. I say everyone should either use Vista and see for itself, or search for valid reasons for not using it. If you don't have enough money for a Vista license, remain in XP and talk about Vista only to criticize about how expensive it is, which is the only truth you can claim.

This is the reason I think a good conducted Mojave Experiment could in fact have the type of results it had. People say a lot about Vista, but get some of them in a experiment where they have to use it for a month, working, trying to solve its everyday problems, and they may actually say in the end Vista is not that bad, or may say it's terrible. The difference lies in the experience factor and a ten minutes video is not experience. Microsoft launching this ad just committed the exact same fallacy as the users who say bad about Vista without using it, it is trying to convince everyone Vista is good based on person's thoughts not based on real experience.

Anyway, I hope the true idea behind it makes people realize they may be judging Vista unfairly.




There was a time in which information finding on the web was difficult, exhausting, frustrating, and indeed succeeding, a miracle. The most of us woke up to a web in which Google already existed, the search engine that made the world a smaller place, however, the information present on the web was far less than it is nowadays so, although there was a great tool to find exactly what we want, rarely that information was even present on this world wide system. Times changed, the information amount is not just more, is huge. If the users of the old times had to deal with frustration of not finding what they wanted because it just was not there, the users of today have information at a distance of a click, but there is just so much and it is all so easy they simply don't bother making the difference if what they get is really what they want.

 

Lazy comments


This is something I noticed a while a go, but got reminded in a intro of a João Martin's post. In that intro he shows he's quite annoyed with the fact that a major part of the comments made to another of his blog posts about a portuguese project called Magalhães (which will deliver netbooks to 6 to 10 year olds kids in Portugal) where of people asking questions that should be rather asked on the (un)official website of the project or would there be successfully solved.  I and a couple of friends of mine suffered of exactly the same thing (even worse) in a joint blog where one day we publicize a portuguese project that built a platform that made easy the acquisition of used school books. The post was simple, just a brief note about the project (linking to the official website) and our votes for its successfulness. After roughly one year of existence, that blog post summed 24 comments in 28, from people asking about the availability of some books that they needed, some complaining about the site, and even some replying back to others saying they indeed had those books and could make a deal, this all in a blog that had nothing to do with the project, having a blog post that clearly pointed out this was not something of our own, and being the 3rd comment a message trying to clear that out for the users. While I was seeing the comments counter rise more and more with always the same kind of message, I could only wonder what was the matter with the users of the web, which, in that case, were behaving exactly like spam bots, with the difference that they just wanted that someone doesn't matter who, from somewhere doesn't matter where, could give them the answer to their problems the fastest possible and with the smallest effort from their part needed.

This is not really a problem of Internet literacy, it's just a problem of education, of people don't being used to read, don't being used to correctly understand a text's message, and a problem of the generation and of the society: nowadays it's all too easy. Kids, teenagers, the adults they will be and their parents, live and lived in a society were nothing really challenging is put to them as a barrier they have to cross. It's all immediate, fast, easy, and it's sad when we see even our portuguese government's education ministry aiming towards that same easiness that somewhat reflects itself in all these little details that nobody cares about, but say a great thing about who we are.



Have you ever seen a collection of photos of some place or monument and felt the desire of wanting to see it all together in a 180º picture? Since two days ago, you can. Microsoft launched Photosynth, an engine that let's you see your photos of anything pasted together, giving you the experience not of the camera that took the photo, which is limited, but of the photographer thas was behind it and saw it all. The engine tries to catch the intersection areas of each photo and then simulates a 3D environmment that gaves you the whole picture. There's no way you could take this picture from the Beijing's Forbidden City.

 

forbidden city

 

I had to try this, so I took the family's Cybershot and start taking shots from my loft's window of my hometown's skyline. This is what I think is the best feature of Photoshynth, the hability to generate 180º pictures. Supposedly, it was a great tool too to generate a 3D view of an object, but I saw it in some of the project's best examples (like the Ferrari) and didn't particularly love the result. You always end up with the feeling you are just seeing inidividual round photos of something, and not some 3D thing. My first experience could end up better, I was just able to achieve 55% of synhty, because suddently the engine was unable to deal with the distance of the objects present in the photos or the lack of intersection areas between those, but I achieved a sequence of twelve photos succesfully conected to each other. So I tried a second time with a bit more patience, and hurray, 100% synthy. It takes you a lot more pictures than you usually would take to achieve a good synthy in Photosynth, so if you're on some synth just seeing two images at a time, of course a normal shot would be able to get the whole area in just a photo, so you achieve litle. But a good synth can show you 7 or more images tied together in a environment you couldn't possibly shoot.

Now, restrictions. Yes, this is a Microsoft product, so don't expect it to be availble on Mac or Linux for now. Also, on Windows, you will need a plugin to experience this all. Anyway, if you meet this conditions try it. Although this has 2 days, I expect it to get even better and surprising. The service is getting so much attention the server is having an hard time dealing with all the demand.

This is the best of Microsoft working so, as a good product it deserves good comments. Hating just for the sake of it, leads to missing the coolest things of today's technology.




It's has been a long time, as usual, since my last post. But nothing didn't change in this humble place of the web. The Summer season is always one when I try to improve a bit my web development/designing experience, so here I come again with the change that was needed for this time: the design.

I must not lie, the first design of this webpage reflected my (un)experience in the field, being my very first serious attempt of making something aesthetic in CSS. As usual in the first tries, they seldom come to the level we desire. I needed a clean, minimalistic, open design, and this was what followed. I surprised myself in this process, and loved the change.

Of course a good design, as Apple's products sometimes show to us, usually compromises several functionalities that a poorer could have. This place has now a blogish interface, a all-in-one-page kind of design, and so loosed several not so important features it had. Search is now gone, I think you can do it better on google, and the contact form was replaced by the email you can check at the footer.  The other ones will soon come, such as my del.icio.us links, last.fm last listens and projects area.

Anyway, I hope you like it, and report anything unusual you may find.




Today I went to the first edition of BarCamp FCT, not actually the first BarCamp to ever take place in Portuguese soil since there were already two promoted by WeBreakStuff in Coimbra.

Having participated in the last year's BarCamp and realized that the organization of this one was not quite the same, nor the previous seemed to be able to attend I was a bit skeptical about what would this turn out to be.

Truth is, some of my predictions turned out to be true, some don't.

First, I have to say, Monte Da Caparica doesn't loose to Coimbra, both places are equally calm and beautiful, so there's plenty of "BarCamp tranquility and informal feeling" in the air, which is crucial but doesn't make the thing by itself. So what could be better was not the place nor the people attending, it was the plan, somehow with equally fault being shared by the organization and the "pseudo-participants".

Fact is, there were 78 people registered in the wiki, and I hardly doubt the 50-people mark was ever broke. So, at the beginning, we can excuse the organization for supposing that people would eventually come. So the presentations started with the people attending (perhaps 30), which in my opinion was a mistake. A simple informal talk outside for knowing each other could have been really beneficial to break the ice, which somehow was only achieved after-lunch with HalfBaked.

The presentations in the morning went well with FireHOL, which could have been done latter, swapped by the informal talk I just referred above, and Techniques for giving presentations, which I, as Vítor Domingos did, thought went a bit longer than it should be.

So, lunch, excellent, fast, good food are the best words to describe it. The method used for lunch (like a big coffee break) made possible discussions that otherwise wouldn't happen due to the division of people for tables (something I noticed in Coimbra).

Then we did HalfBaked which is allways so much fun anywhere it is done, with some really cool (and unexpected) ideas coming out of two apparent non-sensical words. Ok, most of them were also non-sense ideas, but in the middle of it there is always the feasible one that makes you think.

After, Ignite was fine too, it's a great way to have more diversity in the presentations which otherwise wouldn't be possible - there aren't much persons with 45 minutes presentations to give. Also, 7 minutes talks are really focusing ones, there is no time to loose attention. What I criticize a bit is our portuguese sense of having to copy at the smallest detail the rules to this kind of activities from other countries. In there it might work, but in Portugal I think it's a bit stupid having the 15 seconds per slide thing. If the objective is fast presentations make it like that, the slide time is irrelevant, it would still be fast by having just a global time limit, like 7 minutes or so.

Well, Ignite took it till the end, in part thanks to Wiizi (I think there was too much time spent in the conversation that surged after the Entrepreneurship talk, but some might have learnt with it, I don't know).

In a nutshell, this blog post may seem a little too critic but it was intentional because I had a great day and will be certainly there next year, the organization just needs to ear the feedback and improve it, which I'm sure they certainly will. Also, I have to say that I based all the post in my experience in BarCamp 07, which is not really fair, since it's a two-day event.

My thanks to all involved.

P.S.: it was great to discover the guy behind MenuIST twitter bot



So, lately I haven't been posting much, but hey, that's not an exception, it's the rule of this blog: better be quiet than saying crap. This may be understood by a lot of people has an exception, an odd behavior, since the most of blogs around tries too hard seem active by posting a lot to keep a steady readers base. The problem begins when those bloggers start posting stuff that is just either a copy of other major sites, news, or simply, in the most fairest of the words, crap. And this is something that really bothers me.
 
So, what does this have to do with Twitter? Simple, did you discover some great thing that will do for the post of the day in your blog but is unimportant enough for being there? Go register on twitter, and free your blog of chewing gum. Do the mental work of thinking in something else if you actually want to do a post, meanwhile twitter will filter for you all the minor things that otherwise you would be tempted to post about (I agree with Pedro Cavaco on this).
 
This may eventually put you post's-per-day rate at risk, but isn't content above regularity in a quality scale? Or do you post about everything that happens in your life, which you know it's irrelevant to the readers out there, but still do it because you enjoy to?

That's related to a question that was brought to me a few days ago, wether a blog aggregator for a programming/technology community should filter content by technology or just allow everything that comes from the user. And I though about that for a while and decided that without very well defined blogs, in the way that the author will self-restrict the kind of contents that he talks about or the way in which he talks about them, a blog aggregator like that would turn out to be a salad in which the technology would appear just as the temper, and not the lettuce. And the more a blog aggregator makes the reader filter information the less will be its quality.



 
 
Being a Google apps user by default, I doubted that any new online maps service would grab my attention. This was till Microsoft Live Maps came and I heard news about the deal they made with the Portuguese Geographic Institute, which gave them (and to Google) high-defenition images of the whole country.

The difference is just astonishing. It really made me wish Google was a bit faster in updating the now old-fashioned images of Portugal that it has. But what really made me play around with Live Maps was their new feature "Bird's Eye", which displays images with a slight inclination and with the possibility of rotation for seeing from another angle. Sure Google has street view, eye alt, 3D view and all that stuff, but hardly any of those is really helpful. The first will take a crazy amount of time for being available worldwide, and even by that time, it still will display a pretty useless view of the streets. The second, eye alt, I don't even know what is supposed to be, since is just a option for seeing worse what you already have. It might make more sense in 3D view, but even that, in my opinion, had a bad approach by rendering computer-made images of the buildings as a supposed real view of the planet. If I wanted a maps system which was like a CoD4 map I would ask.

With Bird's Eye Microsoft made it simple and stupid, but it's far better than any of the existent alternatives.



I had the chance today to participate in the today's started XV Sinfo, the computer science week here at IST, and to watch to some of the talks that were given. Unfortunately, my class schedule didn't allow me to participate in everything, but I managed to see two thirds of a talk hosted by Raymond Chen from Microsoft.

It was quite fun actually, since this was not supposed to be, as Raymond said , one of that talks in which you actually learn something. It was rather a nostalgic narration of fun events that only one working for Microsoft for so long can have in the bag of memories.

So, it seems, Windows XP, one of the most successful windows versions, comes, in its CD, with a hidden encrypted version of Microsoft Bob, one of the biggest failures of Microsoft, just to fill up the remaining disk space.

Doesn't that make it one of the most shipped products ever?

 

Later today, after the class that didn't allow me to see the whole Raymond Chen's talk, I begged the oportunity to attend to Miguel Vicente's presentation, another guy from Microsoft, talking about the Imagine Cup. It was a very good presentation actually, not because of the project itself, but rather because of the direction that was given by Miguel, that turned out to talk most of the time about "changing the world", creating and having ideas that actually matter. 




Finally I hearkened to the call of the revolution and decided to join OpenID, thus creating my online identity, which I actually delegated to this website.

Now, I'll be able to register and sign in web services and platforms with just a link that "is" my online identity, not having to type all over again usernames and passwords for an infinite number of sites. Great.

Note: If even with my little introduction this openid stuff is just "chinese" to you, you'll find plenty of information on the official website and also if, for you, portuguese is not "chinese", this guide done by Alcides Fonseca will be pretty useful.

But now what? Where are the sites which I can join by such method?

Truth is, there aren't many... but the technology is promising, so we as developers can only help it, not really by using the system, but by creating websites that support it.

So one of the features this blog might have in the future is OpenID enabled for the comments, which I'll study to implement. If you have a wordpress blog, you can do the same easier and even more by installing the wp-openid plugin.
 
Actually, with all the late buzz about this technology, it was quite difficult not to give attention to it, mainly given the news about Yahoo, which turned out to be an OpenID provider and advertised its new feature.
But actually, what's so good in this news? Of course it's great to have a giant of the web being an openid provider but, the other feature of openid, the one which actually matters to those who already were on the bandwagon before Yahoo jumped in, which is the ability to sign in the services of Yahoo with OpenID, is not there just because they made it only possible with Yahoo as a provider. For me this is not OpenID, this is the same closed system that has always been around and I simply can't find any good in it for the ones that chose not Yahoo as their openid provider.

If all the webservices were like Yahoo, we would better be as we were when there was no OpenID.



Previous page Next page