Home » Author Archives: Tomasz Nurkiewicz (page 7)

Author Archives: Tomasz Nurkiewicz

Java EE developer, Scala enthusiast. Enjoying data analysis and visualization. Strongly believes in the power of testing and automation.

java.util.concurrent.Future basics

java-logo

Hereby I am starting a series of articles about future concept in programming languages (also known as promises or delays) with a working title: Back to the Future. Futures are very important abstraction, even more these day than ever due to growing demand for asynchronous, event-driven, parallel and scalable systems. In the first article we’ll discover most basic java.util.concurrent.Future<T> interface. ...

Read More »

Breaking build is not a crime

software-development-2-logo

For years I’ve been taught that breaking continuous integration build is something that should be avoided under all circumstances. Let me first quote few classics. Uncle Bob in The Clean Coder says: The team must simply keep the build working at all times. If the build fails, it should be a “stop the presses” event and the team should meet ...

Read More »

Don’t rely on unit tests alone

junit-logo

When you are building a complex system, barely testing components in isolation is not enough. It’s crucial, but not enough. Imagine a car factory that manufactures and imports highest quality parts, but after assembling the vehicle never starts the engine. If your test case suite consists barely of unit tests, you can never be sure that the system as a ...

Read More »

How aggressive is method inlining in JVM?

java-logo

Ctrl + Alt + M is used in IntelliJ IDEA to extract method. Ctrl + Alt + M. It’s as simple as selecting a piece of code and hitting this combination. Eclipse also has it. I hate long methods. To the point where this smells way too long for me:                 public void ...

Read More »

Spring Data JDBC generic DAO implementation – most lightweight ORM ever

spring-interview-questions-answers

I am thrilled to announce first version of my Spring Data JDBC repository project. The purpose of this open source library is to provide generic, lightweight and easy to use DAO implementation for relational databases based on JdbcTemplate from Spring framework, compatible with Spring Data umbrella of projects.               Design objectives Lightweight, fast and ...

Read More »

Probability distribution for programmers

scala-logo

This is one of these very simple programming puzzles I came across recently: given a function returning random integers from 0 to 4 inclusive with equal probability, write a function returning random integers from 0 to 6 inclusive. Of course the solution should also return equally distributed numbers. So let’s start from an input function sample definition:       ...

Read More »

@Cacheable overhead in Spring

spring-interview-questions-answers

Spring 3.1 introduced great caching abstraction layer. Finally we can abandon all home-grown aspects, decorators and code polluting our business logic related to caching.                   Since then we can simply annotate heavyweight methods and let Spring and AOP machinery do the work: @Cacheable("books") public Book findBook(ISBN isbn) {...} "books" is a cache ...

Read More »

Forcing Tomcat to log through SLF4J/Logback

apache-tomcat-logo

So you have your executable web application in JAR with bundled Tomcat (make sure to read that one first). However there are these annoying Tomcat logs at the beginning, independent from our application logs and not customizable:                 Nov 24, 2012 11:44:02 PM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler ["http-bio-8080"] Nov 24, 2012 11:44:02 ...

Read More »

Standalone web application with executable Tomcat

apache-tomcat-logo

When it comes to deploying your application, simplicity is the biggest advantage. You’ll understand that especially when project evolves and needs some changes in the environment. Packaging up your whole application in one, standalone and self-sufficient JAR seems like a good idea, especially compared to installing and upgrading Tomcat in target environment. In the past I would typically include Tomcat ...

Read More »

Parallelization of a simple use case explained

scala-logo

Some time ago a friend of mine asked me about the possibilities of speeding up the following process: they are generating some data in two stages, reading from a database and processing the results. Reading takes approximately 70% of time and processing takes the remaining 30%. Unfortunately they cannot simply load the whole data into memory, thus they split reading ...

Read More »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close