This is a follow-up to my answer to this Code Review question, which attracted a bit more thoughts of mine because there are multiple approaches to the solution within the same pattern.

Here is the list of these approaches:

  1. Classic, enhanced for loops, or using iterators. I group them togeth...

Continue reading...

A few days ago I came across a portion of code that quickly became legacy and hard to maintain. Several methods accumulated similar instructions to handle exceptions, but contained different logic and returned incompatible object types, for example:

public Item findItem(String context, String grou...

Continue reading...

The official Play! documentation provides examples of mocking external Web services responses that use quite a complex construct:

  Server.withRouter() {
    case GET(p"/repositories") => Action {
      Results.Ok(Json.arr(Json.obj("full_name" -> "octocat/Hello-World")))
    }
  } { implicit por...

Continue reading...

Blog NG: Restart

blog news

Just restarted my blog using Grav Framework.

Very few posts migrated from my previous attempts.

... Hope to fill it regularly with fresh thoughts on dev/programming, tech/IT and whatever might seem cool to publish.

Continue reading...

A short example of how to simplify DB connections management in tests with ScalaTest.

Continue reading...