Home » Author Archives: Nicolai Parlog

Author Archives: Nicolai Parlog

Nicolai Parlog
Nicolai is a thirty year old boy, as the narrator would put it, who has found his passion in software development. He constantly reads, thinks, and writes about it, and codes for a living as well as for fun.Nicolai is the editor of SitePoint's Java channel, writes a book about Project Jigsaw, blogs about software development on codefx.org, and is a long-tail contributor to several open source projects. You can hire him for all kinds of things.

Publishing Snapshots With Gradle’s maven-publish Plugin

I’ve recently started a new project with Gradle and decided to jump straight in – no Gradle experience, no clue about Groovy, no tutorials, just hammer on it until it works. That went surprisingly well until I decided to publish snapshots to Sonatype’s Maven snapshot repository with the incubating maven-publish plugin – that took, ahh, a little convincing. Caveat: As ...

Read More »

What Future Java Might Look Like

During the second week of November was Devoxx Belgium, Europe’s biggest Java conference, and as every year the community’s who’s-who showed up. One of them was Brian Goetz, Java Language Architect at Oracle, and he gave what I would consider the conference’s most thrilling talk: “Java Language and Platform Futures: A Sneak Peek”. In it he presented ideas that the ...

Read More »

Rebutting 5 Common Stream Tropes

I’ve just finished reading “1 Exception To The Power of JDK 8 Collectors” and I have to say that I am pretty disappointed. Simon Ritter, Java champion, former Java evangelist at Oracle, and now Deputy CTO at Azul Systems (the guys with the cool JVM), wrote it so I expected some interesting insights into streams. Instead the post comes down ...

Read More »

JUnit 5 – Dynamic Tests

When it came to defining tests, JUnit 4 had a tremendous weakness: It had to happen at compile time. Now, JUnit 5 will fix this oversight! Milestone 1 just got released and it comes with the brand-new dynamic tests, which allow the creation of tests at run time. Overview Other posts in this series about JUnit 5: Setup Basics Architecture ...

Read More »

Java 9 Additions To Optional

Wow, people were really interested in Java 9’s additions to the Stream API. Want some more? Let’s look at …                   Optional Optional::stream This one requires no explanation: Stream<T> stream(); The first word that comes to mind is: finally! Finally can we easily get from a stream of optionals to a stream ...

Read More »

Java 9 Additions To Stream

Java 9 is coming! And it is more than just Project Jigsaw. (I was surprised, too.) It is bringing a lot of small and not-so-small changes to the platform and I’d like to look at them one by one. I’ll tag all these posts and you can find them here. Let’s start with … Streams Streams learned two new tricks. ...

Read More »

How To Implement hashCode Correctly

So you’ve decided that identity isn’t enough for you and wrote a nice equals implementation? Great! But now you have to implement hashCode as well. Let’s see why and how to do it correctly. Equality and Hash Code While equality makes sense from a general perspective, hash codes are much more technical. If we were being a little hard on ...

Read More »

How To Implement equals Correctly

A fundamental aspect of any Java class is its definition of equality. It is determined by a class’s equals method and there are a couple of things to be considered for a correct implementation. Let’s check ’em out so we get it right! Note that implementing equals always means that hashCode has to be implemented as well! We’ll cover that ...

Read More »

JUnit 5 – Conditions

We recently learned about JUnit’s new extension model and how it allows us to inject customized behavior into the test engine. I left you with the promise to look at conditions. Let’s do that now! Conditions allow us to define flexible criteria when tests should or shouldn’t be executed. Their official name is Conditional Test Execution. Overview Other posts in ...

Read More »

A Doomed Code Review

I wrote this post for Disy’s Tech Blog. Check out the original here (with less swear words). There is also some interesting stuff about databases and geographical information system, so if you are interested in these topics, you might want to take a look (much content is in German, though). There are a couple of things you should do to ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns