tech

CQRS

Posted on

Command Query Responsibility Separation  Separating the writes from the reads What? CQRS really makes sense if your are doing event sourcing and event driven design. I will not go deep into that because it would lead us to far and admittedly I don’t have the expert knowledge yet in this domain.* So, separating writes from […]

tech

Regex – Regular Expression

Posted on

A regular expression or regex is a pattern defined by a group of characters to match a certain string. It can help you find patterns in a text or do replacements for specific character sequences. Here a short of overview of some common regex syntax   Examples Here are some examples of regular expressions. You […]

tech

CIDR

Posted on

CIDR stands for Classless InterDomain Routing. But to explain what it is, we require some more context. IP Addresses demystified An IP address e.g. 52.212.73.201 consist of a network part and a host part. The network part is the same for the whole network. The IP address you see here is actually a decimal representation of four […]

Java

JMH – BenchMarking

Posted on

Java Microbenchmark Harness is part of the Java 9 release. JMH takes care of JVM warm-up and code-optimization paths, making benchmarking as simple as possible and excluding as many test influences as possible. It gives you an easy way of specifying how many warmup and test iterations you want to do. It will also fork […]

Java

Reflection

Posted on

Reflection is a language’s ability to inspect and dynamically call classes, methods, attributes, etc. at runtime. Even if you do not know the type of the object at compile time, it is possible to call it’s methods, get it’s properties … at runtime. In Java Objects have the getClass() method that allows you to find the object’s class […]

tech

DNS

Posted on

How does DNS works? When you are browsing to https://nickvanhoof.com, how does your machine know where to find the address of nickvanhoof.com It turns out that when you are going to nickvanhoof.com, you are actually surfing towards the address 52.212.73.201.  The moment you type nickvanhoof.com and hit enter, how is this domain name linked to that […]

tech

Floating point numbers

Posted on

You certainly heard people speaking about 32 bit  or 64 bit computers. Now what does it mean to store a number in a 32 bit representation? Instead of going very deep into it I am going to give an high level overview and some examples. There are enough websites out there with a lot of info […]

OCP

JDBC

Posted on

Java Database Connectivity I’ll start off with a small example and then give a couple of pointers regarding JDBC.   Example This example connects to a MySQL database. I’m querying the superhero database which originally contains 2 rows: id, name, first_name, last_name, good ‘1’,’Superman’,’Clark’,’Kent’,’1′ ‘2’,’Batman’,’Bruce’,’Wayne’,’1′ The code queries the database for all the names of […]

HowTo

Sql Server tips

Posted on

Here are some basic tips for the use of SQL SERVER:   1. NOCOUNT SET NOCOUNT = OFF Don’t count the number of rows affected for big queries with a lot of joins. This will significantly improve performance   2. DATEADD SELECT count(personId) FROM persons WHERE creationDate > DATEADD(DAY, -14, CURRENT_TIMESTAMP); SELECT count(personId) FROM persons […]