Profiling in Production

If you ever had some serious issues with a performance of your Java application, most probably you know how valuable thread profiling can be. But do you know which profiler you should use?   There are two basic techniques used by profilers – sampling and instrumentation.   Sampling Profilers A sampling profiler involves periodically asking…

Read more...

A Tale of Two Iterators

When you look at the most popular Java interview questions, you might encounter the one about fail-fast and fail-safe iterators: What’s the difference between fail-fast and fail-safe iterators? The simplified answer is that: Fail-fast iterator throws ConcurrentModificationException if the collection is modified while iterating, but fail-safe doesn’t. Even though it totally makes sense, it’s not…

Read more...