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.

[+/-] show/hide

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.

[+/-] show/hide

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",
If we think for a moment it could become clear the set parameter in the URL could provide something and even more the a could stand for album. That is it! Have you caught? Parse from set=a. until the next dot and you got the album id that keeps the photo. (Yeah. That easy.)
So, let's extract that field and retrieve the album, and iterate for the fellow photos in a album. Since my Facebook Graph API wrapper is restFB let’s use Java regular expression.
//posts is a Post list retrived from a user's feed
Post post = posts.get(i);
if(post.getType() != null && post.getType().equals("photo")) {
	//Got a photo
	if(post.getCaption() != null) {
		//it is from a new album
		
		//this regex compilation could be static
		final String ALBUM_REGEX = "(?<=set=a\\.)\\d+";
		Pattern pattern = Pattern.compile(ALBUM_REGEX);
		Matcher matcher = pattern.matcher(post.getLink());
		if(matcher.find()) {
			String albumId = matcher.group();
			Connection< Photo > photos = fbcClient.fetchConnection(albumId + "/photos", Photo.class);
			for(Photo photo : photos.getData()) {
				//do your job with the photos
			}
		}
	}
}
I would love the album ID would be encoded in the Photo object too. It would be much more Object Oriented and far easier. Enough of complains. I guess that is all. Until next post, with more drops of logs from a Computer Scientist’s life.

[+/-] 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.

[+/-] show/hide

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
That is very misleading since the URL contains a parameter redirect_uri that is useless. They never redirect from your page. You get the access_token not as parameter but as content.
I tested facebook-api and restfb and none made a good work to authenticate. You must lead with the initical oauth/dialog url, get and parse the content to retrive the access_token. There is a reasonable elegant way to do that on java servlets: create a Filter that redirect to the authorization page and retrieves the content on the URL above.
Here is the code:
public class FacebookAuthorizationFilter implements Filter {
    public static final String AUTH_URL_BASE = "https://www.facebook.com/dialog/oauth?client_id=%s&redirect_uri=%s&scope=%s";
    public static final String ACCESS_TOKEN_URL_BASE = "https://graph.facebook.com/oauth/access_token?client_id=%s&redirect_uri=%s&client_secret=%s&code=%s";
    
    @Override
    public void init(FilterConfig filterConfig) 
        throws ServletException 
    { /*init code*/ }
    
    @Override
    public void destroy() { /*destroy code*/ }

    @Override
	public void doFilter(ServletRequest request, ServletResponse response,
			FilterChain chain) throws IOException, ServletException {
		
		HttpServletRequest req = (HttpServletRequest) request;
		HttpServletResponse resp = (HttpServletResponse) response;
		
		String code = request.getParameter(MyConstants.CODE_PARAM_KEY);
		String accessToken = request.getParameter(MyConstants.ACCESS_TOKEN_PARAM_KEY);
		
		if(accessToken != null) {
			//there is one already let the application follow usually
			chain.doFilter(req, resp);
			return;
		}else {
			if(code == null) {
				//ask for authorization from facebook
				resp.sendRedirect(String.format(AUTH_URL_BASE, this.appKey, this.redirectURI, this.scope));
			} else {
				//already authorized, fetch the access_code
				accessToken = retriveAccessToken(code);
				//save the access_token
				req.getSession().setAttribute(MyConstants.ACCESS_TOKEN_KEY, accessToken);
				chain.doFilter(req, resp);
			}
		}
	}

