AdSense Mobile Ad

Thursday, July 30, 2009

Open or closed?

Apple banning Google Voice application from its App Store was the topic of this earlier post. I'd just like to tell you about what I think about open and closed platforms and open and closed formats. The problem, in my humble opinion, reduces to this.


Open doesn't always mean free (as in beer)

Open doesn't always mean free (as in beer). I can, and I would, pay services based on open technologies. And I would obviously pay a song encoded with the FLAC codec (an open source free lossless codec). The openness of a technology such is FLAC guarantees me that I would be able to use it in whichever platform or device I chose (between those where an implementation would be feasible, of course).

Choice

Deciding between an open or a closed platform is a choice. A choice which must be checked against your requirements. I'd been a happy Solaris user since Solaris could be run only on top of Sun Microsystems' machines. That, then, was a closed platform. Nevertheless, it perfectly fitted my needs.

Dozens of example could be made and I'm not going to digress any further. I'm also perfectly aware that these are just personal tastes but the point I want to make clear is that, as far as it concerns end users' everyday lives, what's bad aren't the platform themselves. Closed platform are a legitimate choice as far as they don't reduce my freedom to act (which is a characteristic of the iPhone I'm complaining about). I'm running several platforms nowadays including Sun Microsystems' Solaris, Microsoft Windows (yeah...) and Debian GNU/Linux. Microsoft Windows isn't exactly open and I run it because I need a couple of programs which are essential for the client I'm working for. I don't feel absolutely coerced when running Windows. It's my and my client's choice. Moreover, I didn't need to dedicate a machine to Windows, I just virtualize it on a Solaris box using Sun xVM VirtualBox.

So what? Well, as you see I don't think that closed platforms are necessarily a bad choice. What I do think it's a bad choice is using a closed format. Closed formats are bad.

Formats

I think that closed formats are evil because I don't think it's safe relying on a third party to access the information I'm storing in such a format. I wouldn't buy music, nor store photographs, nor doing anything else, using a closed format (or when an open one could fit my needs.) Closed formats limit the domain in which I can do my choices. If I chose, for example, an Apple proprietary format to store my music or my own personal video, I would be running the risk of depending on the availability of an implementation for the OS (or the device) of the day.

Things get worse when purchases are taken into account. Back in the 80's, you could buy an LP or a book and then go home and enjoy your purchase. You wouldn't even worry about "Could I be able to play it back?"-like statements. You would be buying a physical support, that's true, but you were interested in the information it contained. The medium was just that: a medium. The big difference is that no matter the manufacturer of your Hi-Fi appliance, you could bet you could listen to your record! And no matter the paper type, you could just read it with your own eyes.

Years passed by and information is more and more often sold without physical mediums. You're probably already buying online the records of your favorite singer. Maybe you're even buying electronic books.

This introduces the first problem, which is the major one: the format the information is packed with.

When you have to send a document by email, you probably think about the file format you're going to send. Maybe you know that the guy you're sending the mail to is a Microsoft Office user. Maybe you don't want anybody to edit your file. Maybe you don't even care. The fact is: you have to choose a file format amongst the available ones.

No matter the OS, you can probably read PDF files and examine TIFF files. You can probably play an MP3 file without much hassle. You wouldn't worry sending, receiving or archiving such files on your hard disks. These format are mainstream formats (in their domain). Even so, portability sometimes can be an issue.

Other formats may also me considered de facto standards, as maybe is the case of the Microsoft Word file format. Nevertheless, the odds of you having portability problem with Word files is still high nowadays. Microsoft never wanted its Word file format to be portable, before the format war against OpenDocument (and still I have some doubts...) The point is: you use Microsoft Office, you know whom you can interact with. But: would you buy a book in the XPS format? Would you encode the video of your wedding using a Microsoft's of Apple's codec? I wouldn't, because I want to reduce dependencies from proprietary technologies which, tomorrow, couldn't be available on the devices I'll be running. Or they couldn't be available at all.

Piracy and DRM

The problem with multimedia file formats is even more acute, though, because anti-piracy measures sort of obliged distributors to use some sort of DRM. DRM shouldn't be reverse engineered but if a public specification isn't available (because it would defeat its primary intent), you're left alone if you run an unsupported platform. You'd probably think twice before choosing a closed format, in this case. Unfortunately sometimes, you're left with no choice, as was the case with the old iTunes DRM file formats. No way to play them back in an unsupported platform. So we're back to the question: what did I buy? The medium? The information? A file is an ordered stream of bits. But I'm not buying the bare bits. I thought I bought the right to listen to my music whenever I can but the reality is that I must be running this or that platform or the file I paid for will be unusable. I'm buying the right to enjoy that song. When I buy a CD, I can bring the CD with me and listen to it wherever I want.

It's a chicken and egg problem: you want to prevent me from committing a crime (piracy) by limiting my freedom. Including the freedom to break the law, which is something I personally would not do.

I might understand why they do that, but I am not satisfied with such an answer. That's why I go buying my songs where I can avoid worrying for such details. Orwell's 1984 is a good reading nowadays: DRM sounds like psychopolice prevention to me.

To be fair in the case of Apple the DRM problem has been almost solved, but still you're marrying with the platform where you can run iTunes if you want to access the store and we know that Apple, despite its flagship OS being an UNIX, is not pampering so much the GNU/Linux community. Let alone the Solaris' one: we're still waiting for QuickTime... That's why I'd buy from Amazon, rather than from the iTunes store.

Can it get worse than this? Sure. Have you ever bought a CD or a DVD just to discover that you'd run into problems while trying to reproduce its contents on your computer? Yes, I have. And if you're running an UNIX, reproducing a DVD may be an odyssey. My Solaris post-install scripts have a "compile libdvdcss" section, just after installing Sun Studio. Once more: I might understand the reasons of the IP's owners but, since I paid for my DVD, I would like to reproduce wherever and whenever I want, rather than being subject to such kind of coercion whose ultimate (and only) reason to be is prevent me from breaking a law (including when there wouldn't be any law to break).

Different problem, different solution

The previous sections might make you think I'm absolutely against closed platforms and closed formats. Well, that's not exact. As I said, the more it concerns everyday's life, the more I support openness of formats. Choices often imply compromise.

