Articles written by Giacomo Bresciani

Giacomo Bresciani Giacomo Bresciani avatar

7 minute read

Here at Facile.it we are constantly dealing with a lot of forms: we use them to collect various information and data needed to feed our in-house comparing algorithms. These forms could be really complex, having multiple rules and dependencies between fields, and they are likely to be changed and tuned frequently.

When I joined Facile.it, a lot of forms within the Android app needed to be updated or modified and sticking with the existing strategy would have required me to do a lot of work just to add or remove a simple field. So I took a step back and I started thinking about a strategy that would have allowed me to define and structure a form in a more flexible and declarative way. I wanted to be able to declare the relationships between fields, their validation rules and their serialized representation (how they are sent to the server).

Giacomo Bresciani Giacomo Bresciani avatar

5 minute read

Kotlin

Premise

Java is an old programming language. Version 1.0 was released in 1996 by Sun Microsystems and even though it has evolved and grown a lot over the past twenty years it is still carrying on some bad design choices such as null (ask Tony Hoare), primitive types or lack of a proper function type. With the last version of the language (Java 8) Java tried to address some of these problems introducing concepts such as Optional or lambda expression. Although these additions clearly represent a step forward for the language I still have the feeling that they are just patches applied to mitigate problems and not to solve them at their very source. For example Optional could be used to reduce NPE (Null Pointer Exception) but it is clearly not designed for this purpose and lambda expressions, implemented in Java 8 with SAM types, still force you to write an interface only to define a function.

Giacomo Bresciani Giacomo Bresciani avatar

10 minute read

Droidcon It

The third edition of Droidcon IT was, as expected, a great conference, full of interesting talks and people coming from all over the world. We saw a lot of GDEs (Google Developer Expert) and also some Developer Advocates from Google, although it was not organized directly by the company. Back in March the Android team surprisingly released the brand new N Developer Preview earlier than expected, so this year we were already able to talk about the new features in Android N and analyze them. Furthermore, there was talk of Kotlin, RxJava and a lot of other useful and interesting topics.