Date: Tuesday, 18 Feb 2014 00:00
One of the techniques we use to ensure that a non-threadsafe class can still be used by multiple threads is to give each thread its own instance. We call this "thread confinement". In this newsletter we look at some of the issues that can happen when this instance leaks.
Date: Tuesday, 11 Feb 2014 00:00
Heavily contended concurrent constructs may benefit from a small pause after a CAS failure, but this may lead to worse performance if we do more work in between each update attempt. In this follow-up newsletter, we show how adding CPU consumption can change our performance characteristics.
Date: Friday, 07 Feb 2014 00:00
What is faster? Synchronized or Atomic compare-and-set? In this newsletter we look at some surprising results when we run Java on the new i7 chip.
Date: Monday, 30 Dec 2013 00:00
Software engineers need to have a good understanding of mathematics. In this newsletter, we review a book written by a geek and aimed at the geek who wants to discover interesting facts about maths.
Date: Monday, 02 Dec 2013 00:00
Java 8 includes a new synchronization mechanism called StampedLock. It differentiates between exclusive and non-exclusive locks, similar to the ReentrantReadWriteLock. However, it also allows for optimistic reads, which is not supported by the ReentrantReadWriteLock. In this newsletter, we look at some idioms on how to use this new synchronizer.
Date: Thursday, 10 Oct 2013 00:00
CompletionService queues finished tasks, making it easier to retrieve Futures in order of completion. But it lacks some basic functionality, such as a count of how many tasks have been submitted.
Date: Friday, 20 Sep 2013 00:00
When a thread is interrupted, we need to be careful to not create a livelock in our code by re-interrupting without returning from the method.
Date: Friday, 19 Jul 2013 00:00
Maps and Sets in Java have some similarities. In this newsletter we show a nice little trick for converting a map class into a set.
Date: Thursday, 30 May 2013 00:00
We continue our discussion on Unicode by looking at how we can compare text that uses diacritical marks or special characters such as the German Umlaut.
Date: Wednesday, 22 May 2013 00:00
In this newsletter we investigate what can go wrong when we call methods from constructors, showing examples from the JDK, Glassfish, Spring Framework and some other well known frameworks..
Date: Thursday, 11 Apr 2013 00:00
Unicode is the most important computing industry standard for representation and handling of text, no matter which of the world's writing systems is used. This newsletter discusses some selected features of Unicode, and how they might be dealt with in Java.
Date: Sunday, 31 Mar 2013 00:00
How can you set a field at point of declaration if its constructor throws a checked exception?
Date: Thursday, 27 Dec 2012 00:00
The trend of marking parameters and local variables as "final" does not really enhance your code, nor does it make it more secure.
Date: Tuesday, 13 Nov 2012 00:00
We present a new type of ExecutorService that allows users to "stripe" their execution in such a way that all tasks belonging to one stripe are executed in-order.
Date: Monday, 27 Aug 2012 00:00
Rule Based Programming, a declarative programming paradigm, is based on logical patterns to select data and associate it with processing instructions. This is a more indirect method than the sequential execution steps of an imperative programming language.
Date: Monday, 06 Aug 2012 00:00
Ben Evans and Martijn Verburg explain to us in their new book what it takes to be a well-grounded Java developer. The book contains a section on the new Java 7 features and also vital techniques that we use for producing robust and performant systems.
Date: Wednesday, 13 Jun 2012 00:00
It is possible to use the break statement to jump out to the end of a labelled scope, resulting in some strange looking code, almost like the GOTO statement in C.
Date: Monday, 28 May 2012 00:00
In this newsletter, it is up to you to figure out how we improved the performance of our previous Fibonacci newsletter by 25%.
Date: Thursday, 24 May 2012 00:00
The new Java 7 Fork/Join Framework allows us to define our algorithms using recursion and then to easily parallelize them. In this newsletter we describe how that works using a fast Fibonacci algorithm that uses the sum of the squares rather than brute force. We also present a faster algorithm for multiplying two large BigInteger numbers, using the Fork/Join Framework and the Karatsuba algorithm.
Date: Monday, 26 Mar 2012 00:00
Every Java programmer I have met knows that they should know more about concurrency. But it is a topic that is quite hard to learn. In this newsletter I give some tips on how you can become proficient in concurrency.
» You can also retrieve older items : Read
» © All content and copyrights belong to their respective authors.«
» © FeedShow - Online RSS Feeds Reader