Code style is like politics, everybody has their own opinions and personal preferences. However, when working in a team on the same code base it is necessary that you and your teammates agree on a shared style.
Good indexes are vital to get good performance on your N1QL queries. As in SQL, but slightly different, you need to index what you are going to search for. In this article, we are going to go through how to create indexes that will lightning quick and won’t leave you hanging as you scale up.
Even though the main purpose of document-based databases is key-value operations, Couchbase still supports more complex SQL style queries with N1QL (nickel). N1QL is a query language which is described as SQL for JSON.
Welcome to the third episode of the Couchbase series. In Couchbase everything (except for counters) are stored in JSON and in this article, we will look into how we can work with it in an easy and generic way.
Welcome to episode two of the Couchbase series. In this article, we will start writing some code that integrates with the Couchbase. We will look into how we establish the connection and how to open buckets and start reading and writing from/to them.
Welcome to the promised NoSQL with Couchbase series, in these articles we are going to learn how to use a NoSQL database called Couchbase. We are going to investigate and learn what it is extremely good at and what it is not the best at. There is quite a lot of stuff to go through, I am imagining it being enough content for around 5-6 articles and therefore I feel like we have to split it up. This first episode we will focus on installation, and as a bonus, we will also get a quick introduction to another powerful tool called Docker.
Java 9 comes with support for a feature that has been requested a lot, Reactive Streams. However, the idea of Reactive Streams isn’t anything new. It has existed in external libraries such as (and probably most popular) RxJava. But it’s nice to finally see support from it in an official Java release.
As we learned in the previous blog Achieve thread-safety with immutability the builder pattern is a very good design to follow to make your code safer. Another common, perhaps the most common, error that occurs in applications is the NullPointerException. So in this article, we are going to look at how we can use design to eliminate null.
Mutable objects are different control in a multi-threaded environment and are prone to cause strange bugs and unexpected behaviors in your code. We are going to investigate why it’s usually better to work with immutable objects and learn good design patterns to help you as a developer achieve immutability.
Have you ever felt that your code was difficult to test because of your classes, for example, depends on something external? A typical issue is that you have some class managing database operations and during your tests, you don’t want to query the database as it is usually considered out of scope from unit tests. Well, no worries Mockito has got you covered.