    /**
     * Retrieves the content of the page with the access_code token 
     * @param code the code parameter passed to the redirect_uri from the oath/dialog page
     * @return The String access_token provided from facebook
     * @throws IOException
     */
    private String retriveAccessToken(String code) throws IOException {
	    URL url = new URL(String.format(ACCESS_TOKEN_URL_BASE, this.appKey, this.redirectURI, this.appSecret, code));
	    //TODO: Try to sintetize with CharStreams from guava-libraries 
	    ByteArrayOutputStream byteWriter = new ByteArrayOutputStream();
	    InputStream urlReader = url.openStream();
	    int r;
	    while((r = urlReader.read()) != -1) {
		    byteWriter.write(r);
	    }
	    String fetchedResult = new String(byteWriter.toByteArray());
	
	    String[] fields = fetchedResult.split("&");
	    //TODO: Make a regex to extract that
	    for(String field : fields) {
		    String[] pair = field.split("=");
		    if(pair.length == 2 && pair[0].equals("access_token")) {
			    return pair[1];
		    }
	    }
	    throw new RuntimeException(fetchedResult);
    }
}
Sumaring the process on a servlet:
  1. Make a filter that asks for the client object or access_token on the session objectc
  2. If there is no parameter in the session stops the request and redirect to:
  3. https://www.facebook.com/dialog/oauth?client_id=YOUR_APP_ID&redirect_uri=YOUR_URL&scope=email,read_stream
    1. Where scope are the permissions you want
    2. The redirect_uri is going to work this case and you must to have a filter in the redirect_uri able to get the code parameter (line 30 in the snippet above)
  4. Fetch the content of the follow URL:
  5. 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
    1. (Lines 48 to 56 in the snippet above)
  6. Parse the content to extract the parameters (at least acess_token) (lines 60 to 65 on the snippet above)
  7. With access_token you can create the actual client object to access facebook data (line 37 on the snippet above)
  8. Put the object where you can retrieve it (line 35 in the snippet 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:

public class GoogleAuthFilter implements Filter {
	
	@Override
	public void init(FilterConfig arg0) throws ServletException {
		// TODO Auto-generated method stub
	}

	@Override
	public void destroy() {
		// TODO Auto-generated method stub
	}

	@Override
	public void doFilter(ServletRequest request, ServletResponse response,
			FilterChain chain) throws IOException, ServletException {
		HttpServletRequest req = (HttpServletRequest) request;
		HttpServletResponse resp = (HttpServletResponse) response;
		AccessTokenResponse accessToken = (AccessTokenResponse)req.getSession().getAttribute(MyConstants.ACCESS_TOKEN_RESPONCE_KEY);
		//test to check access credential 
		if(accessToken == null) {
			String code = req.getParameter(MyConstants.CODE_KEY);
			if(code == null) {
				//no code means the user must allow the app access their data
				AuthorizationRequestUrl authUrl = new GoogleAuthorizationRequestUrl(
														MyConstants.CLIENT_ID, 
														MyConstants.REDIRECT_URI, 
														MyConstants.GOOGLE_PLUS_SCOPE_URL);
				resp.sendRedirect(authUrl.build());
			} else {
				//use the code to generate access token
				accessToken = new GoogleAccessTokenRequest.
										GoogleAuthorizationCodeGrant(
												new NetHttpTransport(), 
												new GsonFactory(), 
												MyConstants.CLIENT_ID, 
												MyConstants.CLIENT_SECRET, 
												code, 
												MyConstants.REDIRECT_URI
										).execute();
				req.getSession().setAttribute(MyConstants.ACCESS_TOKEN_RESPONCE_KEY, accessToken);
				resp.sendRedirect(MyConstants.SERVLET_PATH);
			}
		}
		chain.doFilter(req, resp);
	}
}
To get the Plus service client object is also simple and verbose, just snip of a servlet to exemplify:
AccessTokenResponse accessToken = (AccessTokenResponse)req.getSession().getAttribute(MyConstants.ACCESS_TOKEN_RESPONCE_KEY);
GoogleAccessProtectedResource requestInitializer = new GoogleAccessProtectedResource(
					accessToken.accessToken, 
					new NetHttpTransport(), 
					new GsonFactory(), 
					MyConstants.CLIENT_ID, 
					MyConstants.CLIENT_SECRET, 
					accessToken.refreshToken);
Plus plus = new Plus(new NetHttpTransport(), requestInitializer, new GsonFactory());
With the Plus object you can make requests to access people data
String who = req.getParameter(MyConstants.WHO_KEY);
who = who == null ? "me" : who; 
Person me = plus.people.get(who).execute();
You could access the activities too, but just the public.
We are almost finishing. Let’s list (or relist) useful links too:
That is it. Enjoy the Google+ small set of accessible data. And let’s hope we get more soon.

[+/-] show/hide

[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.)

[+/-] show/hide

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.

[+/-] show/hide

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.

[+/-] show/hide

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?

A maior parte das pessoas deve estar se perguntando para que raios serve o Google+. O Google+ é um mecanismo de compartilhamento. “E qual a graça disso? Posso compartilhar as coisas pelo Twitter, pelo Facebook, Tumblr e por dezenas de outros caminhos”. A grande propaganda do Google+ é que ele permite que você faça compartilhamento selecionado. Você pode escolher se quer compartilhar com seu círculo de amigos, de colegas, de familiares, de vizinhos, enfim... Escolhas os círculos e contatos com quem quer compartilhar. E o conteúdo só chega para eles. Tem gente que fica com medo de compartilhar fotos, comentários, links, com medo do que o chefe, a namorada, o vizinho, o pai vão pensar. Então compartilhe apenas com seus amigos de bar. Basta criar um círculo para eles e se seu irmão ia curtir adicione ele na lista, de maneira simples e prática.
Outra pergunta que devem estar se fazendo é se a Google não cansou de levar na cabeça nas suas tentativas sociais tipo o Wave e o Buzz (Orkut também, mas brasileiro não entende que Orkut é um fracasso...). A resposta é não. O que a Google quer metendo a cara no mercado das redes sociais digitais? Ela quer ganhar dinheiro. Você deve ter notado a quantidade de propaganda que há no Facebook (olhe para o lado direito da tela). A Google ganha dinheiro com propaganda, pelo menos até o Google Wallet se difundir. No momento que o Facebook leva um fatia grande do mercado de anúncios a Google tem de se mexer. Se a Google não ganha dinheiro ela não pode manter serviços fantásticos como o docs, blogger, gmail, etc..
E vai funcionar? Só o tempo dirá. O Google+ tem alguns fatores bem positivos: visual limpo e agradável, e praticidade. Quem defender que o Facebook já tem as funcionalidades de compartilhamento seletivo vai ter de me explicar porque um usuário vai querer gastar tempo criando grupos por nomes, quando o circles tem uma interface gráfica super simples e prática? E se eu quiser compartilhar algo com dois grupos e mais três amigos? No facebook tem de clicar naquele cadeado escolher a opção de customizar, e numa tela que abre escolher para selecionar quem mostra, adicionar as pessoas... No Google+ isso está na mesma tela a um de distância. Nada mais de scraps privados, mensagens particulares, usar depoimentos, mande conteúdo apenas para quem ele é intencionado.
Claro que o Facebook pode lançar uma remodelagem para simplificar, sintetizar e tornar mais prático, similar ao Google+, os mecanismos de compartilhamentos, mas se ele prover isso o Google+ já serviu para alguma coisa, concorda?
Não é que o Facebook coloque todo mundo no mesmo saco, como a Google alega, o caso é que o Facebook apenas torna tão pouco prático fazer isso que ninguém faz compartilhamento selecionado. O twitter por outro lado não tem essa opção. Você não compartilha, divulga. O sistema de listas é fantástico, mas a natureza do microblog é de divulgação.
Quem não gostou da coisa de qualquer um poder lhe adicionar num círculo não entendeu direito o conceito. Seus posts e shares vão continuar sendo divulgados apenas para quem vocẽ quer. Então não adianta aquele cara na costa da Índia ter te adicionado, a não ser que seu post seja público ele não vai ter acesso. O usuário pode ter milhões de seguidores, mas só vai compartilhar coisas com os amigos e a família, talvez os vizinhos ou colegas de trabalho. A paranoia é sua amiga, mas acho que é irrelevante quem me segue, desde que eu use o prático sistema de compartilhamento do Google+, só compartilho com quem quero. Levando em conta que a maior parte dos usuários tem feed público no twitter e qualquer um pode adicionar numa lista sem nem o aviso que o Google+ dá que alguém lhe adicionou num circle, a reclamação é sem sentido.
Isso de ficar mandando e-mail? É ruim? Talvez, uma vantagem é não ter de ficar trocando de aplicação para mandar um link para o e-mail do meu tio que detesta redes sociais. Faço um share com ele e mando pro e-mail dele.
Pode melhorar? Uma coisa é certa: O potencial do Google+ não foi atingido. Não usei o wave, mas o buzz foi definitivamente subaproveitado, e menosprezado. na minha cabeça já tem algumas funcionalidades que estão faltando, mas com o tempo elas vão chegar nem que seja na marra.
Mas a recomendação do dia é você entrar no Google+. Pode ser que ele não desbanque o Facebook ou o Twitter, mas ele com certeza vai aposentar o Orkut.

[+/-] show/hide

2010-06-05

So what?


I read this days about Google phasing out Windows internal use due to security concerns. So what? I like, really like, Google and their products, but I didn't understand the reason for such repercussion. I actually am disappointed it took so long for that.


Of course you should pay attention to security issues concerning Windows, but not because Google trumpeted them. Computers and Internet must be taken seriously and, of course, Windows has security issues. But, guess what. All Operational Systems have security issues and failures. Whether Mac or Linux (both POSIX).
It isn't even viable drop the general use of Windows. There is too many systems running only on Windows. It doesn't matter how many app are today on the Apple App Store or Android Market. The Windows's programs set is much bigger.
Maybe you have listened that your iPhone, Android mobile, iWhatever OS is safer than Windows. That would be truth. So what? It is not like Apple or Google have invented the light bulb. Their amazing concepts like “Sandboxing” and centralized application repositories are old news in Linux Distributions. Have you ever listened about apt-get, Synaptic, yum, and others? No? They are “Linuxes App Stores” and are around here for quite some time.
What matters little in the security field. It is a vicious cycle. The systems come out, the vulnerabilities are found and explored. New security features show up. New holes show up... And the main hole is somewhere is never going to disappear: the user. Murphy's laws fits perfectly here: if there is a way to user rip off the security barriers, he is going to do it soon.
Let's put it very simply: Google is doing that because it suit them better, it is better for their ecosystem, it doesn't mean the same goes for you. The great reason I don't understand the spotlights on that decision is really this: domestic users aren't going leave their comfort zone to try out something unknown as Linux. I sincerely hope no one people from Free Software is going to think it as opportunity to Linux grow and spread...
I would love to see people doing like I did: testing, finding and deciding what fits them best. I chose Ubuntu Linux, Google chose not-Windows. Google does even not care about OS. Their business is focused in the “cloud”. The Chrome OS is just a detour due to their current business needs. What better way to show that OS is not important than to make one proving it? So what? That is up to you. Are you going to quit Windows, just because Google is going to?

[+/-] show/hide

E daí?


Eu li esses dias que a Google está progressivamente removendo o uso interno do Windows. E daí? Eu gosto, realmente gosto, da Google e dos produtos dela, mas eu não entendi a razão para tal repercussão. Estou na verdade desapontado que tenha demorado tanto.


Claro que você deve prestar atenção as questões de segurança relativas ao Windows, mas não porque a Google alardeou-as. Computadores e Internet devem ser levados a sério e, é claro, o Windows tem questões de segurança. Mas, adivinha. Todos os sistemas operacionais tem problemas de segurança e falhas. Seja Mac ou Linux (ambos POSIX).
Não é viável abandonar o uso geral do Windows. Há muitos sistemas rodando apenas no Windows. Não importa quantas apps há hoje na Apple App Store ou Android Market. O conjunto de programas para Windows é muito maior.
Talvez você tenha ouvido que o SO do seu iPhone, celular Android, iQualquercoisa, seja mais seguro que o Windows. Seria verdade. E daí? Não é como se a Apple ou a Google tivessem inventado o a lâmpada. Seus fantásticos conceitos como “Sandboxing” e repositório centralizado de aplicações são notícia velha para as Distribuições Linux. Já ouviu falar de apt-get, Synaptic, yum, dentre outros? Não? Eles são “App Stores para Linux” e estão por aqui há algum tempo.
O que importa pouco no campo da segurança. É um ciclo vicioso. Os sistemas chegam, as vulnerabilidades são encontradas e exploradas. Novas funcionalidades de segurança aparecem. Novas brechas aparecem... E o principal buraco está num lugar que nunca vai desaparecer: o usuário. A lei de Murphy se encaixa perfeitamente aqui: se há um modo do usuário arrancar as barreiras de segurança, ele vai fazer isso em breve.
Vamos colocar de modo bem simples: a Google está fazendo isso porque melhor a convém, é melhor para o ecossistema dela, isso não significa que seja melhor pra você. A grande razão que não entendo os holofotes nessa decisão é na verdade isso: Usuários domésticos não vão sair de sua zona de conforto para tentar algo desconhecido como o Linux. Eu sinceramente espero que ninguém do Software Livre esteja vendo isso como uma oportunidade do Linux crescer e se espalhar...
Eu adoraria ver as pessoas fazendo como eu fiz: testar, encontrar e decidir o que melhor se encaixa para elas. Eu escolhi Ubuntu Linux, Google escolheu não-Windows. A Google nem se importa com SO. Os negócios deles estão focados na “nuvem”. O Chrome SO foi apenas um desvio devido a suas atuais necessidades de mercado. Que melhor maneira de mostrar que SO não importante do que fazer um provando? E daí? Isso é com você. Você vai largar o Windows só porque a Google está indo?

[+/-] show/hide

2010-05-31

Game's art


The big matter is there is some ambiguity. There is video games and there is electronic puzzles. A electronic puzzle is a game played in an electronic device. Even common games like blackjack or draughts (checkers) are on electronic devices. If you consider chess just a game instead a sport, electronic chess against the computer is an electronic puzzle. I particularly prefer electronic puzzles.
Video game is something different. They aren't only about solve a problem against an automatic antagonist. Video games are touched, blessed, with the most permeator and abstract kind of art: literature. A fundamental point in a videogame is the need of follow a history, or create it somehow.
It's very simple to get there is histories behind modern and old video games. It may be just the background to a bunch of fights or a complex and mysterious screenplay. Sometimes people used the history just as an excuse to shoot zombies, alike some film out there. Even more if there is literature, there is art. There isn't such of thing like more or less art. If there is art is art. How much you have liked that particular work is totally up to you.
I even consider a person who tries to deny the video games as art are depreciating the literature. Even more, there is another kinds of art composing them. It is clear there is graphic arts involved. Even the electronic puzzles are plenty of graphic art. And graphics are fundamental as well it is to cinema and people don't deny it as art.
Perhaps the problem is about the challenge involved. We would hardly accept Olympic Long Jump as art. But in video games the player also acts like actor. There is some level of role-playing. The player incarnates the character, avatar, in that history. The problem about the player role on the art is the same ambiguity there is on dramaturgy. There isn't play without acting. But also on games and sports there isn't contest without the contestants. The video game player does as the actor does: make from literature a different kind of art.
There is a interesting book with this ambiguity between game and art. Das Glasperlenspiel (The Glass Bead Game) is the last work of the German author Hermann Hesse. In that fictional universe there is a game which encapsulates the whole synthesis of human learning and the matches are somehow art pieces.
Even video games are far from the concept alluded on Das Glasperlenspiel they are art and beyond. Art doesn't encapsulates video games, but they shouldn't be excluded of the art set either. I guess the synthesis is: Since videogames have literature and graphic art on them, they are art, but they aren't only art.

[+/-] show/hide

A arte do jogo


O grande problema aqui é a ambiguidade. Há videogames e quebra-cabeças eletrônicos. Um quebra-cabeça eletrônico é um jogo jogado em um dispositivo eletrônico. Até jogos comuns como blackjack (vinte e um) e damas estão em dispositivos eletrônicos. Se você considera Xadrez um jogo em vez de um esporte, Xadrez digital contra o computador é um quebra-cabeça eletrônico. Eu particularmente prefiro quebra-cabeças eletrônicos.
Videogames são algo diferente. Eles não são apenas sobre resolver um problema contra um antagonista automático. Videogames são tocados, abençoados, com a mais permeadora e abstrata forma de arte: a literatura. Um ponto fundamental num videogame é que ele precisa seguir uma história (ou criá-la de algum modo).

É muito simples perceber que há histórias por trás de videogames modernos e antigos. Pode ser apenas o plano de fundo para um bando de lutas ou um roteiro complexo e misterioso. Algumas vezes as pessoas usam a história apenas como uma desculpa para matar zumbis, parecido com alguns por aí afora. Mais do que isso, se há literatura há arte. Não existe isso de mais ou menos arte. Se existe arte é arte. O quanto você gostou desse trabalho em particular é sua total escolha.
Eu até considero uma pessoa que tenta nega videogames como arte está depreciando a literatura. Ainda mais, há outros tipos de arte compondo-os. É claro que há artes gráficas envolvidas. Mesmo os quebra-cabeças eletrônicos estão repletos de arte gráfica. E gráficos são fundamentais também para o cinema e as pessoas não o negam como arte.
Talvez o problema é com o desafio envolvido. Nós dificilmente aceitaríamos Salto em Distância como arte. Mas nos videogames o jogador também atua como ator. Existe um certo nível de interpretação. O jogador encarna a personagem, avatar, naquela história. O problema do papel do jogador na arte é a mesma ambiguidade que há na dramaturgia. Não há peça sem atuação. Mas também nos jogos e esportes não há disputa sem os participantes. O jogador de videogames faz o que o ator faz: constrói da literatura uma outra forma de arte.
Há um livro interessante sobre essa ambiguidade entre jogo e arte. Das Glasperlenspiel (O Jogo das Contas de Vidro) é o ultimo trabalho do autor alemão Hermann Hesse. Naquele universo ficcional há um jogo que encapsula toda a síntese do aprendizado humano e as disputas são de algum modo peças de arte.
Mesmo que os video games estejam longe do conceito aludido em Das Glasperlenspiel eles são arte e mais que isso. Arte não encapsula os videogames, mas eles não deveriam ser excluídos do conjunto de arte tão pouco. Eu acho que a síntese é: já que videogames tem literatura e arte gráfica neles eles são arte, mas eles não são apenas arte.

[+/-] show/hide

2010-05-22

Technology before Education is unsorted...


The National Large Band Plan (Plano Nacional de Banda Larga) is a Brazilian government measure that has its merits, but is a symptom from a Brazilian habit very clear: it's better to extinguish fires instead prevent them.

This measure is comparable to others like ProUni and REUNI. They are attempts to mitigate a situation much graver and generalized in Brazilian society: lack of education. When I say lack of education, I am not saying there isn't access to education on the country. The indicators demonstrate instruction is wider, but what kind of education is given?
Before technology, even opportunities, the society must be educated. Education before technology is the right sorting. Informatics and Internet are too powerful tools to be available to unprepared people.

It is not the case to not have a plan to universalize Internet access and all information it grants, but the priorities are inverted. Where Internet connection transmission quality is better it is also visible there was a long time dedicated to population instruction.
Who does best use of tools is whom better knows techniques and possibilities. It is essential to create a critic and ethic population. The access democratization on Brazil also means a large amount of people without preparation and critic skills is going to gave access to a tool which cans be used in a malefic, even danger, way.
What kind of use to expect from these Internet users? It isn't absurd to conjecture only a increase on social networks access while educational and business opportunities would be marginal. In a country where lack of ethics and social accommodation are so remarkable, to give so powerful implement with even none legal set to avoid excess it is fearful.
The creation of these opportunities are fundamental. If only one soul is saved and has better and bigger opportunities of learning and business that action is already positive. What it is need to keep on sight is the price is going to paying on that.
It is a hideous situation: it is not good as it is on present and doesn't seem like these actions under implantation will do better. A large amount of people accessing Internet is a way to global integration, a step to form a worldly society more open, expressive and dynamic. Meanwhile a majority little educated is synonym to not elevated uses like piracy, abuses on free speech use, even so criminalization.
Much more than a technical instruction which could happen on schools, it needs a ethical formation of this users group. It is not only amplifies the access and prays to things sort out. To cross the finger doesn't solve it. Before technology, Education.
Maybe people have a vision too inoffensive about informatics and Internet. They aren't inoffensive and demand their part. Let's see a example: hardly someone let a loaded weapon on eleven or twelve-years-old person, but many parents allow their children of that age to have profiles in social networks which explicit ask their users to be adults.
We need to form a generation capable to understand what they should demand about Internet access, privacy, free speech, respect to public and private property before to give so powerful weapons on their hands.
When I say I think people should have license to use computer and Internet some judge me surly and meddlesome, but a lot of them wont give a car or a gun to a fourteen or fifteen-years-old young. And if they would they aren't people who I care which their opinion.
To universalize and democratize a quality access to world wide web, but without forget we are doing that with a population little educated and little ethic. Remember there is serious gaps on regulation to Internet use on Brazilian territory. We need to be aware to the price we are going to pay in human and social consequences.

[+/-] show/hide

Tecnologia antes de Educação está desordenado...


O Plano Nacional de Banda Larga é uma medida do governo brasileiro que tem seus méritos, mas é outro sintoma de um costume brasileiro muito claro: é melhor apagar incêndios do que os prevenir.

Essa medida é comparável a outras como ProUni e REUNI. São tentativas de mitigar uma situação muito mais grave e generalizada na sociedade brasileira: falta de educação. Quando digo falta de educação, não digo que não haja acesso a educação no país. Os índices demonstram que a oportunidade ao ensino está mais ampla, mas que tipo de formação é dada?
Antes de tecnologia, ou mesmo oportunidade, a sociedade precisa ser educada. Educação antes de tecnologia é a ordenação correta. A informática e a internet são ferramentas muito poderosas para serem disponibilizadas para pessoas despreparadas.

Não é o caso de não ter um plano de universalização do acesso a internet e a toda a informação que ela disponibiliza, mas as prioridades estão invertida. Em lugares onde a qualidade de transmissão de conexões de internet é melhor também é visível que houve muito tempo dedicado a formação da população.
Quem faz melhor uso das ferramentas é quem melhor conhece as técnicas e as possibilidades. Criar uma população crítica e ética é essencial. A democratização do acesso no Brasil significa também que uma grande quantidade de pessoas sem preparo e sem capacidade crítica estará ganhando acesso a uma ferramenta que pode ser usada de uma forma malévola, até mesmo perigosa.
Que uso esperar desses internautas? Não pode ser tão absurdo vislumbrar apenas um aumento no acesso a redes sociais enquanto oportunidades educacionais e econômicas seriam marginais. Num país onde a falta de ética e a acomodação social é tão marcante dar um instrumento tão poderoso sem que haja sequer um conjunto legal para evitar excessos é temeroso.
É fundamental que haja a criação dessas oportunidades. Se uma única alma se salvar e tiver melhores e maiores oportunidades de aprendizado e empreendedorismo essa ação já é positiva. O que é preciso manter em vista é o preço que vai se pagar para isso.
É uma situação medonha: não está bom do modo que está e não parece que as ações em implantação vão melhorar as coisas. Uma maior quantidade de pessoas acessando a internet é um modo de integração global, um passo na formação de uma sociedade mundial mais aberta, expressiva e dinâmica. Enquanto isso uma maioria pouco educada é sinônimo de usos menos elevados como pirataria, abusos no uso da liberdade de expressão, e até mesmo criminalização.
Mais do que uma formação técnica que pode acontecer nas escolas, é necessário uma formação ética desse grupo de usuários. Não é apenas ampliar o acesso e rezar pra que as coisas se encaminhem bem. Cruzar os dedos não resolve. Antes de tecnologia, educação.
Talvez as pessoas tenham uma visão muito inofensiva da informática e da internet. Elas não são inofensivas e cobram sua parcela. Para ver um exemplo: dificilmente se deixaria uma arma carregada na mão de alguém de onze ou doze anos, mas muitos pais permitem que seus filhos dessa idade tenham profiles em redes sociais que solicitam explicitamente que seus usuários sejam maiores de idade.
É preciso formar uma geração capaz de entender quais as demandas que ela deve fazer em relação a acesso a internet, a privacidade, liberdade de expressão, respeito a propriedade pública e privada antes de dar armas tão poderosas a essas pessoas.
Quando eu digo que acho que as pessoas deveriam ter habilitação para usar computador e internet uns me consideram ranzinza ou metido, mas muitas delas não dariam um carro ou uma arma para um jovem de quatorze ou quinze anos. E se dariam não são pessoas que eu me importaria com a opinião.
Universalizar e democratizar o acesso de qualidade a rede mundial de computadores, mas sem esquecer que estamos fazendo isso com uma população pouco educada e pouco ética. Lembrando que há graves lacunas na regulamentação do uso da internet em território brasileiro. Precisamos estar atentos ao preço que iremos pagar em consequencias humanas e sociais.

[+/-] show/hide