<?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: gan liu</title>
    <description>The latest articles on DEV Community by gan liu (@gavinbuilds).</description>
    <link>https://dev.to/gavinbuilds</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4005337%2F40ddbbec-5b29-4f5f-8679-7709b6edef84.png</url>
      <title>DEV Community: gan liu</title>
      <link>https://dev.to/gavinbuilds</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gavinbuilds"/>
    <language>en</language>
    <item>
      <title>I compared 3 paid TDEE calculators against a free one</title>
      <dc:creator>gan liu</dc:creator>
      <pubDate>Sat, 27 Jun 2026 14:17:31 +0000</pubDate>
      <link>https://dev.to/gavinbuilds/i-compared-3-paid-tdee-calculators-against-a-free-one-3039</link>
      <guid>https://dev.to/gavinbuilds/i-compared-3-paid-tdee-calculators-against-a-free-one-3039</guid>
      <description>&lt;p&gt;I spent an afternoon researching TDEE calculators. Here is what I found:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MacroFactor&lt;/strong&gt;: $71.99/year. And you need to log every meal for 3 weeks before it gives you a TDEE.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MyFitnessPal Premium&lt;/strong&gt;: $79.99/year. TDEE is buried in settings.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cronometer Gold&lt;/strong&gt;: $59.99/year. Single formula, no Katch-McArdle.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;FreeTDEE&lt;/strong&gt; (freetdee.com): Free. Instant. 6+ formulas. No account.&lt;/p&gt;

&lt;h2&gt;
  
  
  The math is the same
&lt;/h2&gt;

&lt;p&gt;All use the same equations: Mifflin-St Jeor, Harris-Benedict, Katch-McArdle. The formulas are public.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;MacroFactor&lt;/th&gt;
&lt;th&gt;MFP Premium&lt;/th&gt;
&lt;th&gt;Cronometer Gold&lt;/th&gt;
&lt;th&gt;FreeTDEE&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Price&lt;/td&gt;
&lt;td&gt;$71.99/yr&lt;/td&gt;
&lt;td&gt;$79.99/yr&lt;/td&gt;
&lt;td&gt;$59.99/yr&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Katch-McArdle&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Account&lt;/td&gt;
&lt;td&gt;Required&lt;/td&gt;
&lt;td&gt;Required&lt;/td&gt;
&lt;td&gt;Required&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;I built FreeTDEE because every calculator either charged money or was buried in an app I did not want.&lt;/p&gt;

&lt;p&gt;Try it: &lt;a href="https://freetdee.com" rel="noopener noreferrer"&gt;freetdee.com&lt;/a&gt;&lt;br&gt;
Comparison: &lt;a href="https://freetdee.com/vs/macrofactor-tdee/" rel="noopener noreferrer"&gt;freetdee.com/vs/macrofactor-tdee/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>fitness</category>
      <category>webdev</category>
      <category>health</category>
    </item>
    <item>
      <title>UTC, GMT, and the time zone bugs that keep biting developers</title>
      <dc:creator>gan liu</dc:creator>
      <pubDate>Sat, 27 Jun 2026 12:49:10 +0000</pubDate>
      <link>https://dev.to/gavinbuilds/utc-gmt-and-the-time-zone-bugs-that-keep-biting-developers-4e2n</link>
      <guid>https://dev.to/gavinbuilds/utc-gmt-and-the-time-zone-bugs-that-keep-biting-developers-4e2n</guid>
      <description>&lt;p&gt;Time zones are one of those topics that look simple until you ship something and a user in another country sees the wrong time. Here are the traps I keep seeing, and how to reason about them in 2026.&lt;/p&gt;

&lt;h2&gt;
  
  
  UTC is not a time zone, and GMT is not UTC
&lt;/h2&gt;

&lt;p&gt;UTC (Coordinated Universal Time) is a time standard, not a region. GMT is a time zone that happens to share the same offset as UTC most of the year. For storage and math, always think in UTC. Treat GMT as just another named zone.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rule 1: store timestamps in UTC
&lt;/h2&gt;

&lt;p&gt;Store every instant as UTC (or an epoch value). Convert to a local zone only at the edges, when you display to a user. If you store local times, you will eventually lose the offset and never recover the true instant.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rule 2: an offset is not a zone
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;+09:00&lt;/code&gt; tells you the offset right now. It does not tell you the zone, because zones change offset across the year due to daylight saving time. Store the IANA zone name (like &lt;code&gt;America/New_York&lt;/code&gt;), not just the offset. The offset is derived from the zone plus the date.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rule 3: DST is where it hurts
&lt;/h2&gt;

