RSSAmplifier

Blog

Nataliia Dziubenko

Blog

nataliiadziubenko.comRSS feed ↗10 posts

Latest posts

AWS RDS (Postgres): how to debug spilling to disk

Recently, I had to quickly learn how to debug excessive spilling to disk on a Postgres instance. Information online on this topic is mostly scattered. I have a feeling that, whenever query plan analysis is involved, things always get a bit mystical. Since I’m going to forget it all tomorrow, it’s good to write it down, both for others and for the future me. Situation You notice that your RDS…

Java's synchronized explained

There’s a ton of documentation and specifications describing the internal workings of the JVM. However, going through all of that to simply gain some understanding might be a bit too much. I’ve read those specs and looked inside, so here’s a simple little explanation of how synchronized works in Java. Java syntax allows for synchronized methods and synchroized blocks (in docs, they call them…

Postgres: notes from day-to-day engineering

As a software engineer, I learn something new every day simply by doing my job. This post contains three small tips that I thought were worth noting down and might be useful for someone, or even for my future self. In this post, I talk about Postgres, but I guess these tips would apply similarly to other relational databases. Beware: there might be traces of AWS here and there :) Transaction locks…

How JVM handles exceptions

It’s interesting to know how the JVM runs bytecode instructions… But do you know what is going on when an exception is thrown? How does the JVM handle the delegation of control? What does it look like in the bytecode? Let me quickly show you! example Here’s a simple bit of Java code that includes all the important actors in the exception-throwing game (try-catch-finally): int a = 0 ; try { if ( a…

First months at Azul: how is it going?

It’s been over three months now since I started working at Azul. Everyone keeps telling me, “you’re in the right place,” and I can’t agree more! I feel like I can use my skills and experience as a backend engineer, and also combine it with the subject of my curiosity and strong interest — JVM internals. So, what am I doing, and how has it been going so far? the team Many know Azul as one of the…

Java Integer Caching: why and how

As Java developers, we know that we shouldn’t compare objects using the == operator because this way we compare the references and not the actual values. That would also apply to Integer objects: Integer x = 256 ; Integer y = 256 ; System . out . println ( x == y ); // false This result can surprise nobody. However, Java has a little trick for us: Integer x = 127 ; Integer y = 127 ; System . out .…

I won’t let Java confuse you #5: let's talk lambdas

Lambdas are interesting structures. What are they exactly? And why can’t we use non-final local variables in lambda bodies? Welcome back to the Java-unconfusing series! It’s our safe place to take a look at simple pieces of Java code that don’t always behave exactly as we expect. We look under the hood in order to understand why Java does what it does, so we are never confused again. Context Years…

I won’t let Java confuse you #4: unreachable statements

Do you think Java consistently rejects all unreachable code? Well… Welcome back to the Java-unconfusing series! Usually here we take a look at the pieces of code which may look really innocent, but not work as we expect. Or not compile at all. It’s good to dive into the reasons why it is a certain way, so we can learn more about Java ideology and design decisions. Let’s get unconfused together!…

I won’t let Java confuse you #3: widening

Welcome to the fourth episode of our Java-unconfusing series, where we look at some basic concepts in Java (in fact, it applies to many other languages too) that result in confusing outcomes in certain cases. When that happens, most likely the code quality could do with some improvements. In any case, it’s good to know what we can expect from Java and never be confused by it. Today, I would like…

I won’t let Java confuse you #2: expressions

Welcome to the third episode of the Java-unconfusing series, where we talk about the things that look innocent, while the results seem confusing. Often that means that the code is not of the best quality. Yet, it’s good to know about such cases and learn how exactly it works. Today I’m going to show you a simple numeric expression… Example Let’s take a look at the following line: System . out .…