Home » Author Archives: Attila Mihaly Balazs (page 4)

Author Archives: Attila Mihaly Balazs

Functional Java collections

java-logo

There is a lot of functional hype these days so I would give a short overview on what is out there at least when it comes to collections in Java. Personally I like standard collections API but i some cases can be awkward and add additional verboseness. This should not be a problem in latter version of Java 8+. There ...

Read More »

The Java Advent Calendar

jcg-logo

The Java Advent Calendar is winter-festivities themed blog featuring (at least) one Java-related post per day between the 1st and 24th of December. The concept is rooted in the tradition of the advent calendar – getting a small gift each day while waiting for Christmas – but it is not a religious endeavor. We want to give people who have ...

Read More »

Using Builder Pattern in JUnit tests

junit-logo

This is not intended to be a heavily technical post. The goal of this post is to give you some guidelines to make your JUnit testing life more easy, to enable you to write complex scenarios for tests in minutes with the bonus of having extremely readable tests.                 There are two major ...

Read More »

Changes to String.substring in Java 7

java-logo

It is common knowledge that Java optimizes the substring operation for the case where you generate a lot of substrings of the same source string. It does this by using the (value, offset, count) way of storing the information. See an example below: In the above diagram you see the strings ‘Hello’ and ‘World!’ derived from ‘Hello World!’ and the ...

Read More »

Java Management Extensions

java-logo

What is JMX? The Java Management Extensions (JMX) is an API used for managing or monitoring various resources such as applications, devices, services and of course the JVM. Developed through the Java Community Process (JCP), the JMX technology was built as Java Specification Request 3. The JMX technology provides with remote access, therefore the management of an application can be ...

Read More »

Java Enum puzzler

java-logo

Let’s suppose we have the following code: enum Case { CASE_ONE, CASE_TWO, CASE_THREE; private static final int counter; private int valueDependsOnCounter; static { int sum = 0; for(int i = 0; i<10; i++) { sum +=i; } counter = sum; } Case() { this.valueDependsOnCounter = counter*counter; } } What do you think is the result of compiling and running the ...

Read More »

Automaton implementation in Java

java-logo

This post will address the problem of implementing finite states machines into java. If you don’t know what FSM are or where can be used you may be keen on reading this, this and this. If you ever found yourself in the situation of using a FSM on your design you have probably started to write classes for every state ...

Read More »

Debugging the JVM

java-logo

In some (rare) cases you might find yourself in the situation that you managed to crash the JVM itself. I most recently managed this by setting the name of a ThreadGroup to null. In these cases it is useful to debug the JVM itself so that the crash can be located more precisely. Here are the steps to do it ...

Read More »

Devoxx Day 1

devoxx-logo

Participating at Devoxx brought me enough motivation to post my first blog entry. I am for the first time here and I am really impressed by how it is organized. There are a record number of top speaker present. For me it is a problem choosing the presentation to attend. But thanks to the organizers all events will be available ...

Read More »

Integrating Maven with Ivy

apache-maven-logo

The problem: you have some resources in an Ivy repository (and only there) which you would like to use in a project based on Maven. Possible solutions: Migrate the repository to Maven (Nexus for example) since Ivy can easily use Maven-style repositories (so your Ivy clients can continue to use Ivy with some slight configuration changes and Maven clients will ...

Read More »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.