For a bunch of valid reasons, I'm running a pretty great set of services on top of the Solaris platform. Since the 90's. My reasoning is that the implementation (Solaris and Sun's servers) is analogous to the physical support. The value is the services themselves. And I never ran into any problem accessing them from whichever platform I was running: Microsoft Windows, GNU/Linux, *BSD, etc. Solaris was just like the plastic the record was made with. Just a medium. And the medium was chosen with requirements in mind, such as resilience.

Conclusion

I hope I made it clear. While I think that openness is a virtue in absolute value, I do recognize the benefits of running a closed platform, depending on your requirements. That said, I stress the importance of your freedom. The platform should never be an hindrance and should never be limiting, or annihilating, your possibility of choice.

When I bought the iPhone I was perfectly aware that I was buying a closed platform. More closed than many others we're used to, nowadays, despite what many people may be thinking. This was a test to assess if, and how much, the platform could fit my needs. And there's no better assessment than trying ourselves. After trying I do not feel free. I'm not free to use the programs I'd like because Apple is deciding for me. I'm not even free to develop and distribute a program of mine, because the gate to the App Store is Apple's filter which, as we saw, seems to be based on commercial decisions and partners' pressure rather than fair competition. I'm not even free to plug the iPhone on my computer because I'm not running a supported platform! While this is Apple's choice, it doesn't seem fair to me (the user) preventing me from using the phone as an USB storage device. Not even to download my own photos and videos.

Wednesday, July 29, 2009

Google Voice banned from the App Store. No VoIP, no Skype, no Voice. Which application will be killed next?

The title is ironice. Skyp, indeed, is there, but Skype calls over 3G aren't allowed due to contractual restrictions. Taking into account that Skype won't stay logged in unless you don't keep the application open, I fail to understand what should the application worth for. Anyway, today, while checking the news, I stumbled upon this article.


Earlier today we learned that Apple had begun to pull all Google Voice-enabled applications from the App Store, citing the fact that they “duplicate features that come with the iPhone”.


Oh yes, the iPhone is a phone. Using your voice to make calls indeed seems a functionality duplication. But that's not the point. The point is that Apple has created sort of an ecosystem (which is exaggeratedly proud of) around the iPhone SDK and the App Store. It seems that things are all there to start a developers' competition. Something which, in principle, goes at progress' and users' sake. With some gotchas, to use an euphemism. The reality is bitter than that: Apple itself is a blocker. Its dos and don'ts too often play against the end users' interest, as is the case with its Google Voice ban. AT&T being the evil behind the scene is not a justification to me. It's Apple who's banning. I won't either comment on Apple's ethics, if it's true that Kovacs himself personally approved Google's project. Was it true... well, it would simply confirm that Apple's more interested to worthy compromises rather than its users, which are still a wealthy niche.


This brings me back to the adagio: open or closed platforms (and formats)?

Taking screenshots on your iPhone

I'm not fond of using images often, but I do recognize that they can be useful at times. These days I've been blogging about my (yet relatively short) experience with an iPhone 3G S and I would have used some screenshot here and there. Today, by chance and without Googling for it, I discovered why: just press the Sleep button (you find it on the right uppermost corner of the phone) and while you keep it pressed, push the Home button too (the one with the square ;). A screenshot will be taken and it will be saved in your camera roll.

Useful, if only I could connect the iPhone on some virtualized guest OS and retrieve the image...

Sunday, July 26, 2009

A trip to Monkey Island with your iPhone

Yes. How many night did you spent in front of a monitor, playing with Guybrush, in Monkey Island? I confess I grew fond of that series of game. Yesterday, with great surprise, I opened the App Store just to see that the number one application in the Top 25 list was LucasArts' The secret of Monkey Island.

I was just (well, still...) a teenager at the beginning of the 90's when I used to play at The secret of Monkey Island at my PC. It was so different a game. I really got caught up. Because of Monkey Island I started playing adventure games. Only adventure games. The Monkey Island series, the Indiana Jones series (although earlier), The dig, Grim Fandango.

I mean, I really, really miss those adventure games. I grew up with the golden man logo of LucasArts. A game, was LucasArts'. Period. I never got used to play a shoot'em all game. Well, maybe just a couple of games from LucasArts' Jedi series. Not even now can I sit and play those games. Not even to just admire their incredible graphics effects and their incredibly realistic 3D engines. I just get bored.

Whilst the story and the magic of Monkey Island always kept me awake so many nights. I'm now buying the game, to feel a little of that magic, almost 20 years later.

Choosing the tea: tea grades

You're having great cups of tea, aren't you? Not yet? Well, start reading about tea just to know what you're missing. Then read about how to prepare your great cup of tea. To prepare a good cup of tea you need the basic ingredient: good tea.

Now, if you go to the nearest tea shop you'd probably stumble upon a variety of tea with exotic names. Many of them are just commercial names given by producers to capture the attention of the inexperienced ones. Would you buy a One thousand and one night or a Darjeeling S.F.T.G.F.O.P.? That's what marketing is for...

Tea grades

Tea grades are not standardized and the only stable tea gradation scale is black tea's. Evaluating the quality of tea is much like evaluating the quality of wine: a great of number of parameters enter the equation. Contry and region of origin, plant, harvest period, to make a few examples. Tea grades, nevertheless, are one of the methods to classify tea and a basic understanding my help you while purchasing your tea.

As far as it concerns green teas, as explained, there's no grading standard and the system may vary from producer to producer. In the case of green tea, moreover, parameters such as the tea plant, the growth stage of the plant and the geographical region are considered when grading tea. Nevertheless, many green tea grading systems are based on the black tea grading system, which is the one I'm going to detail here.

One of the factors to take into account when choosing a tea is the manufacturing process (manual of mechanical) and the size of the leaves.

Orange Pekoe

Before introducing you to black tea grades you should know about the word Pekoe. The origin of the word is disputed, as suggested by this Wikipedia article. This word is prominently used in the tea grading system and refers to entire leafs of the same size. The word Orange does not imply any orange flavors added to the tea. Its use seems to date back to the first Dutch merchants.

Grades

The main grades are (from worst to best):
  • D (Dust): As the word implies, this refers to tea leaves' dust, mainly used to produce the (in)famous tea bags you're surely used to.
  • Choppy: pieces of broken leaves.
  • F (Fanning): Fanning refer to pieces of the tea leaf. As Dust, it's a very low quality tea used mainly in tea bags.
  • B.O.P. (Broken Orange Pekoe):
  • O.P. (Orange Pekoe)
  • F.O.P. (Flowery Orange Pekoe)
Complementing the traits above, the grade may be enriched by:
  • G (Golden): It refers to the golden hue which is characteristic of the youngest buds.
  • T (Tippy): It refers to tea tips.
Sometimes, the best tea quality grade may also be enriched by:
  • F (Fine)
  • S.F. (Super Fine)

Examples

To understand how to read tea grades, I'll make some examples here.
  • G.F.O.P.: Golden Flowery Orange Pekoe. Whole, young tea leaves with golden tips. The tea also bears flowers of the tea plant.
  • T.G.F.O.P.: Tippy Golden Flowery Orange Pekoe. This tea contains whole young tea with golden teas. The leaves are the uppermost ones of the plant. The tea also bears flowers of the tea plant.
  • F.T.G.F.O.P.: Fine Tippy Golden Flowery Orange Pekoe. One of the highest qualities available.

Conclusion

You just had a brief introduction to tea grades. That'll be great the next time you go to your favorite tea shop and choose the right tea for you without wondering about what those strange letters stand for.

The iPhone 3G S battery: you'd better save it with a proper setup

One week with the iPhone 3G S, by now. Experiencing some concerns, too, as I told in another post. One of the greatest concerns I still have is about battery life. After completing some full recharge cycles, the battery was performing poorly. I mean: still using the factory settings, the iPhone wouldn't last from dawn to sunset. And when I had to make a couple of calls, I charged it twice in a day. Not reasonable.


Turning 3G off


Although I'm not using any push service nor other background applications, the first thing I tried to turn off was 3G. It surely depends on hoy good the network coverage where you live. In my case, at office we've got a pretty bad coverage and 3G seems to improve it very much. Deactivating that option made thing go worse and battery drain was not reduced. This weekend, at home, I turned it off again and here, with a good and stable coverage, things got a lot better.


Turning WIFI off


I noticed that, even if I only connect to a wireless network at home, the iPhone would probably be scanning the networks all day long. Deactivating WIFI when not using it greatly improved battery life. I consider this to be the setting which impacted me most.


Reducing screen brightness

The iPhone's got a relatively big and brilliant screen. That drains a lot of power, too. I reduced the brightness to almost the acceptable minimum (here in Spain the sun is pretty bright, too) and the improvement isn't once more negligible.


Conclusion

Yes, what I said it's pretty obvious and you probably would avoid it, but the sad reality is that the iPhone battery wouldn't last a day with those option turned on. Depending on how much you use the net, you should consider keeping the charger (or an USB cable) with you instead of continuously turning these options on and off. In my case, I'm using the iPhone just like... a phone, and it's not a nuisance to turn these settings off.

Wednesday, July 22, 2009

Setting up Subversion post-commit hooks to send emails on Solaris 10

In previous post I explained how I set up some Subversions server on Solaris 10:
Now I want to tell you how I set up Subversion post-commit hooks to automatically send emails after commit events.


Intercepting Subversion events

Subversion lets you hook programs to be executed when certain events are fired. The current version of Subversion lets you hook into:
  • pre/post commit
  • pre/post lock
  • pre/post revprop-change
  • pre/post unlock
If you have a look into your repository base directory, you should see a hooks directory probably filled up with templates. Depending on the platform the executable scripts naming may vary. In the case of Solaris, and an UNIX platform in general, you can drop in an executable or a shell script named post-commit and Subversion will execute it after a commit operation.


Post-commit hook parameters

Subversion passes the following positional parameters to the hook scripts:
  • repository path
  • revision number (after the commit)
If you want, you can use these parameters to customize the behavior of your hook script. I personally use them to customize the subject field and the contents of the email I send.


An example script

I always use a layer of indirection if it makes sense to me. In this case I chose to do the same and my example script just invokes another one, passing by the parameters received by Subversion. No secrets, here, just a one liner.


Sending emails

The problem now reduces to sending email from your host. This may depend on your system configuration and on your tastes. You could use mailx, mutt or even sendmail directly. The Subversion developers suggest using their mailer.py to send emails. Setting it up is pretty easy and you'll also find a configuration file and some tests on Subversion website.

Syncing your Google contacts and calendars on your iPhone with Google sync

And got a bit of push, too (without paying a dime).

Instead of uselessly duplicate your information over the net (or paying Apple for its expensive Mobile Me service), you can just use Google and synchronize the information you need on your iPhone. The instructions are very easy and can be found on Google Sync home page. Basically the service uses aMicrosft Exchange account to set up synchronization for contacts, calendars and, who knows, possibly mail in the future.

I'm very happy with the service. That's the best approximation to push I've reached so far with my iPhone.

Just one warning for non-English users: when I did set up my iPhone, I went to the Sync home page with the iPhone integrated web browser just to discover that the service is not yet available for my phone model. That message was shown in Spanish language. Switching Google's language to English let me access the Sync service options instead.

Using Solaris input methods

In the previous post, I told you about the compose key and how to use it to generate characters not found on your keyboard. I decided to write this two posts because I've got a problem after ordering a series of Sun Type 7 keyboard along with the Sun Ultra workstations we've bought.

The problem is simply stated: our developers are Spaniards and the keyboards are English keyboards. Stated another way, the developers didn't know how to produce the characters of the Spanish language that don't (explicitly) appear on any key. I'm speaking about ñ, á, é, í, ó, ú, ü. If you read that first post, you already know that's no great issue: just use the compose key. Unfortunately, this solution wasn't well received by the guys at the office and I suspect it's a matter of laziness. You should know that, except for the ñ character, to produce accented letters on a Spanish keyboard you usually input two keystrokes: the accent followed by the character. Using the compose key would involve three keystrokes instead of two: I suspect that all the resistance was due to this detail.

With the due respect to everybody's customs, I gave it up and let them buy a few bucks keyboard at the nearest mall and packed the Sun keyboard back again.

Using Solaris input methods

Nevertheless, there's another way to produce such characters without using the compose key and the solutions are the input methods. As far as it concerns this use case, an English keyboard and an European language, the input method is pretty trivial and really resembles the compose-key solution. The first step is configuring input methods.
  • Go to Menu/Preferences/Input Methods.
  • Be sure that input methods are enabled:
 
  • Choose the languages you want to input:
  •  Choose the combination key to activate it:
 

Now, you're ready to use Solaris input methods. Using the combination key you chose, in my case Ctrl+Shift+Space, you can switch input methods and start using it. In the English/European method, you can introduce accents just as usual: type the accent followed by the letter you want. This method is more powerful than the traditional Spanish keyboard in that you'll be able to introduce characters you could not type instead: ĺ, ń, ŕ, etc. You never know what will come next.

It's not that difficult and you easily get used to it.

Sun Type 7 UNIX keyboard: the compose key.

This is the first of a couple of posts I thought I would never write. If you've got a Sun keyboard, chances are you know how to use it. And if you haven't got, you shouldn't worry about it! Moreover, I suppose that the odds of you guys typing on a Sun keyboard being using an English layout are pretty high, so you wouldn't worry anyway. For all the others, I'm writing this post.

If you have got a Sun keyboard or you're old enough for having seen a great number of different keyboards, you'll probably came up against the Compose key. This key isn't usually found on PCs keyboards and it's used to tell the computer's software to interpret the following key strokes to produce a character not found on the keyboard. Hence, its name.

The X Window System, known to the vast majority of UNIX users, uses this key and in this Wikipedia's article you can found an incomplete table of key compositions valid for Xorg v. 7.

This key can still be found on Sun Microsystems keyboards and their keyboard official documentation includes a table of composition characters, too.

Using the compose key

So, why should you be using that key? Well, as said this key lets you input characters which are missing from the keyboard. If you're writing primarily in English, that's really not an issue. If you've got to write in an another European language (free to choose whichever), you're going to need a bunch of characters more than those you've got in your keyboard. The most common example is writing accented characters such as á, è, î, ñ, ü, et cetera.

To produce such characters, you've got to:
  • Press and release the compose key.
  • Introduce the composite key sequence.
To produce the á character, for example, you should:
  • Press and release the compose key.
  • Press a
  • Press '
If you read so far, you'll have noticed that using the compose key may probably seem clumsier than using a specialized keyboard or using input methods. It may be true but it depends on your use case. The compose key is more powerful than just having a couple of accents in your keyboard and it's just a matter of getting used to it.

That's the point of the following post.

Tuesday, July 21, 2009

Dell customer and technical service

As I told you, I had some problems with a Dell Vostro 1710 laptop. I expected a better overall quality. By the way, what broke were the ethernet card and the SD/MMC reader.

I called Dell customer service in Spain and, after opening the ticket, they informed me that the technical support would be sent at my house the following day. Indeed, the technical service phoned back to me in a matter of hours to schedule the appointment.

The following day Dell's technical service came on time, which is pretty relevant here in Spain. The substituted the broken motherboard and, except a small problem with my Solaris (the guy never heard of that), the problem was fixed in a matter of minutes.

Bad or unfortunate laptop, good service.

Desktop archeology: Sun Project Looking Glass. Doesn't it look like Mac OS/X Leopard?

If you have a look at Apple's Cocoa API you'll notice that many functions and data structures start with the NS prefix. If you're wondering, that prefix comes from the NeXT/Sun Microsystems partnership during the development of OPENSTEP.

What struck me most this morning, since I'm not such an Apple follower, was how deep is the resemblance between Sun Project Looking Glass desktop and the Aqua improvements introduced by Apple in the Leopard (10.5) release of its Mac OS/X.

Back on 2003, I still was an Analyst at Accenture, developing a B2B application on the J2EE platform, when I stumbled upon an article describing Sun Microsystems' Project Looking Glass. I was a Solaris 9 user, then, still used to the CDE desktop. Sun was beginning to distribute a customized GNOME desktop for Solaris, what would become the Java Desktop System, but then it was the exception, not the norm. I remember commenting about Looking Glass with my colleagues, in particular with Luca Raggi. It seemed them such a bad idea: why would somebody want such thing on Solaris? At the end, that phrase probably sums up what happened: nobody used it. There was development hype but we all know what came next: the Sun Java Desktop System and as far as it concerns 3D effects, Compiz. That is, a GNOME distribution tailored for Solaris.

Probably it was the best thing it could happen: Solaris distributing GNOME instead of a proprietary desktop environment is just better for us, the users. Would you have thought about running so complete a GNOME desktop on Solaris, back then? I wouldn't and I'm glad it happened. (Well, I'd rather run KDE, given the choice, but that's another story).

Years have passed and I had forgotten about Looking Glass until yesterday, when I started to look at Apple's API. Cocoa history came back into my mind and I felt like I had to search for Looking Glass screenshot. I'd got a CD, but who knows where it is. So here they are:

Doesn't it remind you something? Maybe this:

There are 3 years in between and you notice the effects of them all. But the concept is there.

We Solaris users ran the risk of having such a desktop years earlier, but probably we had not the strength to shout it out loud to Sun. Which, on the other hand, wasn't able to decide with its Solaris x86 project and almost died of hesitation.

Monday, July 20, 2009

Dell Vostro 1710 - A bad experience

I knew that when I'd buy it and install the Solaris OS, I'd have to give up the idea or having WIFI (well, sort of...). And to use the card reader, too.

What I didn't know was that this thing made of plastic was so fragile. The card reader slot broke at the first card insertion. Well, it doesn't bother me much.

The button and the mechanism of the PCMCIA slot? The worst I've seen, ever.

And now... no, I'd better tell you how it happened. I sat down in my sofa, brought the laptop and put it down in the table, plugged in the network cable and Solaris started to boot. Strange, no IP. Would the DHCP server be experiencing some problems? No, everything seems fine. The nwam service has gone nuts? It seems up and running. Restart it. No. Reboot the Solaris OS. Nothing. Unplug and plug in again. The IP has been assigned! Doh! Pretth strange isn't it? After a while, the network is done. And it was so that I discovered that the ethernet plug broke someway. The cable is there and seems well fixed but if you shake it, the network may fall.

Today I called Dell technical service and after the typical 20 minutes listening to music a polite technical assistant opened a ticket and tomorrow a Dell technician is coming to my house to change the entire motherboard.

The iPhone 3G S: The honeymoon is over

Very short a honeymoon, indeed.

The iPhone 3G S is a very responsive, good looking, cellular phone and the first day I unpacked it, like a boy with his new gift, was happy with it. I spent one entire day studying it, exploring its functionalities, trying out applications in the App Store. And so on.

Now, I'm beginning to discover what I do not like. As a safe harbor statement I'll admit that I hadn't read so much about the iPhone before buying it. It had been an impulsive purchase, rather than a considered choice.

The UI

The UI is Apple's, no doubt. Good looking and it delights the eye of the user with balanced graphical effects that don't tire. The bad point is that sometimes it's not so rapid: I've got to wait for the phone while I'd expect such a phone to wait for me. Try to load a handful of contacts in it. You'd run to the nearest PC to use another program and then run a bulk import.

Background processes

I thought that background processes were the norm, rather than the exception. Most of all when we're speaking about a small mobile computer where you'd run Twitter, Facebook clients alongside mail clients. Maybe Skype. So what's the point in shutting them down as soon as you switch application? Oh yes, there's the push notification service. Well, more or less...

I use GMail both for personal use and for work: my company runs Google Apps. The only choice I'm left with is scheduling a manual sync which is not real time mail.

Skype

Yes, this was known. You cannot make Skype calls when going on 3G. Android does it, if you're interested. And if you want to change the application, you're signed out.

The App Store

Have you got an iTunes account? I didn't. And if you set it up with your iPhone you'll be asked a credit card number and its security code. Yes. No way to circumvent it. Wouldn't it be better asking me the first time I want to buy something? That's why credit cards are there, not for you to store their numbers. At least, in my humble opinion. Moreover: I'm not, but many people is jealous with its card number. I'd consider adding some other payment methods, such as PayPal.

Push? Pull!

Yeah. If the application supports it. Gmail does not, even if supporting IMAP IDLE would be a way to let users have almost real time mail. I think most of us are used to such a mechanism, either with IMAP IDLE-capable IMAP servers or with other protocols, such as Microsoft Exchange. If you want push mail, you can always go with Mobile Me. It's a hundred bucks but you've got an iPhone, haven't you? I read Yahoo! push-mail is also supported but I haven't got an account and I'm not going to switch.

Surprisingly, I haven't either found any application to support IMAP IDLE for GMail on the App Store. Maybe it's a malicious thought but it seems no coincidence to me.

Moreover it's just not only mail. As said, I'd expect to put an iPhone on a table, leave all my apps running and wait for it to signal me that something's coming in. But I can't. Just one application at a time. And sometimes, if the phone goes into standby mode, not even that.

App store glitch. Or: can't I choose my preferred language?

I live in Spain. Then, I bought the iPhone and made a contract with a local telephone provider. Guess which was the phone default language? Spain. So far, so good. Now: I'm not Spanish and maybe I prefer using another language. Let say, English. Easy: go to the preferences tab and choose it. The phone rebooted and (almost) everything switched to the new language. Some now and then the App Store shows up in English, which is ok, but refuses to install the chosen application because my account is only valid in the Spanish App Store (do you remember the credit card?). Just close the application and try again. It works.

But I don't expect such a quirk in such a phone.

GMail default settings

This is a long story. I explained something here. The configuration it's Evolution specific but the concept is the same. When you add an email account in your iPhone you can use a wizard. It has some preset account configurations, one for GMail, and the classic, unlucky Other... as last choice. Bet nobody pushes the Other button! Well, the wizard just asks you a couple of things and your GMail account will be up and running in a matter of minutes.

That's very good. My father would think SMTP is the name of a bus company, if asked, rather than a protocol. But surprise! The wizard settings would have the effect of running your phone (and your mail...) into the infamous GMail's Trash bin quirk mode. Short story: if you use multiple labels on your messages, you could unwillingly lose messages if you move them from a label directory into the trash bin. Why? Well: because that's GMail trash bin semantics: it removes every copy of your message, whichever label it's got, and put it into the trash.

Maybe that's what you want. Maybe not. GMail users (should) know this very well. Google, indeed, warns you about iPhone default settings. Too. Start here and read along.

Flash

Yet another great missing. No JVM. Ok, that was freaky. No SDK. Oh no, it's there (if you pay). No Flash. No. Haven't you got an iPhone client for your preferred website? Don't mind, you've got Safari, the coolest web browser out there. Open. Go to URL. Oops. There's no Flash plugin???

No.

Conclusion

This is what I discovered during my first day with the iPhone. I hope I already discovered the worst. I wish I could arrive at home and switch my laptop off. I've got every client I need in my phone, at hand. But no, I cannot. Unless I choose which one I want to run.

Friday, July 17, 2009

The iPhone 3G S: first impressions

Oh yes, at least I bought it. It's so little time I unpacked it that I fell it pretty premature to sit down and blog about it.

But I must say this: I'm astonished. Yes. Absolutely.

I spent a couple of days playing around with an Android-powered HTC of a fellow guy at IBM and the overall impression was very good. The device feels like a PC, rather than a cellular phone. Installing applications was pretty easy and the GUI seemed pretty and polished. But it didn't just gave me the impression I had with the iPhone. The iPhone sits in your hand and it seems you've been using it since a long time. Everything's at hand and intuitive seems unjust, to me.

I had not any experience whatsoever: no iPhone. No iPod. No Mac. Nothing. I powered the iPhone up and I found everything so natural that it was just... right. Making the first customizations didn't gave me that sense of being exploring a new device. Installing the first applications from the App Store was as easy as with the Android OS. But the App Store is just more beautiful. Can't tell you why, I do admit. It's just right.

Even Google applications look better to me. Google Maps is just so iPhony that it does not seem a stranger there. Google application in my old Symbian really seemed aliens in that environment.

Google maps, for example. I started it and it immediately found my location. Extremely precise, moreover! The quantity and the quality of the information I could search into the map was really impressive. I looked for pharmacies, restaurants, italian pizzerie, dentists and so on and it was practically missing nothing around here. The detailed information it gave me really surprised me: telephone numbers are golden pieces of info I'm never sure about. And they're just there, just one search away. Really one finger away.

I also installed Skype and, even if I can only call through a wireless connection (I do understand that, folks) it's a great deal of difference. No sitting at the workstation. Just moving around or sitting in the sofa.

I'm really looking forward to playing with it. I suspect I'm not going to sleep, tonight.

Wednesday, July 15, 2009

Java EE: Filters. An example: reading HTTP headers.

You would not need to read HTTP headers so frequently during the development of your Java EE web modules. You aren't probably writing servlets any longer. Nevertheless, it might happen one day that you need to explore what's there, inside the HTTP headers that go to your servlet or your JSP. That's easy enough, though: just use the getHeader method (and its brothers) of the HttpServletRequest interface.

But if you're using HTTP headers you're not moving information to be used by the business logic. At least, I hope you don't. That's why you might also be interested in not polluting your business logic (servlets' code, JSPs' and so on). The solution to such problems may be a filter, as specified in the Java Servlet Specification, chapter SRV.6.

What's a filter?

Good question, that's why the servlet specification is there! Filters interpose during the call to a web resource between the client and the resource itself and the container executes them before the resource is invoked. With a filter you could, for example:
  • Intercept a call to a web resource to perform logic which is orthogonal to the code into the resource itself.
  • Modify the request content before it gets accessed by the web resource.
  • Deny access to the resource, by redirecting the user to another resource or by launching an exception.
The Servlet Specification is the place where you'll find all the details about filters. Here I'll just write down a little example so that you know what a filter is and how to use it.


As far as it concerns the code, a filter is a class which implements the javax.servlet.Filter interface. There clearly are two life-cycle management methods:
  • init(FilterConfig fc)
  • destroy()
The third method of the interface is where filter logic will be executed:
  • doFilter(ServletRequest req, ServletResponse res, FilterChain chain)
So, let's write the body of our shiny little filter. That's pretty easy with NetBeans: it has templates for web module filters.

Coding the filter


Coding the init and destroy methods.

Coding the init and the destroy methods is straightforward, unless you really put logic in them, such as custom filter configuration, external resources initialization and so on. A basic implementation for these method is the following:

private FilterConfig filterConfig = null;
private static final boolean debug = false;

public void destroy() {
}

public void init(FilterConfig filterConfig) {
this.filterConfig = filterConfig;
if (filterConfig != null) {
if (debug) {
// the log method is implemented elsewhere
// and relies on the ServletContext instance
// to log its messages.
log("DPErrorFilter:Initializing filter");
}
}
}

Coding the filter logic

That's pretty straightforward, too. Maybe the only thing you should remember is just... invoking the other filters in the chain. That's why the method signature has that FilterChain in it. This is NetBeans' doFilter prototype

public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain)
throws IOException, ServletException {

if (debug) {
log("DPErrorFilter:doFilter()");
}

doBeforeProcessing(request, response);

Throwable problem = null;
try {
chain.doFilter(request, response);
} catch (Throwable t) {
// If an exception is thrown somewhere down the filter chain,
// we still want to execute our after processing, and then
// rethrow the problem after that.
problem = t;
t.printStackTrace();
}

doAfterProcessing(request, response);

// If there was a problem, we want to rethrow it if it is
// a known type, otherwise log it.
if (problem != null) {
if (problem instanceof ServletException) {
throw (ServletException) problem;
}
if (problem instanceof IOException) {
throw (IOException) problem;
}
sendProcessingError(problem, response);
}
}

