# Functional Interfaces Overview

Java 8 provided a lot of new and very useful features that we can use in our everyday life. In this post I decided make an overview with examples of most  commonly used built-in functional interfaces.

I’d like to start from the definition, what is the functional interface? By the definition any interface that has only one abstract method is considered to be a functional interface. Another name for such interfaces is Single Abstract Method interfaces (SAM Interfaces). For instance, Runnable is absolutely legal FI and as you can see it’s annotated now with FunctionalInterface annotation. Continue reading Functional Interfaces Overview

# Intro in Binary Representations and Bit Manipulation

First of all, what is a bit (short for binary digit)? You can think of it as an atom which can be used to build information. In fact, a bit has only two unique states: zero or one. Sometimes you can find another definition like “yes/no”, “on/off” or  “true/false”. But, all this stuff boils down to the same thing.

To represent more meaningful information other than zero or one we need a
bunch of bits that can be grouped together. For example, eight bits are able to produce 256 (2^8) unique numbers: Continue reading Intro in Binary Representations and Bit Manipulation

# Summary of basic math properties

I know it’s better to have intuition rather than memorize formulas and rues. But nonetheless, I want to combine the most common math properties and formulas that pop up in everyday life and work in one place for quick access. Please let me know in case if I missed something.

# Power Rule, Product Rule, Quotient Rule and Chain Rule

Recently, I had a need to use derivative. So I decided to make this short overview of the four fundamental rules to refresh and recall my knowledge in evaluating derivatives.

The overview doesn’t contain any proves, it’s just a reference where you and I can quickly find differentiation rules that can be applied on derivatives. Moreover, I skipped some other rules such as sum or difference rule.

# Trie

Trie or prefix tree is a tree-like data structure that implements dictionary abstract data type. In other words, trie allows to store key/value pairs in hierarchical structure. For example, let say we have words {a, as, air, aim, ail, car, i, milk, be, bag}. These words can be represented as follows.

As you can see the root of the trie is an empty string that has five direct children. Every child represents first letter of a given word so that the words with the same prefix share the common nodes. As a result, a key can consist of one or more nodes, but values stored in one node.

# Java Concurrency Overview Part 2

In this part I’ll try to make an overview of java.util.concurrent framework that provides high-level building blocks for creating concurrent applications. These building blocks have high performance, thread-safe, widely used in Java world and moreover they have been thoroughly tested.

The reason why this framework was introduced in Java 1.5 is that low-level API such as wait(), notify() and so on are too primitive and force developers to create their own custom high-level libraries.