<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Debugging on foojay.io - Friends of OpenJDK</title><link>https://foojayio.github.io/website/today/category/debugging/</link><description>Recent content in Debugging on foojay.io - Friends of OpenJDK</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sun, 28 Jun 2026 07:19:42 +0000</lastBuildDate><atom:link href="https://foojayio.github.io/website/today/category/debugging/index.xml" rel="self" type="application/rss+xml"/><item><title>AI-Assisted Unused &amp; Dead Code Removal</title><link>https://foojayio.github.io/website/today/ai-assisted-unused-dead-code-removal/</link><pubDate>Sun, 28 Jun 2026 07:19:42 +0000</pubDate><guid>https://foojayio.github.io/website/today/ai-assisted-unused-dead-code-removal/</guid><description>&lt;h2 id="h-why-your-codebase-is-forcing-ai-to-underperform-and-what-to-do-about-it"&gt;Why Your Codebase Is Forcing AI to Underperform, and What to Do About It&lt;/h2&gt;
&lt;figure class="alignleft size-large is-resized"&gt;
 &lt;img fetchpriority="high" decoding="async" width="1024" height="576" src="ai-assisted-dead-code-removal-1024x576.avif" alt="" class="wp-image-124402" style="width:250px"&gt;
&lt;/figure&gt;
&lt;p&gt;Your AI coding assistant is only as good as the codebase it works on. If your Java application carries years of dead &amp;amp; unused code, and most do, the AI spends its reasoning budget on code that nobody runs. The result is more hallucinations, worse suggestions, and higher token costs. Here&amp;rsquo;s what to do about it.&lt;/p&gt;</description></item><item><title>Enabling AI Agents to Use a Real Debugger Instead of Logging</title><link>https://foojayio.github.io/website/today/enabling-ai-agents-to-use-a-real-debugger-instead-of-logging/</link><pubDate>Mon, 16 Feb 2026 21:12:13 +0000</pubDate><guid>https://foojayio.github.io/website/today/enabling-ai-agents-to-use-a-real-debugger-instead-of-logging/</guid><description>&lt;p&gt;Every Java developer has been there. Something breaks, and the first instinct is to litter the code with &lt;code&gt;System.out.println(&amp;quot;&amp;gt;&amp;gt;&amp;gt; HERE 1&amp;quot;)&lt;/code&gt;. Then &lt;code&gt;HERE 2&lt;/code&gt;. Then &lt;code&gt;HERE 3 --- value is: &amp;quot; + x&lt;/code&gt;. Rebuild. Rerun. Stare at the console. Repeat.&lt;/p&gt;
&lt;p&gt;We&amp;rsquo;ve been doing this for decades. And now, so have our AI agents.&lt;/p&gt;
&lt;p&gt;When you ask an AI coding assistant to debug a Java application, it almost always reaches for the same playbook: add logging statements, recompile, rerun, read the output, and reason about what happened. It&amp;rsquo;s the &lt;code&gt;println&lt;/code&gt; debugging loop, automated &amp;mdash; but it&amp;rsquo;s still &lt;code&gt;println&lt;/code&gt; debugging.&lt;/p&gt;</description></item><item><title>Unikernel: Profiling and Troubleshooting JVM on Nanos Unikernel</title><link>https://foojayio.github.io/website/today/unikernel-profiling-and-troubleshooting-jvm-on-nanos-unikernel/</link><pubDate>Wed, 11 Feb 2026 13:50:41 +0000</pubDate><guid>https://foojayio.github.io/website/today/unikernel-profiling-and-troubleshooting-jvm-on-nanos-unikernel/</guid><description>&lt;h3 id="h3-0-profiling-a-java-application-running-inside-an-unikernel-with-jprofiler"&gt;Profiling a Java Application Running Inside an Unikernel with JProfiler&lt;/h3&gt;
&lt;p&gt;Unikernels are often associated with minimalism and tight resource control.&lt;/p&gt;
&lt;p&gt;But can we profile a Java application running inside a unikernel using a standard JVM profiler?&lt;/p&gt;
&lt;p&gt;The answer is yes.&lt;/p&gt;
&lt;p&gt;In this guide, we will walk step by step through profiling a Quarkus&lt;/p&gt;
&lt;p&gt;application running inside a Nanos unikernel using &lt;strong&gt;JProfiler&lt;/strong&gt; and&lt;br&gt;
&lt;strong&gt;IBM Semeru JRE 25 (OpenJ9)&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;No special hacks. Just standard JVM tooling.&lt;/p&gt;</description></item><item><title>The Art of Performance Tuning: Why Saving 30% in the Cloud Means Nothing if Your Code Wastes 1000× More</title><link>https://foojayio.github.io/website/today/the-art-of-performance-tuning-why-saving-30-in-the-cloud-means-nothing-if-your-code-wastes-1000x-more/</link><pubDate>Tue, 25 Nov 2025 06:46:00 +0000</pubDate><guid>https://foojayio.github.io/website/today/the-art-of-performance-tuning-why-saving-30-in-the-cloud-means-nothing-if-your-code-wastes-1000x-more/</guid><description>&lt;h2 id="h2-0-the-hidden-cost-of-good-enough-code"&gt;The Hidden Cost of &amp;ldquo;Good Enough&amp;rdquo; Code&lt;/h2&gt;
&lt;p&gt;A few weeks ago, Kirk Pepperdine published a fascinating performance challenge &amp;mdash; a small Java code snippet that appeared trivial but produced puzzling runtime behavior.&lt;/p&gt;
&lt;p&gt;He invited readers to take a shot at solving it. If you haven&amp;rsquo;t seen it yet, stop here for a moment and try it yourself &amp;mdash; and when you&amp;rsquo;re done, check his Kirk&amp;rsquo;s official solution&lt;/p&gt;
&lt;p&gt;When I saw it, I thought it would be a fun exercise to revisit some fundamentals &amp;mdash; but the deeper I went, the more I realized it wasn&amp;rsquo;t just about performance. It was about how we think.&lt;/p&gt;</description></item><item><title>Spring AI Debugging + How to Contribute to Open Source</title><link>https://foojayio.github.io/website/today/breaktime-tech-talks-ep38-spring-ai-debugging-how-to-contribute-to-open-source/</link><pubDate>Wed, 02 Apr 2025 05:56:01 +0000</pubDate><guid>https://foojayio.github.io/website/today/breaktime-tech-talks-ep38-spring-ai-debugging-how-to-contribute-to-open-source/</guid><description>&lt;p&gt;In this episode, I continue my journey with vector databases, integrating &lt;a href="https://docs.spring.io/spring-ai/reference/api/vectordbs/pinecone.html" target="_blank" rel="noopener noreferrer"&gt;Pinecone&lt;/a&gt;
, &lt;a href="https://docs.spring.io/spring-ai/reference/api/vectordbs/neo4j.html" target="_blank" rel="noopener noreferrer"&gt;Neo4J&lt;/a&gt;
 , and &lt;a href="https://docs.spring.io/spring-ai/reference/index.html" target="_blank" rel="noopener noreferrer"&gt;Spring AI&lt;/a&gt;