Reading HTTP headers

The last piece of code you miss is the logic itself. Here it is:
private void doBeforeProcessing(ServletRequest request, ServletResponse response)
throws IOException, ServletException {
if (debug) {
log("DPErrorFilter:DoBeforeProcessing");
}

// wrapping the servlet request
if (!(request instanceof HttpServletRequest)) {
log("Request isn't an instance of HttpServletRequest, skipping...");
return;
}

HttpServletRequestWrapper req =
new HttpServletRequestWrapper((HttpServletRequest) request);

// read your headers here
}

The only trick here is wrapping your ServletRequest (which lacks HTTP-related functionality) parameter into an HttpServletWrapper. I also do an instanceof check before doing it, just in case, and return if the object type isn't the expected.

Using the filter

To use the filter, you have to deploy it and configure your deployment descriptor, the web.xml file. The required steps are:
  • Declare the filter.
  • Map the filter.
The filter declaration is a typical declaration: you define a name for your filter class. The filter mapping defines when the filter execution is triggered; you can specify an URL pattern and an optional dispatcher type. The dispatcher type also specifies when the filter has to be triggered, depending on the request type being executed:
  • REQUEST (the default value)
  • FORWARD
  • INCLUDE
  • ERROR
Here's a typical XML fragment from web.xml:
<filter>
<filter-name>DPErrorFilter</filter-name>
<filter-class>
es.trafico.datapower.exceptions.filters.DPErrorFilter
</filter-class>
</filter>
<filter-mapping>
<filter-name>DPErrorFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

