Tag Archives: java

How to decrease the Maven build time of your Java projects

There are good resources on the web that shows how you can decrease the Maven build times of Java projects, but since I couldn’t find the following information in most of them, I wanted to note this down for future reference. One of the simplest things you can do to decrease the Maven build time is to add the following to your command line:


But is it worth it? Let’s check. Take an example project such as Hadoop that is about 2 million lines of source code. Without skipping the generation of Javadoc, Read the rest of this entry »


Posted by on May 23, 2016 in java, Programlama


Tags: , ,

How to comment your code: an example from Hadoop

How to comment your source code? This topic comes up every once in a while, and sometimes it leads to heated discussions. The consensus is something like “comment why, and not how”. Useful as it seems, I think it is important to give examples from real-world scenarios. So, let’s look at such a case.

I’ve been working on the integration between Hadoop and HGST Active Archive S3 Object Storage product recently, and while dealing with the internals of the S3A File System that we are improving at the company, as well its interaction with YARN,  I’ve come across an interesting piece of code in the Hadoop code base. Before going into its details, look at it without any comments:

Read the rest of this entry »

Leave a comment

Posted by on March 11, 2016 in java, Programlama


Tags: , , ,

Book review: Java Performance

9780137142521Drinking from the Firehose

Even though the Java platform (along with JVM) is one of the most ubiquotus software develoment platforms, it was surprisingly difficult to find a self-contained book dedicated to performance aspects of Java platform. “Java Performance” by Charlie Hunt and Binu John can be considered the only solid and contemporary reference in the domain of performance analysis and tuning of Java based systems. No matter which programming language you use to run on JVM, this book is the essential reference until something better comes along.

On the other hand, make no mistake, this is not a lightweight book, or a cookbook which you can consult for a few performance tuning recipes. Reading Java Performance is more like drinking from the firehose. Whether you are a beginner, or a seasoned developer, it will take time to digest the gory details presented. Luckily, the book’s logical organization is close to perfect and some of the chapters are pretty self-contained.

From start to finish, it is not difficult to see that if you want to consider yourself a serious Java performance engineer, you need to master the majority of the book. Chapter 2 starts with an overview of the basics of operating systems performance and monitoring, setting the stage for the upcoming chapters and acting as a refresher. The authors are very careful to explain concepts concretely by giving examples from Linux, Solaris and MS Windows systems, which makes sense given the portability of JVM. Chapter 3 and 4, if taken together, provide the most comprehensive technical explanation of Java Virtual Machine and Just-in Time compilation from a performance perspective. Even if you are not facing performance problems (yet), this two chapters make a very solid and clear reference for understanding JVM and JIT technology. The terminology, concepts and details in these chapters are very important: Without a solid understanding of them, it is not easy to understand the discussions in the following chapters.

Read the rest of this entry »

Leave a comment

Posted by on December 8, 2013 in Books, java, Programlama


Tags: , , , ,

Java 8, Lambda Expressions and the Psychology of the Masters of the Universe (devoxx style)

A quick quiz: Take a look at the words / phrases below and tell me in what kind of talk can you hear them?

scary, scared, lazy, don’t want to scare, risk, risky, ivory tower, functional, real life, scary, no functional, reality, customers, complex

Those are some of the words I remember from the keynote given by Mark Reinhold and Brian Goetz, and titled “Java 8 and Beyond” at Devoxx 2013 conference. And I think this fact shows the real and biggest difference between designing a programming language and marketing one.

Let me explain: Devoxx, which does not need much introduction, is the biggest Java conference in Europe, including anything related to Java, JVM, Android, languages running on JVM (and even Microsoft, this year). Close to 4000 Java developers, as well as team leads, and software project managers come together from all over the world for 5 days. And just like Devoxx, Brian Goetz, one of the keynote speakers, does not need much introduction: He is a Java and concurrency expert, having written one of the best books in this field, and  serving many JCP Expert Groups and working at Oracle as the Java Language Architect. In other words, when a heavyweight Java expert such as Goetz gives a keynote at a conference such as Devoxx, and talks about the upcoming version of Java 8, and stressing features such as lambda expressions and streams, thousands of developers do listen, and they listen very carefully.

So far, so good. But there is one thing surprising. Some of those developers, I, for example, feel like listening to the aspects of human psychology and the finer points of marketing to the masses, albeit technical masses. The reasons I felt like that can be summarized as the following:

devoxx_java8_1 Read the rest of this entry »


Tags: , , , , , , , , , , ,

How to create highly effective teams, Devoxx style

I was lucky to attend to Martijn Verburg’s enlightening talk titled “The Habits of Highly Effective Teams” at #Devoxx 2013 today.

His talk, along with the slides, will be available online soon (at least for Devoxx participants), but I generally prefer to note down the key points that really stick to my mind. Moreover, for such cases, I prefer not to take any written notes during the talk, but rather listen to it carefully. I think whatever I remember after some time is really what is important for me (otherwise my brain wouldn’t spend precious energy to create enough connections and excite a lot of nerve cells to encode it, would it? ;-))

So here comes my brain dump (all inaccuracies and factual errors are solely my responsibility): Read the rest of this entry »

Leave a comment

Posted by on November 13, 2013 in Management


Tags: , , , , , ,

Book review: The Well-Grounded Java Developer: Vital techniques of Java 7 and polyglot programming

Very well balanced in its breadth, somehow lacking in depthwell_grounded_java

If you have ever had the chance to witness the live performance of the authors, you know what a dynamic duo they are, taking a no-nonsense, pragmatic and very down to earth attitude towards the perils and treasures of modern day Java development. It is easy to see that almost every page of ‘The Well-Grounded Java Developer: Vital techniques of Java 7 and polyglot programming‘ is full of that energy.

The world of Java development is wide and this book is very well-balanced in its selection of topics. In other words, almost any serious Java development team would welcome a new developer well versed in the topics of this book, or to put it differently, unless you don’t know much about most of those topics, do not consider yourself fit for a sharp and focused Java development team. Read the rest of this entry »


Posted by on September 30, 2013 in Books, java, Programlama


Tags: , , , , , , , ,

Does GWT (Google Web Toolkit) support Java 7 constructs?

The short answer is: No, as of version 2.5.1. If you’re building web applications with GWT and try to use Java 7 constructs, be careful. A few days ago I was bitten by a nasty surprise when I tried to write use Strings in a switch statement, for demonstration purposes please see the code below that I have adapted from the Hello World example of GWT in Action:

The code above compiles perfectly fine with the latest version of GWT, Eclipse and Java 7, but if you try to run in using the Development Mode, instead of the expected output in your web browser window, you will get run-time error in Eclipse: Read the rest of this entry »


Posted by on September 17, 2013 in java, Programlama


Tags: , , , , , , ,