Java: CyclicBarrier – Explained

Oftentimes it’s necessary to write an application in which there are multiple threads that are mostly independent from one another, but require a sync up occasionally before proceeding. This is a great use case for a CyclicBarrier. It is called a Barrier because it prevents threads from proceeding, and it is called Cyclic because once […]

Java: FutureTask – Explained

Java FutureTasks are a great means of offloading a computation so that you can worry about it later, but they can be tricky to use. In this post we’ll dive into a few examples to explain the utility of this java feature. A bit on Callable Before understanding a FutureTask, we must first understand a […]

Linux Tip: Use sed to replace characters

Sed is often used to replace words in input, but did you know that you can replace a set of characters with another set of corresponding characters? This is accomplished by use of the ‘y’ command. It’s essentially the same as the ‘tr’ utility and works as follows: An example of replacing all uppercase vowels […]