In this case the filter is triggered at every request because of the /* URL pattern.

Thursday, July 9, 2009

Setting up the right umask when installing NetBeans

This isn't a problem I encounter so often when installing software on the Solaris platform. The strange thing is that NetBeans is a Sun-sponsored project! But hey, a bug's just a bug.

Solaris default umask (file mode creation mask) for user is 022. That means that during file creation the write bit is filtered away from group and other permission bits. So, if you touch a file, you'll end up with these permissions set:
$ touch test
$ ls -l test
-rw-r--r--   1 enrico   staff          0 Jul  9 23:45 test
This basically means that everybody is granted access for reading your file. That may not be an issue for you because that file is hanging from a directory hierarchy which is otherwise protected. Solaris though, if the umask is not changed when creating home directories, will create a home directory for you with world readable flags set.

To cope with such situations, a good practice could be changing the default umask to a more restrictive value, such as 077. That's the umask I use and, as you see, it filters away all the permission bits for group and others. The previous test will end up with such a result:
$ touch test2
$ ls -l test2
-rw-------   1 enrico   staff          0 Jul  9 23:49 test2
This is not a problem unless the software you're using relies on a particular umask values (such as 022). That appears to be the case for the NetBeans installer. I just installed NetBeans 6.7, replacing my "venerable" NetBeans 6.5, and I ended up with the same problem I encountered during the installation of the earlier version. If you install NetBeans with a more restrictive umask set, the installation will result in an unusable set of files.

So, remember: if you're planning to install NetBeans 6.x onto your Solaris box and you plan to install it as root to provide an installation for all of your users, don't miss (re-)setting your umask to 022:
# umask 022
# ./netbeans-6.x-ml-solaris-x86.sh

Gli Dei, le banche... e la crisi globale

Un editoriale che mi è piaciuto.

Gli Dei, le banche... e la crisi globale

L'ultimo decennio è stato caratterizzato dall'idea, via via assunta dal sistema bancario come una “verità rivelata”, che il settore creditizio fosse destinato ad una “crescita perpetua”. Si postulava una sorta di “entropia” sulla base della quale l'espansione di una Banca dovesse essere continua ed ininterrotta, un po' quello che avviene per l'Universo (anche se per la verità parte degli scienziati pensa che ad una fase di espansione dell'Universo debba seguirne un'altra di contrazione, fino al suo collasso). Sulla scorta di questa weltanshauung si è assistito ad una crescita sfrenata, una sorta di riedizione di una corsa all'oro nella quale si sono aperti sportelli ovunque, si è dato luogo a fusioni megagalattiche alla luce del “grande è bello”, senza pensare a null'altro che ai profitti, non importa come realizzati.

La concretizzazione di questa filosofia la si toccava all'interno di ogni Banca all'inizio di ogni anno, quando si dava luogo ad un rituale basato su una formula matematica così esprimibile:
risultato dell'anno scorso + % di incremento (variabile) = risultato richiesto per quest'anno
Questa formula matematica, come tutti i teoremi, non ammetteva eccezioni, per cui veniva implacabilmente applicata qualunque fossero le condizioni socio-economico-temporali in cui operasse lo sportello: quindi non erano considerati fattori influenti il fatto, ad esempio, che sulla stessa piazza si fossero stabiliti sportelli di altri Istituti. Parimenti ininfluente il fatto che i residenti e le loro risorse non tendessero all'infinito (inteso come espressione di calcolo derivato).

Questa sorta di schizofrenia aveva origine in un Demiurgo non ben identificato che decideva che il risultato annuale di una Banca dovesse essere, per esempio, un “+25%”, e che veniva esploso gerarchicamente fino a raggiungere i terminali, i quali non potevano che prendere atto della “volontà degli dei”, a nulla valendo alcuna altra considerazione.

I desiderata dell'Olimpo determinavano ovviamente una pressione psicologica sui terminali, e si sa che la pressione psicologica non è una buona consigliera, e può determinare una sorta di abbassamento dei livelli di attenzione e di allarme che, alla fine, poteva spingere ad esempio ad appioppare un bel prodotto “strutturato” ad un arzillo ottantenne.

Il rito è andato aventi per lunghi anni nella certezza che il teorema della crescita continua non ammetteva eccezioni ed era diventata una legge universale.

Si badi bene però che il tutto procedeva furbescamente a ritmi di “trimestrali” e “semestrali”, e non perchè queste periodicità fossero migliori di altre, ma perché ad ognuna di queste scadenze erano legate quelle che in gergo pugilistico si chiamato “borse”, in lingua di San Marco “scaretà de schei”, ovviamente destinate ai soli Dei dell'Olimpo.

Difficile da dimenticare che pochi anni or sono l'Amministratore Delegato della nostra Banca ci ha comunicato che il bilancio non consentiva l'erogazione del VAP, ed il giorno dopo abbiamo appreso dal Sole 24 Ore i suoi emolumenti milionari (in euro ovviamente) per lo stesso anno.

Tutta questa bella impalcatura è miseramente crollata con la crisi globale che il mondo sta affrontando. Si potrebbe sicuramente discettare sul fatto che tranne qualche “voce che gridava nel deserto” nessuno ha previsto la nube che si avvicinava. Ma perchè avrebbero dovuto dare l'allarme o prendere contromisure preventive quando era proprio questo sistema, questa legge universale della crescita continua a garantire loro stipendi a nove zero, casali in Toscana, stock options, luci della ribalta.

E fu così che gli Dei del budget continuarono a ballare fino all'ultimo sul Titanic, tanto gli scatoloni con gli effetti personali sarebbero ovviamente toccati agli impiegati della Lehman Brothers, non agli Amministatori Delegati, che negli anni si erano messi da parte qualche soldino per la pensione.

Per non dire che almeno in qualche parte del mondo, ad esempio gli Stati Uniti, qualcuno ha già ottenuto un soggiorno gratuito a spese dello Stato nelle patrie galere, in tuta arancione, e sicuramente altri sono in lista di attesa, ma da noi le facce restano sempre le stesse, che vediamo in finanziera anno dopo anno pontificare ai convegni, alle conventions, alle Assemblee dell'ABI e di Banca d'Italia.

E per di più rifiutano sdegnati gli esempi che provengono da vasti settori produttivi europei e mondiali, dove il management si è drasticamente ridotto le remunerazioni. Qui da noi tutto deve rimanere com'è! Nessuno osi pensare di ridurci la nostra quota di “nettare e ambrosia”, ci spetta per diritto divino! Invece:
“una delle lezioni della crisi è che cattivi sistemi di remunerazione del management e dei responsabili delle funzioni chiave delle banche possono contribuire all'accumulo di rischi eccessivi. Chi è remunerato in funzione di risultati di breve periodo punta a profitti immediati senza tener conto dei rischi che li accompagnano. Ne segue una falsa contabilità del profitto che produce una micidiale spirale di rischio”.

Non sono le parole di un avversario del Sistema, bensì del Governatore Draghi all'Assemblea dell'ABI dell'8 luglio 2009. Speriamo non siano parole al vento.

La crisi attuale, che è ormai chiaro che non sarà né breve né passeggera, dovrebbe modificare profondamente l'approccio degli “Dei” ai problemi dell'oggi e purtroppo del domani. Invece devo mio malgrado constatare che l' “ottica di breve periodo” non è ancora stata abbandonata, se è vero come è vero che le pressioni commerciali sono ancora esercitate in funzione di avere ricche trimestrali e semestrali. Ciò vuol dire che non si è ancora fatto il necessario salto di qualità culturale, che dovrà portare alla valutazione del management, e le relative remunerazioni, in una prospettiva di medio-lungo periodo, alla fine del quale chi ha fatto bene avrà qualcosa in più, ma chi ha fatto male dovrà “andare a casa”.

Ma come tutte le malattie anche il virus della “crescita continua” è duro da debellare. Forse non sono stati ancora scoperti gli antibiotici in grado di contrastarlo. Quotidianamente i bancari ricevono telefonate di questo tenore:
  • Quanti conti nuovi hai aperto?
  • Quante obbligazioni hai piazzato?
  • Il tal cliente ha il castelletto vuoto. Come mai?
Ed è difficile obiettare. Ma come c**** vuoi che il cliente presenti portafoglio commerciale se non fattura più! A meno di chiedergli fatture false. Ma quanti conti nuovi sarà mai possibile aprire se la cassa integrazione, o la disoccupazione morde in Veneto e altrove come mai prima? È già tanto se i lavoratori non appena abbiano sentore di cassa integrazione o peggio non vadano a chiuderli i rapporti!

Ma quante obbligazioni potranno mai sottoscrivere pensionati e cittadini sempre più in difficoltà e in ansia per il futuro?

Questo non vuol dire ovviamente che il mondo si stia fermando, ma che qualcosa nell' approccio debba essere rivisto certamente sì. Non è possibile continuare nelle riunioni a descrivere il Veneto come una sconfinata prateria dove ci sono migliaia di indiani-cittadini con i carnieri pieni, in attesa di essere catturati dai bancari-cow-boy. Pur capendo le implicazioni dei ruoli, sarebbe opportuno non scadere nel ridicolo. Per non dire che “chi tira la
carretta” quotidianamente comincia a dare preoccupanti segni di stanchezza. Bisogna prendere finalmente atto che una crisi c'è, che è la peggiore mai vista dal 1929, che il cavallo non beve, e che alla fine bisognerà forse contare anche i “morti”.

Da questa presa di coscienza devono derivare comportamenti coerenti con la congiuntura. Si dovrà necessariamente chiedere che tutti facciano qualche sacrificio, non esclusi gli azionisti. Non vorremmo infatti dover vedere che nei prossimi anni gli sforzi di tutti siano finalizzati alla sola remunerazione del capitale, magari ottenuta col ferro e col fuoco all'interno delle Banche.

I bravi condottieri si vedono non nelle parate o nelle commemorazioni, bensì sotto il fuoco del nemico. Il tempo ci dirà chi sarà all'altezza della sfida.

Umberto Baldo

Google Apps are out of beta

Yesterday I was talking about the Google Chrome OS, the clearest move Google has done in order to provide a lightweight OS and a set of (enterprise) application running entirely in their servers on web.

Today Google did another step forward announcing that Google Apps have ended their beta program. We all know that Google beta tags have been sticking around for years, in some cases: Gmail is such an example. Nevertheless, Google has been offering such applications to enterprises with service level agreements and support around the clock. Beta doesn't frighten me, if it's a Google tag. This announcement isn't surprising either, it was just a matter of time. The interesting thing is the timing: the Chrome browser, the Chrome OS, now Google Apps. Google's engines are hot since a long time, now I'm just waiting for the big move. Google is boldly going where no enterprise has gone before: will they succeed in beating Microsoft where no OS and no application hasn't succeeded yet? I'm speaking about an OS for mobile phone (Android vs. Windows Mobile) or netbooks (Chrome OS vs. Windows, no PCs, though), office applications (Google Apps vs. Microsoft Office), enterprise servers (Google Apps vs. Microsoft Exchange)?

I'm really looking forward to knowing who will win this battle. I'm a Solaris freak, nevertheless I'd really like a Linux-centric enterprise to win such a game. It would be a win for open source software. It would mean real competition and it would benefit the real winners: the users.

Wednesday, July 8, 2009

Google introduces the Chrome OS

On July 7th Google has introduced its brand new web-centric operating system: the Google Chrome OS.

The official statement leaves no doubt:
Google Chrome OS is being created for people who spend most of their time on the web [...]
It also makes it clear how Google's OS vision different from Microsoft's. Internet Explorer was born and still is an extension of the Windows OS. Google Chrome OS is a natural extension of Google Chrome, Google's browser.

Years have passed since Sun was claiming that The network is the computer. It clearly was too early, but the path was laid. Google's innovation haven't only been technical, Google has really changed the way users experience the web and their web applications.

Google has undoubtedly dominated the market of search engines, changing the way we search for information and the quality standards we demand. Search engines quality have been measured against Google, since then.

Years later, there came Google Mail. Once more, Google changed the way users use their mail and their expectations. Mail was everywhere. No need to set up a mail client or fall back to a cluttered web interface. No need to constantly delete messages because mails were being bounced back because of mailbox space exhaustion. Competitors, at the end, had to adapt. Google mail was so fast (at least as far as it concerns an email provider) and mailbox size was so big that even libraries appeared to mount a mailbox inside an UNIX OS.

Since then, Google introduced more and more services (which enjoyed pretty different levels of fortune). Some of these products, such as Google Docs, were one of the first tries, at least as far as it concerns such big an entity, to move native desktop applications to the web. The next step seems to be, finally, to move the OS, at least for the users who just live in the web. Google is promising that Google Chrome OS-powered PCs will just work, such as any other home appliance you're using. Sort of on/off OS which starts up in a few seconds (I said few seconds) and connects you to the net.

I think it's not only just a good idea. There are great examples out there of this way of rethinking and approaching the user experience. Think about Google Android, the iPhone OS, or even the Mac OS/X itself. It's pretty much a (slower) electrodomestic with its power on button and there you are. A (beautiful) desktop and all the apps the typical users need. And much more. The iPhone its a step further towards simplicity, although it's obviously not comparable with a netbook, it still is more a PC than a cellular phone.

I'm not the kind of user targeted by Chrome OS. Neither by OS/X. I'm a (nostalgic and) efficient CLI gui. But I think it's time for users such as my sister and my father to just:
  • buy a machine wondering about its color and not about its RAM
  • unpack it
  • power it up
  • use it!
without all the hassle which, inevitably, comes with standard (or legacy?) OSs we're accustomed to. Mac OS/X is the latest and greatest approximation to this philosophy. That's why Apple succeeded in pushing an UNIX into the desktop of so many users. It's not just aesthetic and fashion. Mac OS/X powered machines just do their job. Well. And moreover they're aesthetically pleasant. What would an user desire?

I wonder if this announcement will reignite an OS war.

Tuesday, July 7, 2009

Sun xVM VirtualBox 3.0.0 has been released

Oh yes, a brand new major version. Sun xVM VirtualBox v. 3.0.0 has just been released. Here's the changelog, as usual.

Great features has been introduced:
  • Guest SMP support. Oh yes: guest SMP support (up to 32 CPUs)!
  • Experimental Direct3D 8/9 support for Windows guests
  • OpenGL 2.0 support for Solaris, Linux and Windows guest.
The feature I was interested in was guest SMP support. I admit I'm not running critical tasks here in my laptop but I do have some use cases that would greatly benefit from it: I'm running Windows guests for .NET development using Visual Studio 2008 and yes, there, you can see the difference.

Configuration is just as easy as this:


So download it and enjoy!

Il passaporto (ecologico) ed il rinnovo all'italiana

Il passaporto ecologico. Lo chiamo così perché lo Stato ha pensato bene di risparmiare carta, e quindi alberi, permettendo rinnovare un passaporto... così:

 
Sicuramente, la pagina 2 ha allungato di parecchio la vita di molti passaporti. Tra l'altro, rinnovarlo invece di chiederne uno nuovo costava molto meno. L'ultimo passaporto che ho chiesto al consolato mi è costato nientepopòdimenoche la bellezza di 84 Euro e qualche centesimo. Gli 84 Euro che più male hanno fatto al mio portafoglio, ultimamente. Ora, non so se i passaporti rilasciati recentemente possano ancora rinnovarsi così. Non c'è dubbio, però, che molti italiani fossero nella mia stessa situazione ed avessero un passaporto rinnovato a pagina 2.
Non avete idea di quanti problemi mi abbia dato. Ogniqualvolta ho presentato il mio passaporto in un ufficio, ho dovuto, contestualmente, girare (io) la pagina per mostrare che non era scaduto, come il mio interlocutore ingenuamente credeva! Sembra che fossimo solo noi, in Italia, ad avere un meccanismo di rinnovo del libretto così originale (ed artigianale). Non c'è quindi da sorprendersi se i poveri funzionari stranieri ponessero in dubbio la validità del mio documento. Se io fossi stato in loro, sarei stato più inflessibile: nel dubbio, meglio prendersi meno rischi.
Come sempre, misure a favore del cittadino! Ah, dimenticavo: anche la mia ragazza ha rinnovato il suo passaporto. Le è costato 15 Euro, invece di 84. Sicuramente, però, la carta in cui è stato stampato il suo non sarà della stessa qualità!

Italia e la burocrazia barocca

Mentre tornavo a casa da Cádiz, dove ho passato un po' di giorni di relax, mi chiedevo quale fosse la prima cosa che avrei scritto al mio ritorno. (S)Fortunatamente non ho dovuto pensare molto: una pattuglia di Guardias Civiles mi fermò all'uscita di un tunnel. L'esperienza, comica, mi ha dato lo spunto necessario per scrivere il mio primo post.

La vita di uno straniero comunitario in Spagna potrebbe e dovrebbe essere abbastanza semplice. Quando meno me lo aspetto, però, inciampo nella burocrazia barocca del mio paese. Pensavo di essere al sicuro in Spagna, con la mia carta d'identità digitale e tutti i servizi per il cittadino disponibili in Internet: quelli, in Italia, sono ancora un sogno che forse (forse...) mia nipotina vedrà realizzarsi.

Faccio una piccola premessa: in Spagna ho bisogno della documentazione Italiana perché, grazie al privilegiato status di straniero comunitario, sono esente dall'obbligo di richiedere un permesso di residenza. Ho sempre con me, quindi, il necessaire dell'emigrante (comunitario):
  • NIE: l'equivalente della cartà d'identità. Il formato è quello delle carte di credito.
  • Passaporto (ecologico Italiano: questo lo racconto in un altro post)
  • Carta d'identità. Qui è ancora cartacea. Di tanto in tanto ci provo ancora a mostrarla anche se di solito la gente non crede a quello che vede e quando ci crede, ride. Il commento più carino che ho ricevuto mi è stato rivolto da una Guardia Civile durante un controllo nell'Autostrada Madrid-A Coruña: "Beh, dai, questo è proprio un documento da Impero Romano".
  • Certificato di iscrizione all'anagrafe consolare.
Certificato di iscrizione all'anagrafe consolare? Eh già! Un altro salto mortale della nostra burocrazia malata. Un'italiano all'estero si iscrive all'AIRE, l'Anagrafe degli Italiani Residenti all'Estero. All'atto, si rilascia detto certificato. Peccato che ai fini del rilascio della carta d'identità (e del passaporto) il domicilio risulta ancora essere (chissà perché...) l'ultimo domicilio in Italia. Quindi? Quindi nella carta d'identità c'è un indirizzo inutile che, alle autorità del paese di residenza (quello vero, la Spagna) non serve. Quindi: tiro fuori il NIE (dove c'è l'indirizzo buono), il passaporto (o la carta d'identità) e poi, contestualmente (avverbio che tanto piace al legislatore Italiano), mostro anche il certificato di iscrizione all'anagrafe consolare. E questo finché non scada il mio NIE: allora avrò bisogno del certificato di registro (certificado de registro). Comodo. Invece del portafogli la mia ragazza mi ha regalato una scrivania...

In Settembre mi scadeva il passaporto e la carta d'identità. Andai al consolato per scoprire che il passaporto nuovo mi sarà recapitato tra ben due mesi. Sì, sì, due mesi, ma non perché un amanuense debba scriverlo e rilegarlo a mano. Semplicemente perché i poveri diavoli del Consolato non sanno più che Santi chiamare. Ok, quindi niente ferie fuori dalla Comunità Europea. Già che c'ero ho chiesto che mi rinnovassero la carta d'identità. Come nel caso del passaporto ecologico, il rinnovo si fa all'italiana. Un bel timbretto e la data scritta a mano. A prova di frode.

Ora torniamo a noi. Il Guardia Civile, pover'uomo sotto un sole cocente, a 40 gradi, nella deserta autostrada Madrid-Badajoz, mi ferma per un controllo di routine e mi chiede i documenti. Io gli porgo la succitata documentazione:
  • NIE
  • Carta d'identità con rinnovo artigianale
  • Passaporto ecologico con rinnovo artigianale
  • Certificato di iscrizione all'anagrafe consolare
Il militare guarda la documentazione, ci capisce poco e poi finisce come sempre: ci ridiamo sopra e finisco per guadagnarci. Con il suo accento dell'Extremadura mi congedò dicendo: "Ma come farei io a multarti?". Il poveraccio era sottinteso.

Poi un giorno leggo il giornale e ringrazio ancora una volta i nostri legislatori e le loro (imperscrutabili) ragioni: la carta d'identità elettronica vale dura 10 anni. Cito testualmente:
La carta di identità ha la durata di 10 anni. Tutti i possessori del documento, la cui scadenza di 5 anni è prossima, debbono recarsi al comune di residenza o dimora, dove per il formato cartaceo sarà apposto un timbro, mentre per il documento elettronico sarà consegnato un certificato, valido a tutti gli effetti di legge, che ne attesta la proroga e che dovrà essere conservato ed esibito contestualmente.

Se l’Autorità straniera non dovesse riconoscere la validità di tale certificazione, è necessario contattare gli Uffici diplomatici italiani del luogo.
Certo! Se, per esempio, sono a Creta e mi ferma il poliziotto greco che, incredulo, vede una carta d'identità scaduta esibita contestualmente a un foglietto (unto e stropicciato) che dichiara che il mio documento è invece ancora valido, cosa può succedere? O ci crede e si fida, visto che il foglietto è contestualmente scritto in italiano e quasi certamente lui non capirà nulla, o potrò rivolgermi comodamente all'Ambasciata Italiana di Atene.

Ma come si possono partorire queste idee, nel ventunesimo secolo?

(*) Grazie, Luca, per il link ed i tuoi commenti, ironici come sempre.