<?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: John Mitchell</title>
    <description>The latest articles on DEV Community by John Mitchell (@john_mitchell_4185d0dd9ed).</description>
    <link>https://dev.to/john_mitchell_4185d0dd9ed</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%2F2012500%2F00e6460d-4ed8-4a50-89e7-29af21b659cc.jpg</url>
      <title>DEV Community: John Mitchell</title>
      <link>https://dev.to/john_mitchell_4185d0dd9ed</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/john_mitchell_4185d0dd9ed"/>
    <language>en</language>
    <item>
      <title>CI and CD have two different audiences</title>
      <dc:creator>John Mitchell</dc:creator>
      <pubDate>Sun, 23 Mar 2025 16:27:46 +0000</pubDate>
      <link>https://dev.to/john_mitchell_4185d0dd9ed/ci-and-cd-have-two-different-audiences-1o39</link>
      <guid>https://dev.to/john_mitchell_4185d0dd9ed/ci-and-cd-have-two-different-audiences-1o39</guid>
      <description>&lt;p&gt;CI should be fast, and give actionable feedback to its audience: the Developers. Whatever system delivers this is fine.&lt;/p&gt;

&lt;p&gt;CD should be predictable and reliable. Its goal is to deploy code/assets to a pre-production server so business can validate the feature changes. Again, whatever system does this is fine.&lt;/p&gt;

&lt;p&gt;Logically a single CICD system would be simpler. The part about "failure can happen in AWS CP which is not reflected in the triggering workflow" makes me nervous. I'd expect a CI to be "smarter" than CD, so a deploy-time error should show up sooner, in CI, vs after the handoff.&lt;/p&gt;

&lt;p&gt;The overall goal of any pipeline -- including CICD -- is to optimize fast, high-quality, reliable changes to create business value. Generally, getting code features into production so real users can see them.&lt;/p&gt;

&lt;p&gt;The specific quality/ scope/ speed/ cost/ complexity tradeoffs vary per company and per team. That's fine.&lt;/p&gt;




&lt;p&gt;Response to &lt;code&gt;Is it ever a good idea to split CI and CD across two providers?&lt;/code&gt; on &lt;a href="https://www.reddit.com/r/devops/comments/1jhvxam/is_it_ever_a_good_idea_to_split_ci_and_cd_across/" rel="noopener noreferrer"&gt;Reddit&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Starting Tests from Zero</title>
      <dc:creator>John Mitchell</dc:creator>
      <pubDate>Sun, 23 Mar 2025 16:25:58 +0000</pubDate>
      <link>https://dev.to/john_mitchell_4185d0dd9ed/starting-tests-from-zero-5f2b</link>
      <guid>https://dev.to/john_mitchell_4185d0dd9ed/starting-tests-from-zero-5f2b</guid>
      <description>&lt;p&gt;Often developers and businesses can't see the value that testing gives. Devs see it as a "tax", an extra thing that slows them down from doing their "real job". Businesses go into magical thinking mode, that Devs are always creating flawless features that deliver whatever the Business thinks it does and fits into the system.&lt;/p&gt;

&lt;p&gt;Tests don't &lt;em&gt;slow down&lt;/em&gt; development, then &lt;em&gt;pull the development forward&lt;/em&gt;. Writing "happy path" Unit Tests shows Devs what to work on next. Investing in high level End to End tests gives the Business confidence the system is working reliably and new changes aren't dangerous.&lt;/p&gt;

&lt;p&gt;Here's how to get started with tests if you have non. &lt;/p&gt;

