My thanks to Morten T. Hansen and his book “Great at work” for opening my mind about some points. Most of the reflections in this article come from the ideas of this book.
When self-help gurus and motivational speakers talk about passion, they tend to conclude that it should guide our professional decisions and that loving what you do is the only requisite to be great in your job. But can passion alone be the key to success?
When I was young, I dreamt about being a famous soccer player like Cristiano Ronaldo or Messi or a rock-star, playing in a huge metal band such as Iron Maiden. Although music and sports are my greatest passions, I did not follow a career as a player or a musician because I would not be able to be good enough at these fields and most importantly, I would never be able to live up to my expectations and frustration probably would be the only outcome of such decisions. …
One of the greatest challenges in software design is the difference of paradigm between the object-oriented world (in which many applications rely on) and the relational world of databases.
Converting objects to tables and vice-versa is what we call object-relational mapping (ORM). Building your own ORM solution is no trivial task, requires a great effort and is very error-prone. Therefore, it is not the recommended approach most of the times, especially considering that there are some reliable and well-established alternatives. One of the most important and used in the Java world is Hibernate.
Although Hibernate abstracts most of the persistence logic and attempts to achieve low latency when making read/write operations in the database, it is no silver bullet. In particular, we have to be very careful with the way we write our queries, especially for objects that have collections as an attribute because this can lead to severe performance problems. …