Matias Paterlini

Helping to make the world more social and connected
Facebook Development Conference
Last Saturday I presented a conference about facebook apps development at Fasta University.

It was a great time, and there are new oportunities to make the presentation in other companies and universities soon. There is a posibility to make a webcast too, so I'll keep you informed about updates.

Here you can see some pictures about the facebook development conference at Fasta:

http://www.new.facebook.com/photo.php?pid=764159&l=56bf2&id=587412625

Thanks to Ignacio Repetto and Red Estudio for the photos!!!

And here you can download the presentation here (it's spanish mostly, english presentation coming soon):

http://www.paterlinimatias.com/presentations/fasta-2008.pptx

Thanks to all the devs that came to the conference, it was nice to share that time with you.

Cheers!!!

Matias Paterlini
Facebook Apps Development and Monetization Conference at Fasta University
I wanted to share with you that I've been invited to make a presentation about "Facebook apps development and monetization" in the Fasta University Workshop.

The conference will be about Facebook Movement, what is it and how to be part of it, facebook api, libraries, applications infrastructure, monetization, gifts, ads and some other topics.

So if you're close to Mar del plata, it will be on Friday 09/26 at 21:00 hs.

Cheers!

Matias Paterlini
Poke the Pope Redesign is finished!
We just completed our first significant update of Poke the Pope. Now we have a leaderboard and we think a unique Friends of Friends category. OfferPal can really drive you on the way to a Pope's bankroll. We will watch how that works. Next up are some shocking new topics of questions. Then some great papal gifts. Nowhere else will you be able to match that. To stay ahead of our question research, shop Amazon for the incredible books we are using. And whenever you shop Amazon start from Poke the Pope-- Thanks. You can add Poke the Pope here
Matias Paterlini
Facebook apps developer - be carefull with IGNORE button on requests

 One of the most important things that a facebook developer has to be concern about is facing a good viral grow implementation. Without this your possibilities of reaching a high volume of users accessing the app are very poor, including using ads to promote your app.

There are some precious tools that must be understood and be used properly by developers in order to maintain their apps growing every day. One of those tools are user requests (fb:request).

According to the post "Feedback-based allocations for requests and invites" published on Facebook Developer News page, "Applications will no longer have a static upper limit of 20 requests, but instead requests will be allocated based on how users have responded to past actions. The number of requests per application will be based on the rate that users accept and ignore requests...{}".

People receives from 3 to more than 10 or 15 request a day, and if you pay attention, most of the apps only show 2 buttons, "Confirm" and "Ignore" buttons. Most of us like to keep our accounts clean, so if we don't want to play we have no choice than ignoring...

So, let me share with you my workaround to get the less Ignored request possible on your app based on Sudha Jamthe suggestions and a simple trick that came to my mind after some research.

The idea is very simple and based on two tips:

  • Any request button (fb:req-choice) pressed on a facebook request that is not "Ignore" button are considered as acceptance buttons.
  • You can only set the URL and the name of the button.

So we created this 3 buttons :

  • Play now! - That's acceptance button, that we link to our canvas page file to make the action requested.
  • Not right now - This is added to avoid users pressing Ignore. HERE is the trick. We set the url like this:
  1. <fb:req-choice url='reqs.php' label='Not right now' />

    This way facebook doesn't take in count the pressed button as an ignore button, and the request disappear, just like Ignore button action does.

  • Block sending requests - This one is linked to our canvas page to set in our database that this user doesn't want to receive requests anymore, (at least for now), later we can ask him if he still doesn't want to receive requests...

By using this logic, we increased in less than three weeks from 16 up to 30 available request per day.

I hope that helps a little, and we can keep discussing new ways to improve and make our apps more viral!.

Thanks!!

Matias Paterlini

Hibernate error: "could not execute native bulk manipulation query"

I was getting this error:

exception: org.hibernate.exception.SQLGrammarException: could not execute native bulk manipulation query

After looking in more than 25 google results I couldn't find any clue about what could be happening. But somehow I got illuminated and found what was happening. That's why I'm writing this post.

This was my code before I saw the problem:

  1. String del = "DELETE VotableNode vn WHERE vn.votingSetBucketId = " + Integer.toString(bucketId);
  2. session.createSQLQuery(del).executeUpdate();

Let Me tell you something about this error. I'm not a hibernate crack, but as you can see it's saying that you can't create a bulk delete on a sql query by using hibernate.

The error in this code is that I was executing a HQL script using createSQLQuery method which is completely wrong, I should use createQuery.

  1. String del = "DELETE VotableNode vn WHERE vn.votingSetBucketId = " + Integer.toString(bucketId);
  2. session.createQuery(del).executeUpdate();

So there's nothing much to say, If you want to make a bulk task like an update of multiple records or a deletion of multiple rows using a simple query, you MUST use a HQL query.

Hope that helps a little!

Matias Paterlini

Sharepoint error One of more field types are not installed properly (Portuguese: Um ou mais tipos de campo não estão instalados corretamente)

If you are working with sharepoint, there will be a day that you'll have to confront an error like this: "Sharepoint error One of more field types are not installed properly" or in the portuguese version: "Um ou mais tipos de campo não estão instalados corretamente".

 If this happens to you, it is like the problem says, a field type error, but sometimes it has nothing to do with installed field types.

 So first of all, you should check if there is on the list any field that is a lookup field linked to another list. After that you must check one by one the target list of those fields, to see if they exist, because one of the reasons of this error is because there is a lookup field pointing to a list that does not exist anymore.

There is another reason that throws this error, and it is when you change the name of a field, it doesn't change the internal name of the field. So if you use a  CAML query in which there is a field name, you should allways use the internal name instead of the Name of the field. You can find more information about this error and the solution in this blog: http://www.sharepoint-tips.com/2007/04/one-of-more-field-types-are-not.html

Any comments, questions and suggestions, fell free to contact me at: mpaterlini (at) gmail (dot) com

Hope That Helps A Little!!!

Matias Paterlini
Manas Technology Solutions

Working with USB to Serial port adapter on .NET

You can't solve a problem with the same kind of thinking that created it. — Albert Einstein (1879-1955)

Yesterday I spent a lot of time trying to get a speed radar to work on my .NET application. Every test was giving us diferent results. We made hundreds of tests, but every time we thought we found the problem, then the results of the test changed again.

So If you're working with USB to Serial ports using some devices (like a Decatur speed radar in my case), and you're getting some difficulties, there are some things that you can do to isolate the problem

FIRST OF ALL: Test the application on a computer that has a serial port, and connect the device directly without the USB to SERIAL adapter.

If the problem is sitll in there, well, you should check the power of the device, or some kind of bug in the program.

BUT if the problem is gone, there are two things that you should know.

  1) For some reason, some adapters can add some caracters like "\r" right before or after the content that is sent from the device.

