Archive for April, 2008

h1

About python indentation

April 20, 2008

One of my friends asked me yesterday about why python does not use brackets or keywords for the syntax. I didn’t know the answer. I just told him that it was to keep simple the language, but that I would search about it. As many times Google gave me an answer. This is a great article and here are a few quotes:

A logic reason for use indentation instead of brakes or keywords.

Python does not allow to obfuscate the structure of a program by using bogus indentations

Tabs or Spaces?

It can be a good idea to avoid tabs altogether, because the semantics of tabs are not very well-defined in the computer world, and they can be displayed completely differently on different types of systems and editors.

This is a difference between Java and python; and just for finish my post, I’d like to share one problem that I had a few time ago. I started reading some Java code from someone who left the place where I was working and I found something like this:

if(x==3)
  x++;
  {
  System.out.println(x);
  }

The first time I read the code, I din’t get why always the x variable was being print. That is why I now I use checkstyle libraries for my java IDEs. Anyway, I really like programming in python and it’s nice to have more reasons for using the right indentation.

h1

Python, Optimization Anecdote from Guido

April 16, 2008

I have been using python during the last year and half. And I’m starting to feel more and more happy about learning python. I was a php and java developer, but because of the school I started to learn, and I have enjoyed every python code that I have written. Today I read something that made me feel like when I was at high school learning Pascal and daring my friends to write the best and short code. I read “An Optimization Anecdote” from the Guido van Rossum’s articles, and I really would like to recommend this article, not just because of the technical content, but because I liked the way Guido tells the story.

h1

The future of webapps

April 7, 2008

I stared written this post like 3 weeks ago, but then some things start changing in my life, so I stop thinking about posting.  Anyway, here it is.

No! I couldn’t go! Where?? The future of Webapps conferences and workshops in Miami. I would love to visit Miami some day, I haven’t been there(yet). I think this was a great opportunity, but there are a lot of things that require my attention in Valencia right now. Anyway, I have found very interesting that the audio and the slides are available for downloading here. I have just heard two or three conferences, but I’m planning on put more attention on almost all. Here are the notes about what I have listened.

Kevin Marks from Google
He spoke about the Open Social API and how the email has been replaced by other ways of communication, like the instant messaging, the blogs, and of course the social networks. I like his conference because he explains in an ordered way how is evolving the communication process between people. I haven’t tried the Open Social API, but I for what I have heard in the conference and I’m interested in knowing how it works, and I will compare it with the Facebook API and with others available. In the Q&A section someone asked about the dark side of Social Networks, because there is one. Because we can’t lie about the party that we said we didn’t go, but we did go, if we public photos in Flick or Facebook about this party we may be caught in our lie. This has happened a lot in Facebook, and I believe this is part of the future. We are going to be more honest in the future. Maybe not more honest with our friends, parents or our boss, but we will be more honest with ourself.

Kevin said something else that I have thought but I haven’t been able to explain. He mention something about two kind of social networks: public and private.  I think those networks could be like this:

  • The public were we show the things that we want anybody in the world may see about us, but it is not really what we are, it is more like the shiny cover of and old book.
  • The private where we all are connected by our important and private information but we don’t share our valuable information, we just share the connection (more like connexions than friends). In this way we share the index and the table of content from our not so shiny book.

And maybe there is room for another kind of network, one even more close and personal.  One social network where we really share valuable information and true friendship.  I think this kind of network may have only a few contacts (10 or something like that),  where we could be more honest and share information without being worried about who reads, sees, or comments our dirty laundry.  I know that by having restricted and small networks the concept of social networking does not work very well, but since the value of a network is defined by two main factors: the number of elements integrating the network and the value of the information that share the elements of the network, I believe this close and small private networks will successfully provide a private life and give us the chance to be a little bit more hones with the people we trust.

I have really enjoyed listening this conference, and I’m try¡ng to listen a few more (instead of the punk-rock music I usually have in my mind),  so If I get anything inspiring to share in my mind I’ll be posting soon.