<?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: Robert Wallace</title>
    <description>The latest articles on DEV Community by Robert Wallace (@utilitylab).</description>
    <link>https://dev.to/utilitylab</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%2F4006231%2Fa3ef09aa-df38-4f29-9879-e6b872f274ea.jpg</url>
      <title>DEV Community: Robert Wallace</title>
      <link>https://dev.to/utilitylab</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/utilitylab"/>
    <language>en</language>
    <item>
      <title>How to Clean CSV Files Before Importing into Excel</title>
      <dc:creator>Robert Wallace</dc:creator>
      <pubDate>Sun, 28 Jun 2026 09:41:33 +0000</pubDate>
      <link>https://dev.to/utilitylab/how-to-clean-csv-files-before-importing-into-excel-3l8c</link>
      <guid>https://dev.to/utilitylab/how-to-clean-csv-files-before-importing-into-excel-3l8c</guid>
      <description>&lt;p&gt;Every analyst and developer has been here: you open a CSV export and the headers are a mess — extra spaces, inconsistent casing, random line breaks, and half the columns have names that won’t survive a database import.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Before you start cleaning in Excel, fix the source file. Excel will only make it worse.

Headers are the first thing I normalize. Trim whitespace, convert to lowercase or title case consistently, and replace spaces with underscores or hyphens. Consistent headers prevent JOIN failures, ambiguous column references, and broken analytics queries downstream.

Then remove empty rows and summarize rows. Exports from payment processors, ad platforms, and CRMs often sneak in totals or blank spacer rows. They look fine in a spreadsheet but break scripts and ETL pipelines the moment you automate the import.

Duplicate rows are another silent problem. They don’t always show up visually depending on the viewer, but they inflate metrics and corrupt aggregations. A quick deduplication pass on a stable key column — email, transaction ID, or timestamp + user ID — fixes this before it pollutes your dataset.

The last step is checking encoding. UTF-8 with BOM is the safest default. If your file opens with strange characters or column shifts, it’s almost always an encoding mismatch between the export tool and your target system.

If you’re doing this regularly, a browser-based cleaner that doesn’t upload the file is usually enough for one-off prep. It keeps the data local and avoids the friction of installing a preprocessing script for a single cleanup job.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>csv</category>
      <category>data</category>
      <category>productivity</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How to Estimate GPT-4 API Costs Before Building</title>
      <dc:creator>Robert Wallace</dc:creator>
      <pubDate>Sun, 28 Jun 2026 09:38:30 +0000</pubDate>
      <link>https://dev.to/utilitylab/how-to-estimate-gpt-4-api-costs-before-building-4b3h</link>
      <guid>https://dev.to/utilitylab/how-to-estimate-gpt-4-api-costs-before-building-4b3h</guid>
      <description>&lt;p&gt;If you’re building an AI feature, the first thing to model is tokens — not model choice. Pricing pages show per-1K-token rates, but they don’t multiply the math for your actual prompt and completion patterns.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The mistake I see most often is estimating from a single “hello world” call. That number is almost always wrong because real usage has three cost layers: input tokens from system prompts, output tokens from model responses, and hidden costs from retries, logging, or repeated calls in loops.

Input cost is usually predictable if you count your system prompt and the average user message length. Output cost is where variance hides — it depends on max response length, temperature settings, and whether your app chains multiple model calls per interaction.

A practical approach before writing any production code: estimate prompt, completion, and training tokens separately. Run the pricing math at your expected daily call volume, then add a 2x buffer for traffic spikes and experimental prompts.

The trap nobody budgets for is long-running costs from prompt caching, context window growth, or feature expansion that quietly increases token counts. Modeling the ranges — minimum, expected, and worst case — before launch prevents the “why is my bill so high” moment later.

If you’re comparing providers or models, build the estimate table once and swap rates. The math is the same regardless of whether you’re using GPT-4, Claude, or another provider — only the per-1K-token numbers change.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>webdev</category>
      <category>productivity</category>
    </item>
    <item>
      <title>How to Fix Messy Markdown from Notion or Obsidian</title>
      <dc:creator>Robert Wallace</dc:creator>
      <pubDate>Sun, 28 Jun 2026 09:35:34 +0000</pubDate>
      <link>https://dev.to/utilitylab/how-to-fix-messy-markdown-from-notion-or-obsidian-3pp2</link>
      <guid>https://dev.to/utilitylab/how-to-fix-messy-markdown-from-notion-or-obsidian-3pp2</guid>
      <description>&lt;p&gt;If you’ve ever exported from Notion or Obsidian, you know the pain: extra whitespace everywhere, empty links, inconsistent heading styles, and stray HTML that breaks your site or docs build.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The good news is the content is usually fine. It just needs normalization.

Headings are the first thing I fix. Exports often start with H2 or mix H1 and H2 depending on how the document was structured. Pick a single top-level heading style and normalize everything down to it. Tools that rewrite headings automatically save more time than manually editing each file.

Then I remove empty bullets and blank lines. They look harmless in an editor, but they show up as layout problems in static site generators and markdown linters. Stripping them out before import prevents a lot of downstream noise.

Links are the next cleanup step. Exported docs love to include anchors to nowhere — placeholders, internal cross-references, or empty hrefs. Removing those late is worth it because broken links are harder to spot once the content is staged.

Finally, code fences should have language tags. Obsidian usually preserves them; Notion often drops them. Adding them back makes the content readable in GitHub, dev.to, or any docs renderer.

If you’re pasting a doc into a markdown cleaner, the fastest workflow is: normalize headings, remove empty bullets, strip dead links, then verify the result in a renderer before using it in production.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>productivity</category>
      <category>markdown</category>
      <category>webdev</category>
      <category>documentation</category>
    </item>
    <item>
      <title>Container Queries vs Media Queries: When to Use Which</title>
      <dc:creator>Robert Wallace</dc:creator>
      <pubDate>Sun, 28 Jun 2026 08:24:44 +0000</pubDate>
      <link>https://dev.to/utilitylab/container-queries-vs-media-queries-when-to-use-which-5m2</link>
      <guid>https://dev.to/utilitylab/container-queries-vs-media-queries-when-to-use-which-5m2</guid>
      <description>&lt;p&gt;I’ve been thinking about this lately: media queries handle page-level layout changes fine, but they fall apart when the same component needs to behave differently depending on where it sits in the DOM.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;That’s where container queries change the equation.

Media queries respond to the viewport. Container queries respond to the component’s container size. This matters for reusable design systems: a card component might sit in a 200px sidebar in one place and an 800px grid in another. With media queries alone, you’d need extra classes, wrapper changes, or JavaScript to handle that. Container queries let the component adapt based on its own context.

The practical rule I use: keep media queries for the page shell and major layout tiers. Use container queries inside reusable components that appear in multiple contexts. This keeps the CSS predictable without duplicating component variants.

A few real-world constraints worth knowing:
- Browser support is solid in modern browsers, but older versions still need fallbacks
- Container queries can’t replace media queries for user preferences like prefers-color-scheme or prefers-reduced-motion
- The syntax (cqw, cqh, container-type) takes a few minutes to internalize

If you’re experimenting with container query syntax, it helps to generate query blocks and paste them directly into your components instead of hand-writing each one. Testing a few variations is faster than guessing values in the editor.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>css</category>
      <category>frontend</category>
      <category>ui</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
