Tuesday, July 28, 2015

Gradle Daemon - boost your build performance

You use Gradle and want to speed up a bit your build time? Nobody wants to wait for compilation, assembly etc. Let's try this easy to setup performance boost:

If you enable Gradle Daemons, you can actually reuse the Gradle context that you've just created for your subsequent builds! It basically doesn't completely kill the process when a Gradle build finishes, but reuses the common framework classes and thus improving build time.

I've tried it on my projects and the improvement was from a 40s build down to 20s on subsequent builds !

Here's what you need to do and know:
touch ~/.gradle/gradle.properties && echo "org.gradle.daemon=true" >> ~/.gradle/gradle.properties

  • enables Gradle daemon for all your projects by default (don't worry you can turn it off for individual projects as well)
  • if you use multiple Gradle versions, a different daemon is created for each one! This is a potential deal-breaker for some developers, but a good reason to align all your projects to a single version of Gradle.

  • in case you want to recreate the daemon, you can stop them all using:

./gradlew --stop
And that's it!

For more info check the dedicated page:
https://docs.gradle.org/current/userguide/gradle_daemon.html 

Monday, June 29, 2015

Chocolatey - apt-get for windows

As a Windows user, I was quite envious of Linux/OS X tools like apt-get or brew... But not anymore!  I've just found the Chocolatey tool for Powershell which let's you easily find and install software on your Windows-powered PC.

Let's see an example:
Searching for Slack and installing afterwards





















This way you can maintain apps and versions on your PC using scripts.
If you want to check if there's an upgrade to any of your programs, just write:

choco upgrade all
If you want to give it a try yourself, visit https://chocolatey.org/  and follow the instructions

Wednesday, June 03, 2015

Traveling back in time

What happens when you go to your parents' house is that you
travel back in time...

It's strange to see all the playgrounds that were once full with kids
and laughter, covered in bushes and trees, so high that makes you
understand just how much time has passed...

You remember times when you laid the foundation of a new football field, nothing of it still remains.
Even the goals are removed and most probably melted as scrap...

Having looked through the window for just a minute, made me travel back in time 10+ years.
And that makes me understand just how insignificant life is, as well as how visible and how powerful it can be - life passed by me and this playground very quickly, events occurred and had a long-lasting effect. Events most probably defined by life ... like those very lively trees that now occupy those grounds!

Entropy, such a short word but describing so many things...
...
A great way to get out of my negative entropy-based chain of thoughts, is to reread Isaac Asimov's "The Last Question". I just love his work and this is one of his best, in my opinion.