So, as a rule, every time you make a ReadLine through a Serial port connection you should trim the data received.

Example:

    String data = sp.ReadLine().Trim();       // (Where sp is the serial port connection)
    sp.ReadExisting();

                

2) Some devices can connect with different baud speeds, but after the tests, we came to the conclusion that In spite of using the same model of devices, some of them should be connected with different baud Speeds. So, How do we know which speed we should use? we just keep testing! :).

    When you connect to a serial port with a baud speed that is not the one that likes to the device, probably it will let you open the port without any error, warning or exception, but once you're connected, if you try to make a sp.ReadLine() it will throw an Exception like System.TimeOutException (then you know you're probably working on a wrong baud speed).

    SO, What do we do? ...well, you can try something like this

    try
    {
                String data = sp.ReadLine().Trim();
                sp.ReadExisting();

                // Here you process the information received.
    }
    catch (TimeoutException tex)
    {
          String p = tex.Message;
          try
          {
                  // here you close the connection, and open it again with a different baud speed

                  if (sp.IsOpen)
                        sp.Close();
                  if (sp.BaudRate == 9600)
                       sp.BaudRate = 115200;
                  else
                       sp.BaudRate = 9600;
                  sp.Open();

            }
            catch 
            {      
            }
    }
    catch (Exception exc)
    {   
          Debug.WriteLine(exc.Message);
    }

 

Any comments, questions and suggestions, fell free to contact me at: paterlinimatias (at) gmail (dot) com

Hope That Helps A Little!!!

Matias Paterlini
 




 

More Posts