I like casual biking and some algorithms. What I especially like are the City bikes of Helsinki. The network of stations allows you to conveniently travel in the city center as you can take and return a bike in any station. The bike station network also gives a nice context to solve some well-known graph problems.

In this blog post the following problems are addressed with well-known algorithms: Shortest path, Minimum spanning tree and Travelling salesman problem. The focus will be on the visualization of the algorithms.

Creating the graph

A graph is an abstract data type and it consist of nodes and…


Let’s explore some basic concepts that will help us create a simple chess AI:

  • move-generation
  • board evaluation
  • minimax
  • and alpha beta pruning.

At each step, we’ll improve our algorithm with one of these time-tested chess-programming techniques. I’ll demonstrate how each affects the algorithm’s playing style.

You can view the final AI algorithm here on GitHub.

Step 1: Move generation and board visualization

We’ll use the chess.js library for move generation, and chessboard.js for visualizing the board. The move generation library basically implements all the rules of chess. Based on this, we can calculate all legal moves for a given board state.


The basic concept of blockchain is quite simple: a distributed database that maintains a continuously growing list of ordered records. However, it is easy to get mixed up as usually when we talk about blockchains we also talk about the problems we are trying to solve with them. This is the case in the popular blockchain-based projects such as Bitcoin and Ethereum . The term “blockchain” is usually strongly tied to concepts like transactions, smart contracts or cryptocurrencies.

This makes understanding blockchains a necessarily harder task, than it must be. Especially source-code-wisely. …


Spring Boot supports a lot of authentication and integration mechanisms. However, when configuring a non-trivial authentication/integration you will probably end up looking solutions/examples all over the web: spring docs, github projects and stackoverflow. Often, what you really want is a simple working configuration that you can then start to work with. That’s why I created spring-tsers-auth.

This example project tries to provide working out-of-the-box Spring Boot authentication examples with real (dockerized) databases and IDPs including: MySQL, OpenLDAP and Shibboleth. No inMemoryAuthentication() that you usually see in the examples but real end-to-end authentication workflows!

Docker (with Docker Compose) gives the possibility…


One aspect of Docker is to provide the same environment throughout the different stages of software development process: e.g. in development, staging and production. But does it really make sense to run your application inside Docker when developing a Spring Boot application on your local computer. Here I go through some features common in Java development and how to make them work with Spring Boot and Docker: autoreload and debugging.

To achieve these properties I will be using the features found in the spring-dev-tools introduced in Spring Boot 1.3. …

Lauri Hartikka

I like programming and Careless Whisper. http://bit.ly/JMRmkU

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store