<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: sam lee</title>
    <description>The latest articles on DEV Community by sam lee (@sam_lee_880a38a45a170858b).</description>
    <link>https://dev.to/sam_lee_880a38a45a170858b</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3711821%2Fe4c5e69c-318e-4e20-802e-1c2bbd6b8e22.png</url>
      <title>DEV Community: sam lee</title>
      <link>https://dev.to/sam_lee_880a38a45a170858b</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sam_lee_880a38a45a170858b"/>
    <language>en</language>
    <item>
      <title>Why Instagram Adds "AI Info" to Your Photos (and a way to fix it in the browser)</title>
      <dc:creator>sam lee</dc:creator>
      <pubDate>Mon, 09 Mar 2026 05:31:04 +0000</pubDate>
      <link>https://dev.to/sam_lee_880a38a45a170858b/why-instagram-adds-ai-info-to-your-photos-and-a-way-to-fix-it-in-the-browser-4kdc</link>
      <guid>https://dev.to/sam_lee_880a38a45a170858b/why-instagram-adds-ai-info-to-your-photos-and-a-way-to-fix-it-in-the-browser-4kdc</guid>
      <description>&lt;p&gt;Instagram and a few other platforms are now reading metadata in your images to detect AI-generated content. They look at things like C2PA and certain EXIF fields, then add an "AI Info" label. You can’t turn it off in the app.&lt;/p&gt;

&lt;p&gt;I ran into this after using an AI upscaler on a photo. The image was mine, but the platform still tagged it. Fair enough from their side, but not great if you only used AI for small edits and don’t want every post labeled that way.&lt;/p&gt;

&lt;p&gt;I looked for tools that could strip the relevant metadata. A lot of options were either desktop software or sites that asked you to upload everything to their servers. I didn’t want to hand over my images.&lt;/p&gt;

&lt;p&gt;I ended up using a browser-based tool that runs locally. You drag in the image, it removes C2PA and the related EXIF data, and you download a clean file. No uploads, no signup. I used it on a few photos before posting and the labels stopped appearing. If you’re in a similar situation, &lt;a href="https://removeailabel.com/" rel="noopener noreferrer"&gt;removeailabel.com&lt;/a&gt; does this and is free to use.&lt;/p&gt;

&lt;p&gt;I’m also curious how different platforms handle it—Instagram vs Pinterest vs TikTok—if you’ve seen any differences.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>ai</category>
      <category>javascript</category>
      <category>programming</category>
    </item>
    <item>
      <title>Building a Gold Price Calculator with Next.js and a Dual-API Fallback</title>
      <dc:creator>sam lee</dc:creator>
      <pubDate>Fri, 13 Feb 2026 14:04:20 +0000</pubDate>
      <link>https://dev.to/sam_lee_880a38a45a170858b/building-a-gold-price-calculator-with-nextjs-and-a-dual-api-fallback-bcl</link>
      <guid>https://dev.to/sam_lee_880a38a45a170858b/building-a-gold-price-calculator-with-nextjs-and-a-dual-api-fallback-bcl</guid>
      <description>&lt;p&gt;When I set out to build a gold value calculator—something users could use to check melt value by weight and purity—the first thing I had to figure out was where to get live gold prices. Most financial data APIs are paid or rate-limited, and I needed something that could handle production traffic without breaking.&lt;/p&gt;

&lt;h2&gt;
  
  
  The API Landscape
&lt;/h2&gt;

&lt;p&gt;I looked at a few options:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GoldAPI.io&lt;/strong&gt; — straightforward REST endpoint, returns XAU (gold) price per troy ounce. Free tier: 100 requests/month. Paid plans scale from there.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MetalpriceAPI&lt;/strong&gt; — similar concept, supports multiple metals and currencies. Also has a free tier with monthly limits.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Metals-API, Kitco, etc.&lt;/strong&gt; — various pricing and feature sets.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I didn’t want to depend on a single provider. If one API went down or hit rate limits, the whole calculator would fail. So I designed a primary + fallback pattern: try GoldAPI first, then MetalpriceAPI if that failed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Handling Different Response Formats
&lt;/h2&gt;

&lt;p&gt;The tricky part was normalizing the responses. GoldAPI returns price per troy ounce directly. MetalpriceAPI’s “latest” endpoint uses &lt;code&gt;rates.USDXAU&lt;/code&gt; for “1 ounce of XAU = $X” — but their docs warn that some setups return &lt;code&gt;XAU&lt;/code&gt; (how much gold you get per $1) instead, so you have to check and use &lt;code&gt;1/XAU&lt;/code&gt; when needed. I ended up with a small adapter that maps both provider responses into a common structure: 24K price per gram, then derive 14K, 18K, etc. from purity ratios.&lt;/p&gt;

&lt;h2&gt;
  
  
  Server-Side Caching and SSR
&lt;/h2&gt;

&lt;p&gt;Since gold prices don’t change every second, I used Next.js &lt;code&gt;unstable_cache&lt;/code&gt; (or equivalent) to cache the API response on the server. That way:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The first request populates the cache.&lt;/li&gt;
&lt;li&gt;Subsequent requests use cached data for a set TTL (e.g. 15 minutes).&lt;/li&gt;
&lt;li&gt;The initial HTML includes real prices for SEO and fast first paint, instead of empty placeholders.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The client then hydrates and can refetch on currency change or user interaction, but the initial load is server-rendered with real data.&lt;/p&gt;

&lt;h2&gt;
  
  
  Timeouts and Error Handling
&lt;/h2&gt;

