<?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 Frank Wiles on Medium]]></title>
        <description><![CDATA[Stories by Frank Wiles on Medium]]></description>
        <link>https://medium.com/@fwiles?source=rss-f89a9e6e9985------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*1OG21XaCM6hBZI75mr9gSA.jpeg</url>
            <title>Stories by Frank Wiles on Medium</title>
            <link>https://medium.com/@fwiles?source=rss-f89a9e6e9985------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 06:16:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@fwiles/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[On Developer Imposter Syndrome]]></title>
            <link>https://medium.com/@fwiles/on-developer-imposter-syndrome-e38e77c622cf?source=rss-f89a9e6e9985------2</link>
            <guid isPermaLink="false">https://medium.com/p/e38e77c622cf</guid>
            <category><![CDATA[personal-development]]></category>
            <category><![CDATA[tech-career]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Frank Wiles]]></dc:creator>
            <pubDate>Thu, 02 Apr 2026 15:23:42 GMT</pubDate>
            <atom:updated>2026-04-02T15:23:42.136Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*XdKvHeOXBWNfF1_7.jpg" /></figure><p>NOTE: I’ve been taking random questions in an <a href="https://frankwiles.com/questions/">Ask Frank Anything</a> the last few months and this is one of the better ones.</p><p>If you <a href="https://forms.frankwiles.com/ask-frank">have a question shoot it over to me</a> and I’ll get you a response as soon as I can</p><h3>Question: Hi Frank, I am a fellow techie with a very low real-life industry experience. I’ve met you several times and I quite frankly admire what you do and how you treat others. At the same time, I am weirdly intimidated by how smart you are and therefore cannot really approach you asking for an opportunity to work with you as I feel like I am too dumb to do so. My credentials look great on the paper but in real life, I lack real and true knowledge/hands-on experience. Whatever I do, though, I poor my heart into it and I’ve never upset any manager wherever I worked with. I would consider myself a quick learner. Some call it imposter syndrome, I don’t know what it is. I have faced similar issues in the past with other leaders. Any advice on how to advance my career? Best, Cousin Greg</h3><p>Hey Gregory,</p><p>First off, thank you for the kind words. I’d like to think I treat people well, but it’s always nice to hear a confirmation!</p><p>Secondly, I hope it’s clear it’s never my intention to be intimidating. At least assuming we didn’t meet in a dark alley. 🤣 Seriously, I’m just a guy like anyone else, just ask my co-workers! I have my moments, for example, I nearly fell down putting on my jeans this morning.</p><p>Sadly, we aren’t looking to hire any full time staff right now, but we do occasionally need additional subcontractors. And yes it’s a bit of a high bar as our <a href="https://www.revsys.com/clients/">customers at REVSYS</a> come to us expecting that.</p><h3>On Imposter Syndrome</h3><p>I was thinking of a quote and I couldn’t exactly find it. My AI tells me the popular version is something like:</p><blockquote><em>“Confidence isn’t a personality trait — it’s the result of evidence. It’s built by stacking proof that you can do what you say you’ll do.”</em></blockquote><p>That is often attributed to Naval Ravikant and Alex Hormozi.</p><p>Imposter syndrome is <strong>VERY</strong> common. In fact, I would guess 99% of people have it on some level in their career and we all have it in some area of our lives. So you’re not alone. I’ve worked with several great engineers who suffered from this. Some it wasn’t as pronounced, but for some it was nearly debilitating to their careers.</p><p>My advice? Focus not on what you lack, but on what you have done.</p><p>Apologies for channeling Yoda there, but it’s true. If you don’t feel you have done enough, find ways to do more. Get more reps in.</p><p>You mention that you look great on paper. So I’d work on expanding your off paper experience, even outside of your day job. Feel like you need more experience in developing with a certain tech? Try to find an Open Source project you can contribute to that uses it. Or if it’s more on the ops side of things, do a bad version in a home lab to get started and then do it again in a more robust way. And then maybe again with a full observability stack, gitops, and the whole nine yards.</p><p>Couple of iterations of that and you’re on your way to being an expert.</p><p>Which reminds me of my absolute FAVORITE quote:</p><blockquote><em>An expert is a person who has made all the mistakes that can be made in a very narrow field” — Niels Bohr</em></blockquote><p>I’m a confident expert because I’ve fucked it up in every single way you can think of!</p><p>Let’s make a list! I’ve …</p><ul><li>Deleted the production database without having backups</li><li>Let the main work domain registration lapse</li><li>Deployed to production when I meant to deploy to staging</li><li>Double charged customer credit cards due to a bug</li><li>Didn’t write tests</li><li>Wrote bad tests</li><li>Picked the wrong tech stack</li><li>Was wildly wrong in an assumption of how something did work</li><li>Slept through the pager alert</li><li>Over engineered the solution</li><li>Under engineered the solution</li><li>Deployed a bug just before hopping on a plane</li><li>Didn’t document the process</li><li>Documented the process incorrectly</li></ul><p>I could keep going and going, but you get the idea.</p><p>It’s not some idea that I’m magically infallible, it is precisely the fact I’ve made so many mistakes that I now know what NOT to do in the current situation.</p><p>It’s just a matter of reps. So go out there get some more reps in.</p><p>Go fuck it up good and learn from it.</p><p>Asked on March 24, 2026</p><p><em>Originally published at </em><a href="https://frankwiles.com/questions/imposter-syndrome/"><em>https://frankwiles.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e38e77c622cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Django Third-party App Ecosystem]]></title>
            <link>https://medium.com/@fwiles/django-third-party-app-ecosystem-1ce825d80ba6?source=rss-f89a9e6e9985------2</link>
            <guid isPermaLink="false">https://medium.com/p/1ce825d80ba6</guid>
            <category><![CDATA[python-web-developer]]></category>
            <category><![CDATA[django]]></category>
            <category><![CDATA[django-rest-framework]]></category>
            <dc:creator><![CDATA[Frank Wiles]]></dc:creator>
            <pubDate>Mon, 17 Nov 2025 00:00:22 GMT</pubDate>
            <atom:updated>2026-01-07T14:32:43.680Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Have you ever spent hours building a feature, only to later discover a well-maintained package that does exactly what you need?</strong></p><p>Third-party applications are the unsung heroes of the Django ecosystem. Core Django covers a wide range of common application needs, the <em>batteries</em> in “batteries included”, but it cannot be everything to everyone.</p><p>If you are very plugged into the Django community you know this, where to find them, and likely have opinions on which apps are best for a given scenario.</p><p>But <strong>HOW</strong> plugged in are you?</p><p>We’re failing both new and experienced users. Newer users don’t necessarily know where or how to find good third-party apps. Experienced users aren’t immune. A couple of Steering Council members remarked that they often learn about a useful new app only by chance in a random conversation at a DjangoCon!</p><p>Indulge me for a moment with a couple of tangents…</p><h3>Tangent #1 — DSF Example</h3><p>It’s common at DjangoCon for someone from the <a href="https://www.djangoproject.com/foundation/">DSF</a> to talk about sponsorship and how to become a member. During this they ask the audience to raise a hand if they know about the Foundation. Typically over half of the room is not aware of the DSF, yet use Django enough to attend a conference dedicated to it!</p><p>I believe the same effect is at play with knowing about the wider Django ecosystem.</p><h3>Tangent #2 — Personal Example</h3><p>I remember when I was new to the Python ecosystem I felt I was always the last person to learn about a useful standard library module or pip package. I felt the same when I started using Javascript and again with Rust.</p><p>Learning a new programming language isn’t the easiest thing, but learning deeply about the <em>wider ecosystem around that language</em> is often the more time consuming part!</p><h3>The Problem</h3><blockquote><em>If all you have is a hammer, everything looks like a nail</em></blockquote><p>Most developers are focused, rightfully so, on solving their day-to-day work problems. They have Python, the standard library, and Django with its batteries.</p><p>So they use them.</p><p>It’s not always obvious when a problem warrants research time.</p><p>The solution is to invest a bit of time, on a regular basis, to look around in your ecosystem (as this is true for any programming language).</p><p>The long term benefits include:</p><ul><li>remembering there exists an app for that, often saving you a tremendous amount of time re-solving a solved problem</li><li>watching a particular app evolve over time, its adoption by the community, and its release cadence</li><li>learning how one third-party app approached a problem can teach you effective patterns to use elsewhere</li></ul><h3>A small step in the right direction</h3><p>In an effort to fix this, one of the main goals of the current Django Steering Council is to dramatically elevate the profile of third-party apps starting with the new <a href="https://www.djangoproject.com/community/ecosystem/">Ecosystem Page</a>.</p><p>This includes links to:</p><ul><li>Specific, commonly used apps</li><li>Podcasts, Newsletters, and Social Media links</li><li>Groups like DjangoGirls, Django Commons, and Jazzband</li><li>Useful websites like <a href="https://awesomedjango.org/">Awesome Django</a> and <a href="https://djangopackages.org/">Django Packages</a></li></ul><p>This is the first step we’re taking to raise the profile of these useful resources. We could never list everything but here are some packages and resources that the Steering Council all agree are solid and well supported.</p><p>We also hope by doing this it will reduce some pressure for features to exist in core Django. It’s very often preferable for an app to stay <em>OUTSIDE</em> of Django than to be brought into it. Another of our aims is to make it easier to create, use, and experiment with new ideas. Keeping Django nimble into the future.</p><p>The Steering Council plans to review and re-evaluating the specific items on this new Ecosystem page once a year to help ensure it is kept up to date and includes the current best packages and resources.</p><h3>Conclusion — Call to Action</h3><p>There are three main takeaways here:</p><ol><li>Check out the new <a href="https://www.djangoproject.com/community/ecosystem/">Django Ecosystem Page</a></li><li>Subscribe to a newsletter and/or podcast to help dribble in new useful info to you periodically</li><li>Block out some time weekly, monthly, or quarterly to spend a couple of hours wandering around the ecosystem without a specific agenda</li></ol><p>These small actions, over time, will do far more for your career than you might expect. It may not be possible to become the smartest person on your team, but it is possible to become the most <em>knowledgeable</em> one.</p><p><em>Do you have a fun story about being the last one to know about an app, library or tool? Ping me on social media I’d love to swap some stories around this subject!</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*I1tRYZOlArUTnBvT.jpg" /></figure><p><em>Originally published at </em><a href="https://frankwiles.com/posts/django-third-party-apps/"><em>https://frankwiles.com</em></a><em> on November 17, 2025.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1ce825d80ba6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Claude Created Color Copier]]></title>
            <link>https://medium.com/@fwiles/claude-created-color-copier-253e98d176e0?source=rss-f89a9e6e9985------2</link>
            <guid isPermaLink="false">https://medium.com/p/253e98d176e0</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[claude]]></category>
            <dc:creator><![CDATA[Frank Wiles]]></dc:creator>
            <pubDate>Sun, 08 Jun 2025 00:00:10 GMT</pubDate>
            <atom:updated>2026-01-09T20:47:00.635Z</atom:updated>
            <content:encoded><![CDATA[<p>Today I’m working on a bunch of ReactJS frontend UI changes to a SaaS startup I’m working on named <a href="https://gandercpg.com/">Gander</a> in the <a href="https://www.investopedia.com/terms/c/cpg.asp">Consumer Packaged Goods (CPG)</a> space.</p><p>In previous coding sessions I had to keep opening up the Tailwind CSS file because while I love the names of these custom colors the designers gave us I haven’t quite memorized them yet. I know that fresh-hay is <em>yellow-ish</em> but I haven&#39;t internalized if it&#39;s the darker one or the lighter one quite yet.</p><p>Since I’m going to be doing a ton of color related stuff today I had Claude build me a little <a href="https://frankwiles.com/posts/productive-throw-away-tools">throw away tool</a> to speed up the day.</p><p>So I fired up Claude Code CLI and asked it, typos and all!</p><figure><img alt="Image of a various color swatches with memorable names and RGB hex values" src="https://cdn-images-1.medium.com/max/829/1*r5Ffo7Rvz3JvVYoFsnXBzQ.png" /></figure><blockquote><em>In </em><em>static/css/input.css I have a bunch of custom Tailwind CSS colors defined. I add a route to </em><em>frontend/src/router.jsx that is </em><em>/colors which has a simple page which just divides up the screen into evenly sized squares with the background set to one each of these colors. Please also make it display the CSS value (i.e. #xxxxxx) and the name minus the prefixing</em><em>--color- so display </em><em>goose-down rather than </em><em>--color-goose-down and make it so when you hover over the color&#39;s name it shows the &quot;copy&quot; icon and copies the name into the clipboard. This is only for local development speed up reasons and not for the actual users of this site.</em></blockquote><p><strong><em>I</em></strong> add a route? Apparently I need this second coffee. I actually hadn’t added the route and was wanting Claude to do it. Thankfully it understands my caffine deprived brain!</p><p>The React component it added isn’t bad:</p><pre>import { useState } from &quot;react&quot;<br><br>const colors = [<br>  { name: &quot;goose-down&quot;, value: &quot;oklch(97.74% 0.02 97.52)&quot; },<br>  { name: &quot;dark-cream&quot;, value: &quot;#f8eed2&quot; },<br>  { name: &quot;fresh-hay&quot;, value: &quot;#e9e4a6&quot; },<br>  { name: &quot;chocolate&quot;, value: &quot;#3b110c&quot; },<br>  { name: &quot;cocoa&quot;, value: &quot;#5d3d3a&quot; },<br>  { name: &quot;lavender&quot;, value: &quot;#bdb7fc&quot; },<br>  { name: &quot;coffee&quot;, value: &quot;#a05f1a&quot; },<br>  { name: &quot;gander-red&quot;, value: &quot;#da1c1c&quot; },<br>  { name: &quot;cinnamon&quot;, value: &quot;#8b372b&quot; },<br>  { name: &quot;sunset-orange&quot;, value: &quot;#dd5013&quot; },<br>]<br><br>export const Colors = () =&gt; {<br>  const [copiedColor, setCopiedColor] = useState(null)<br><br>  const copyToClipboard = async (colorName) =&gt; {<br>    try {<br>      await navigator.clipboard.writeText(colorName)<br>      setCopiedColor(colorName)<br>      setTimeout(() =&gt; setCopiedColor(null), 2000)<br>    } catch (err) {<br>      console.error(&quot;Failed to copy text: &quot;, err)<br>    }<br>  }<br><br>  return (<br>    &lt;div className=&quot;p-8&quot;&gt;<br>      &lt;h1 className=&quot;text-3xl font-bold mb-8 text-chocolate&quot;&gt;Color Palette&lt;/h1&gt;<br>      &lt;div className=&quot;grid grid-cols-5 gap-4 auto-rows-fr&quot;&gt;<br>        {colors.map((color) =&gt; (<br>          &lt;div<br>            key={color.name}<br>            className=&quot;aspect-square rounded-lg shadow-lg overflow-hidden border border-gray-200&quot;<br>            style={{ backgroundColor: color.value }}<br>          &gt;<br>            &lt;div className=&quot;h-full flex flex-col justify-end&quot;&gt;<br>              &lt;div className=&quot;bg-white bg-opacity-90 p-3 backdrop-blur-sm&quot;&gt;<br>                &lt;div className=&quot;text-sm font-mono text-gray-600 mb-1&quot;&gt;<br>                  {color.value}<br>                &lt;/div&gt;<br>                &lt;button<br>                  onClick={() =&gt; copyToClipboard(color.name)}<br>                  className=&quot;group flex items-center gap-2 text-sm font-medium text-gray-800 hover:text-blue-600 transition-colors&quot;<br>                &gt;<br>                  &lt;span&gt;{color.name}&lt;/span&gt;<br>                  &lt;svg<br>                    className=&quot;w-4 h-4 opacity-0 group-hover:opacity-100 transition-opacity&quot;<br>                    fill=&quot;none&quot;<br>                    stroke=&quot;currentColor&quot;<br>                    viewBox=&quot;0 0 24 24&quot;<br>                  &gt;<br>                    &lt;path<br>                      strokeLinecap=&quot;round&quot;<br>                      strokeLinejoin=&quot;round&quot;<br>                      strokeWidth={2}<br>                      d=&quot;M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z&quot;<br>                    /&gt;<br>                  &lt;/svg&gt;<br>                  {copiedColor === color.name &amp;&amp; (<br>                    &lt;span className=&quot;text-green-600 text-xs&quot;&gt;Copied!&lt;/span&gt;<br>                  )}<br>                &lt;/button&gt;<br>              &lt;/div&gt;<br>            &lt;/div&gt;<br>          &lt;/div&gt;<br>        ))}<br>      &lt;/div&gt;<br>    &lt;/div&gt;<br>  )<br>}</pre><p>The use of useState and the timeout to make the string Copied! disappear is a nice little bit of UI but definitely not needed for a silly little tool like this but it&#39;s appreciated Claude.</p><p>Certainly adequate for a one shot prompt.</p><p><strong>5 minutes and $0.22 USD</strong> later, while I got myself a coffee, for this tool is going to pay dividends all day. Sure it will save me some time and keystrokes, but it will MOSTLY keep me focused on what I’m trying to <em>actually</em> do and not get distracted or frustrated by the mechanics of it.</p><p>I intended this to be a throw away tool, but I think I’ll keep it!</p><p>P.S. Don’t ask why the first color uses oklch() and the others are all RGB hex values. I honestly don&#39;t remember hah!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*iN8VwLkFFTQzGPvM.jpg" /></figure><p><em>Originally published at </em><a href="https://frankwiles.com/posts/claude-created-color-palette/"><em>https://frankwiles.com</em></a><em> on June 8, 2025.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=253e98d176e0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Productive Throw Away Tools]]></title>
            <link>https://medium.com/@fwiles/productive-throw-away-tools-52cec20690f3?source=rss-f89a9e6e9985------2</link>
            <guid isPermaLink="false">https://medium.com/p/52cec20690f3</guid>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[shell]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Frank Wiles]]></dc:creator>
            <pubDate>Sat, 07 Jun 2025 00:00:16 GMT</pubDate>
            <atom:updated>2026-01-08T16:43:17.010Z</atom:updated>
            <content:encoded><![CDATA[<p>Today I’m giving you permission to be lazy!</p><p>Actually, the word <em>lazy</em> has some bad connotations to it. Let’s reframe that to be <em>efficient</em> or <em>ergonomic</em> instead, because that is what we’re really doing when we build tools.</p><ul><li>Even if those tools are only for today</li><li>Even if only for this particular situation</li><li>Even if we only use them a couple of times</li></ul><p>If the tool gets you over a <a href="https://frankwiles.com/speedbumps/">speedbump</a> or saves you even a couple of minutes more than it took to create it, <strong>it is worth doing!</strong></p><p>I built two stupid simple tools and they easily <strong>doubled</strong> my productivity for the morning.</p><h3>The Situation</h3><p>Today I’m working on a product idea and before I invest a bunch of time in this idea I wanted to build a little proof of concept to collect all the data (think telemetry data) that would be necessary to make the product useful and thus successful. In the interest of time I don’t want to build a user interface for this, I just want to spit out the data in JSON as nicely formatted as possible. So that’s what I’m doing.</p><h3>The Problem(s)</h3><p>I’m saving time by not building a bunch of UI related code, which is great. But the problem is now I don’t have a great way to visualize the data I’m capturing. What the code is doing is creating a <em>unique directory per run</em> in the format session_YYYYMMDD_HHMMSS (e.g. session_20250607_125713) and creating a few dozen JSON files filled with my data.</p><p>In this situation I’m not really concerned with how big the data is, the total size of of one of these directories is 200K to 300K. Small enough I don’t have to care about efficiency at all.</p><p>This <strong>IS</strong> a throw away tool after all right?</p><p>I realized I have two problems:</p><ol><li>I quickly end up with dozens of these directories as I work on the code which is messy and annoying</li><li>While the date/time format is an obvious way to store this but makes it harder than it should be to look at the most recent run</li></ol><p>Neither of these are <strong>real problems</strong>.</p><p>They’re speedbumps that slow me down and make me focus on the wrong things. When my brain wants to be looking at the data it first has to figure out, several times an hour, which run is the latest and which file I want to open.</p><p>I lose the focus.</p><p>I lose the flow.</p><h3>The Solution</h3><p>I figured there had to be a way to have <a href="https://frankwiles.com/posts/just-do-it/">just</a> make this easier for me. So I was super lazy and asked Claude to create me two just recipes to solve the two problems I’m having.</p><p>Here they are:</p><pre># Clean up old session directories, keeping the latest X (default: 5)<br>session-cleanup keep=&quot;5&quot;:<br>    #!/usr/bin/env bash<br>    set -euo pipefail<br><br>    # Find all session_* directories sorted by modification time (newest first)<br>    sessions=($(ls -dt session_* 2&gt;/dev/null || true))<br><br>    if [ ${#sessions[@]} -le {{ keep }} ]; then<br>        echo &quot;Found ${#sessions[@]} session directories, keeping all (limit: {{ keep }})&quot;<br>        exit 0<br>    fi<br><br>    # Calculate how many to remove<br>    to_remove=$((${#sessions[@]} - {{ keep }}))<br>    echo &quot;Found ${#sessions[@]} session directories, removing $to_remove oldest (keeping {{ keep }})&quot;<br><br>    # Remove the oldest directories<br>    for (( i={{ keep }}; i&lt;${#sessions[@]}; i++ )); do<br>        echo &quot;Removing ${sessions[$i]}&quot;<br>        rm -rf &quot;${sessions[$i]}&quot;<br>    done<br><br># Change to the latest session directory<br>latest-session-path:<br>    #!/usr/bin/env bash<br>    set -euo pipefail<br><br>    latest=$(ls -dt session_* 2&gt;/dev/null | head -n1 || true)<br><br>    if [ -z &quot;$latest&quot; ]; then<br>        echo &quot;No session directories found&quot; &gt;&amp;2<br>        exit 1<br>    fi<br><br>    echo &quot;$latest&quot;</pre><p>The first allows me to run just session-cleanup and have it keep the last five runs. Or just session-cleanup 1 to keep the very last one. With just&#39;s command line completion this really becomes just s&lt;TAB&gt; so it&#39;s quick and easy.</p><p>The second gives me the relative path of the latest run. Which is useful, but <em>not quite as useful as it could be</em>.</p><p>So I wrote a third which opens all of the files in the latest run in NeoVim!</p><pre>open-latest-session:<br>    nvim $(just latest-session-path)/*</pre><p>Having a just recipe call another one is a great pattern to use FYI. Now I can execute just open-latest-session and instantly view these JSON files in NeoVim which itself makes it easy to move between each file, search for specific keys, etc.</p><p>And again command line completion makes this just o&lt;TAB&gt;.</p><h3>What now?</h3><p>I spent maybe 90 seconds prompting Claude, waiting for it’s response, and pasting it into my Justfile. I spent maybe another minute or two making my open-latest-session command as I think I had to give it a couple of tries to get the shell syntax correct.</p><p>I was time ahead after running them a few times.</p><p>Which is why this works! If I had to spend 30 minutes writing and debugging these I wouldn’t. I wouldn’t see the time risk as worth the expected gain. I’d just suffer through.</p><p>With these I was able to iterate on my <strong>REAL PROBLEMS</strong> faster. Catch mistakes where the wrong data was collected or when it was placed into the wrong bit of JSON structure more quickly.</p><p>I was focused and far more productive for hours with a couple of minutes spent on tool building.</p><p><strong>Where in your projects should you be building STUPID LITTLE TOOLS like this?</strong></p><p>Hopefully this was useful to you. I find these little bits of extremely specific productivity gains awesome when someone shows them to me, please share this with your friends and coworkers you think would it benefit!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*wYTm0xKeMNyCldBt.jpg" /></figure><p><em>Originally published at </em><a href="https://frankwiles.com/posts/productive-throw-away-tools/"><em>https://frankwiles.com</em></a><em> on June 7, 2025.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=52cec20690f3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[/usr/bin/just do it]]></title>
            <link>https://medium.com/@fwiles/usr-bin-just-do-it-685ad79cb80e?source=rss-f89a9e6e9985------2</link>
            <guid isPermaLink="false">https://medium.com/p/685ad79cb80e</guid>
            <category><![CDATA[shell]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Frank Wiles]]></dc:creator>
            <pubDate>Sat, 26 Apr 2025 00:00:48 GMT</pubDate>
            <atom:updated>2025-04-27T15:16:02.398Z</atom:updated>
            <content:encoded><![CDATA[<p>When working on projects of any real size you end up with a few to a few dozen project specific commands. You might call them commands, recipes, or scripts. You may have implemented them in Bash, a Makefile or folder full of a hodgepodge of various languages.</p><p>I’m here to tell you that you should be doing all of this with <a href="https://just.systems/man/en/">just</a> instead.</p><p>As a <a href="https://www.revsys.com/">consultant for 18 years</a>, I work on dozens of very different projects each year and just is one of those tools that improves each one. It&#39;s a bonus that it is very easy to incorporate!</p><p>Let’s dive into a small simple example that is a bit silly.</p><h3>Silly Example</h3><pre>@default:<br>  just --list <br><br># Get sued<br>@do it:<br>  echo &quot;We&#39;re going to do {{it}}&quot;<br>  echo &quot;P.S. Nike, please don&#39;t sue me&quot;</pre><p>I like to make the default command, the one run if you don’t give it a specific command to list all of the commands we’ve defined. This is the built in help I mentioned earlier.</p><p>If you don’t do this, the <em>first</em> command defined in your file becomes the <em>default</em> command which can be dangerous if it’s at all destructive.</p><p>If we run just with no options we now see this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*5zc1V-yLOsRMO0CTUMwsIw.png" /></figure><p>It is hard to make out with my shell’s color theme, but the it is a very light blue color to indicate that it is an argument of the do recipe. The simple comment above acts as our documentation to the right.</p><p>Now if we run just do it we&#39;ll have the following output:</p><pre>We&#39;re going to do it<br>P.S. Nike, please don&#39;t sue me</pre><p>And if we run just do something we get:</p><pre>We&#39;re going to do something<br>P.S. Nike, please don&#39;t sue me</pre><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FfDDDvC4VSvE%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DfDDDvC4VSvE&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FfDDDvC4VSvE%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/6826be2327183b0c939b44c909109236/href">https://medium.com/media/6826be2327183b0c939b44c909109236/href</a></iframe><h3>Why just?</h3><p>Here is a quick <em>TL;DR</em> of why you should be using the just command runner if you are in a hurry:</p><ul><li>It’s wicked fast and the syntax is simple</li><li>Built in help for your commands</li><li>Makes it easy to accept and use arguments</li><li>Recipes are composable and can call dependent recipes</li><li>You can write your recipes in a variety of languages if you wish</li><li>Shield your team from the minutae of a command and how it may need to change over time</li><li>Shell autocompletion of your custom recipes</li></ul><p>So why wouldn’t you want to use just? If you need make, use make obviously, but if you are not building a C/C++ project it&#39;s actually a really crappy command runner with esoteric syntax (tabs vs spaces, PHONY, etc). Honestly, the best reason I can come up with NOT using just to run commands is that, much like the Go programming language, it&#39;s difficult to Google search about!</p><h3>More justification</h3><p>Here are some other aspects of just that I personally love and find incredibly useful in our software development and devops projects.</p><p>For starters, the just binary looks above/behind your current location in your folder structure for the closest Justfile it can find. So you don&#39;t have to cd ../../../ up to the root of your project. The recipes you write also assume you want to run them from the perspective of the directory containing the Justfile, but you can <a href="https://just.systems/man/en/working-directory.html">override that easily</a> for cases where you want it to use your actually current working directory.</p><p>You can <a href="https://just.systems/man/en/groups.html">group recipes</a> together which is useful as your number of recipe commands grows over time. You can easily segment local dev items from things you run in CI to things you run in production for example.</p><p>There are extensions for all of your favorite editors to handle syntax highlighting in case you were worried about that.</p><h3>Standardization</h3><p>Since we work on several projects at the same time having just up do the same thing on each one, i.e. &quot;bring the project up locally for development&quot; is less friction than having to remember for Project A it&#39;s docker compose up and Project B it needs to be docker compose --profile=backend up.</p><h3>Ability to ignore</h3><p>In a few projects I’ve built a pair of recipes snapshot-db and restore-db which reach out to a remote system, grab a backup of the database, and then restore it into our local compose environment. My teammates only need to know which environment they want to snapshot and a name that is meaningful to them.</p><pre>$ just snapshot-db prod prod-april-27-2025<br># ... Time passes as it dumps the database and transfers ...<br>$ just restore-db prod-april-27-2025</pre><p>They do not need to be concerned with <em>HOW</em> those commands work and most importantly do not need to be informed or learn a new process if how we do it changes over time. Next time they git pull the get the new process.</p><h3>Ideas for commands to create</h3><p>I find it useful to think about how my team and I might use tools like this before investing the time to learn them and switch. Here is a large sample of commands we have in real world projects.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/852/1*e7VC_VsUkikhlDWqZhnLig.png" /></figure><p>Here is a screenshot of the just help output from a larger project to give you an idea of many different commands we usually end up defining.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q1dZWyH652O_RwQQ04dcXQ.png" /></figure><h3>Installing just</h3><p>The easiest way for most people to install just is to use Homebrew or via Rust’s cargo</p><h3>Homebrew</h3><pre>$ brew install just</pre><h3>Cargo</h3><pre>$ cargo install just</pre><h3>Conclusion and Thanks</h3><p>Hopefully this post has intrigued you enough to give just a try.</p><p>Many thanks to <a href="https://jefftriplett.com/">Jeff Triplett</a> who introduced me and everyone at <a href="https://www.revsys.com/">REVSYS</a> to just. We&#39;ve standardized all of our projects with it over the last several years and we couldn&#39;t be happier about it.</p><p>If you like the general concept, but aren’t loving just for whatever reason awhile back <a href="https://harperreed.com/">Harper Reed</a> recommended <a href="https://mise.jdx.dev/">mise</a> to us. It has similar task running features but goes further and can handle things like different environment variables like <a href="https://direnv.net/">direnv</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*0kJ45ecUs28oKMBG.jpg" /></figure><p><em>Originally published at </em><a href="https://frankwiles.com/posts/just-do-it/"><em>https://frankwiles.com</em></a><em> on April 26, 2025.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=685ad79cb80e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Git Pulled What???]]></title>
            <link>https://medium.com/@fwiles/git-pulled-what-0d442dd7d803?source=rss-f89a9e6e9985------2</link>
            <guid isPermaLink="false">https://medium.com/p/0d442dd7d803</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[git]]></category>
            <dc:creator><![CDATA[Frank Wiles]]></dc:creator>
            <pubDate>Tue, 01 Apr 2025 00:00:00 GMT</pubDate>
            <atom:updated>2025-04-01T15:22:58.857Z</atom:updated>
            <content:encoded><![CDATA[<p>I have been trying to spend a bit more time optimizing my day to day workflows. Not sure why it bugged me today, but something about my git CLI workflow didn’t feel right today.</p><p>Unlike most of my peers I bounce around between several git repos every single day rather than working in a small handful on a routine basis. When I switch I’m obviously going to git pull in the latest changes and then I often questions.</p><h3>The Questions</h3><ol><li>What commits did I just pull in?</li><li>What is the git diff compared to just before the pull?</li></ol><p>I figured there had to be a way to do this without much trouble and I was pleasantly surprised to discover it is not hard to accomplish (especially when you just ask Claude hehe).</p><p>To display all of the commit messages you just pulled in you run:</p><pre>$ git log @{1}..</pre><p>And to display the diff between before your pull and right now is:</p><pre>$ git diff @{1}..</pre><p>The @{1} here specifically represents the &quot;previous position of HEAD&quot;. HEAD or @ represents the current HEAD position,@{1} the previous state, and @{2} would be two moves ago. I doubt I&#39;ll ever use the later, but it helps to understand what the syntax is doing here.</p><p>I’ve got a pretty good memory, but I know I’m not going to remember this syntax very easily so I created two little zsh aliases to make it easier.</p><pre>pulllog() {<br>  git log @{1}..<br>}<br><br>pulldiff() {<br>  git diff @{1}..<br>}</pre><p>Now I can very easily see what changes I just pulled in! This is a small micro-optimization of my workflow but an important one. In the past I’ve done a silly dance of:</p><ol><li>Find the last commit I wrote or remember reviewing</li><li>git log &lt;sha&gt; or git diff &lt;sha&gt; from that commit</li></ol><p>It’s multi-step for one, but it’s also prone to error on my part as it’s easy to grab the wrong commit sha or be wrong about what I felt was “last”.</p><h3>Alternatives</h3><p>After I made these I also discovered git aliases @{1} to ORIG_HEAD so you can also use the alternative forms of:</p><pre>$ git log ORIG_HEAD..<br>$ git diff ORIG_HEAD..</pre><p>If you don’t feel like making some aliases. Another option is you can use git pull -v which will show you the commit messages but doesn&#39;t help if you&#39;re wanting to see the diff.</p><p><em>Hopefully now you will never be confused or surprised after you pull in some new code changes going forward!</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*BB2J5enH09GBkR1j.jpg" /></figure><p><em>Originally published at </em><a href="https://frankwiles.com/posts/two-handy-git-aliases/"><em>https://frankwiles.com</em></a><em> on April 1, 2025.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0d442dd7d803" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ergonomic React Queries]]></title>
            <link>https://medium.com/@fwiles/ergonomic-react-queries-2754e54c38d7?source=rss-f89a9e6e9985------2</link>
            <guid isPermaLink="false">https://medium.com/p/2754e54c38d7</guid>
            <category><![CDATA[react-query]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Frank Wiles]]></dc:creator>
            <pubDate>Sat, 09 Nov 2024 00:00:28 GMT</pubDate>
            <atom:updated>2024-11-13T17:32:43.503Z</atom:updated>
            <content:encoded><![CDATA[<p>This post is mostly for future me as I’ve done this on a few projects, but for some reason keep reverting back to a suboptimal pattern.</p><p>I use React and <a href="https://tanstack.com/query/latest/docs/framework/react/overview">react-query</a> a LOT. It’s the only way to fly when it comes to keeping state in a React app. The defaults and ability to easily cache and invalidate responses saves me a TON of time in every projects while still providing a great user experience.</p><p>However, I often make it a little harder on myself than it needs to be. I blame some mild PTSD from my early days getting used to React hooks.</p><h3>Filesystem Layout</h3><p>To give you some more context, most of my projects have a file system layout like this.</p><pre>src/<br>    queries/<br>        users.js<br>        folders.js<br>    components/<br>        ...<br>    views/<br>        folders/<br>            FolderList.jsx</pre><p>So 99% of the time my queries are being used from either components or views. Mostly views.</p><h3>The Bad Pattern</h3><p>You can read up more on how react-query works, but here is an example of the “bad pattern”. Ok it’s no <em>bad</em>, it’s just not great. This is my first inclination, but it leads to lots of subtle bugs around mistakes in your <a href="https://tanstack.com/query/latest/docs/framework/react/guides/query-keys">query keys</a> and <a href="https://tanstack.com/query/latest/docs/framework/react/guides/query-options">query options</a>.</p><p>I’m sad to report I’ve spent many hours hunting bugs that ended up being the difference between [&quot;users&quot;, 14] and [&quot;user&quot;, 14]. Not to mention finding these from teammates.</p><pre>// In FolderList.jsx<br>import React from &#39;react&#39;<br>import { useQuery } from &quot;@tanstack/react-query&quot;<br>import { Link } from &quot;react-router-dom&quot;<br><br>import { getFolders } from &quot;../../queries/folders&quot;<br><br>export const FolderList = () =&gt; {<br>  const folders = useQuery({<br>    queryKey: [&quot;folders&quot;],<br>    queryFn: getVendors,<br>    staleTime: 60 * 1000 * 2,<br>    cacheTime: 60 * 1000 * 5,<br>  })<br>  // ...<br>}</pre><p>Here we’re direclty importing useQuery(), our fetching function, and settings options. And we have to repeat this all over the place, anywhere we&#39;re grabbing our list of folders from the API.</p><h3>The Good Pattern</h3><pre>// In queries/folders.jsx<br>import { useQuery } from &quot;@tanstack/react-query&quot;<br><br>export const useFolders = () =&gt; {<br>  return useQuery({<br>    queryKey: [&quot;folders&quot;],<br>    queryFn: getVendors,<br>    staleTime: 60 * 1000 * 2,<br>    cacheTime: 60 * 1000 * 5,<br>  })<br>}<br><br>// In views/folders/FolderList.jsx<br>import { useQuery } from &quot;@tanstack/react-query&quot;<br>import { useFolders } from &quot;../../queries/folders&quot;<br><br>export const FolderList = () =&gt; {<br>  const folders = useFolders()<br>  // ...<br>}</pre><p>I’m not sure why I have this ingrained feeling that hooks are different. The better pattern is to define all of this in queries/folders.js and just return it.</p><p>Isn’t that so much nicer?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*JnOe4OX47YNvxmEr.jpg" /></figure><p><em>Originally published at </em><a href="https://frankwiles.com/posts/ergonomic-react-queries/"><em>https://frankwiles.com</em></a><em> on November 9, 2024.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2754e54c38d7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Your pytest fixtures can return containers]]></title>
            <link>https://medium.com/@fwiles/your-pytest-fixtures-can-return-containers-95f8f5033721?source=rss-f89a9e6e9985------2</link>
            <guid isPermaLink="false">https://medium.com/p/95f8f5033721</guid>
            <category><![CDATA[pytest]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Frank Wiles]]></dc:creator>
            <pubDate>Sat, 09 Nov 2024 00:00:07 GMT</pubDate>
            <atom:updated>2024-11-13T17:34:48.503Z</atom:updated>
            <content:encoded><![CDATA[<p>As you probably know I’m a <a href="https://www.revsys.com/tidbits/pytest-fixtures-are-magic/">big fan of pytest fixtures</a> and use them on nearly every project we work on at <a href="https://www.revsys.com/">REVSYS</a>.</p><p>I had a not uncommon situation that I solved in a new way today and wanted to share it. It’s VERY simple, but something I can imagine many developers over looking. I overlooked it until today.</p><h3>The situation</h3><p>I’m building a SaaS product with Django that has the usual problem of needing my User to have access to one or more Customer models. Like many SaaS products this one is going to have the pattern like Sentry, Rollbar, and many many others where as the currently logged in user you &quot;switch&quot; between which accounts you&#39;re working with at any given moment.</p><p>In this product, Customer is our &quot;account&quot; model.</p><p>To do make this a little more sane I on the User model I&#39;ve added a current_customer foreign key. When a user registers or gets invited to a customer this is set and it&#39;s changed any time the user &quot;switches&quot;.</p><p>Pretty straight forward so far.</p><p>Normally, I would define a separate fixture for “Customer X” and also create a “User X” fixture. So I can do things like:</p><pre>def test_switching(x_user, x_customer, y_customer):<br>  assert x_user.current_customer == x_customer<br><br>  switch(x_user, y_customer)<br><br>  assert x_user.current_customer == y_customer</pre><p>This looks and seems logical, but there is a problem. These fixtures depend on each other. I can’t set x_user&#39;s current customer without having the x_customer already built and while it&#39;s probably possible to get the fixture ordering <em>JUST</em> right, it&#39;s brittle.</p><h3>Return a Container instead</h3><p>Instead, we should return a small container object! I’m ommitting the imports for brevity. And yes, this could be a <a href="https://docs.python.org/3/library/dataclasses.html">dataclass</a> to make it even shorter.</p><pre>class CustomerContainer:<br>    user = None<br>    customer = None<br><br>    def __init__(self, customer, user):<br>      self.customer = customer<br>      self.user = user<br><br>@pytest.fixture<br>def x(db):<br>  user, created = User.objects.get_or_create(...)<br>  customer, created = Customer.objects.get_or_create(...)<br><br>  user.current_customer = customer<br>  user.save()<br><br>  return CustomerContainer(customer=customer, user=user)</pre><p>This allows us to build these together, pass around a small object to access them in a natural feeling way. Now our test can look like this.</p><pre>def test_switching(x, y):<br>  assert x.user.current_customer == x.customer<br><br>  switch(x.user, y.customer)<br><br>  assert x.user.current_customer == y.customer</pre><p>Obviously you shouldn’t be using x and y as your fixture names in favor of something more descriptive. Because I&#39;m building this product with a friend named &quot;Sam&quot; I actually have the fixture containers named frank and sam to hold our two Customer objects and the associated users.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*TG_XizZFnpdFS_Z2.jpg" /></figure><p><em>Originally published at </em><a href="https://frankwiles.com/posts/pytest-fixture-containers/"><em>https://frankwiles.com</em></a><em> on November 9, 2024.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=95f8f5033721" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating a PostgreSQL database using psycopg]]></title>
            <link>https://medium.com/@fwiles/creating-a-postgresql-database-using-psycopg-842a7bf786c9?source=rss-f89a9e6e9985------2</link>
            <guid isPermaLink="false">https://medium.com/p/842a7bf786c9</guid>
            <category><![CDATA[postgresql]]></category>
            <category><![CDATA[python-programming]]></category>
            <dc:creator><![CDATA[Frank Wiles]]></dc:creator>
            <pubDate>Mon, 21 Oct 2024 00:00:26 GMT</pubDate>
            <atom:updated>2024-10-25T21:55:39.165Z</atom:updated>
            <content:encoded><![CDATA[<p>Are you getting a postgres syntax error about an extra or missing quote around your database, table, or index you’re trying to create with Python?</p><p>Are you getting that error creating, dropping, or altering <em>things</em> in PostgreSQL via psycopg2 or psycopg3?</p><p>By <em>things</em> I mean all of the database objects that aren’t rows. Yeah, I’ve been there friend. Just now in fact!</p><p>This one is frustrating to debug and hard to Google for a solution. I’ve run into this <strong>AT LEAST THREE TIMES</strong> in recent years and I always have to <em>re-discover</em> the answer the hard way.</p><h3>The Issue</h3><p>Here is how you normally use psycopg 2 or 3. I’ve omitted the connection info and other boilerplate to focus on the important bits of code.</p><p>So it is reasonable to assume that something like this would work:</p><pre>import psycopg2<br><br>conn = psycopg2.connect(...)<br>cursor = conn.cursor()<br>cursor.execute(&quot;DROP TABLE IF EXISTS %s WITH(FORCE);&quot;, [&quot;my-table&quot;])</pre><p>and confusing when you instead get this error:</p><pre>syntax error at or near &quot;&#39;my-table&#39;&quot; LINE 1: DROP DATABASE IF EXISTS &#39;my-table&#39; WITH (FORCE);</pre><p>If you haven’t poked around in a psql shell in awhile PostgreSQL is rightfully picky about how things are quoted in the SQL you write. The first INSERT query works because we&#39;re having psycopg2 represent our string ... <em>as a string</em> ...</p><p>The second DOES NOT work because while the table name feels like it should be yet another string, it’s actually an identifier. And should be either bare, without quotes, or with double-quotes. Strings on the other hand use single quotes.</p><p>So this manifests in the seemingly odd &quot;&#39;&lt;value&gt;&#39;&quot; situation. psycopg is wrapping your <em>string</em> with single quotes and then PostgreSQL is assuming it is an identifier, and you can&#39;t use single quotes in an identifier.</p><p>Once you know this fact, and on closer inspection, it does make sense. It just is not terribly useful in leading you to the solution.</p><h3>The Solution</h3><p>Luckily the solution is easy to implement, but for whatever reason hard for me to remember I need it so infrequently.</p><p>We need instead to do:</p><pre>cursor.execute(<br>    sql.SQL(<br>        &quot;DROP TABLE IF EXISTS {} (FORCE);&quot;).format(sql.Identifier(&quot;my-table&quot;)<br>    )<br>)</pre><p>psycopg’s <a href="https://www.psycopg.org/psycopg3/docs/api/sql.html#psycopg.sql.SQL">sql.SQL</a> is another way to format SQL statements. And this one allows us to denote that what we’re passing is an identifier and not a string, number, or other data type.</p><h3>The Next Problem</h3><p>The next problem you may run into, is if you’re trying to drop or create specifically a database.</p><pre>DROP DATABASE cannot run inside a transaction block</pre><p>This one is easier to find a solution online, but it’s just a matter of turning on auto commit mode to your connection like this:</p><pre>import psycopg2<br><br>conn = psycopg2.connect(...)<br>conn.autocommit = True</pre><p>While I wrote this blog post for <em>future me</em> that runs into this particular problem again, I do hope you have found it useful.</p><p>Hopefully, this saved you the frustrating hour I had to spend on it. Again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*YUDhIXQG_6yMp12b.jpg" /></figure><p><em>Originally published at </em><a href="https://frankwiles.com/posts/psycopg2-create-database/"><em>https://frankwiles.com</em></a><em> on October 21, 2024.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=842a7bf786c9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lets just try it]]></title>
            <link>https://medium.com/@fwiles/lets-just-try-it-3cf251edb40a?source=rss-f89a9e6e9985------2</link>
            <guid isPermaLink="false">https://medium.com/p/3cf251edb40a</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[process]]></category>
            <dc:creator><![CDATA[Frank Wiles]]></dc:creator>
            <pubDate>Tue, 26 Sep 2023 15:51:47 GMT</pubDate>
            <atom:updated>2023-09-26T15:51:47.485Z</atom:updated>
            <content:encoded><![CDATA[<p>Years ago, a client said, “Let’s just try it for a month and see how it goes.” That week, I had a drink with my former boss, and he said, “Oh, that’s a trick. He knows it’s harder to change the process BACK but easier to sell it this way. You got played.”</p><p>My former boss was spot on. The change was to go from async Slackbot standup reports to synchronous Zoom meetings. Several years later, not only did we still have Zoom standups, but many on the team had daily and a couple of weekly ones. It contributed to a lot of context-switching and slowed down the project noticeably and immediately.</p><p>It is not my intention to rail on meetings. That’s for another, much longer blog post!</p><h3>We’ll just leave this in for a couple of sprints</h3><p>Another team I worked with needed a one-off feature flag for a rush request from an important client. Instead of implementing a real feature flag system or using a third-party service, we were asked to hack in a Django setting for this particular customer’s unique ID with the promise it would be removed, or we would implement some real feature flagging “in a couple of sprints.”</p><p>You know where this is going. The one-off flag was still there years later and was there when the project was scrapped due to not hitting its goals. However, it didn’t meaningfully impact the project in any way.</p><h3>But trying things is good…</h3><p>Yes, trying new things in an effort to improve is necessary and the basis for all real progress. The hard part is having the fortitude to push back on changes that don’t work.</p><p>The harder part is being able to tell the difference in the first place.</p><p><a href="https://jamesclear.com/new-habit">Research shows</a> that it takes about 21 days to form a new habit. Once solidified into a habit, it takes effort to overcome the inherent inertia of the new process. Conversely, trying something for a day or two can easily yield misleading information. You could have done more yesterday because of better sleep and not your new fancy issue tracker labeling system.</p><h3>How to tell the difference</h3><p>Here are some methods and tips you can use to make better decisions on when to push back hard on <em>trying something</em>:</p><ol><li>Establish the metric(s) you’ll judge it against upfront. Otherwise, how will you tell if it’s working?</li><li>No metrics that make sense or you’re too lazy to capture them? Ok, then it’s a <em>gut decision</em> and more guts are better than one. At the agreed-upon time, have the whole team vote for the change to stay or go and require a 2/3rds majority to keep it. If it’s not obviously good or even just not liked by the vast majority of your team, why do you want to keep it? Smells like ego or a personal preference to me.</li><li>Is it reasonable to assume the upside is far greater than the downside? While lots of 1% improvements add up over time, a 25% risk for a 1% gain is usually not worth it. Avoid these entirely.</li><li>Consider the change holistically. It may be worth trying if it’s a 1% slowdown for one team member once a week but a possible 5% boost for several other team members. Note this works conversely for managers. A 10% speed up for that report you must do weekly should not slow the <em>rest of your team down</em> 1% each.</li><li>Horse trade. We’ll try your idea for a month if you’ll try scraping/changing this other process that gets in our way. The net effect of these two changes could be a win.</li></ol><p>Obviously, don’t push back on all changes <em>just because</em> they are changes and you don’t like change but <strong>DO</strong> push back on changes that aren’t either demonstrably positive or embraced by the majority team.</p><p>Or maybe just try it for a month?</p><p><em>Need help optimizing your development team’s ability to get shit done? Frank and his </em><a href="https://www.revsys.com/hello/"><em>team at REVSYS</em></a><em> can help guide you to 2X the velocity you’re seeing now.</em></p><p><em>Originally published at </em><a href="https://frankwiles.com/posts/lets-just-try-it/"><em>https://frankwiles.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3cf251edb40a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>