Páginas

2011-10-13

Fuck off death reaper! Dennis Ritchie too?!

Despite the commotion about Jobs’s death, many probably don’t know about the death of Dennis Ritchie (even that being in second on Twitter Worldwide Trend Topics while I was writing this post). Yeah, who the hell is Dennis Ritchie? I had no idea either, but his legacy is much bigger than Jobs’s.

What?! Wait a minute! How so someone I’ve never heard about is more important than Steve Jobs? That is the difference to real geniuses: their legacy is even greater than their fame. Dennis Ritchie was the designer and developer of C language, not that would be enough mind-blowing he also co-created Unix.
It’s like Newton’s famous quote: “If I have seen further it is by standing on the shoulders of giants”. I am not going to talk how internet, iOS and basically everything on IT relays in C, Unix or their legacy. But despite everything that other created, designed and built for Jobs to sell, Ritchie made things himself.
It is so sad people who worked in the greatest revolution of mankind are passing away. What are we going to do with all the transformation and power they gave us? I am going to finish this drop with much more philosofical statement than the usual “That is all for now. Until next post, with more drops of logs from a Computer Scientist’s life”:
Fame is not important. Let’s be ready to change the world and stay anonymous.

2011-10-05

[drops.log]: Life follows...

I was thinking in to entitle this post as “Apple loses jobs even no one was fired”. But I guess the main thing here is: life follows.Steve Jobs passed away but that means little. Better products weren’t going to stop of show up. Apple is not going to die tomorrow.

I don’t get the commotion. What really hit me was random black humor phrases like:
“Who would like to trade Apple stocks?”.
“I guess we don’t need to study iOS API anymore.”
“Jobs has just released his newest innovation, the iDead” (that was kinda obvious, but I didn’t read on Twitter).
“Is Apple going to put Jobs funeral tickets in the iTunes?”.
“Finally a really nice work spot opened in Silicon Valey”.
“Jobs is uncontrollable, even iDead he has already done millions purchase his final product: iSad”.
“Apple says: we don’t have enough e-mail addresses to spam, send yours to rememberingsteve@apple.com”.
My acquintaces came up some funny stuff too, but I am not going to copy them here.
I would also recommend watch Pirates of Silicon Valley and tweet to keep iDead in the Twitter Trend Topics for one more day at least. That is all for now. Until next post, with more drops of logs from a Computer Scientist’s life.

2011-09-30

[drops.log]: An inverse path, from photo to album

Wow! I’ve been absent since last week. My logs didn’t increase much in the while. I keep groping the Facebook Graph API with the restFB java wrapper.

It is easy to get the photos from a album. This post is about the inverse. The current task is to find what album a photo belongs. Let me put some context. Imagine you are using the Facebook Real-time Updates API to read feed and get every time user share/post something. Sometimes it is a new album. But when the feed is fired up with a new album you get only the cover photo from the album.
So now I need to check out what album holds that picture to iterate in it and do my app job. I read a comment in the StackOverflow saying the old REST API covered that easily, but the current graph api doesn’t do such a good job. Thankfully they already caught the album ID is encoded in the link attribute.
So... Let’s cut the talk and show where is the album ID in a Facebook Graph API Photo object. A photo object has a attribute link like this:
"link": "https://www.facebook.com/photo.php?fbid=255682667892372&set=a.255682644460941.54884.100000719217155&type=1",

[+/-] show/hide

2011-09-24

[drops.log]: To pay attention usually pays the effort

That title is a bit vague but can get handy. I commented I got stuck with Facebook Real-time Updates API. The problem was incompatibility between my subscription and user authorization. I subscribed to users feed, but never asked them (myself in the case) for the auth to read their feeds. Of course facebook would never pass me content users never allowed me to get even with a offline access token. By the way, I haven't tried yet, but I am pretty sure you will need one to handle updates processing since the updates are mere announces, no content is delivered.

After, I needed to figure out what is going wrong with my JSP in google appengine. That was very disturbing since this part was working in my develop environment. The case was my fool attempt to save in the session an not serializable Object. Yeah. That stupid! Since appengine doesn’t save on session objects not serializable, but my local development environment does I did that silliness and tried to save the restFB com.restfb.DefaultFacebookClient.
In short I could have finished this coding stage two days early if I have payed more attention in the f*cking documentation. Other damn thing is I needed to revise the code I posted with Facebook Auth Filter. But that was to show me: To pay attention usually pays the effort.
That is all. Until next post, with more drops of logs from a Computer Scientist’s life.

2011-09-23

[drops.log]: Facebook in Java

I started to do a small piece of code to interact with facebook. I spent some days wondering why the hell my application wasn’t working. The case is bad documentation on Facebook developers page. They say you should pass the authorization code and your app secret to the Graph API token endpoint from an URL like this:

https://graph.facebook.com/oauth/access_token?client_id=YOUR_APP_ID&redirect_uri=YOUR_URL&client_secret=YOUR_APP_SECRET&code=THE_CODE_FROM_ABOVE

[+/-] show/hide

2011-09-20

[drops.log]: Google+ API roadmap (and shortcuts...)


