<?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: Tom Boutell</title>
    <description>The latest articles on DEV Community by Tom Boutell (@boutell).</description>
    <link>https://dev.to/boutell</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%2F574227%2F1a291812-c74e-4efa-9e74-fa9c4f916dc7.jpg</url>
      <title>DEV Community: Tom Boutell</title>
      <link>https://dev.to/boutell</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/boutell"/>
    <language>en</language>
    <item>
      <title>Docker is exactly the same everywhere... wait, not quite!</title>
      <dc:creator>Tom Boutell</dc:creator>
      <pubDate>Wed, 13 Aug 2025 14:59:32 +0000</pubDate>
      <link>https://dev.to/boutell/docker-is-exactly-the-same-everywhere-wait-not-quite-21c7</link>
      <guid>https://dev.to/boutell/docker-is-exactly-the-same-everywhere-wait-not-quite-21c7</guid>
      <description>&lt;p&gt;TIL: when you run Docker (or podman) on a Mac and specify a universal base image like "node" or "node:22-bullseye", podman will default to a version of that image built specifically for your architecture.&lt;/p&gt;

&lt;p&gt;This matters if your Dockerfile is going to attempt to install things that don't exist for your binary architecture. And in any case: &lt;strong&gt;you want to make sure production will behave exactly like your test environment.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Spoiler alert: production will be 64-bit Intel Linux.&lt;/p&gt;

&lt;p&gt;So I added &lt;code&gt;--platform=linux/amd64&lt;/code&gt; to my &lt;code&gt;docker build&lt;/code&gt; command, and now I can &lt;code&gt;apt-get install&lt;/code&gt; and &lt;code&gt;npm install&lt;/code&gt; things inside the &lt;code&gt;Dockerfile&lt;/code&gt; with exactly the same results as on a Linux host.&lt;/p&gt;

</description>
      <category>docker</category>
      <category>ops</category>
    </item>
    <item>
      <title>"yup" is the new extra virgin olive oil</title>
      <dc:creator>Tom Boutell</dc:creator>
      <pubDate>Tue, 14 Jan 2025 13:28:12 +0000</pubDate>
      <link>https://dev.to/boutell/yup-is-the-new-extra-virgin-olive-oil-1229</link>
      <guid>https://dev.to/boutell/yup-is-the-new-extra-virgin-olive-oil-1229</guid>
      <description>&lt;p&gt;This is an unsolicited endorsement of "yup," an absolutely fantastic tool for validating input in all JavaScript and TypeScript applications.&lt;/p&gt;

&lt;p&gt;I'm impressed by how well it meets my needs as a JavaScript developer while also, apparently, having absolutely ferocious TypeScript support for those who want to go all in on that.&lt;/p&gt;

&lt;p&gt;Also an endorsement of &lt;a class="mentioned-user" href="https://dev.to/gregvanbrug"&gt;@gregvanbrug&lt;/a&gt; for bringing it into my professional life.&lt;/p&gt;

&lt;p&gt;I use yup in everything now. It's the new extra virgin olive oil.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/jquense/yup" rel="noopener noreferrer"&gt;https://github.com/jquense/yup&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>typescript</category>
      <category>validation</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Useful open source tools: the little things add up</title>
      <dc:creator>Tom Boutell</dc:creator>
      <pubDate>Fri, 03 Jan 2025 15:35:27 +0000</pubDate>
      <link>https://dev.to/boutell/useful-open-source-tools-the-little-things-add-up-5797</link>
      <guid>https://dev.to/boutell/useful-open-source-tools-the-little-things-add-up-5797</guid>
      <description>&lt;p&gt;Over the years we've created lots of little open source modules that are useful on their own. Because they are not part of our core product, I don't often step back and look at them as a whole. Turns out, &lt;a href="https://apostrophecms.com/blog/useful-open-source-tools" rel="noopener noreferrer"&gt;there's quite a collection&lt;/a&gt;. Tools for sanitizing HTML, tools for managing github organizations at scale, tools to improve performance, tools for localizing URLs, even a brand new tiny framework for microservices. Giving stuff away has a lot of benefits for us: it encourages quality, it encourages contributions, and of course it "gives back" for all the open source we're using to create &lt;a href="https://apostrophecms.com" rel="noopener noreferrer"&gt;ApostropheCMS&lt;/a&gt;, which is also under an open source license.&lt;/p&gt;