&lt;h1&gt;
  
  
  Top-down vs Bottom-up: two different Audiences
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Write one or more end-to-end tests (E2E). This gives confidence that the entire app is solid, at the cost of being slow and not very detailed. The main benefit is for the Business: they can see and understand the results.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Back in the day, for a shopping site, our E2E test was "create user, add item to cart, checkout, validate there's a total cost" kind of thing. It was slow but had really obvious business value. Nowadays you'd do something like Playwright for this.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Write lots of "happy path" unit tests, generally one per non-obvious function. These are &lt;em&gt;fast&lt;/em&gt; and give a lot of info, but for a tiny scope: one function. Generally any time I have to think, I write a test.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Also write a unit test per bug, even if it's just "this doesn't work" or "expect some sort of Exception to happen here". Tests can be vague if that gives you actionable feedback as a developer.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;publish Test Coverage! This is great as you and your team -- and more importantly the Business -- can see this number and how it changes over time. New code makes number go down? Write tests for the new code (or old code, if that makes sense for your team). Bug happens? Write test -- number goes up -- then fix the bug.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The overall goal is getting into a Value Feedback Cycle. For the Business audience, they want confidence the app is functioning as expected, that a new deploy won't bring down the site. For the Dev audience, they want fast actionable feedback for them to complete the features. The two types of tests: End to End and Unit Tests, give this feedback to the two audiences.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advanced&lt;/strong&gt;: unit tests don't cover much code. Consider adding API-level tests like with Postman. These are cheaper in that a single test checks more code, even though at a less detailed level. They're also fun for the Business and Devs to see because a single API test makes the Test Coverage go up more than from a single Unit Test.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>FP &gt; OO</title>
      <dc:creator>John Mitchell</dc:creator>
      <pubDate>Sun, 17 Nov 2024 18:46:51 +0000</pubDate>
      <link>https://dev.to/john_mitchell_4185d0dd9ed/fp-oo-2hej</link>
      <guid>https://dev.to/john_mitchell_4185d0dd9ed/fp-oo-2hej</guid>
      <description>&lt;p&gt;I'm a fan of Object Oriented programming (OOP), but don't use it much. The challenge is that nearly always the state and functionality gets mashed together, so it's hard to modify either one. Example: OO can be harder to test because it's not obvious which sequences of init / update functions are needed before you can actually test the resulting object.&lt;/p&gt;

&lt;p&gt;Functional Programming (FP) makes adaptation and testing much easier.&lt;/p&gt;

&lt;p&gt;Occasionally I'll do a "class" that's just a bunch of static methods, like a mini-library of related functions. Each function accepts state, and returns it. No side effects.&lt;/p&gt;

&lt;p&gt;Rich Hickey's classic talk &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://www.youtube.com/watch?v=SxdOUGdseq4" rel="noopener noreferrer"&gt;Simple Made Easy&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;really brought the ideas together for me.&lt;/p&gt;




&lt;p&gt;In response to &lt;a href="https://www.reddit.com/r/ExperiencedDevs/comments/1gthnfe/hesitation_to_write_actual_oop/" rel="noopener noreferrer"&gt;Hesitation to Write Actual OOP&lt;/a&gt; on Reddit.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Re: I Like Makefiles</title>
      <dc:creator>John Mitchell</dc:creator>
      <pubDate>Sun, 17 Nov 2024 18:43:45 +0000</pubDate>
      <link>https://dev.to/john_mitchell_4185d0dd9ed/re-i-like-makefiles-5h76</link>
      <guid>https://dev.to/john_mitchell_4185d0dd9ed/re-i-like-makefiles-5h76</guid>
      <description>&lt;p&gt;in response to &lt;code&gt;I Like Makefiles&lt;/code&gt; on &lt;a href="https://news.ycombinator.com/item?id=41607059" rel="noopener noreferrer"&gt;Hacker News&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I adore Make. I've written one (or more) for every single task or project I've touched in the last 20 years.&lt;br&gt;
No smarts. It's just a collection of snippets with a few variables. "make run", "make test", "make lint", that kind of thing.&lt;/p&gt;

&lt;p&gt;"make recent" = lint then run the most recently modified script.&lt;/p&gt;

&lt;p&gt;You could do the same thing with Bash or other shells, but then you get stuck into Developer Land. Things are so much more complicated, without giving extra value. Make is just a DSL saying "files like this, are made into files like that, by running this command or two". That's it.&lt;/p&gt;

&lt;p&gt;This is incredibly powerful!&lt;/p&gt;

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