Blog Archives

#Java @nnotations

“Annotations, a form of metadata, provide data about a program that is not part of the program itself. Annotations have no direct effect on the operation of the code they annotate.

Java Tutorial – Oracle (Sun)


public @interface <name>{

<type> <method_name>();

<type> <method_name>() default <value>;


  • @Retention annotation specifies how the marked annotation is stored:
    • RetentionPolicy.SOURCE – The marked annotation is retained only in the source level and is ignored by the compiler.
    • RetentionPolicy.CLASS – The marked annotation is retained by the compiler at compile time, but is ignored by the Java Virtual Machine (JVM).
    • RetentionPolicy.RUNTIME – The marked annotation is retained by the JVM so it can be used by the runtime environment.
  • @Target annotation marks another annotation to restrict what kind of Java elements the annotation can be applied to. A target annotation specifies one of the following element types as its value:
    • ElementType.ANNOTATION_TYPE can be applied to an annotation type.
    • ElementType.CONSTRUCTOR can be applied to a constructor.
    • ElementType.FIELD can be applied to a field or property.
    • ElementType.LOCAL_VARIABLE can be applied to a local variable.
    • ElementType.METHOD can be applied to a method-level annotation.
    • ElementType.PACKAGE can be applied to a package declaration.
    • ElementType.PARAMETER can be applied to the parameters of a method.
    • ElementType.TYPE can be applied to any element of a class.
  • @Inherited annotation indicates that the annotation type can be inherited from the super class. (This is not true by default.) When the user queries the annotation type and the class has no annotation for this type, the class’ superclass is queried for the annotation type. This annotation applies only to class declarations.

Read the rest of this entry

The scent of frenzy into a new life: #London

Taking pics easily with #WeddingSnap

On 17th September I have taken part into WeddingSnap project as Android consultant and developer. At first, I was so confused and astonished by the idea that a guest takes pictures with his phone at a wedding. But after a few days I have noticed that this is a great idea! Far from Italian traditions, catching pics socially is a great thing because it increases and amplifies the sense of friendship and closeness between people. In fact, if you consider that we are talking about unforgettable and precious moments you’ll certain understand that the bride and groom want all best things in their precious day.

15 years ago we were used to take pictures through simple cameras but now, in an era governed by most famous social networks and technologies, we are using smartphones more and more. WeddingSnap tries to collect these special moments merging wedding’s pictures into shared album, avoiding  useless tricks to share pics between guests. Through this idea all people involved in a wedding can take and share a lot of photo shoots without caring of number limits and distribuition of them.

In just one month the Android app is grown quickly, giving to this project a great contribuition. In particular, if you decide to take a look on GooglePlay, you’ll find these new features:

  • Off-line mode: you can collect pictures without connection and upload them in another moment
  • Share: you were so marvellous at your friend wedding! Why not share that shoot on Facebook or Twitter?
  • Get it! now you can download on your phone pictures shared by other guests!
  • Fastness and responsiveness: old version of WS were too slow… and now it looks very fast!
  • Delete it! Don’t worry if you have upload the worst picture of the Wedding!
  • Several improvements on errors! have you noticed that now app is more stable?

If you aren’t ready for your first, second,….. wedding, give a look at ForeverSnap! You aren’t forced to use a wedding app if you only want to collect other events pics 😉

Windows Developer Conference 2012 #devc12

In the last two days I have participated for FactoryMind at Windows Developer Conference in Milan. As an amazing android developer I have heard carefully all the news proposed by speakers. In my opinion every kind of development technology has its own charm and curiosity and I believe that the new Windows8 will offer to public and developers a new way of think.

Inspired by many active technologies from Apple, Android, Google, (Old) Windows,… this new OS tries to summarize social and canonical schema into a multi-platform operating system granting the maximum experience to users. Far from old styles Windows8 promises to integrate every device in the most convenient manner for the user.

At this conference I have participated at this at these technical talks:

  • Designing a LOB solution in Metro style fashion – Luca Regnicoli
  • From .NET to Metro style apps – Raffaele Rialdi
  • Implementing MVVM in WinRT – Corrado Cavalli
  • Metro style apps: ALM and Background Tasks – Paolo Pialorsi
  • Developing for Intel Ultrabook – Francesco Baldassarri
  • Tile, Toast and push notifications in Metro style – Daniele Bochicchio
  • Cloud based services for Windows 8 – Roberto Brunetti
  • Windows Store – Lorenzo Barbieri
  • Async Programming in .NET 4.5 – Marco Russo

That’s all for this time 🙂
This is not an IOC to Microsoft world but a new way of think that travels hand by hand with my other one 😉


The fall of Facebook: the rebirth of social.

FB on Nasdaq


The title is just a provocation because it’s not only referred to Facebook but to all those kinds of social networks which are similar to it. In particular I’m referring to all social networks which are based on the concepts of groups and closures. If you think just a few moments to the reasons that have led you to join them you’ll find a strange need to spy people which live near you. Maybe I’m exaggerating but how many times have you looked at some pictures of your neighbour or your classmate or your workmate without knowing him/her? I really don’t believe that at least one time you don’t have done it. Features like people tagging, friends tips,… have helped you to perform these kind of actions in a simply way without thinking of it. Sometimes it’s very easy to hide ourself behind a screen to view many different contents but unfortunately you end up to use these social networks only to inspect contents and other lives without contributing to the real sense of Social.

In my opinion social networks like Facebook, Google+,… will not have much future because they only move the concept of friendship circles into them without offering features related to real needs of people. They work only as people’s boxes leaving them the possibility to choose what kind of box to create into them: and this is the failure of the system. In this way they split two times their user base loosing great opportunities.

I think that we can consider some important notices/considerations of the recent moments to prove that this kind of social manner will be a complete failure:

  • Facebook acquires Instagram for $1 billion
  • Facebook on NASDAQ: is glorious as everyone expected?
  • Google+: is it different from Facebook or just same box with different presentation-logic layer?
  • What are the difference in Twitter, Instagram or Foursquare?

In the last month Facebook has acquired the “new” social platform Instagram. Someone have said “this is a moved to bring the Mark Zuckerberg creation to the Chinese world” but in my opinion it’s is an investment in a network that can really bring the concept of social to the extreme level. On Instagram you receive many good feedbacks on your photos without reducing your perspectives only to small boxes and increasing your sense of satisfaction. If you think to the American NASDAQ, Facebook is entered with a great value for every stock quote but loosing many points in just some days. Actually its value is increased (3.22%) but I think that in the next month it will decrease again. The Instagram purchase will be a good choice to improve Facebook service and at the same time the interst of many user. On the other hand if you consider Big G with its social network you’ll find a service similar to Facebook but that force you to migrate to another platform. This is boring and I don’t believe that it’ll be massively used. I have to admit that Google+ is very well integrated with other Google services but it’s not enough to be innovative. So if you consider other social platform like Twitter, Linkedin, Foursquare, Grooveshark… you have to understand that their power states into a single great box, not in just many small realities, and that they work in a single field that involves thousand and thousand of people. I hope this not seems cynical but this is what I am seeing in this Wide World Web.

As developer I think that all kind of applications and systems (except for low level ones) have to include and support social features, the most used of the moment, because in this way they can interact with an immense user base, granting themself more visibility and popularity.

What do you think? Am I a black dolly that thinks only strange things? 😛

[REVIEW] Professional Android 4 Application Development – Reto Meier

Professional Android 4 Application Development

Professional Android 4 Application Development

I have just finished this wonderful technical book about android programming and I think that can be a good idea sharing personal my impressions with you.

In the past two years I have red some Italian books written by Massimo Carli, finding them useful for a base approach. Growing my thirst for knowledge I have encountered Reto‘s work that in my opinion offers a more complete and wider view about this powerful platform.

The book is structured in 19 chapters those present to you a deep overview on all platform features. The most important feature that I have found particularly interesting is the attention provided by the author in teaching step by step through examples. This is a very important point that many teachers and writers forget when they have to write a book because they think that’s better talking in a smoky enchanted way than educate easily and directly the readers.

The author during these chapters provide a full set of examples, related in most of case to an app that reports earth quakes, that grows in page by page involving features, concepts and abstractions like:

  • Intents, IntentFilters and Pending Intents
  • Activities, Services and Receivers
  • Maps and Geolocation
  • Threads and AsyncTasks

In just 21,84€, a very competitive price for the contents, you can purchase an ebook that’s too intuitive and expressive for new developers but at the same time for the more expert ones. I have personally bought my ebook on Amazon but if you prefer you can find it on other stores like Wrox or directly in Google Play.

See you next time, maybe with a tutorial 🙂


How was the ICT Trade in Ferrara?

In the last two days (8th-9th May) I have participated with father as C.L.T Computers to ICT Trade in Ferrara. In this particular event organized by Sirmi we have seen the most important brands on the Italian scenario like Oracle, HP, Tech Data, Ingram Micro, Telecom,… and many other ones!

This slideshow requires JavaScript.

On May 8, Maurizio Cuzari opened the show presenting all that sponsors and talking with them and our about new strategies and solutions against the crisis that is pervading all the world and Italy. So I have learned the real mean of many terms like Channel and Cloud and how this means interact with these companies and their partners. Many of them believe that the idea of Cloud will open in the near feature many new possibilities and opportunities to build new business. In my opinion this is a great possibility but it has to be completed and surrounded by other useful services: money saving and data persistence are primary goals but without services, apps and programs that can solve users problems are useless.

On May 9, we have started our trip visiting stands and having a look to some workshops: in particular we have seen the services offered by Telecom and by Ingram Micro. In the afternoon we had a very interesting meeting with Asus and I had the opportunity to touch and use the most wonderful products of the moment: the Zenbook and the android PadFone. I think that they are nice and cool devices that in a contained price (especially for the PadFone: 2 fast devices in 699€  is a good compromise) offers a good user experience.

Finally the idea that I have stolen from this experience is that it’s a strange and sad period for our peninsula and Europe but there are basic signals from the IT world those make to hope in a better feature.

[REVIEW] I love my Kindle Touch

Kindle Touch

My Kindle Touch

Two weeks ago I have received my first Kindle Touch that I had pre-ordered on Amazon in the middle of the past month. I was so curious and so tired to use my laptop or phone to read books that I have used some of my savings to buy this new instrument.

It has immediately started to amaze me for its simplicity and elegance in the design but at the same time in reading. The ink touch screen is one of the best screen that allows readers to read as  on a real book but with some advantages those make this E-book read fantastic. These are the main features of the Kindle Touch version those increase the pleasure of read books and magazines:

  • Pinch to zoom to increase or decrease text sizes
  • Interline and font style choice
  • A fast way to add notes with a touch keyboard
  • A nice translator and extracts sharer
  • Fast scrolling between pages and chapters
  • Inner prototype browser
  • Mp3 player to relax your readings
  • Up to two months of battery (I hope :P)

I think that it’s a great device not only to read but also to write and to annotate your books. Many people say that it’s so uncomfortable and different reading on a pc or laptop but I’m sure that with a Kindle you’ll found a good compromise. I didn’t choose the basic Kindle version because on my books I usually put a lot of notes and highlits: for those reasons the touch version with touch keyboard is more useful.

Is android difficult or simply too wide?

I have heard that many new android developers are afraid by this platform because they consider it too difficult and for that they try to find many different reasons to prefer other alternatives. I think that these kind of suppositions are not completely true because in other platform you’ll not find better tools, api’s or whatever you want.

On one hand I think that android can be difficult because it’s full of functionalities and because it has some mechanisms (Intents and Receivers) those are not too easy but very powerful. On the other hand it’s not too easy to create standard apps because the pelvis of different kind of devices forces you to create different UIs and solutions.

At the same time this powerful platform and pretty way of think offers you many opportunities:

  • Good and very wide support in documentation, forums and blogs
    (StackOverFlow is a very nice place where you can find answers to your questions)
  • Deep control on device features (Sensors, Services,…)
  •  Narrow limits to your ideas (you can provide your own email app or implement social apps)
  • Possibility to check your UIs with many emulators and sizes
  • ….

After two year of developing, I have acquired a pretty good familiarity with this platform but I think that you can reach a good level in just few months. All that you have to do is a sort of self training with android sdk across examples and good tutorials that you can find on the web. If some years ago the documentation could be skinny, now it has become a fantastic encyclopedia where you can find optimal solutions to your problems.

I hope that many of the escaped developers will reconsider the opportunity to study in deep the new features offered by ICS and HoneyComb.

ICT Days: from Hackathon with love

ICT Days 2012

ICT Days 2012

In the last three days I have participated with some university friends to ICT Days: in particular to Hackathon.

The Hackathon is a challenge in which some teams have  a funny experience in android development and in which a jury choose the best and the most innovative idea.
In our team we have developed a sort of music player that allows user to search song by artist or title in the giant and confused web, playing them like streams.

Based on the idea of Andrea Martinelli (one member of our hackathon team), we have developed, all togheter, an android version base on the original’s core, but with features like a real media player, in which the application does the things for you after your choice.




Considering that the application involves features like REST, MediaPlayer, Services and android IPC, I think that it’s a great goal in two days.

Now I really want to thank all the people those have participated, supported and helped in these marvellous days.
In particular thank to:

  • my patient girlfriend Erika Baldo
  • Andrea Martinelli, Paolo Sottovia, Roberto Faresin and Simone Casagranda (app developers)
  • Alessandro Tomasi, Aaron Ciaghi and Pietro Molini