&lt;p&gt;Both APIs can be slow or unavailable. I added a 15-second timeout per request. If the primary provider times out or returns 429, we immediately try the fallback. If both fail, we fall back to a static price (with a clear “stale data” indicator) so the UI doesn’t break. Users still get a usable calculator; they just see that the price might be outdated.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I’d Do Differently
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Rate limit awareness&lt;/strong&gt;: On the free tier, 100 requests/month sounds like a lot until you realize server-side fetches + client refreshes can burn through that quickly. Caching is essential.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Webhook or scheduled job&lt;/strong&gt;: For a higher-traffic app, I’d consider a cron job that fetches prices periodically and stores them (e.g. in a DB or KV store), so the app reads from storage instead of calling external APIs on every request.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you’re working with commodity or metal price APIs, the same patterns apply: normalize responses, cache aggressively, and always have a fallback. The calculator I built is live at &lt;a href="https://mygoldcalc.com" rel="noopener noreferrer"&gt;MyGoldCalc&lt;/a&gt; if you want to see the result—supports grams, troy ounces, and common purities like 10K, 14K, 18K, 22K.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>discuss</category>
    </item>
    <item>
      <title>A Free Chronological Age Calculator (And Why Small Utilities Still Matter)</title>
      <dc:creator>sam lee</dc:creator>
      <pubDate>Tue, 10 Feb 2026 16:28:47 +0000</pubDate>
      <link>https://dev.to/sam_lee_880a38a45a170858b/a-free-chronological-age-calculator-and-why-small-utilities-still-matter-35b2</link>
      <guid>https://dev.to/sam_lee_880a38a45a170858b/a-free-chronological-age-calculator-and-why-small-utilities-still-matter-35b2</guid>
      <description>&lt;p&gt;If you've ever had to fill in "chronological age at date of testing" on a form—assessment, IEP, or clinical report—you know the pain: count months and days by hand, watch for leap years, double-check. One wrong month and the whole thing feels off.&lt;/p&gt;

&lt;p&gt;I stopped doing that and started using a &lt;strong&gt;free online chronological age calculator&lt;/strong&gt;. Two dates in (e.g. birth date and test date), exact age out in years, months, and days. No signup, no install. It runs in the browser and handles leap years and variable month lengths correctly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this matters (especially in schools and clinics)
&lt;/h2&gt;

&lt;p&gt;In education and clinical settings, age often has to be &lt;strong&gt;exact&lt;/strong&gt;—years, months, and days—for standardized assessments (e.g. Pearson) and paperwork. Manual counting is error-prone. A small utility that does one thing well reduces mistakes and saves time. Plus: no account and no stored data means it's safe to use and to recommend on shared devices.&lt;/p&gt;

&lt;h2&gt;
  
  
  The tool I use
&lt;/h2&gt;

&lt;p&gt;When I need precise chronological age for forms or reports, I use &lt;strong&gt;&lt;a href="https://chronologicalagecalculator.app" rel="noopener noreferrer"&gt;Chronological Age Calculator&lt;/a&gt;&lt;/strong&gt;. Free, no account, and the logic matches what assessment manuals expect so numbers stay consistent.&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaway
&lt;/h2&gt;

&lt;p&gt;Single-purpose tools—one input, one output, no fluff—still have a place. If you regularly need "age at testing" in years, months, and days, bookmark one solid calculator and move on to the actual work.&lt;/p&gt;

&lt;p&gt;If you have a similar "small tool" you rely on (age, date diff, units, etc.), drop it in the comments.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Building a Production-Ready Square Image Editor with Next.js: Lessons from SquareImage</title>
      <dc:creator>sam lee</dc:creator>
      <pubDate>Thu, 15 Jan 2026 02:20:03 +0000</pubDate>
      <link>https://dev.to/sam_lee_880a38a45a170858b/building-a-production-ready-square-image-editor-with-nextjs-lessons-from-squareimage-2cjc</link>
      <guid>https://dev.to/sam_lee_880a38a45a170858b/building-a-production-ready-square-image-editor-with-nextjs-lessons-from-squareimage-2cjc</guid>
      <description>&lt;p&gt;As a full-stack developer who recently built a square image editor, I want to share how Next.js enabled us to create a performant, SEO-friendly tool that handles client-side image processing efficiently.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Technical Architecture Highlights:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Next.js 14 with App Router: Leverages React Server Components for initial page load performance while maintaining client-side interactivity&lt;/p&gt;

&lt;p&gt;Client-Side Image Processing: All image manipulation happens in the browser using Canvas API, ensuring zero server costs and maximum privacy&lt;/p&gt;

&lt;p&gt;Dynamic Imports: Heavy components like the image editor are lazy-loaded to reduce initial bundle size&lt;/p&gt;

&lt;p&gt;Responsive Design: Tailwind CSS with mobile-first approach ensures consistent experience across devices&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Technical Decisions:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;javascript&lt;br&gt;
// Example of our dynamic import strategy&lt;br&gt;
const ImageEditor = dynamic(() =&amp;gt; import('@/components/image-editor'), {&lt;br&gt;
  loading: () =&amp;gt; &lt;br&gt;
});&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why This Architecture Works:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;SEO Optimization: Next.js SSR ensures our tool pages rank well for terms like "free square image maker"&lt;/p&gt;

&lt;p&gt;Performance: Edge caching and optimized images via Next.js Image component&lt;/p&gt;

&lt;p&gt;Scalability: Static generation for landing pages, client-side rendering for the editor&lt;/p&gt;

&lt;p&gt;The entire project is built with TypeScript and includes comprehensive structured data markup. You can explore the live implementation at: &lt;a href="https://squareimage.run" rel="noopener noreferrer"&gt;squareimage&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For developers interested in building similar tools, I recommend starting with Next.js for its excellent developer experience and production-ready features out of the box.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