Well, my foreplay with Google+ API, launched past week, was too rush and to practical. Let’s make some notes useful for the next time.

First observations:
  • To work with Google+ API we need the Google Client API to get access to user google account and the Google Plus Service API. Make sure to download both
  • We need to get permission from our apps access Google services and data. SO you need to sign in Google API Console
  • Create the app by creating a Client ID, providing type of app, hostname address
  • Switch to ON the status of the services you will need to access from our app
One note for JAVA users, when I was writing this post the documentation was a bit misleading. The feature version of the JAVA wrapper for the Client API was 1.4.3 but version of the google plus API in the Developer’s Guide page was 1.2.1 which is incompatible with the 1.4.3 version, so download the 1.5.0 version
There are start sample code provided for some languages wrappers, the one for JAVA is quite good. It shows for instance how get the access token. Let’s make a Servlet Filter (analogous to drps.log about authentication of FB apps that I showed) to do the job of checking or authorising, retrieving access token... It is very simple, but a bit verbose:

[+/-] show/hide

2011-09-20

[drops.log]:More, more, more, plus... Google+

Not long ago I dropped something about the Google+ API release. Well, they do not let any grumpy comments (like mine) get cold. They just released the Google+ Hangout API. Well, of course I need to take a look, make some tests, but I have to much to do right now (Anyone could help with Facebook Real-time Updates on app hosted in Google Appengine?).

