<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Wildan Zulfikar on Medium]]></title>
        <description><![CDATA[Stories by Wildan Zulfikar on Medium]]></description>
        <link>https://medium.com/@wzulfikar?source=rss-e11142da6cb9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*myBs7u8JCWFISuibpIbG1w.jpeg</url>
            <title>Stories by Wildan Zulfikar on Medium</title>
            <link>https://medium.com/@wzulfikar?source=rss-e11142da6cb9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 05 Jun 2026 09:34:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@wzulfikar/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[Code Bites: `isDateRecent`]]></title>
            <link>https://medium.com/@wzulfikar/code-bites-isdaterecent-e1f19e55d319?source=rss-e11142da6cb9------2</link>
            <guid isPermaLink="false">https://medium.com/p/e1f19e55d319</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[code-newbie]]></category>
            <category><![CDATA[code-review]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Wildan Zulfikar]]></dc:creator>
            <pubDate>Sun, 23 Feb 2025 23:13:44 GMT</pubDate>
            <atom:updated>2025-02-23T23:13:44.712Z</atom:updated>
            <content:encoded><![CDATA[<p>A small helper I wrote to check if a date is recent enough so I can use a cached value instead of fetching a fresh one.</p><pre>/**<br> * Check if a date is recent (within a given duration). For convenient,<br> * use `@lukeed/ms` to parse duration from string to milliseconds.<br> */<br>export function isDateRecent(<br>  date: string | Date,<br>  durationMs: number,<br>  dateNow = new Date(),<br>): boolean {<br>  if (typeof date === &#39;string&#39;) date = new Date(date)<br>  if (isNaN(date.getTime())) throw new Error(&#39;Invalid date&#39;)<br>  const diffMs = dateNow.getTime() - date.getTime()<br>  return diffMs &gt; 0 &amp;&amp; diffMs &lt;= durationMs<br>}</pre><p>Honestly, I just wanted a reason to use <a href="https://github.com/lukeed/ms">@lukeed/ms</a> or <a href="https://github.com/kwhitley/itty-time">itty-time</a> but I think it ends up looking good. Here’s an example where I use isDateRecent.</p><pre>import { parse } from &#39;@lukeed/ms&#39;<br><br>const cachedValue = { data: &#39;Hello world&#39;, created_at: &#39;2025-02-02&#39; }<br>const isRecent = isDateRecent(cachedValue.created_at, parse(&#39;1d&#39;))<br>if (isRecent) {<br>  return cachedValue<br>}</pre><p>Assuming today’s date is 2025-02-03, the cachedValue will be returned because it’s still within 1 day.</p><p>That’s it! Two required inputs for one concise output. What do you think? Let me know!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e1f19e55d319" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Between `lib` and `services`]]></title>
            <link>https://medium.com/@wzulfikar/between-lib-and-services-bb8d6c234651?source=rss-e11142da6cb9------2</link>
            <guid isPermaLink="false">https://medium.com/p/bb8d6c234651</guid>
            <category><![CDATA[code-organization]]></category>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[code-newbie]]></category>
            <dc:creator><![CDATA[Wildan Zulfikar]]></dc:creator>
            <pubDate>Sun, 23 Feb 2025 22:34:19 GMT</pubDate>
            <atom:updated>2025-02-23T22:49:05.533Z</atom:updated>
            <content:encoded><![CDATA[<p>After all this time, I still can’t really decide in instant how to organise my codes. I see this as a sign that I don’t really understand the structure or what the codes are doing. Other than components, hooks, and constants, my codes will go under lib by default.</p><p>Note: most of my projects are in Next.js with Typescript, so it’ll be the context of this post.</p><p>Examples of the codes that I have under lib are lib/exa/findXProfileByUsername, lib/x/getProfile, lib/storage/uploadDisplayPicture. Now, I need to implement a “profile finder” flow to find an X profile by a name or username. I created lib/profileFinder which uses the above lib codes under the hood. Soon enough, I hit constraints like rate limit and cost, and so I added caching logic to help with that. My lib/profileFinder is no longer doing one thing and it feels awkward to put this high level logic at the same layer as other lib codes.</p><p>I looked around and wonder if there’s a better place, and asked Grok.</p><p><strong>Me:</strong><em> I have codes under lib folder and services folder. How would you separate the two? Shorten your explanation to 2 sentences.</em></p><p><strong>Grok</strong>: <em>lib folder should hold generic, reusable utilities like helper functions. </em><em>services is for app-specific logic like API calls or business workflows. Keep </em><em>lib independent by letting </em><em>services depend on it, not the other way around.</em></p><p>That clicked. I moved the lib/profileFinder to services/profileFinderService and it doesn’t feel awkward anymore. So this is what I’ll roll with: lib for low level, services for higher level. services will be something that I can use in places closer to the users like an API handler or in command line, which is the door of most business logics. It still calls lib codes under the hood, but the abstraction looks clearer to me.</p><p>Let me know what do you think! I’m putting this here so I can know more about how others do it and improve myself. Cheers!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bb8d6c234651" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The other habit]]></title>
            <link>https://medium.com/@wzulfikar/the-other-habit-d5b2da08f711?source=rss-e11142da6cb9------2</link>
            <guid isPermaLink="false">https://medium.com/p/d5b2da08f711</guid>
            <category><![CDATA[apple-books]]></category>
            <category><![CDATA[reading]]></category>
            <category><![CDATA[books]]></category>
            <category><![CDATA[feedback-loop]]></category>
            <dc:creator><![CDATA[Wildan Zulfikar]]></dc:creator>
            <pubDate>Wed, 24 Jul 2024 18:40:56 GMT</pubDate>
            <atom:updated>2024-07-24T18:40:56.744Z</atom:updated>
            <content:encoded><![CDATA[<p>Continuing from my previous post “<a href="https://medium.com/@wzulfikar/i-picked-new-habit-839e4b172c79">I picked new habit</a>”, one other habit I picked is Apple Books. I like reading. I read physical books, then started reading in Kindle Paperwhite, then moved to Kindle mobile app, and then the built-in Preview app in iOS and macOS, and finally now in Apple Books. I may write a post about why I moved from one tool to another, but this post is about Apple Books.</p><p>Similar to the Brilliant app, Apple Books shows my reading “streak”. And that streak feature has persuaded me once again to keep going. Today I am in my day 37!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dIHuQmMAqAsaz_lj3gEnzA.png" /><figcaption>The home screen of my Apple Books app (iOS)</figcaption></figure><p>It has been fun! I try to spend no more than one hour every day for reading, and I pick books that is relevant to my current situation at home or at work. Current task at work is related to LLM, and reading book related to LLM (currently reading <a href="https://www.amazon.com/Building-LLMs-Production-Reliability-Fine-Tuning/dp/B0D4FFPFW8">Building LLMs for Production</a>) has helped me keep my enthusiasm high in work and in reading. I guess I have created a feedback loop!</p><p>When I started reading this year, I set the goal of reading 4 books. Looks like I finished earlier! So now I am setting it to 12.</p><p>I like it when I finished a book, I stopped for a while to reflect, and start looking at my current situation to think of what topic would be relevant for me. You know, if I see myself as a plant, I would love to see it growing 🌱.</p><p>Stay foolish!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d5b2da08f711" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I picked new habit]]></title>
            <link>https://medium.com/@wzulfikar/i-picked-new-habit-839e4b172c79?source=rss-e11142da6cb9------2</link>
            <guid isPermaLink="false">https://medium.com/p/839e4b172c79</guid>
            <category><![CDATA[streaks]]></category>
            <category><![CDATA[habits]]></category>
            <dc:creator><![CDATA[Wildan Zulfikar]]></dc:creator>
            <pubDate>Wed, 24 Jul 2024 18:15:35 GMT</pubDate>
            <atom:updated>2024-07-24T18:15:35.347Z</atom:updated>
            <content:encoded><![CDATA[<p>I did not think to do it at first, but looking at the “streak” feature of the app, I was persuaded to keep going. It was Brilliant app (<a href="https://brilliant.org">Brilliant.org</a>).</p><figure><img alt="Home screen of Brilliant app (iOS)" src="https://cdn-images-1.medium.com/max/1024/1*rJmobUfCD5LBSTw5xCs9MQ.jpeg" /><figcaption>My Brilliant app (iOS) home screen. 192 days of learning!</figcaption></figure><p>I only wanted to pick up math lessons and remember about an ad for the app. So I tried. But why? Well, I remember having difficult time understanding math concepts and I want to see if I still have the same difficulty. Perhaps it was just my brain that was not developed enough, who knows!</p><p>I picked some math lessons, and noticed the interactive lesson that the Brilliant app provided in has allowed me to practice my intuition about the concept. Even when I have not fully grasped the idea. Example:</p><figure><img alt="Using interactive lesson to understand a concept" src="https://cdn-images-1.medium.com/max/800/1*W0cLy5UmLEKHclbw-LtgRw.png" /><figcaption>Taken from “Dot Product with Components” lesson (Foundational Math, Level 4)</figcaption></figure><p>So that was the origin. Wanted to learn math, but stayed for other lessons. I could find lessons that keep me in the fun zone (not too easy and not too difficult to learn). I do the lesson while walking, commuting, or waiting for a bus. I spend around 10 minutes every day and have always learned new things so far. I am happy for that!</p><p>Hmm, looks like the post got quite long. I actually wanted to tell about one other habit that I picked, but I guess I will put it in another post.</p><p>Stay hungry!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=839e4b172c79" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What do I write about?]]></title>
            <link>https://medium.com/@wzulfikar/what-do-i-write-about-dfb611bb9d2f?source=rss-e11142da6cb9------2</link>
            <guid isPermaLink="false">https://medium.com/p/dfb611bb9d2f</guid>
            <category><![CDATA[growing-plants]]></category>
            <category><![CDATA[just-do-it]]></category>
            <category><![CDATA[writing]]></category>
            <dc:creator><![CDATA[Wildan Zulfikar]]></dc:creator>
            <pubDate>Wed, 24 Jul 2024 17:29:43 GMT</pubDate>
            <atom:updated>2024-07-24T17:29:43.415Z</atom:updated>
            <content:encoded><![CDATA[<p>Perhaps about tech, or learnings I got from work, or personal opinions. I just want to get things out of my head. And since I spend most of my time working with tech (e.g. software engineering, product development), I suspect most of my writings will be tech related.</p><p>How long? I don’t know. Could be short (like this!), could be long.</p><p>What I want is to inspire myself to keep writing, because I believe that’s what my future self would thank me. Some time, in the future, I will read this again and say, “nice”. Or “not bad”.</p><p>If I see myself as a plant, I would love to see it growing 🌱.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dfb611bb9d2f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why write?]]></title>
            <link>https://medium.com/@wzulfikar/why-write-99ec06f381cf?source=rss-e11142da6cb9------2</link>
            <guid isPermaLink="false">https://medium.com/p/99ec06f381cf</guid>
            <category><![CDATA[self-note]]></category>
            <category><![CDATA[growth-mindset]]></category>
            <category><![CDATA[reflections]]></category>
            <dc:creator><![CDATA[Wildan Zulfikar]]></dc:creator>
            <pubDate>Wed, 24 Jul 2024 17:24:43 GMT</pubDate>
            <atom:updated>2024-07-24T17:24:43.838Z</atom:updated>
            <content:encoded><![CDATA[<p>I have tried writing multiple times now, with different tools. From Wordpress, Ghost, Hugo, Next.js, Notion, and Github. I could not stick with one of it, and I think I have missed the point; I kept tinkering with the tool instead of the writing itself.</p><p>Now I am trying again. But this time I will try to persist. Whatever the tool gave me, I will just write. This post will serve as a reminder when I start wandering back to the bad habit of bike shedding the tool instead of doing what matters — write.</p><p>Oh, about that, why write? I love to see how I progressed. I love to see if my opinion changed. I love to see what I felt about something.</p><p>Writing is like exercise. When I write, I feel like I am peeking into head, poking around different area of my brain in an effort to keep it sharp and organised. When I read what I wrote, It makes me appreciate all that happens in life. It’s like a snapshot. A time machine, maybe.</p><p>Keep writing!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=99ec06f381cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>