&lt;p&gt;The same wall-clock time can happen twice (fall back) or never (spring forward). Scheduling "9am every day" is a zone-aware operation, not an offset-aware one. Libraries like the built-in &lt;code&gt;Intl.DateTimeFormat&lt;/code&gt; and &lt;code&gt;Temporal&lt;/code&gt; (now widely available) handle this correctly if you give them a zone name.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;Intl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;DateTimeFormat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;en-US&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;timeZone&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Asia/Tokyo&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;dateStyle&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;short&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;timeStyle&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;short&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}).&lt;/span&gt;&lt;span class="nf"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Rule 4: scheduling across teams is an overlap problem
&lt;/h2&gt;

&lt;p&gt;For a distributed team, the useful question is not "what time is it there" but "when do our working hours overlap". That is a set-intersection over each person's 9-to-5 expressed in UTC.&lt;/p&gt;

&lt;h2&gt;
  
  
  A tool for the human side
&lt;/h2&gt;

&lt;p&gt;When I just need to eyeball overlaps and pick a meeting time without writing code, I use the free tool I built: &lt;strong&gt;&lt;a href="https://zoneplan.net" rel="noopener noreferrer"&gt;ZonePlan&lt;/a&gt;&lt;/strong&gt;, a time zone meeting planner and live world clock.&lt;/p&gt;

&lt;p&gt;If you want the practical playbook for picking meeting times, I wrote it up here: &lt;a href="https://zoneplan.net/blog/schedule-meeting-across-time-zones/" rel="noopener noreferrer"&gt;How to schedule a meeting across time zones&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;What is the worst time zone bug you have shipped? Mine involved a cron job that ran twice every November.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>webdev</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Converting HEIC to JPG entirely in the browser (no upload, no server)</title>
      <dc:creator>gan liu</dc:creator>
      <pubDate>Sat, 27 Jun 2026 12:48:29 +0000</pubDate>
      <link>https://dev.to/gavinbuilds/converting-heic-to-jpg-entirely-in-the-browser-no-upload-no-server-5d4h</link>
      <guid>https://dev.to/gavinbuilds/converting-heic-to-jpg-entirely-in-the-browser-no-upload-no-server-5d4h</guid>
      <description>&lt;p&gt;If you have ever received a photo from an iPhone and gotten a .heic file that Windows refuses to preview, you have met Apple's High Efficiency Image Container format. It saves space, but support outside the Apple ecosystem is still patchy in 2026.&lt;/p&gt;

&lt;p&gt;Most online converters solve this by uploading your image to a server, converting it there, and sending it back. That works, but it means your personal photos travel to someone else's machine. For a format that is almost always personal photos, that bothered me. So I built a converter that never uploads anything.&lt;/p&gt;

&lt;h2&gt;
  
  
  The approach: decode HEIC client-side with WebAssembly
&lt;/h2&gt;

&lt;p&gt;HEIC is essentially HEVC (H.265) intra-frames wrapped in a container. Browsers do not decode it natively, so the trick is to run a HEIC decoder compiled to WebAssembly directly in the page.&lt;/p&gt;

&lt;p&gt;The high level flow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;User drops a .heic file. You read it with the File API as an ArrayBuffer.&lt;/li&gt;
&lt;li&gt;A WASM build of libheif decodes the image into raw RGBA pixel data.&lt;/li&gt;
&lt;li&gt;You paint that data onto an offscreen canvas.&lt;/li&gt;
&lt;li&gt;canvas.toBlob() re-encodes it as JPEG, PNG or WebP at the quality you choose.&lt;/li&gt;
&lt;li&gt;You hand the user a download link via URL.createObjectURL().
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;buffer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;file&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;arrayBuffer&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;image&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;heifDecoder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;decode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;buffer&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// libheif (wasm)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;canvas&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createElement&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;canvas&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;canvas&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;width&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;image&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;canvas&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;height&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;image&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;canvas&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getContext&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;2d&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;putImageData&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;image&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toImageData&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;canvas&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toBlob&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;blob&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;downloadBlob&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;blob&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;photo.jpg&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;image/jpeg&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.92&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Why client-side is worth the effort
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Privacy&lt;/strong&gt;: the file never leaves the device. No upload, no retention.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Speed&lt;/strong&gt;: no round trip. Conversion starts the instant the file is read.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost&lt;/strong&gt;: no servers to run, so the tool can stay free. It is just static files on a CDN.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Offline&lt;/strong&gt;: once the page is cached, it works with no network at all.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The trade-off is bundle size (the WASM decoder is a few hundred KB) and that very large batches lean on the user's CPU. For typical phone photos it is instant.&lt;/p&gt;