They announced a lot of Google+ new features today 1, 2. What do I comment about all that? Google+ really wants to get in your pants pocket (Yeah, lame joke, I know, but I don’t speak English natively), purse, bag, anywhere you keep your smart device. I guess since Facebook is getting closer of Google+ best features it seems Google wants to attract the users by that thing they are always toughing, playing, even doing nasty things: their mobiles (What? Have you known about any nude pictures taken by mobile devices and spread over the internet? Ever heard of sexting? Other bad joke... I know, but sexting is nasty, isn't it? :$).
Jokes apart I guess Google is showing their intelligence and fighting in a place they can do great: smart phones. After all they have the droids in their side... (Enough of silly jokes, bye.)

2011-09-19

[drops.log]: FHS, where to install stuff?

I have been reading the the Filesystem Hiearchy Standart (FHS) documentation. As I was reading I was checking the contents o different Linux boxes I have access to (debian, ubuntu and CentOS). What got me confused was about the /opt. Since google chrome is installed in the /opt/google/chrome as recommended but besides that /opt directories were empty.

But, wait. Shouldn’t be firefox, libreoffice, pidgin, etc. in /opt, making it full of directories? I lost my reading track and started to search why, in the document and the net. A linux magazine article was helpful. Even if I am not totally sure that is why I guess firefox is in /usr and google chrome is in /opt:
Firefox is shipped with the distribution. Even if optional package say for instance Inkscape is avaliable in the distro repositories the distro guys install it in the /usr. Google chrome in other hand is not provided with the distribution. Since google chrome is not part of the distribution it should be installed in the proper place, in that case /opt.
The point could be incompatibility of Licenses but since Gnome is GPL, Firefox is Mozilla Public License ("MPL"), and LibreOffice LGPL and they are shipped together in one basic, initial instalation of a distro like ubuntu. So I guess I am going to stick with my former explanation.
One could say the point of /usr is to be shareable. Agreed. It is one of the characteristics expressed in the FSH documentation. But, if can firefox installation shareable, why couldn’t chrome?
Anyway, what that conclusion got me was: So if I develop a piece of software I should make it be instalable in the /opt correctly, but if one distro decides to put my software in their product they should move the instalation to /usr. That could get even with different version. Let’s say: the most recent release I program to /opt, and if the distro has frozen that package their instalation is in /usr and if a user download my package and installs it he should get two different ersions, one in the /opt alien to the distro and other in /usr distro official.
I hope I have gotten that right. We must keep FHS on mind when developing.

[+/-] show/hide

2011-09-17

[drops.log]: Google+ API... First Impressions

I tried three times write this drop, but they just become too long. I guess after I am going to write a roadmap + shortcuts to make the first app accessing Google+.

* You will need the new Google Client API big time. That is nor bad neither good.
I tested the JAVA flavour wrapper for the API
- JAVA is naturally verbose, but the Google Client API wrapper to JAVA is too much for my taste... I guess the objective is to make it the most detached possible, even so...
- Documentation is kinda misleading. For instance:
- They divulged the Google Client API, but what I was expecting was the Google+ API, it is not so straightforward to get you need the client API to authenticate and one API for each service to get the wrappers for that service
- The featured version of the Google Client API for JAVA is the 1.4.3, but the Google+ service API JAVA wrapper version 1.2.1 is incompatible with it. So, if you get some error like: java.lang.NoSuchMethodError: com.google.api.client.http.json.JsonHttpParser. download the version 1.5.0 of the client API 1
- I have no idea why my calls for Person.getName() and Person.getNickName() are returning null
* There are a lot of runtime errors out there, if your user has a google account, but no account in the specific service, Google+ in our case, I got 404 error. We should keep this in mind. There are tons of things that could get wrong during the communication and Google recommends that kind error don’t blow in the user face. Let’s pay attention.
+ Google Client/Services API are opensource (they are under the Apache License 2.0)
- The main missing feature is public information is too little. Google justifies that saying is only the first step of a long journey . They should rush, facebook is quickly copying the great features of Google+
+ Google is providing a great set of language wrappers (even if they are in beta, or even alpha). That is a ball facebook drop long ago, and twitter never bothered about
* This API use OAuth 2.0 draft 10, but the wrappers make things simple enough to don’t need to dive in the subject
* You should read the whole documentation of client API in your favourite language before to jump in coding (don’t repeat my mistakes).
* I wonder how we will set the data access. I haven’t read about the access limitations, but I wonder if a app could get in all my post, or photos, or videos sometime. That goes in the opposite direction of specific and limited shares. I guess app could be like elements I put in circles and share with them some amount of data, granular and event specific. I don’t want apps out there accessing all my data similar to facebook.
NOTES:

[+/-] show/hide

2011-09-16

[drops.log]:A definitive future to AI

I am going to start the Stanford AI course in October. I like AI concepts. People think about Terminator when they think about AI and that is plain dummy, I guess. But after this study hint, let’s go to what was in my mind.

Sometimes I wonder what is the computing future. I am sure AI and “smart computing” have a great deal in that future. When I talk about “smart computing” i am not talking about the magazine, I am talking about computers to guess nicely. When a system suggest me similar products based on my or friends’ statical behavior it is a good guess, smart enough. What could AI and smart computational guesses can do for us? Well, predict the future in computing is really messy.
What I know they wont do it, or at least shouldn’t do it is: think for the you. Ultimately, you should make the choices. They could suggest, but you should accept after reasonable thinking. Don’t think because Facebook suggest your friends classification that should be your classification. Amazon says your friends would like some gift, check out their actual wishlist, the one they choose the products, not one made up by their shopping behavior.
So, programmers out there, don’t try to make programs that think instead their users.

[+/-] show/hide

2011-09-14

[drops.log]:Why innovate when you can copy?

What has Facebook done to fight its direct competitors, Twitter and Google+ ? They definitely aren’t standing still. For instance, they enhanced their share feature. It is not as easy and practical as Google+ however. They have launched a Subscribe option. Basically you can provide a Subscribe button on your profile and let people follow you. That is the Twitter main behavior, for sure. So, instead of making innovations are they replicating their competitors’ best features and concepts? That is at least fair keeping in mind how much Google+ copied from them.

Maybe you haven’t seen the presentation that based Google+. It talks a lot about how we keep subjective groups while we establish relationships. Twitter and Google+ acknowledge a simple and obvious behavior: many relationships are asymmetric. They do acknowledge it since who you follow and who follows you, or who is in your or has you in circles are independent sets. My point is: Google+ still is better. Basically everybody is up to be followed, similar to Twitter, but the “sharers” decide who their shares are going to reach. I guess this is the perfect concept. And 140 characters limit and Twitter lists really suck.
Since Facebook is going to just copy their competitors ideas they could just make their share tool equal to Google+, rip off the “add as friend” and just make everybody follow who they want and let to the user choose what to share with who. In short: Since they are coping Google+ anyway, they could just become it and kill this Google attempt. They have best ecosystem, a good API, pages from organizations, a much larger users base and so on. I hope in the process of becoming Google++ they kill the stupid groups. That features is really lame.

[+/-] show/hide

2011-09-12

[drops.log]: Facebook, Pidgin, OpenID, and other chat frustrations

I started to use the OpenID from Google to access my facebook. That make less loginand password digitation. What frustates me is only initial facebook page can use it to login. If I access from a e-mail they send me that doesn’t work.

Since I configured that on my facebook my pidgin stops to access my facebook account to chat. I need to change the facebbook password to pidgin back to login. If that isn’t enough I can’t be logged on facebook chat in pidgin and disable the facebook web page chat. That is annoying I want only chat from the pidgin. I don’t want that little windows filling my facebook navegation.
I found out facebook let you select the groups you will show on-line. That is a great feature. Even more impressive since the Google+ enables you to hung out only to certain groups, but not separate your chat status in the same way.

2011-09-05

Preface: drops.log

I have more comments than real posts and etc, but since I still don’t started the “Very basics” series I guess my comments could be something for the blog. So, I am going to share small comments, opnions, even code samples here. They are small drops I am going to “log” on the blog. Even though my English sucks I am going to do it in this language.

2011-07-01

Google+ : "MAIS" uma tentativa social do Google


O Google+ saiu e já tem gente achando um barato, gente cautelosa, e claro, gente jogando pedra. Eu particularmente não estava tão empolgado com algo da Google desde que vi o Social Graph API, e provavelmente só vou ficar mais entusiasmado com o Google Wallet. Nesse post vamos dar duas respostas para as seguintes perguntas:

  • Pra que serve o Google+ ?
  • É mais uma tentativa da Google para a dominação mundial?
Uma pergunta que não vou responder é: Vai dar certo?

[+/-] show/hide