Anyone who has a dice can play a simple game. Choose a number greater than 6. Then roll the dice until the sum of the rolled numbers is equal to or greater than the chosen number. If the sum at some point is equal to the chosen number, you win. What is the number that gives you the highest chance of winning? Mathematicians know the answer, but I have decided to develop a simple program to test it.
Full-stack dev quiz question #67
Pre-caching is a little less popular than its more famous brother on-demand caching, but still important. Check the sixty-seventh question of full-stack dev quiz to check, if you know what pre-caching actually is.
Caching has different faces. It can live long or short, be local or distributed, and use various eviction strategies. Surprisingly, there are many options to choose from. Some can be implemented quickly and some will require adding new technology to the project. What should I choose for my application? Are there any universal solutions?
Full-stack dev quiz question #66
I know, it has taken some time since the last article. Probably it is even more important to test what you remember. Check the sixty sixth question of full-stack dev quiz to find out, what you remember about GSON.
GSON build array with newlines
JSON has become a famous data format for exchanging information over the Internet. It is commonly used in REST API and for storing loosely structured data. Compared to XML, it is concise, and unfortunately, less human readable. Beautifiers and pretty printers can easily enhance this. I will show you the different options available in GSON to convert an array of objects to a JSON string.
Liquibase shuts down Hub in favor of database Observability feature
After a few years of promoting Liquibase Hub, it is officially shutting down. Apparently, it wasn't so broadly used as it had been expected. If you haven't started to use it, yet, now you don't have to. If you have, you can consider moving to the database Observability feature. Unfortunately, it is available in Liquibase Pro.
Project structure for Liquibase - best practices
In a real-life project developed by one or more teams, the number of change sets can quickly grow. What are the best practices for organizing Liquibase changelog files? Should all change sets be put to one large change log file or does it makes sense to have a separate file for each release? Well. That depends on the particular project, but I can tell you how I usually do that.
Full-stack dev quiz question #65
HashSet is probably the most popular implementation of a set in Java. An important reason of that is computational complexity of crucial operation on HashSet. Check sixty fith question of full-stack dev quiz to find out, if you know what that means.
Is it worth using HashSet for a few elements?
HashSets are known from its efficiency, when it comes to checking, if they contain a particular object. They were designed exactly for doing that in a constant time. Contrary, checking objects existence in an ArrayList has a linear computational complexity, which is less efficient in theory. But is it true for small sets as well?