&lt;p&gt;I encourage you to check out the whole story here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://apostrophecms.com/blog/useful-open-source-tools" rel="noopener noreferrer"&gt;Useful open source tools: the little things add up&lt;/a&gt;&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>javascript</category>
      <category>node</category>
      <category>github</category>
    </item>
    <item>
      <title>In-context, on-page editing in React, Vue, Svelte and other frameworks</title>
      <dc:creator>Tom Boutell</dc:creator>
      <pubDate>Tue, 12 Sep 2023 13:02:00 +0000</pubDate>
      <link>https://dev.to/boutell/in-context-on-page-editing-in-react-vue-svelte-and-other-frameworks-1f8n</link>
      <guid>https://dev.to/boutell/in-context-on-page-editing-in-react-vue-svelte-and-other-frameworks-1f8n</guid>
      <description>&lt;p&gt;Dear fans of React, Vue, Svelte and other frontend frameworks:&lt;/p&gt;

&lt;p&gt;How do you feel about the way these integrate in CMS projects? Is on-page editing an important feature for you? Would you prefer to solve that in the context of a full-featured frontend framework, like NextJS or Astro? Or do you just want the CMS to let you write all your templates in React instead of a legacy template language?&lt;/p&gt;

&lt;p&gt;Thanks for your feedback!&lt;/p&gt;

</description>
      <category>react</category>
      <category>svelte</category>
      <category>vue</category>
      <category>cms</category>
    </item>
    <item>
      <title>My Journey with the OpenAI API</title>
      <dc:creator>Tom Boutell</dc:creator>
      <pubDate>Tue, 25 Jul 2023 17:38:44 +0000</pubDate>
      <link>https://dev.to/boutell/my-journey-with-the-openai-api-199i</link>
      <guid>https://dev.to/boutell/my-journey-with-the-openai-api-199i</guid>
      <description>&lt;p&gt;A few months ago I had the chance to speak to my sister's class of eighth graders about AI — which made this talk for adults at Philly Tech Week much better. If you need an overview that gets really basic before digging into how you can integrate it yourself, I think I can help. Thanks to Apostrophe for supporting my work on this and to Philly Tech Week for having me!&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/nQor7L3HPlI"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Hey, how much memory did that command take?</title>
      <dc:creator>Tom Boutell</dc:creator>
      <pubDate>Wed, 26 Oct 2022 13:19:40 +0000</pubDate>
      <link>https://dev.to/boutell/hey-how-much-memory-did-that-command-take-4fgb</link>
      <guid>https://dev.to/boutell/hey-how-much-memory-did-that-command-take-4fgb</guid>
      <description>&lt;p&gt;Last week my customer had a problem. Their custom webpack build was working fine on a spiffy developer Mac, but fell over when running on a deployment server. I could see an out of memory error, but how much RAM did this thing really need? Adding more "iron" in the form of a bigger AWS instance was a possible solution, but how much iron exactly?&lt;/p&gt;

&lt;p&gt;I knew I could watch the output of the &lt;code&gt;top&lt;/code&gt; command, and sort it by "resident set size," a fancy technical term for "how much memory this process really needs, not counting shared stuff." But I also knew the webpack build would "fork" a lot of child processes with their own memory requirements, and besides, who wants to stare at the screen for several minutes? Don't blink, you might miss the magic moment!&lt;/p&gt;

&lt;p&gt;This made me think of the &lt;code&gt;time&lt;/code&gt; command. &lt;code&gt;time&lt;/code&gt; is a classic Unix command that tells you how much time another command takes to run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; ~ $ time sleep 5

real    0m5.012s
user    0m0.001s
sys 0m0.004s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;time&lt;/code&gt; is great, but what I really needed was &lt;code&gt;max-mem&lt;/code&gt;, a command to show me the &lt;strong&gt;peak resident set size&lt;/strong&gt; of my command... including all child processes.&lt;/p&gt;

&lt;p&gt;I couldn't find it, so I whipped something up. &lt;a href="https://www.npmjs.com/package/max-mem" rel="noopener noreferrer"&gt;Here's the max-mem command.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now I can type:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;max-mem npm run build

[Regular output appears here]

Max memory usage: 800MB
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With the help of &lt;code&gt;max-mem&lt;/code&gt;, I was able to tell my customer exactly how much it would cost to upgrade the deployment server to ensure enough RAM for the webpack builds. His response: "yes please, upgrade the server! My developers can optimize RAM usage later." Problem solved.&lt;/p&gt;

&lt;p&gt;It's written in Node.js, and samples the memory usage every 100 milliseconds by automating the &lt;code&gt;ps&lt;/code&gt; command. Is there a better way? Maybe! Pull requests are welcome, just remember it should work on both MacOS and Linux.&lt;/p&gt;

&lt;p&gt;Check it out and let me know what you think.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