. While making some progress, I also encountered hurdles, such as evolving APIs and the unique architecture of vector stores.&lt;/p&gt;
&lt;p&gt;Next, I share insights from &lt;a href="https://dzone.com/articles/why-and-how-to-participate-in-open-source-projects" target="_blank" rel="noopener noreferrer"&gt;an article on contributing to open-source source projects&lt;/a&gt;
, how it can accelerate your career and enhance both your technical and soft skills. From picking the right project to building credibility within the community, it&amp;rsquo;s a series of steps that gets better with time and practice!&lt;/p&gt;</description></item><item><title>The slow Death of the onjcmd Debugger Feature</title><link>https://foojayio.github.io/website/today/the-slow-death-of-the-onjcmd-debugger-feature/</link><pubDate>Sat, 18 Jan 2025 10:47:30 +0000</pubDate><guid>https://foojayio.github.io/website/today/the-slow-death-of-the-onjcmd-debugger-feature/</guid><description>&lt;p&gt;Almost to the day, one and a quarter years ago, I published my blog post called &lt;a href="https://foojayio.github.io/website/today/level-up-your-java-debugging-skills-with-on-demand-debugging/"&gt;Level-up your Java Debugging Skills with on-demand Debugging&lt;/a&gt;
. In this artucle, I wrote about multiple rarely known and rarely used features of the Java debugging agent, including the onjcmd feature.{#block-a9c8a1e1-3105-4ea3-80ff-84fea4726402}&lt;/p&gt;
&lt;p&gt;To quote my own article:{#block-a9c8a1e1-3105-4ea3-80ff-84fea4726402}&lt;/p&gt;
&lt;blockquote&gt;
&lt;h2 id="block-34217269-4b27-4330-a4cb-2c66085f9a1c"&gt;JCmd triggered debugging&lt;/h2&gt;
&lt;p&gt;There are often cases where the code that you want to debug is executed later in your program&amp;rsquo;s run or after a specific issue appears. So don&amp;rsquo;t waste time running the debugging session from the start of your program, but use the &lt;code&gt;onjcmd=y&lt;/code&gt; option to tell the JDWP agent to wait with the debugging session till it is triggered via &lt;code&gt;jcmd&lt;/code&gt;.{#block-19cdbfac-1c23-4648-af2f-6bd2f85951c2}&lt;/p&gt;</description></item><item><title>Front End Debugging Part 2: Console.log() to the Max</title><link>https://foojayio.github.io/website/today/front-end-debugging-part-2-console-log-to-the-max/</link><pubDate>Tue, 03 Dec 2024 16:28:40 +0000</pubDate><guid>https://foojayio.github.io/website/today/front-end-debugging-part-2-console-log-to-the-max/</guid><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="#understanding-frontend-logging-vs-backend-logging"&gt;&lt;strong&gt;Understanding Front-End Logging vs. Back-End Logging&lt;/strong&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#leveraging-console-log-levels"&gt;&lt;strong&gt;Leveraging Console Log Levels&lt;/strong&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#customizing-console-output-with-css"&gt;&lt;strong&gt;Customizing Console Output with CSS&lt;/strong&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#stack-tracing-with-consoletrace"&gt;&lt;strong&gt;Stack Tracing with console.trace()&lt;/strong&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#assertions-for-designbycontract"&gt;&lt;strong&gt;Assertions for Design-by-Contract&lt;/strong&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#printing-tables-for-clearer-data-visualization"&gt;&lt;strong&gt;Printing Tables for Clearer Data Visualization&lt;/strong&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#copying-objects-to-the-clipboard"&gt;&lt;strong&gt;Copying Objects to the Clipboard&lt;/strong&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#inspecting-with-consoledir-and-dirxml"&gt;&lt;strong&gt;Inspecting with console.dir() and dirxml()&lt;/strong&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#counting-function-calls"&gt;&lt;strong&gt;Counting Function Calls&lt;/strong&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#organizing-logs-with-groups"&gt;&lt;strong&gt;Organizing Logs with Groups&lt;/strong&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#chromespecific-debugging-features"&gt;&lt;strong&gt;Chrome-Specific Debugging Features&lt;/strong&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#final-word"&gt;&lt;strong&gt;Final Word&lt;/strong&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In &lt;a href="https://foojayio.github.io/website/today/front-end-debugging-part-1-not-just-console-log/"&gt;my previous article&lt;/a&gt;
, I talked about why &lt;code&gt;Console.log()&lt;/code&gt; isn&amp;rsquo;t the most effective debugging tool. In this installment, we will do a bit of an about-face and discuss the ways in which &lt;code&gt;Console.log()&lt;/code&gt; is fantastic. Let&amp;rsquo;s break down some essential concepts and practices that can make your debugging life much easier and more productive.&lt;/p&gt;</description></item><item><title>Front End Debugging Part 1: Not just Console Log</title><link>https://foojayio.github.io/website/today/front-end-debugging-part-1-not-just-console-log/</link><pubDate>Tue, 05 Nov 2024 14:01:45 +0000</pubDate><guid>https://foojayio.github.io/website/today/front-end-debugging-part-1-not-just-console-log/</guid><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="#instant-debugging-with-the-raw-debugger-endraw-keyword"&gt;&lt;strong&gt;Instant Debugging with the&lt;/strong&gt; &lt;code&gt;debugger&lt;/code&gt; Keyword&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#triggering-debugging-from-the-console"&gt;&lt;strong&gt;Triggering Debugging from the Console&lt;/strong&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#dom-breakpoints-monitoring-dom-changes"&gt;&lt;strong&gt;DOM Breakpoints: Monitoring DOM Changes&lt;/strong&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#xhr-breakpoints-uncovering-hidden-network-calls"&gt;&lt;strong&gt;XHR Breakpoints: Uncovering Hidden Network Calls&lt;/strong&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#simulating-environments-for-debugging"&gt;&lt;strong&gt;Simulating Environments for Debugging&lt;/strong&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#debugging-layout-and-style-issues"&gt;&lt;strong&gt;Debugging Layout and Style Issues&lt;/strong&gt;&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="#final-word"&gt;Final Word&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;As a Java developer, most of my focus is on the backend side of debugging. Front-end debugging poses different challenges and has sophisticated tools of its own. Unfortunately, print-based debugging has become the norm in front-end. To be fair, it makes more sense there as the cycles are different and the problem is always a single user problem. But even if you choose to use &lt;code&gt;Console.log&lt;/code&gt;, there&amp;rsquo;s a lot of nuance to pick up there.&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>The Art of Full Stack Debugging</title><link>https://foojayio.github.io/website/today/the-art-of-full-stack-debugging/</link><pubDate>Fri, 25 Oct 2024 07:24:06 +0000</pubDate><guid>https://foojayio.github.io/website/today/the-art-of-full-stack-debugging/</guid><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="#full-stack-development-a-shifting-definition"&gt;Full Stack Development, A Shifting Definition&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="#the-full-stack-debugging-approach"&gt;The Full Stack Debugging Approach&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#frontend-debugging-tools-and-techniques"&gt;Frontend Debugging: Tools and Techniques&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="#it-isnt-just-consolelog"&gt;It isn&amp;rsquo;t &amp;ldquo;Just Console.log&amp;rdquo;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#the-power-of-developer-tools"&gt;The Power of Developer Tools&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#tackling-code-obfuscation"&gt;Tackling Code Obfuscation&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#debugging-across-layers"&gt;Debugging Across Layers&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="#isolating-issues-across-the-stack"&gt;Isolating Issues Across the Stack&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#the-importance-of-systemlevel-debugging"&gt;The Importance of System-Level Debugging&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#embracing-complexity"&gt;Embracing Complexity&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#conclusion"&gt;Conclusion&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="h3-0-full-stack-development-is-often-likened-to-an-intricate-balancing-act-where-developers-are-expected-to-juggle-multiple-responsibilities-across-the-frontend-backend-database-and-beyond-as-the-definition-of-full-stack-development-continues-to-evolve-so-too-does-the-approach-to-debugging"&gt;Full stack development is often likened to an intricate balancing act, where developers are expected to juggle multiple responsibilities across the frontend, backend, database, and beyond. As the definition of full stack development continues to evolve, so too does the approach to debugging.&lt;/h3&gt;
&lt;p&gt;Full stack debugging is an essential skill for developers, as it involves tracking issues through multiple layers of an application, often navigating domains where one&amp;rsquo;s knowledge may only be cursory. In this blog post I aim to explore the nuances of full stack debugging, offering practical tips and insights for developers navigating the complex web of modern software development.&lt;/p&gt;</description></item><item><title>Profile IntelliJ IDEA with its own profiler</title><link>https://foojayio.github.io/website/today/profile-intellij-idea-with-its-own-profiler/</link><pubDate>Wed, 16 Oct 2024 15:49:38 +0000</pubDate><guid>https://foojayio.github.io/website/today/profile-intellij-idea-with-its-own-profiler/</guid><description>&lt;p&gt;Other languages: &lt;a href="https://flounder.dev/es/posts/profile-idea-with-idea/" target="_blank" rel="noopener noreferrer"&gt;Español&lt;/a&gt;
 &lt;a href="https://flounder.dev/ko/posts/profile-idea-with-idea/" target="_blank" rel="noopener noreferrer"&gt;한국어&lt;/a&gt;
 &lt;a href="https://flounder.dev/pt/posts/profile-idea-with-idea/" target="_blank" rel="noopener noreferrer"&gt;Português&lt;/a&gt;
 &lt;a href="https://flounder.dev/zh/posts/profile-idea-with-idea/" target="_blank" rel="noopener noreferrer"&gt;中文&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Just like my &lt;a href="https://foojayio.github.io/website/today/debugger-godmode-hacking-a-jvm-application-with-the-debugger/"&gt;previous post&lt;/a&gt;
, this one is going to be slightly meta. Obviously, you can use IntelliJ IDEA &lt;a href="https://flounder.dev/posts/get-started-with-profiling/" target="_blank" rel="noopener noreferrer"&gt;to profile another process&lt;/a&gt;
, but did you know IntelliJ IDEA can profile itself?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This might be useful if you are writing an &lt;a href="https://plugins.jetbrains.com/docs/intellij/sdk.html" target="_blank" rel="noopener noreferrer"&gt;IntelliJ IDEA plugin&lt;/a&gt;
 and need to address issues related to your plugin&amp;rsquo;s performance.&lt;/p&gt;
&lt;p&gt;Also, regardless of whether you are a plugin author, the described case might be interesting to you because the profiling strategy that I&amp;rsquo;ll cover is not exclusive to IntelliJ IDEA &amp;ndash; you can use it to troubleshoot similar bottlenecks in other types of projects and using other tools.&lt;/p&gt;</description></item><item><title>Foojay Podcast #58: How Java Developers Can Secure Their Code</title><link>https://foojayio.github.io/website/today/foojay-podcast-58/</link><pubDate>Mon, 30 Sep 2024 07:43:46 +0000</pubDate><guid>https://foojayio.github.io/website/today/foojay-podcast-58/</guid><description>&lt;p&gt;Three years after Log4Shell caused a significant security issue, we still struggle with insecure dependencies and injection problems.&lt;/p&gt;
&lt;p&gt;In this podcast, we&amp;rsquo;ll discuss how developers can secure their code.&lt;/p&gt;
&lt;p&gt;I talked with three authors who posted a security and code quality post on Foojay.io.&lt;/p&gt;
&lt;h2 id="h2-0-video"&gt;Video&lt;/h2&gt;
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
			&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/sRVcqILDuSo?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
		&lt;/div&gt;

&lt;h2 id="h2-1-podcast-apps"&gt;Podcast Apps&lt;/h2&gt;
&lt;p&gt;You can listen and subscribe to the Foojay Podcast on:&lt;/p&gt;</description></item><item><title>Trash Pandas Love Enterprise Java Garbage Code</title><link>https://foojayio.github.io/website/today/trash-pandas-love-enterprise-java-garbage-code/</link><pubDate>Tue, 13 Aug 2024 08:16:55 +0000</pubDate><guid>https://foojayio.github.io/website/today/trash-pandas-love-enterprise-java-garbage-code/</guid><description>&lt;p&gt;&lt;strong&gt;If raccoons were software engineers, they would feel at home inside many enterprise systems. These systems are often full of unused and dead code that was written, fully tested, then altered in a way that prevents teams from ever running it.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This garbage code &amp;mdash; a raccoon&amp;rsquo;s favorite &amp;mdash; is a maintenance burden that developers must work around to keep passing tests while other major changes are made. This code often doesn&amp;rsquo;t end up in the trash because it&amp;rsquo;s hard to know what can be safely removed without breaking the application. But you can better identify bad code if you understand how to look for it.&lt;/p&gt;</description></item><item><title>Allocation Profiling in Java</title><link>https://foojayio.github.io/website/today/get-started-with-allocation-profiling/</link><pubDate>Fri, 09 Aug 2024 08:44:59 +0000</pubDate><guid>https://foojayio.github.io/website/today/get-started-with-allocation-profiling/</guid><description>&lt;p&gt;&lt;strong&gt;Read in other languages&lt;/strong&gt; : &lt;a href="https://flounder.dev/zh/posts/allocation-profiling/" target="_blank" rel="noopener noreferrer"&gt;中文&lt;/a&gt;
 &lt;a href="https://flounder.dev/es/posts/allocation-profiling/" target="_blank" rel="noopener noreferrer"&gt;Español&lt;/a&gt;
 &lt;a href="https://flounder.dev/pt/posts/allocation-profiling/" target="_blank" rel="noopener noreferrer"&gt;Português&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;We often find ourselves in situations when code is not working properly, and we have no idea where to even begin investigating.&lt;/p&gt;
&lt;p&gt;Can&amp;rsquo;t we just stare at the code until the solution eventually comes to us? Sure, but this method probably won&amp;rsquo;t work without deep knowledge of the project and a lot of mental effort. A smarter approach would be to use the tools you have at hand. They can point you in the right direction.&lt;/p&gt;</description></item><item><title>Failure is Required: Understanding Fail-Safe &amp; Fail-Fast Strategies</title><link>https://foojayio.github.io/website/today/failure-is-required-understanding-fail-safe-and-fail-fast-strategies/</link><pubDate>Tue, 30 Jul 2024 08:08:33 +0000</pubDate><guid>https://foojayio.github.io/website/today/failure-is-required-understanding-fail-safe-and-fail-fast-strategies/</guid><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="#failfast"&gt;Fail-Fast&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#failsafe"&gt;Fail-Safe&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#choosing-between-failfast-and-failsafe"&gt;Choosing Between Fail-Fast and Fail-Safe&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="#balancing-both"&gt;Balancing Both&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#consistent-layer-behavior"&gt;Consistent Layer Behavior&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#retrys-are-not-failsafe"&gt;Retry&amp;rsquo;s Are not Fail-Safe&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#redefining-failure"&gt;Redefining Failure&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="#data-corruption"&gt;Data Corruption&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#dont-fix-the-bug"&gt;Don&amp;rsquo;t Fix the Bug&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#debugging-failure"&gt;Debugging Failure&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="#avoiding-cascading-failure"&gt;Avoiding Cascading Failure&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#hybrid-in-production"&gt;Hybrid in Production&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#final-word"&gt;Final Word&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Failures in software systems are inevitable. How these failures are handled can significantly impact system performance, reliability, and the business&amp;rsquo;s bottom line.&lt;/p&gt;
&lt;p&gt;In this article, I want to discuss the upside of failure. Why you should seek failure, why failure is good and why avoiding failure can reduce the reliability of your application. We will start with the discussion of fail-fast vs. fail-safe, this will take us to the second discussion about failures in general.&lt;/p&gt;</description></item><item><title>Mastering Serverless Debugging</title><link>https://foojayio.github.io/website/today/mastering-serverless-debugging/</link><pubDate>Mon, 29 Jul 2024 10:14:26 +0000</pubDate><guid>https://foojayio.github.io/website/today/mastering-serverless-debugging/</guid><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="#introduction-to-serverless-computing"&gt;Introduction to Serverless Computing&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#challenges-of-serverless-debugging"&gt;Challenges of Serverless Debugging&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="#disconnected-environments"&gt;Disconnected Environments&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#lack-of-standardization"&gt;Lack of Standardization&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#limited-debugging-tools"&gt;Limited Debugging Tools&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#concurrency-and-scale"&gt;Concurrency and Scale&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#effective-strategies-for-serverless-debugging"&gt;Effective Strategies for Serverless Debugging&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="#local-debugging-with-ide-remote-capabilities"&gt;Local Debugging with IDE Remote Capabilities&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#using-feature-flags-for-debugging"&gt;Using Feature Flags for Debugging&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#staged-rollouts-and-canary-deployments"&gt;Staged Rollouts and Canary Deployments&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#comprehensive-logging"&gt;Comprehensive Logging&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#embracing-idempotency"&gt;Embracing Idempotency&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#debugging-a-lambda-application-locally-with-aws-sam"&gt;Debugging a Lambda Application Locally with AWS SAM&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="#setting-up-the-local-environment"&gt;Setting Up the Local Environment&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#running-the-hello-world-application-locally"&gt;Running the Hello World Application Locally&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#configuring-remote-debugging"&gt;Configuring Remote Debugging&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#handling-debugger-timeouts"&gt;Handling Debugger Timeouts&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#final-word"&gt;Final Word&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Serverless computing has emerged as a transformative approach to deploying and managing applications. The theory is that by abstracting away the underlying infrastructure, developers can focus solely on writing code.&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>Wireshark &amp; tcpdump: A Debugging Power Couple</title><link>https://foojayio.github.io/website/today/wireshark-tcpdump-a-debugging-power-couple/</link><pubDate>Mon, 08 Jul 2024 14:51:05 +0000</pubDate><guid>https://foojayio.github.io/website/today/wireshark-tcpdump-a-debugging-power-couple/</guid><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="#introduction-to-wireshark"&gt;Introduction to Wireshark&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="#browser-network-monitors"&gt;Browser Network Monitors&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#installation-and-getting-started"&gt;Installation and Getting Started&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#navigating-through-noise-with-filters"&gt;Navigating Through Noise with Filters&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#deep-dive-into-data-analysis"&gt;Deep Dive into Data Analysis&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#beyond-basic-usage"&gt;Beyond Basic Usage&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="#the-basics-of-https-encryption"&gt;The Basics of HTTPS Encryption&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#methods-for-decrypting-https-in-wireshark"&gt;Methods for Decrypting HTTPS in Wireshark&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="#premaster-secret-key-logging"&gt;&lt;strong&gt;Pre-Master Secret Key Logging&lt;/strong&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#using-a-proxy"&gt;&lt;strong&gt;Using a Proxy&lt;/strong&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#integrating-tcpdump-with-wireshark-for-enhanced-network-analysis"&gt;Integrating tcpdump with Wireshark for Enhanced Network Analysis&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#the-role-of-tcpdump-in-network-troubleshooting"&gt;The Role of tcpdump in Network Troubleshooting&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="#key-scenarios-for-tcpdump-usage"&gt;Key Scenarios for tcpdump Usage&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#using-tcpdump-effectively"&gt;Using tcpdump Effectively&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#challenges-and-considerations"&gt;Challenges and Considerations&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#final-word"&gt;Final Word&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Wireshark, the free open-source packet sniffer and network protocol analyzer, has cemented itself as an indispensable tool in network troubleshooting, analysis, and security (on both sides).&lt;/p&gt;</description></item><item><title>Hack a Java application with the debugger</title><link>https://foojayio.github.io/website/today/debugger-godmode-hacking-a-jvm-application-with-the-debugger/</link><pubDate>Thu, 13 Jun 2024 04:58:03 +0000</pubDate><guid>https://foojayio.github.io/website/today/debugger-godmode-hacking-a-jvm-application-with-the-debugger/</guid><description>&lt;p&gt;Read in other languages: &lt;a href="https://flounder.dev/zh/posts/debugger-god-mode/" target="_blank" rel="noopener noreferrer"&gt;中文&lt;/a&gt;
 &lt;a href="https://flounder.dev/es/posts/debugger-god-mode/" target="_blank" rel="noopener noreferrer"&gt;Español&lt;/a&gt;
 &lt;a href="https://flounder.dev/pt/posts/debugger-god-mode/" target="_blank" rel="noopener noreferrer"&gt;Português&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Back in the day, computer games were different. Not only have graphics and mechanics evolved since, but there&amp;rsquo;s also one characteristic that doesn&amp;rsquo;t seem very common in games today: nearly all of them had cheat codes.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Cheat codes were sequences of keys that would give you something extraordinary, such as infinite ammo or the ability to walk through walls. The most common and powerful of them was &amp;lsquo;god mode&amp;rsquo; &amp;ndash; it made you invincible.&lt;/p&gt;</description></item><item><title>Debugging Kubernetes Part 1: An Introduction</title><link>https://foojayio.github.io/website/today/debugging-kubernetes-part-1-an-introduction/</link><pubDate>Wed, 05 Jun 2024 06:12:40 +0000</pubDate><guid>https://foojayio.github.io/website/today/debugging-kubernetes-part-1-an-introduction/</guid><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="#introduction-to-kubernetes-and-distributed-systems"&gt;Introduction to Kubernetes and Distributed Systems&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="#the-evolution-of-deployment-technologies"&gt;The Evolution of Deployment Technologies&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#enter-virtualization"&gt;Enter Virtualization&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#rise-of-containers"&gt;Rise of Containers&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#rise-of-orchestration"&gt;Rise of Orchestration&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#enter-kubernetes"&gt;Enter Kubernetes&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="#why-kubernetes-stands-out"&gt;Why Kubernetes Stands Out&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#kubernetes-for-developers"&gt;Kubernetes For Developers&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="#kubernetes-basics-in-practice"&gt;Kubernetes Basics In Practice&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#final-word"&gt;Final Word&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;While debugging in an IDE or using simple command line tools is relatively straightforward, the real challenge lies in production debugging. Modern production environments have enabled sophisticated self-healing deployments, yet they have also made troubleshooting more complex. Kubernetes (aka k8s) is probably the most well known orchestration production environment. To effectively teach debugging in Kubernetes, it&amp;rsquo;s essential to first introduce its fundamental principles.&lt;/p&gt;</description></item><item><title>Foojay Podcast #50: JCON Report, Part 2 - Maven, Software Security, Code Quality</title><link>https://foojayio.github.io/website/today/foojay-podcast-50/</link><pubDate>Mon, 27 May 2024 08:07:54 +0000</pubDate><guid>https://foojayio.github.io/website/today/foojay-podcast-50/</guid><description>&lt;p&gt;This is part 2 of the interviews we recorded at the JCON conference earlier this month in Germany. In this episode, you get two main topics: &lt;strong&gt;Maven and Code Quality&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;In the first part, you&amp;rsquo;ll hear Karl Heinz Marbaise and Steve Poole discuss the Maven project, the repository, Sonaytype, and the security impact of dependencies.&lt;/p&gt;
&lt;p&gt;But next to security, we developers are also responsible for creating readable and maintainable code. Miro Wengner, Marit van Dijk, and Hinse ter Schuur dive into this topic, in the second part!&lt;/p&gt;</description></item><item><title>Diagnosing user-reported issues using WireQuery</title><link>https://foojayio.github.io/website/today/diagnosing-user-reported-issues-using-wirequery/</link><pubDate>Mon, 13 May 2024 07:11:04 +0000</pubDate><guid>https://foojayio.github.io/website/today/diagnosing-user-reported-issues-using-wirequery/</guid><description>&lt;p&gt;&lt;strong&gt;As a developer, I&amp;rsquo;ve often struggled with diagnosing user-reported issues, which is often caused by a lack of information to reproduce the problem. While a ticket may contain a screenshot of the problem and a description, it often does not portray the complete picture. For example: what did the user do that led up to the issue? What endpoints were called from the frontend, and how did they respond? What did the underlying systems communicate? Etc.&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>Debug Without Breakpoints – Guide to IntelliJ IDEA's Pause</title><link>https://foojayio.github.io/website/today/debug-without-breakpoints/</link><pubDate>Mon, 22 Apr 2024 06:59:28 +0000</pubDate><guid>https://foojayio.github.io/website/today/debug-without-breakpoints/</guid><description>&lt;p&gt;Read in other languages: &lt;a href="https://flounder.dev/zh/posts/debug-without-breakpoints/" target="_blank" rel="noopener noreferrer"&gt;中文&lt;/a&gt;
 &lt;a href="https://flounder.dev/es/posts/debug-without-breakpoints/" target="_blank" rel="noopener noreferrer"&gt;Español&lt;/a&gt;
 &lt;a href="https://flounder.dev/pt/posts/debug-without-breakpoints/" target="_blank" rel="noopener noreferrer"&gt;Português&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;In a typical debugging scenario, you would set breakpoints to tell the debugger when to suspend your program. A breakpoint usually corresponds to the moment that marks the starting point of the further investigation.&lt;/p&gt;
&lt;p&gt;However, in some situations you aren&amp;rsquo;t certain about where to set a breakpoint. Other times, you might prefer to suspend the program at a particular &lt;em&gt;time&lt;/em&gt; rather than aiming at a specific &lt;em&gt;line&lt;/em&gt;.
&lt;img src="https://foojayio.github.io/website/today/debug-without-breakpoints/debug-without-breakpoints-banner-1024x538.png" alt="post banner" loading="lazy"&gt;
&lt;/p&gt;</description></item><item><title>Tips for reading code</title><link>https://foojayio.github.io/website/today/tips-for-reading-code/</link><pubDate>Tue, 26 Mar 2024 11:46:58 +0000</pubDate><guid>https://foojayio.github.io/website/today/tips-for-reading-code/</guid><description>&lt;p&gt;&lt;strong&gt;As developers, we read code more than we write it. When adding new features or fixing bugs, we first need to understand existing code, so we can make the right changes in the right place.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;When reading code inside the IDE, &lt;a href="https://www.jetbrains.com/idea/" target="_blank" rel="noopener noreferrer"&gt;IntelliJ IDEA&lt;/a&gt;
 helps us to read and understand code by providing helpful features like syntax highlighting and inlay hints. But there are more features to help us understand a piece of code.&lt;/p&gt;</description></item><item><title>Java top most detected issues</title><link>https://foojayio.github.io/website/today/top-most-detected-issues-in-java-projects/</link><pubDate>Wed, 14 Feb 2024 09:49:16 +0000</pubDate><guid>https://foojayio.github.io/website/today/top-most-detected-issues-in-java-projects/</guid><description>&lt;p&gt;&lt;strong&gt;Using the telemetry from SonarLint after analyzing thousands of projects, these are the top most raised issues in Java projects.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;We know that having clean code in our projects is important, and every developer would agree on that. But, according to what SonarLint telemetry shows, there are still lots of issues that appear in the huge list of analyzed projects.&lt;/p&gt;
&lt;p&gt;From the SonarLint telemetry for the last 2 years, with more than 2.5 million issues, I have taken the top most common issues happening in Java projects, from the +600 rules covering the language, considering quality and security to see how we can avoid them and align our code a bit more towards having a consistent, intentional, adaptable, and responsible code.&lt;/p&gt;</description></item><item><title>Is JDWP's onjcmd feature worth using?</title><link>https://foojayio.github.io/website/today/is-jdwps-onjcmd-feature-worth-using/</link><pubDate>Mon, 12 Feb 2024 11:25:22 +0000</pubDate><guid>https://foojayio.github.io/website/today/is-jdwps-onjcmd-feature-worth-using/</guid><description>&lt;p&gt;A few months ago, I told you about the onjcmd feature in my blog post &lt;a href="https://foojayio.github.io/website/today/level-up-your-java-debugging-skills-with-on-demand-debugging/"&gt;Level-up your Java Debugging Skills with on-demand Debugging&lt;/a&gt;
 (which is coming to JavaLand 2024). The short version is that adding onjcmd=y to the list of JDWP options allows you to delay accepting the incoming connection request in the JDWP agent until &lt;code&gt;jcmd &amp;lt;JVM pid&amp;gt; VM.start_java_debugging&lt;/code&gt; is called.&lt;/p&gt;
&lt;p&gt;The main idea is that the JDWP agent&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;only listens on the debugging port after it is triggered, which could have some security benefits&lt;/li&gt;
&lt;li&gt;and that the JDWP agent causes less overhead while waiting, compared to just accepting connections from the beginning.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The first point is debatable; one can find arguments for and against it. But for the second point, we can run some benchmarks. After renewed discussions, I started benchmarking to conclude whether the onjcmd feature improves on-demand debugging performance. &lt;em&gt;Spoiler alert: It doesn&amp;rsquo;t.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Java Flight Recording and Analysis with Azul Mission Control</title><link>https://foojayio.github.io/website/today/java-flight-recording-and-analysis-with-azul-mission-control/</link><pubDate>Thu, 25 Jan 2024 07:59:42 +0000</pubDate><guid>https://foojayio.github.io/website/today/java-flight-recording-and-analysis-with-azul-mission-control/</guid><description>&lt;p&gt;&lt;strong&gt;Java Flight Recording (JFR) is a Java Virtual Machine (JVM) profiling and diagnostics tool. It enables you to collect and analyze data regarding the performance and behavior of a Java application. As JFR is included in the JVM, there is no need for additional tools or installations to make recordings of your applications.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;By utilizing JFR, you gain valuable insights into the runtime behavior of your Java applications. It helps you to optimize performance, identify and troubleshoot issues, and ensure better overall reliability. JFR is designed with very low overhead, allowing its use in production environments with minimal impact on the performance of your application.&lt;/p&gt;</description></item><item><title>Who Killed the JVM? Attaching a Debugger Twice</title><link>https://foojayio.github.io/website/today/who-killed-the-jvm-attaching-a-debugger-twice/</link><pubDate>Wed, 06 Dec 2023 17:17:47 +0000</pubDate><guid>https://foojayio.github.io/website/today/who-killed-the-jvm-attaching-a-debugger-twice/</guid><description>&lt;p&gt;A few weeks back, I told you about on-demand debugging in my &lt;a href="https://mostlynerdless.de/blog/2023/10/03/level-up-your-java-debugging-skills-with-on-demand-debugging/" target="_blank" rel="noopener noreferrer"&gt;Level-up your Java Debugging Skills with on-demand Debugging&lt;/a&gt;
 blog post, enabling you to delay a debugging session until:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You gave orders via &lt;code&gt;jcmd&lt;/code&gt; (&lt;code&gt;onjcmd=y&lt;/code&gt; option), a feature contributed by the &lt;a href="https://sapmachine.io" target="_blank" rel="noopener noreferrer"&gt;SapMachine&lt;/a&gt;
 team&lt;/li&gt;
&lt;li&gt;the program threw a specific exception (&lt;code&gt;onthrow=&amp;lt;exception&amp;gt;&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;The program threw an uncaught exception (&lt;code&gt;onuncaught=y&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is quite useful because the JDWP agent has to do substantial initialization before it can start listening for the attaching debugger:&lt;/p&gt;</description></item><item><title>JDWP, onthrow and a mysterious error</title><link>https://foojayio.github.io/website/today/jdwp-onthrow-and-a-mysterious-error/</link><pubDate>Thu, 26 Oct 2023 13:44:01 +0000</pubDate><guid>https://foojayio.github.io/website/today/jdwp-onthrow-and-a-mysterious-error/</guid><description>&lt;p&gt;&lt;strong&gt;In my previous Java-related blog post called &lt;a href="https://foojayio.github.io/website/today/level-up-your-java-debugging-skills-with-on-demand-debugging/"&gt;Level-up your Java Debugging Skills with on-demand Debugging&lt;/a&gt;
, I showed you how to use the &lt;code&gt;onthrow&lt;/code&gt; option of the JDWP agent to start the debugging session on the first throw of a specific exception.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This gave us a mysterious error in JDB:
&lt;img src="https://mostlynerdless.de/wp-content/uploads/2023/10/image-3.png" alt="" loading="lazy"&gt;
&lt;/p&gt;
&lt;p&gt;And I asked if somebody had any ideas. No one had, but I was at Devoxx Belgium and happened to talk with &lt;a href="https://shipilev.net/" target="_blank" rel="noopener noreferrer"&gt;Aleksey Shipilev&lt;/a&gt;
 about it at the Corretto booth:
&lt;img src="https://mostlynerdless.de/wp-content/uploads/2023/10/F7hNsheWUAA0Y46-2000x1500.jpg" alt="" loading="lazy"&gt;
 Two OpenJDK developers having fun at Devoxx: Investigating a jdb bug with Shipilev&lt;br&gt;
in the Coretto booth (&lt;a href="https://twitter.com/parttimen3rd/status/1709201492115095904" target="_blank" rel="noopener noreferrer"&gt;Tweet&lt;/a&gt;
)&lt;/p&gt;</description></item><item><title>Not a Single Trace</title><link>https://foojayio.github.io/website/today/not-a-single-trace/</link><pubDate>Fri, 20 Oct 2023 07:06:31 +0000</pubDate><guid>https://foojayio.github.io/website/today/not-a-single-trace/</guid><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="#the-limiting-factor"&gt;The Limiting Factor&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#strength-in-numbers"&gt;Strength in Numbers&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#example"&gt;Example&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#magical-apis"&gt;Magical APIs&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#final-word"&gt;Final Word&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Your team celebrates a success story where a trace identified a pesky latency issue in your application&amp;rsquo;s authentication service. A fix was swiftly implemented, and we all celebrated a quick win in the next team meeting. But the celebrations are short-lived. Just days later, user complaints surged about a related payment gateway timeout. It turns out that the fix we made did improve performance at one point but created a situation in which key information was never cached. Other parts in the software react badly to the fix and we need to revert the whole thing.&lt;/p&gt;</description></item><item><title>Level-up your Java Debugging Skills with on-demand Debugging</title><link>https://foojayio.github.io/website/today/level-up-your-java-debugging-skills-with-on-demand-debugging/</link><pubDate>Mon, 16 Oct 2023 14:21:24 +0000</pubDate><guid>https://foojayio.github.io/website/today/level-up-your-java-debugging-skills-with-on-demand-debugging/</guid><description>&lt;p&gt;&lt;strong&gt;Debugging is one of the most common tasks in software development, so one would assume that all features of debuggers have ample coverage in tutorials and guides.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Yet there are three hidden gems of the Java Debugging (JDWP) agent that allow you to delay the start of the debugging session until&amp;hellip;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;you gave orders via &lt;code&gt;jcmd&lt;/code&gt; (&lt;code&gt;onjcmd=y&lt;/code&gt; option)&lt;/li&gt;
&lt;li&gt;the program threw a specific exception (&lt;code&gt;onthrow=&amp;lt;exception&amp;gt;&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;the program threw an uncaught exception (&lt;code&gt;onuncaught=y&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Before I tell you more about the specific options, I want to start with the basics of how to apply them.&lt;/p&gt;</description></item><item><title>Debugging Tips and Tricks: A Comprehensive Guide</title><link>https://foojayio.github.io/website/today/debugging-tips-and-tricks-a-comprehensive-guide/</link><pubDate>Mon, 09 Oct 2023 07:12:23 +0000</pubDate><guid>https://foojayio.github.io/website/today/debugging-tips-and-tricks-a-comprehensive-guide/</guid><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="#rubber-ducking-the-art-of-talking-it-out"&gt;&lt;strong&gt;Rubber Ducking: The Art of Talking it Out&lt;/strong&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#moving-the-goalposts-redefining-the-bug"&gt;&lt;strong&gt;Moving the Goalposts: Redefining the Bug&lt;/strong&gt;&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="#the-evolution-of-a-bug"&gt;The Evolution of a Bug&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#the-process-of-redefinition"&gt;The Process of Redefinition&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#flipping-the-direction-multiple-angles-of-attack"&gt;&lt;strong&gt;Flipping the Direction: Multiple Angles of Attack&lt;/strong&gt;&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="#the-linear-approach-to-debugging"&gt;The Linear Approach to Debugging&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#disruptive-environments-exposing-hidden-bugs"&gt;&lt;strong&gt;Disruptive Environments: Exposing Hidden Bugs&lt;/strong&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#leveraging-debugging-extensions-and-tools"&gt;&lt;strong&gt;Leveraging Debugging Extensions and Tools&lt;/strong&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#disconnect-and-reconnect-the-power-of-a-fresh-mindset"&gt;&lt;strong&gt;Disconnect and Reconnect: The Power of a Fresh Mindset&lt;/strong&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#embrace-the-challenge-finding-joy-in-debugging"&gt;&lt;strong&gt;Embrace the Challenge: Finding Joy in Debugging&lt;/strong&gt;&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="#strategies-to-embrace-the-debugging-challenge"&gt;Strategies to Embrace the Debugging Challenge&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#use-a-process"&gt;&lt;strong&gt;Use a Process&lt;/strong&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#conclusion"&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Debugging is an integral part of software development.&lt;/p&gt;</description></item><item><title>The Systemic Process of Debugging</title><link>https://foojayio.github.io/website/today/the-systemic-process-of-debugging/</link><pubDate>Thu, 28 Sep 2023 07:06:14 +0000</pubDate><guid>https://foojayio.github.io/website/today/the-systemic-process-of-debugging/</guid><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="#the-importance-of-issue-tracking"&gt;The Importance of Issue Tracking&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="#avoiding-parallel-work-on-the-same-bug"&gt;Avoiding Parallel Work on the Same Bug&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#the-value-of-issue-over-pull-requests"&gt;The Value of Issue Over Pull Requests&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#communication-issue-tracker-vs-ephemeral-channels"&gt;Communication: Issue Tracker vs. Ephemeral Channels&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="#why-we-sometimes-avoid-the-issue-tracker"&gt;Why We Sometimes Avoid the Issue Tracker&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#the-role-of-daily-meetings"&gt;The Role of Daily Meetings&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#the-role-of-testing-in-debugging"&gt;The Role of Testing in Debugging&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="#starting-with-unit-tests"&gt;Starting with Unit Tests&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#unit-tests-vs-integration-tests"&gt;Unit Tests vs. Integration Tests&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#final-word"&gt;Final Word&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Debugging is an integral part of software development. However, as projects grow in size and complexity, the process of debugging requires more structure and collaboration. This process is probably something you already do as this process is deeply ingrained into most teams.&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>The Evolution of Bugs</title><link>https://foojayio.github.io/website/today/the-evolution-of-bugs/</link><pubDate>Tue, 12 Sep 2023 03:34:48 +0000</pubDate><guid>https://foojayio.github.io/website/today/the-evolution-of-bugs/</guid><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="#memory-management-the-past-and-the-present"&gt;Memory Management: The Past and The Present&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="#the-classic-challenges-memory-leaks-and-corruption"&gt;The Classic Challenges: Memory Leaks and Corruption&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#enter-garbage-collection-a-mixed-blessing"&gt;Enter Garbage Collection: A Mixed Blessing&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#memory-profiling-the-contemporary-solution"&gt;Memory Profiling: The Contemporary Solution&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#concurrency-a-double-edged-sword"&gt;Concurrency: A Double-Edged Sword&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="#the-bright-side-predictable-threading"&gt;The Bright Side: Predictable Threading&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#the-murky-waters-multi-container-concurrency"&gt;The Murky Waters: Multi-Container Concurrency&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#reproducing-the-elusive-threading-bugs"&gt;Reproducing The Elusive: Threading Bugs&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#race-conditions-the-ever-present-ghost"&gt;Race Conditions: The Ever-Present Ghost&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#the-pervasiveness-of-state-bugs"&gt;The Pervasiveness of State Bugs&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="#what-are-state-bugs"&gt;What Are State Bugs?&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#from-simple-variables-to-complex-data-structures"&gt;From Simple Variables to Complex Data Structures&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#interactions-and-events-where-timing-matters"&gt;Interactions and Events: Where Timing Matters&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#persistence-when-bugs-linger"&gt;Persistence: When Bugs Linger&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#concurrency-compounds-state-issues"&gt;Concurrency Compounds State Issues&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#tools-and-strategies-to-combat-state-bugs"&gt;Tools and Strategies to Combat State Bugs&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#exceptions-the-noisy-neighbor"&gt;Exceptions: The Noisy Neighbor&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="#what-are-exceptions"&gt;What Are Exceptions?&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#the-informative-nature-of-exceptions"&gt;The Informative Nature of Exceptions&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#causes-of-exceptions"&gt;Causes of Exceptions&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#handling-exceptions-a-delicate-balance"&gt;Handling Exceptions: A Delicate Balance&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#proactive-prevention"&gt;Proactive Prevention&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#faults-beyond-the-surface"&gt;Faults: Beyond the Surface&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="#what-constitutes-a-fault"&gt;What Constitutes a Fault?&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#origins-of-faults"&gt;Origins of Faults&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#detecting-and-isolating-faults"&gt;Detecting and Isolating Faults&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#addressing-faults"&gt;Addressing Faults&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#the-value-of-learning-from-faults"&gt;The Value of Learning from Faults&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#thread-bugs-unraveling-the-knot"&gt;Thread Bugs: Unraveling the Knot&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="#a-glimpse-into-thread-bugs"&gt;A Glimpse into Thread Bugs&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#the-common-culprits-behind-thread-bugs"&gt;The Common Culprits Behind Thread Bugs&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#diagnosing-the-tangle"&gt;Diagnosing the Tangle&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#untangling-the-knot"&gt;Untangling the Knot&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#race-conditions-always-a-step-ahead"&gt;Race Conditions: Always a Step Ahead&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="#what-exactly-is-a-race-condition"&gt;What Exactly is a Race Condition?&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#why-are-race-conditions-so-tricky"&gt;Why are Race Conditions so Tricky?&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#guarding-against-the-unpredictable"&gt;Guarding Against the Unpredictable&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#testing-for-races"&gt;Testing for Races&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#performance-pitfalls-monitor-contention-and-resource-starvation"&gt;Performance Pitfalls: Monitor Contention and Resource Starvation&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="#monitor-contention-a-bottleneck-in-disguise"&gt;Monitor Contention: A Bottleneck in Disguise&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#why-its-problematic"&gt;Why It&amp;rsquo;s Problematic&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#mitigation-strategies"&gt;Mitigation Strategies&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#resource-starvation-the-silent-performance-killer"&gt;Resource Starvation: The Silent Performance Killer&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#the-impact"&gt;The Impact&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#solutions-to-counteract-starvation"&gt;Solutions to Counteract Starvation&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#the-bigger-picture"&gt;The Bigger Picture&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#final-word"&gt;Final Word&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Programming, regardless of the era, has been riddled with bugs that vary in nature but often remain consistent in their basic problems. Whether we&amp;rsquo;re talking about mobile, desktop, server, or different operating systems and languages, bugs have always been a constant challenge. Here&amp;rsquo;s a dive into the nature of these bugs and how we can tackle them effectively.&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>Understand Stack Traces and how you can Debug Better With them</title><link>https://foojayio.github.io/website/today/understanding-stack-traces-and-debugging-them-further/</link><pubDate>Tue, 05 Oct 2021 10:57:28 +0000</pubDate><guid>https://foojayio.github.io/website/today/understanding-stack-traces-and-debugging-them-further/</guid><description>&lt;p&gt;Recently a junior developer sent me an obfuscated stack trace and was pretty surprised when I instantly knew the problem and pointed him at the necessary change. To be fair, I had the advantage of being the person who put that bug there in the first place&amp;hellip; But still the ability to glean information from a stack trace, even an obfuscated one, is a serious skill.&lt;/p&gt;
&lt;p&gt;The stack trace in question was a &lt;code&gt;ClassNotFoundException&lt;/code&gt;, that&amp;rsquo;s typically pretty easy and already tells you everything you need to know. The class isn&amp;rsquo;t there. Why it isn&amp;rsquo;t there is really a matter of what we did wrong. In this case, since the project was obfuscated, the bug was that this class wasn&amp;rsquo;t excluded from obfuscation.&lt;/p&gt;</description></item></channel></rss>