Entries

Git bash in IntelliJ IDEA on Windows

One of the top features of the recent release of IntelliJ IDEA 13 is definitively a built-in command-line interface. For me, this is really great feature - especially local terminal . I don't need to abandon the IDE to work with command-line interface anymore, e.g. while working with source code management systems like Git.

Thymeleaf Page Layouts

Usually websites share common page components like the header, footer, menu and possibly many more. These page components can be used by the same or different layouts. There are two main styles of organizing layouts in projects: include style and hierarchical style. Both styles can be easily utilized with Thymeleaf without losing its biggest value: natural templating .

Parametrized JUnit tests with JUnitParams

Parameterized unit tests are used to to test the same code under different conditions. Thanks to parameterized unit tests we can set up a test method that retrieves data from some data source. This data source can be a collection of test data objects, external file or maybe even a database. The general idea is to make it easy to test different conditions with the same unit test method, which will limit the source code we need to write and makes the test code more robust. We can call these tests data-driven unit tests. The best way to achieve data-driven unit tests in JUnit is to use a JUnit's custom runner - Parameterized or JUnitParams' JUnitParamsRunner . Using JUnit's approach may work in many cases, but the latter seems to be more easy to use and more powerfull.

Fixing someone else's code

Collective code ownership is very important part of any successful Agile project where everyone in the team shares responsibility for the quality of code. Any developer can change the code, fix the bug he notices and refactor as the code belongs to the team.

HOW-TO: Get started quickly with Spring 4.0 to build a simple REST-Like API (walkthrough)

Yet another tutorial about creating Web API with Spring MVC. Not really sophisticated. Just a walkthrough. The resulting app will serve simple API, will use Mongo as its persistence and it will be secured with Spring Security.