<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Project on mahroot's blog</title><link>https://mahroot.dev/tags/project/</link><description>Recent content in Project on mahroot's blog</description><generator>Hugo</generator><language>en-us</language><copyright>&lt;a href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank" rel="noopener"&gt;CC BY-NC 4.0&lt;/a&gt;</copyright><lastBuildDate>Tue, 13 Jan 2026 19:37:47 +0100</lastBuildDate><atom:link href="https://mahroot.dev/tags/project/index.xml" rel="self" type="application/rss+xml"/><item><title>Crafting My Own Storage Engine-Part 01: Java I/O Fundamentals</title><link>https://mahroot.dev/posts/crafting-my-own-storage-engine-part-01--java-io-fundamentals/</link><pubDate>Tue, 13 Jan 2026 19:37:47 +0100</pubDate><guid>https://mahroot.dev/posts/crafting-my-own-storage-engine-part-01--java-io-fundamentals/</guid><description>&lt;h1 id="the-page-abstraction"&gt;The &amp;ldquo;Page&amp;rdquo; Abstraction&lt;/h1&gt;
&lt;p&gt;so the &lt;code&gt;ByteBuffer&lt;/code&gt; acts like a staging area where we serialize our Java objects (the &lt;code&gt;Page&lt;/code&gt; object) into raw bytes and keep them in RAM using methods like &lt;code&gt;putInt&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;and after that, we need to persist the data to disk — meaning we write those bytes into a file so the data survives after the program stops&lt;/p&gt;
&lt;p&gt;so we have one large file, and since all pages have a fixed size, if we want to write the data for &lt;code&gt;pageId = 14&lt;/code&gt;, we simply compute the offset &lt;code&gt;4096 * 14&lt;/code&gt; and write the buffer at that position using the &lt;code&gt;write&lt;/code&gt; method&lt;/p&gt;</description></item><item><title>Create My Own JCF-week1</title><link>https://mahroot.dev/posts/create-my-own-jcf-week1/</link><pubDate>Sat, 11 Oct 2025 00:59:35 +0200</pubDate><guid>https://mahroot.dev/posts/create-my-own-jcf-week1/</guid><description>&lt;h3 id="jcf-java-collection-framework-hierarchy"&gt;JCF: Java Collection Framework Hierarchy&lt;/h3&gt;
&lt;p&gt;&lt;img src="https://mahroot.dev/images/Pasted%20image%2020251014010626.png" alt="Pasted image 20251014010626"&gt;&lt;/p&gt;
&lt;p&gt;_Bfore starting implementing JCF should you know the Iterable&lt;E&gt; interface&lt;/p&gt;
&lt;h1 id="1-iterable"&gt;1. Iterable&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Iterable interface is a builtin interface in java it allow us using &amp;ldquo;for-each&amp;rdquo; loop thanks to Iterator method&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;let&amp;rsquo;s take an example
if you work with arrays in java and suppose you create an new array&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-java" data-lang="java"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;int&lt;/span&gt;&lt;span style="color:#f92672"&gt;[]&lt;/span&gt; arr &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;new&lt;/span&gt; Interger&lt;span style="color:#f92672"&gt;[]&lt;/span&gt;{1,2,3}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;and you want to make the forEach loop like this &lt;code&gt;for(int n : arr)&lt;/code&gt; =&amp;gt; this will give you a compiler error&lt;/p&gt;</description></item></channel></rss>