&lt;h2&gt;
  
  
  The live tool
&lt;/h2&gt;

&lt;p&gt;I packaged this into a free tool if you just want to convert something now: &lt;strong&gt;&lt;a href="https://livephotokit.com" rel="noopener noreferrer"&gt;LivePhotoKit&lt;/a&gt;&lt;/strong&gt;. It does HEIC to JPG/PNG/WebP/PDF, opens .livp Live Photo files, extracts the MP4, and batch converts, all in the browser with no sign-up.&lt;/p&gt;

&lt;p&gt;If you want the non-developer walkthrough, I wrote it up here: &lt;a href="https://livephotokit.com/blog/how-to-open-heic-files-on-windows-11/" rel="noopener noreferrer"&gt;How to open HEIC files on Windows 11&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Have you shipped anything with a WASM media decoder? I would love to compare notes on bundle size vs decode speed trade-offs.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>webassembly</category>
    </item>
    <item>
      <title>8 free, no-signup web tools I built with AI in 2026</title>
      <dc:creator>gan liu</dc:creator>
      <pubDate>Sat, 27 Jun 2026 12:26:45 +0000</pubDate>
      <link>https://dev.to/gavinbuilds/8-free-no-signup-web-tools-i-built-with-ai-in-2026-1o17</link>
      <guid>https://dev.to/gavinbuilds/8-free-no-signup-web-tools-i-built-with-ai-in-2026-1o17</guid>
      <description>&lt;p&gt;Over the past few months I have been shipping small, single-purpose web tools. Each one is built with AI-assisted coding (Next.js + Cloudflare Pages) and designed to do exactly one thing. No sign-up, no upload, everything runs in your browser.&lt;/p&gt;

&lt;p&gt;Here is the full list in case any of them save you a few minutes.&lt;/p&gt;

&lt;h2&gt;
  
  
  File and image
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://livephotokit.com" rel="noopener noreferrer"&gt;LivePhotoKit&lt;/a&gt;&lt;/strong&gt; converts Apple HEIC images and Live Photos (.livp) to JPG, PNG, WebP or PDF, or extracts the MP4, all locally in your browser.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://iworkviewer.com" rel="noopener noreferrer"&gt;iWorkViewer&lt;/a&gt;&lt;/strong&gt; opens .pages, .numbers and .key files on Windows or Android without a Mac, and exports them to PDF.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Calculators
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://freetdee.com" rel="noopener noreferrer"&gt;FreeTDEE&lt;/a&gt;&lt;/strong&gt; is a TDEE, BMR, calorie and macro calculator.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://babypercent.com" rel="noopener noreferrer"&gt;BabyPercent&lt;/a&gt;&lt;/strong&gt; is a baby growth percentile calculator (WHO/CDC) for ages 0 to 24 months.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Planning
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://plantingcalendar.net" rel="noopener noreferrer"&gt;PlantingCalendar&lt;/a&gt;&lt;/strong&gt; gives vegetable planting dates by USDA hardiness zone.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://zoneplan.net" rel="noopener noreferrer"&gt;ZonePlan&lt;/a&gt;&lt;/strong&gt; is a time zone meeting planner and live world clock.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Everyday
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://invoicepad.net" rel="noopener noreferrer"&gt;InvoicePad&lt;/a&gt;&lt;/strong&gt; is a free invoice generator for freelancers, with no sign-up.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://pupvax.com" rel="noopener noreferrer"&gt;PupVax&lt;/a&gt;&lt;/strong&gt; is a dog vaccine tracker with schedules and reminders.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The stack
&lt;/h2&gt;

&lt;p&gt;Every site is Next.js with static export, deployed on Cloudflare Pages. AI handled most of the coding while I focused on picking the problem, the SEO and the UX. Each tool is intentionally tiny and privacy-first: no accounts, no uploads, and processing happens client-side.&lt;/p&gt;

&lt;p&gt;I would love feedback, especially on which ones are genuinely useful versus which are solving a non-problem. What tiny tool do you keep wishing existed?&lt;/p&gt;

</description>
      <category>webdevshowdevaiindiehackers</category>
    </item>
  </channel>
</rss>
