Programming, Life-style, Random

Tag: Programming

  • You won’t believe how much time you will save with this Git pre-push hook

    Introduction A significant part of being a successful software developer is refining our workflows to optimize productivity. One method I’ve found incredibly useful is integrating Git hooks with static code analysis tools such as Detekt for my Android projects. The Role of Git Hooks and Detekt in Code Quality Before we dive into the actual…

    Read all

  • Show layout bounds from command line

    Lately I found myself clicking through Android Settings menu to enable and disable “Show layout bounds” to check if views are where are supposed to be a bit too often. Using the menu once is OK. Using the menu twice is still OK. I live by the Rule of three so when I hit the…

    Read all

  • Diventa un Android Dev

    Dal 1 febbraio 2021, in collaborazione con CGM Consulting, partirà il mio corso di programmazione Android destinato a tutti coloro che si stanno avvicinando al mondo della programmazione mobile: https://bit.ly/corso-android-ivan-morgillo Anche se sei già un dev, c’è sempre la possibilità di aiutare qualche amico o amica interessati ad una carriera come Android Dev 😉 Il…

    Read all

  • D’oh!! There is no copy method for Sealed Classes in Kotlin!

    A few weeks ago we looked at one of my pain points of working with Kotlin Data Classes: nested copy and we improved on a basic Kotlin solution using a Lens. Today we look at another type of nesting: Sealed Classes nesting. When we wanted to create some sort of restricted hierarchy in Java we…

    Read all

  • How to fix the pain of modifying Kotlin nested data classes

    When Kotlin arrived a few years ago one of the selling points was immutability: In object-oriented and functional programming, an immutable object (unchangeable object) is an object whose state cannot be modified after it is created.https://en.wikipedia.org/wiki/Immutable_object This is very cool! Value objects are such a huge help when it comes to reasoning about code, safety and avoiding weird subtle misbehaviours due to “things changing…

    Read all

  • Uninstall and Run in one shot in Android Studio

    As an Android developer, I live my life one repetitive task after another: Clean, RunUninstall, RunRestartClean, RestartRestart with Debugger Click here, click there. Tap on the phone. Open menu. Tap menu. It never ends. Plug-in to the rescue To ease up the pain, we developers tend to create tools and one of my trusty companions…

    Read all

  • Can I loop over a Kotlin Sealed Class?

    As an Android developer, I constantly write API clients: 90% of all mobile apps fetch some JSON, parse it and show it in a list ¯\_(ツ)_/¯ To keep a clear separation between what’s coming from the network and what I want in my domain, I usually have a DTO and a Domain Model. DTO and…

    Read all

  • Push vs Pull: air conditioning system

    By Ivan Morgillo, Sasa Sekulic and Fabrizio Chignoli This article has been excerpted from Grokking ReactiveX. After a life of imperative programming, switching to a reactive mindset could seem challenging: “Why should I give up all the control and bend to this <data are in control> thing?” Let’s look at it in an everyday life scenario:…

    Read all

Go to top