<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Stefano Fago on foojay.io - Friends of OpenJDK</title><link>https://foojayio.github.io/website/today/author/stefano-fago/</link><description>Articles written by Stefano Fago on foojay.io - Friends of OpenJDK</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 24 Jun 2026 07:38:07 +0000</lastBuildDate><atom:link href="https://foojayio.github.io/website/today/author/stefano-fago/index.xml" rel="self" type="application/rss+xml"/><item><title>double, BigDecimal, or Fixed-Point? Precision, Performance, and Sane Choices for Numbers in Java</title><link>https://foojayio.github.io/website/today/double-bigdecimal-or-fixed-point-precision-performance-and-sane-choices-for-numbers-in-java/</link><pubDate>Wed, 24 Jun 2026 07:38:07 +0000</pubDate><guid>https://foojayio.github.io/website/today/double-bigdecimal-or-fixed-point-precision-performance-and-sane-choices-for-numbers-in-java/</guid><description>&lt;p&gt;There is an evergreen debate in the Java world: &lt;em&gt;Should you always use&lt;/em&gt; &lt;code&gt;MARKDOWN_HASHeb731dbabfc7392f8ad8c1cdb326a26aMARKDOWN&lt;/code&gt;&lt;em&gt;HASH&lt;/em&gt; for money?&lt;/p&gt;
&lt;p&gt;The short answer is &lt;strong&gt;no&lt;/strong&gt; . The real answer is: &lt;em&gt;it depends on your computational context: the precision you need, the rounding rules you must follow, and the performance budget you have.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;The problem is that this conversation is often driven by dogma rather than engineering. You hear statements like &amp;ldquo;&lt;code&gt;double&lt;/code&gt; is broken,&amp;rdquo; &amp;ldquo;&lt;code&gt;BigDecimal&lt;/code&gt; is slow,&amp;rdquo; &amp;ldquo;always use fixed-point,&amp;rdquo; or &amp;ldquo;always use IEEE 754,&amp;rdquo; each treated as an absolute truth. Reality is more nuanced and more interesting.&lt;/p&gt;</description></item><item><title>Clean your Memory: From Finalize to Cleaner</title><link>https://foojayio.github.io/website/today/clean-memory-from-finalize-to-cleaner/</link><pubDate>Mon, 31 Mar 2025 12:30:08 +0000</pubDate><guid>https://foojayio.github.io/website/today/clean-memory-from-finalize-to-cleaner/</guid><description>&lt;p&gt;Garbage collection in Java takes care of memory management, but it does not clean up non-memory resources like sockets or file handles.&lt;/p&gt;
&lt;p&gt;Resource leaks may occur without proper management, leading to performance degradation or crashes.&lt;/p&gt;
&lt;p&gt;Java&amp;rsquo;s &lt;a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/ref/Cleaner.html" target="_blank" rel="noopener noreferrer"&gt;Cleaner API&lt;/a&gt;
, introduced in Java 9, provides a modern and efficient mechanism for resource cleanup when objects are no longer reachable.&lt;/p&gt;
&lt;p&gt;It addresses the shortcomings of the deprecated finalize() method, offering a predictable and efficient way to manage non-memory resources: so let&amp;rsquo;s take a short trip on clean memory from finalize to Cleaner API.&lt;/p&gt;</description></item></channel></rss>