Faster Sorting of Arrays of Primitives Coming to Java?

It appears that sorting arrays of primitives in Java may experience a performance improvement in the not-so-far future. Vladimir Yaroslavskiy has posted a message to the core-libs-dev mailing list titled “The new optimized version of Dual-Pivot Quicksort” in which Yaroslavskiy writes of an “optimized and faster version of Dual-Pivot Quicksort” that he has “been working on … for the last ...

Read More »

10 reasons to Learn Scala Programming Language

One of the questions my reader often ask me is, shall I learn Scala? Does Scala has better future than Java, or why Java developer should learn Scala and so on. Well, there can be many reasons for learning Scala e.g. you are forced to learn because it been used in the new company you joined or your solution architect ...

Read More »

When You Have A Blockchain, Everything Looks Like a Nail

Blockchain, AI, big data, NoSQL, microservices, single page applications, cloud, SOA. What do these have in common? They have been or are hyped. At some point they were “the big thing” du jour. Everyone was investigating the possibility of using them, everyone was talking about them, there were meetups, conferences, articles on Hacker news and reddit. There are more examples, ...

Read More »

Using @Alternative in CDI application

java-interview-questions-answers

There are many scenarios where you might want to have more that one version of a bean and use it for different purposes. The typical justification for an alternative bean is for testing purposes where the alternative bean presents mock data. The benefit it that the live system that the ‘real’ bean must connect to in order to obtain live ...

Read More »

Configuring HTTPS for use with Servlets

java-interview-questions-answers

To configure your Java EE application to communicate over HTTPS requires a few lines of XML in the web.xml file. The web.xml file is located in the WEB-INF directory of your project and is usually created automatically when your IDE generates a Java EE web application. If it is not you can create it yourself. Motivation for HTTPS The reasons ...

Read More »

Refactoring stringly-typed systems

Last year I joined a project that was taken over from another software house that failed to satisfy client demands. As you can probably tell there were many things that could and should be improved in that “inherited” project and its codebase. Sadly (but not surprisingly) the domain model was one of such orphaned, long-forgotten areas that screamed for help ...

Read More »

Immutable Versus Unmodifiable in JDK 10

Nearly two months ago, Stuart Marks wrote, “Immutability is like wine.” He then reminded readers of Schopenhauer’s Law of Entropy: “If you put a spoonful of wine in a barrel full of sewage, you get sewage. If you put a spoonful of sewage in a barrel full of wine, you get sewage.” With that provided background, Marks applied Schopenhauer’s Law ...

Read More »

How Http Basic Authentication works in Spring Security?

spring-interview-questions-answers

In the last article, you have learned how to enable Http basic authentication in Spring security based Java application and now we’ll go one step further to understand how exactly http basic authentication works in Spring security. If you remember, when you use HTTP Basic for authentication purpose the client e.g. browser or a rest client sends login credentials in http ...

Read More »