Java 8 Features in a nutshell – Optional

Posted by & filed under java.

Hope everybody already know that Java 8 is out. It brings a lot of interesting features to make Java easier and more comfortable to use. I will try to talk through some of those features in a nutshell. Lets start with Optional class. As with all Java 8 features, Optional existed before the release, for… Read more »

Java chronicle library tutorial #1: Basic examples

Posted by & filed under java.

Introduction I dont remember how, but occasionally I ended up reading amazing blog of Peter Lawrey about different aspects of Java programming, focused, particularly on performance. Peter also author of Java Chronicle library which he describes as: This library is an ultra low latency, high throughput, persisted, messaging and event driven in memory database. Basically, it allows an application to… Read more »

Speak the code application on Google play

Posted by & filed under android, java.

Recently, when I was going through 2-step verification process for my gmail account, I thought that it would be nice if I did not have to peek my phone and check the text. If there would be an app just to read that code out loud so I can enter it. So, I created it!… Read more »

Protobuf and optional values

Posted by & filed under java.

Just small note to all you guys if you are using google protobuf library for communicating with server. Lets say you have simple protobuf message with one optional numeric field: If you are using some dynamic language in your server backend, you can end up having code like this: Now question, what value of limit… Read more »

Executing scheduled periodic tasks in Android

Posted by & filed under android, java.

I think that Android is a platform created by developers for developers. That’s why sometimes it offers several different ways to do the same thing. Let’s say you want to execute some periodic task in background, even if currently none of your Activities is active. How you can achieve this? First of all, you should… Read more »

Things you need to remember when using finally in Java

Posted by & filed under java.

Because Java has a Garbage collector and you don’t know for sure when your object will be destroyed it is tricky to do proper resource management, in comparison with C++ where objects are created on the stack or you control their lifecycle manually by new/delete operator. To help you deal with that, the finally block was… Read more »