Scala extractors infix sample with Rational numbers

I keep coming back to the awesome introductory material on Scala put together by Daniel Westheide. One of the examples that he provides for extractors using an infix operation pattern is the Streams API – val xs = 58 #:: 43 #:: 93 #:: Stream.empty xs match {   case first #:: second #:: _ => first - second   ...

Read More »

Basics of scaling Java EE applications

java-interview-questions-answers

To be honest, ‘scalability’ is an exhaustive topic and generally not well understood. More often than not, its assumed to be same as High Availability. I have seen both novice programmers and ‘experienced’ architects suggest ‘clustering‘ as the solution for scalability and HA. There is actually nothing wrong with it, but the problem is that it is often done by ...

Read More »

Spring Boot Oauth2 Security

spring-interview-questions-answers

This post is an enhancement for my previous post which talks about how to secure your REST API using Spring security oauth2. In case if you missed it, here is the place to grab: http://blog.rajithdelantha.com/2015/09/secure-your-rest-api-with-spring.html Spring boot is one of the new inventions from Spring framework that makes developers’ lives easier when building large scale applications. Here is a good ...

Read More »

JAR Hell

What is JAR hell? (Or is it classpath hell? Or dependency hell?) And which aspects are still relevant when considering modern development tools like Maven or OSGi? Interestingly enough there seems to be no structured answer to these questions (i.e. even the second page listed no promising headlines). This post is supposed to fill that gap. Overview We’ll start with ...

Read More »

Debugging tip: How to simulate a slow hardisk

As a Software Engineer there are times when you’d like to have a slower system. It doesn’t happen really often actually: usually it’s when someone reports a bug on your software that you have never seen before and that you can not reproduce. The majority of time, the reason of those ghost bugs are race conditions. Race conditions, are issues ...

Read More »

Vertical and Horizontal Decorating

A decorator pattern is one of the best ways to add features to an object without changing its interface. I use composable decorators quite often and always question myself as to how to design them right when the list of features must be configurable. I’m not sure I have the right answer, but here is some food for thought.   ...

Read More »

Clojure web development – state of the art – part 2

This is part 2 of my “Clojure web development” series. You can discuss first part on this reddit thread. After reading the comments I must explain two assumptions I had writing this series: Keep things easy to understand for people from outside Clojure land, especially Java devs. That’s why I use REST/JSON in favor of transit and component as a ...

Read More »

Letting Go Of Technical Debt

The term “technical debt” was first introduced by Ward Cunningham as a metaphor. It was in the early 90s, when the rift between developers and business people was growing wide. The business people would urge developers do release untested, ugly code. The developers tried to explain why this was a bad mistake. (Not like today, right?) The metaphor of debt ...

Read More »