Interesting Java-related links. Week 35-37

It’s been a while since my last post. Lots of things have changed since then. I had a nice trip to Italy with my lovely wife. I also did a professional step forward and started working in the Fitbit division in Belarus. So back to looking at new things after a while of being absolutely busy. 🙂

  1. JDK8 and Mockito – everything sounds better with JDK8.
  2. Java Garbage Collection mini book – really good read which touches some other parts of JVMs too.
  3. HTTP2 and REPL in Java 9 – small introduction into the Java 9 features.
  4. PostgreSQL Tips  (Russian) – small but very useful things on PostgreSQL
  5. A bit deeper into Object (Russian) – small investigations in the JDK code. I really like these since it shows that JDK code is not that scary.

Interesting personal stuff:

  1. Bought a new phone. It’s really hard to find competitive phones less than 5” in size. 😦
  2. If you’re wondering why your MySQL dump seems to be slightly broken in BLOB fields – please check that you’re not using “>” redirection. You might need to use “-r” paramater instead.
  3. Finally knew a way to grep results of “tail -f “:
    tail -f  /var/log/app/default | grep -v –line-buffered SpammingThread
  4. Wasted around 3-4 hours trying to make IntelliJ functional again. Tried pretty much everything and nothing helped. Build in pure Gradle was working fine while IntelliJ was stuck at “Writing classes” and eating CPU time. I was pretty much in desperation trying to clean and re-import project, changing JDK version, changing Gradle version. Nothing helped. Compiler process was stuck. Once looking at it in “ps ax | grep java” – I saw -Xmx700m. Hm, may be it’s a sort of OOM which is not reported? Bingo! Went to “Changing Compiler” -> “Build Process heap size” and set it to 1024. Now I have everything compiling properly but 4 hours of life are away.
  5. Struggled with the local name resolution on Mac OS for a while. Finally it appears that if you specify more than 10 items in a row inside /etc/hosts – it’s stuck for 30 seconds trying to resolve some of these. It’s weird but splitting one line in two separate lines helped.
  6. Once you’ve got HEX string in your CQLSH output you might like to view it with:
    1. Removing 0x at the beginning
    2. byte[] data = DatatypeConverter.parseHexBinary(“1f8b0800000e35acbc…”);
This entry was posted in Development, Rants, Tips and tagged , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s