Reddit API Authentication with Java/Spring

I am a big fan of Reddit. The platform is great for learning and sharing programming knowledge… In fact, it contains so much knowledge and opinion, that there is no chance for any single person to analyze it all. Sounds like a job for a machine? Before we get started, we need to learn how to authenticate with the Reddit API. Continue reading “Reddit API Authentication with Java/Spring”

Java surprises – Unexpected behaviours and features

Java is a very mature programming language – in fact, it is over 21 years old, so if it was a person it could drink even in the USA! With age comes wisdom, but also with age comes quirkiness… at least sometimes. In this article, I will look at some of the more surprising and unexpected behavior and features of the language. Continue reading “Java surprises – Unexpected behaviours and features”

Single Responsibility Principle – do you know the real one?

Single Responsibility Principle, as defined in the very famous set of SOLID principles, is often misunderstood. When asked what it means, most developers go with- “a class should do only one thing”, or something along these lines. This is simplistic and frankly- wrong! Intrigued? Read on! Continue reading “Single Responsibility Principle – do you know the real one?”

Implementing Minimax Algorithm in Java

If you want to write a program that is able to play a strategy game, there are good chances that you will be looking at a Minimax algorithm. This is especially true when it comes to games like chess, where variations of the Minimax algorithm are what is used to build the strongest chess-playing programs in existence. In this article, I will look at implementing the basic version of the Minimax algorithm with Java. Continue reading “Implementing Minimax Algorithm in Java”

Please, stop writing so many “for loops” in Java!

In this blog post, I want to take you back to basics and talk about Java for loops. To be honest, I am writing this blog post partially for myself, as this is something that I am myself too often guilty of. Since Java 8, we don’t have to write so many for loops in Java! I hope this blog post will make your code nicer to read and quicker to write. Continue reading “Please, stop writing so many “for loops” in Java!”

Simulating the Secretary Problem with Java

You might have noticed that I like reading books. I have recently read “Algorithms to Live By: The Computer Science of Human Decisions” which absolutely fascinated me! The book mentions a famous optimal stopping (Wikipedia) problem called Secretary Problem. In this blog post I will explain it and then we will have some fun simulating it with Java. Let’s see if we can find a solution by brute force! Continue reading “Simulating the Secretary Problem with Java”

Designing an Object Oriented Chess Engine in Java

I love playing chess. I also love programming. How to marry the two? How about playing chess against a chess engine (chess playing program) that I have designed and wrote? If you are intrigued- read on! This is the first blog post in the series about building my chess engine in Java. Continue reading “Designing an Object Oriented Chess Engine in Java”

Learning Java / Spring / Microservices with Pluralsight

You might have seen recently some Pluralsight promotion on my page. There are two reasons for this. Reason number one- I became a Pluralsight Affiliate and I earn by promoting their website. Reason number two- I use Pluralsight myself and I think it is a great place to level up your skills. In this article, I will explain why you should consider it too! Continue reading “Learning Java / Spring / Microservices with Pluralsight”