Big O Notation

Reading Time: 4 minutes Definition The Big O Notation is simplified analysis of an algorithm’s efficiency. It is also known as Landau’s Symbol. Big O Notation is used in Computer Science and Mathematics to describe the Asymptotic behavior of functions. Let’s study some of the characteristics; Big O Notation enlightens about the complexity of a target algorithm for a

Binary Tree

Reading Time: 6 minutes Definition Binary tree is a non-linear data structure that is composed of two nodes at most. This is how the name “Binary” is formed. However, it is not necessary for the Child Nodes that they have to have two nodes, in fact they can have even zero, we will observe such types in the following chapters.

Creating a Java keystore

Reading Time: 1 minute create a keystore file $JAVA_HOME/bin/keytool -genkey -alias tugrulaslan.net -keyalg RSA -keystore keystore.jks -keysize 2048 Generate a certificate signing request (CSR) for an existing Java keystore $JAVA_HOME/bin/keytool -certreq -alias tugrulaslan.net -keysto re keystore.jks -file tugrulaslan.net.csr Import a root or intermediate CA certificate to an existing Java keystore $JAVA_HOME/bin/keytool -import -trustcacerts -alias root -file intermediate.crt -keystore keystore.jks

Bootstrap a sample blog post details/read more page

Reading Time: 2 minutes [code] <!DOCTYPE html> <html lang=”en”> <head> <meta charset=”utf-8″> <meta http-equiv=”X-UA-Compatible” content=”IE=edge”> <meta name=”viewport” content=”width=device-width, initial-scale=1″> <link rel=”stylesheet” href=”https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css” integrity=”sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp” crossorigin=”anonymous”> <link rel=”stylesheet” href=”https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css” integrity=”sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u” crossorigin=”anonymous”> <style type=”text/css”> body { background: #eee !important; } .page-header{ margin-top: 0 !important; } .panel-body{ padding-top: 0; } .featuredImg{ margin-bottom: 15px; } </style> <!– HTML5 shim and Respond.js for IE8 support

Bubble Sort

Reading Time: 1 minute Description Bubble sort will repeatedly compare and swap adjacent items. If the item on the left is greater, it swaps it with the right item. Basically the greater items are shifted towards the right direction. Furthermore, the second iteration is stopped because the last items are sorted already we wont go though them again. Furthermore,

Adapter Design Pattern in Java

Reading Time: 4 minutes Description Adapter Design pattern is listed underneath the Structural patterns. As you understand from the name it is designated to act like an adapter. When you look for this pattern there are different descriptions and examples, however I find the below illustration very clear what the pattern stands for; As you study the illustration we

Mediator Design Patter in Java

Reading Time: 4 minutes Definition The Mediator Pattern falls into the Behavioral Pattern. In simple terms, there is centrally a mediator that handles communication between object in a loosely coupled way, thus objects shall not talk to each other directly. Furthermore, often developers get confused with the Observer pattern, and they seem pretty similar. However, we can break the

Java Object equals, hashCode, Hashing Collections and Hash Code Collision

Reading Time: 7 minutes Introduction In this blog post I’ll be focusing on something very fundamental and assumed as easy in the concept, but fairly the subject requires more focus and better apprehending. Besides that I am quite sure you’ll learn many interesting related to this topic. Object equals and hashCode Methods equals and hashCode methods are shipped with

Builder Pattern in Java

Reading Time: 6 minutes The Builder pattern eliminates building the complexity of the target object as well as eases the construction by providing such methods that will assemble the object same as building a set of blocks. By implementing the Builder pattern, there won’t be any need of larger constructors, parameter objects or custom types. Furthermore, the Builder pattern

Immutable Objects in Java

Reading Time: 3 minutes Immutability of an object indicates that once an object is constructed with given values, its state and values cannot be altered. In case of any value change must result in new object creation. Out of box Java offers some Immutable objects for instance java.lang.String, java.lang.Integer, java.lang.Float, java.math.BigDecimal. Immutable objects make generally a good use in