JsonUnit
Let me introduce you another of my pet projects. It's called JsonUnit and it's something like XmlUnit only for JSON (well it's much, much more simple). Basically it's able to compare two JSON documents...
View ArticleTomcat throughput (a stupid test)
This week, a colleague of mine had asked me what is the maximal throughput in Tomcat. That he just needs to accept an HTTP request and log the request body. That's all. How many requests will be...
View ArticleREST API versioning and hypermedia
Recently, I have been thinking about REST API versioning. I have read several books and articles but the issue is far from straightforward. Let's start with a simple example – a petclinic. We will have...
View ArticleSpring and string list injection
This week, I have been bitten by a surprising behavior of Spring type conversion. Let's have the following bean and Spring config. public class Bean { public void setArray(String[] values) {...
View ArticleHow NOT to implement caching and optimistic locking in REST
Today I have encountered an interesting REST API. It looked like this one GET /objects/{objectId} % Object resource - returns 302 (Found) redirecting to the latest version GET, PUT...
View ArticleAsynchronous servlet processing
Welcome to new episode of fun with threads. Today we will cover the exciting topic of asynchronous servlet processing. In the last episode we have learned that it's not a problem to start more than...
View ArticleREST Fire
Let me introduce you to my latest pet project – REST Fire. It's basically a thin wrapper around Apache HTTP client, providing simple DSL for REST service testing. You can test your REST APIs like this:...
View ArticleCompletableFutures – why to use async methods?
I have been playing with Java 8 CompletableFutures and one thing has been bothering me – shall I use methods with Async suffix or the variant without it. Let's take a look at the following example:...
View ArticleWhat are ListenableFutures good for?
Standard Futures are in Java since version 5. But recently they started to lose breath. Nowadays we do have asynchronous servlets, asynchronous HTTP clients and lot of other asynchronous libraries....
View ArticleConverting ListenableFutures to CompletableFutures and back
Java 8 introduced CompletableFutures. They build on standard Futures and add completion callbacks, future chaining and other useful stuff. But the world did not wait for Java 8 and lot of libraries...
View ArticleConverting RxJava Observables to Java 8 Completable future and back
I have been working on a small project that converts between different types of Java futures. The most challenging conversion is from/to RxJava observable. The reason is simple – RxJava observable is...
View ArticleMachine learning for dummies – Logistic Regression
Hi, welcome to my on-line course "machine learning for dummies". Usually courses like this are written by an expert. This is not my case, though. I do not know anything about machine learning. I have...
View ArticleMachine Learning for dummies – overfitting
Before we can move to more advanced topics, we should discuss over and underfitting. It reminded me my high school biology lessons. We were expected to recognize different kinds of flowers. In the...
View ArticleMachine learning for dummies – Support Vector Machines
Support Vector Machines, it sounds scary. Might be a name of some horror movie. Revenge of Support Vector Machines. But do not worry, for us dummies it's not so complicated. I promise I will not use...
View ArticleMachine Learning for dummies – Logistic Regression internals
Before we can start with neural networks, we should talk a bit more about Logistic Regression – without understanding Logistic Regression, we can not understand neural networks. Moreover, I have...
View ArticleMachine Learning for dummies – Neural Networks
Even though Neural Networks are the most cool thing in machine learning, they conceptually are just multiple linear regressions chained one after the other. So I will not draw any fancy pictures of...
View ArticleMachine Learning for dummies – word2vec
Last time we have skimmed through neural networks. Today I'd like to describe one cool algorithm that is based on them. Up until now we have worked on character recognition in images. It's quite...
View ArticleMachine Learning – word2vec results
Last time we have discussed word2vec algorithm, today I'd like to show you some of the results. They are fascinating. Please remember that word2vec is an unsupervised algorithm, you just feed it a lot...
View ArticleMistakes I made designing JsonUnit fluent API
Several years ago, I have decided that it would be nice to add fluent API to JsonUnit library. If you are not familiar with fluent assertion APIs it looks like this....
View Article