I had a bug in pagination when navigating through categories or dates
It was due to a customization I made sometime ago to make Wordpress 2.5 work o a IIS web server.
Instead of
$_SERVER[’REQUEST_URI’]=’/page/1′;
It must be
if($_SERVER['REQUEST_URI']=='')
$_SERVER[’REQUEST_URI’]=’/page/1′;
Shame on me 

Weave is an experimental prototype from Mozilla Labs that integrates online services with Firefox.
“As the Web continues to evolve and more of our lives move online, we believe that Web browsers like Firefox can and should do more to broker rich experiences while increasing user control over their data and personal information.”
in Mozilla Labs » Weave
Seems nice. But I’m pretty sure that I would not store all my passwords on the cloud in a service like this. But to store bookmarks, history, cookies (excluding the authentication ones) and tabs is pretty useful. I tried this service today, and it was toooo slow. I’ll way for a more efficient version of this experimental software.

I would prefer a browser independent solution, but that is too much to ask. Nevertheless it may be nice in the future. Meanwhile I’ll keep using Windows Live Favorites. If I used Internet Explorer as my main browser, it would be perfect, but it will have to do.
After I wrote about getting started with Windows Live Agents, it’s time to go deeper into BuddyScript, the script language that is used in agents development.
To make your code easier to manage and even to make it reusable you can create package files. These are files that aggregate functions, procedures and data sources that are strongly connected. These packages can be referenced in your scripts using the package statement in the beginning of your script file. To create a new package right click you solution and add a new item based on the PKG File template. The name you give to your package file will be also the package name.

I’ve created a package named DataSources.pkg in which I will write sample code related to data sources usage. You can have several kinds of data sources which are listed in the official documentation. Today I’ll talk about 2 of them. First of all the HTTP data source. It Allows you to download data from the web to use in your scripts. When you declare a data source you must give it a name, return type and if you wish you can add parameters. The example bellow is called GetRSSFeedDataSource, has no parameters and the result type is composed by three fields: title, description and link of a RSS feed entry.
In the data source body I define the source file on the web, the timeout for the HTTP request and the expiration time (for caching purposes). You can even define HTTP headers like the user-agent in the example bellow. Now, lets take a look at the source code.

The data that is downloaded by this HTTP data source is parsed using a simple xml filter (there are other like script-based, XSLT, etc). This kind of filter allows you to filter and format your data source results. In this case you can dive into the returned XML and return particular parts of it. This data source only returns the first entry on my RSS feed, but as you can see in the commented code, you can iterate over the XML using loops.
Now lets see an example of usage of my data source.

I defined a procedure where I call the data source, extract the title and link, and send it to the default output device (which will be the Windows Live Messenger conversation window).
Another nice kind of data source that can be configured and used is based on SOAP web services. The example bellow uses a silly web service that I wrote in .NET that sums two numbers and return the result. This data source has 2 parameters (the operands) that are used as input to the web service. I had to define the proxy parameter (URL of the web service), the name of the operation to be performed (and the respective action) and also the namespace of the web service.

SendSum() is a simple procedure that outputs the sum of two parameters. I’ll use it later. The demo web service is packaged with the rest of the project that I made as an example for this post. Download project source code and take a look at it.
Now that we have defined these two data sources, I’ll show you how to use them during a conversation of an agent with an user. The next lines of code were added to the Main.ddl script file. First of all the the reference to the new package, adding the “package DataSources” line to the beginning of the file.
I have chosen to show the first entry of my blog when the user types “news” into the conversation window. When I recognize that pattern, I call the SendLatestRSSEntry procedure that I’ve defined before.

The second example is great to show how simple it is to recognize patterns and split them into variables. The second expression matches with messages that have the format sum <integer> and <integer>. And store the two integer in two variables: OP1 and OP2, which are used as parameters to the procedure SendSum. You can learn more about matching expressions in MSDN.
Feel free to download the project source code and change it at will.

Recently I’ve been exploring the Windows Live Agents SDK. This framework allows you to develop interactive Windows Live Messenger bots. You may already talked to a messenger bot like encarta@conversagent.com which allows you to search information from Encarta Encyclopedia or if you are Portuguese maybe you use info@destakes.com which gives you news about topics you choose, using data from several news websites.
To start developing your Agent/Bot/Buddy you must have Visual Studio 2005/2008 installed as well as .NET Framework 3.0. More details about requirements can be found in the Installation Requirements web page.
After fulfilling the requirements you can download the Windows Live Agents SDK and install it.
Now you are able to start developing your first agent! Open Visual Studio and open the “New Project” window. There will be a new project template under the “BuddyScript” project type. After choosing the “Windows Live Agent” project template, and typing your project name, you will be prompted for some project settings. You can choose several languages for your Agent and define if it will be able to do some default chatting with users. The only problem I found is that a project created this way is way too complex for a beginner, and if (like me) your target language is not supported or if you want your agent being able just to respond to specific messages, it is pretty difficult to use this template.
After hours trying to find out that was really relevant, I’ve created a Simple Project Template from which I removed a lot of files and settings from the original project. It has only some usage examples in Main.ddl (main BuddyScript file). This project is testable out of the box
The examples I left on the file are pretty simple. They cover how to set an expected input and how the bot is supposed to react. It also uses a package that makes available information about the current user, like his user name. I left some comments in the code. There are a lot of possibilities that can be explored. Something I tried already and that I will share in future posts is the usage of data sources like XML, Databases, RSS, etc. If you are curious about BuddyScript capabilities take a look at the BuddyScript Language Reference.
In order to test your agents you must have a license key, which is easy to obtain from within Visual Studio. Check out How to: Install the License Key.
You can test your agents directly in Visual Studio (Menu View > Other Windows > Conversation Window) with the interface showed bellow.

More information about this kind of testing can be found on the How to: Launch the Agent in the Windows Live Agents IDE article.
Another way of testing your Agent which is much more fun, since you can ask your friends to test it too, is deploying your Agent on the Windows Live Messenger network.
Read How to: Launch the Agent in IM Environment to learn how achieve it.
More detailed information can be found in the Windows Live Agents SDK documentation at MSDN.
Next time I will talk about using data sources, background procedure (code that runs detached from user conversations), notifications (scheduling messages) and how to create pro-active agents that starts conversations instead of responding to user requests.
In understand that to make Windows Live Messenger profitable and free to all of us to use it has to have some kind of advertisement system attached to it. Sometimes these ads are useful, since they are different for each country and there are several major brands that use Windows Live Messenger advertisement.

Nevertheless, recently I’ve not been pleased by Messenger advertising. It has been really annoying. Now there are a lot of ads that just pop up out of out our main Messenger window showing some sort of flash animation. Some of them are pretty big and annoying when I trying to reach a contact that is hidden beneath the ad… Most of them disappear when the mouse leave the ad area (it is the minimum that I expect…) but other ads are only disabled by clicking a close button.

I am starting to understand those people that use software that patches Windows Live Messenger to remove all the advertisement. It violates the terms of usage and it is wrong to do it, but this Messenger advertisement “feature” is becoming to invade the user space. Some day in the future maybe I will consider the hypothesis of moving to a IM software like Pidgin (which I like pretty much
) that is compatible with MSN protocol.
There is even a portable version just like I love in software).