<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="https://bearandgiraffe.com/feed/engineering.xml" rel="self" type="application/atom+xml" /><link href="https://bearandgiraffe.com/" rel="alternate" type="text/html" /><updated>2026-11-21T19:39:02+00:00</updated><id>https://bearandgiraffe.com/feed/engineering.xml</id><title type="html">Bear &amp;amp; Giraffe | Engineering</title><subtitle>Fractional CTO and senior engineering leadership for startups. We architect scalable systems and take products from MVP to mature infrastructure.</subtitle><entry><title type="html">Building an MVP Has Never Been Easier. But Building the Right MVP Still Takes Experience.</title><link href="https://bearandgiraffe.com/blog/building-an-mvp-with-ai/" rel="alternate" type="text/html" title="Building an MVP Has Never Been Easier. But Building the Right MVP Still Takes Experience." /><published>2026-11-21T15:00:00+00:00</published><updated>2026-11-21T15:00:00+00:00</updated><id>https://bearandgiraffe.com/blog/building-an-mvp-with-ai</id><content type="html" xml:base="https://bearandgiraffe.com/blog/building-an-mvp-with-ai/"><![CDATA[<p>If you’ve ever had a software idea, you’ll probably be familiar with the frustration that comes with trying to get it off the ground.</p>

<p>You know the problem you want to solve. You understand the industry, the customers, the workflows and, quite possibly, exactly what the solution should look like.</p>

<p>But turning that idea into working software is another matter.</p>

<p>Traditionally, you had a few options. Learn to code yourself, find a technical co-founder, hire a development agency or bring in a freelance developer. All of these come with their own challenges, costs and, perhaps most importantly, time commitments.</p>

<p>For early-stage founders, this can be a significant barrier. You might spend months and a considerable amount of money getting to a point where you can finally put something in front of a customer.</p>

<p>That’s beginning to change.</p>

<p>AI coding tools have made it possible to build software at a speed that would have been difficult to imagine just a couple of years ago. Tools like Claude Code are changing the way we approach software development, creating opportunities to deliver MVPs faster and more efficiently.</p>

<p>But there’s an important distinction I’d like to make.</p>

<aside class="post-callout">
  <span class="post-callout__icon material-symbols-outlined" aria-hidden="true">lightbulb</span>
  <div class="post-callout__body">
    <p class="post-callout__label">The important distinction</p>
    <p class="post-callout__lead">AI makes building software faster. It doesn't automatically make building <strong>good</strong> software easier.</p>
    <p>And understanding that distinction is where the real opportunity lies.</p>
  </div>
</aside>

<h2 data-kicker="The Shift" id="from-idea-to-working-software-faster">From idea to working software, faster</h2>

<p>Until recently, getting an MVP built meant translating your idea into a technical specification, handing that specification to a developer and waiting for them to turn it into something tangible.</p>

<p>There was often a significant gap between what you imagined and what eventually appeared on the screen.</p>

<p>You’d have conversations about requirements, review designs, discuss technical decisions and wait for development cycles to complete. By the time you had something usable, you’d probably learned a few things about what you actually wanted to build.</p>

<p>AI is changing this feedback loop.</p>

<p>We’re now able to leverage AI coding tools to significantly accelerate the development process. Rather than manually writing every line of code, we can use tools like Claude Code to generate, modify and improve code within an established development environment.</p>

<p>This doesn’t mean handing over the entire development process to AI. It means using AI to take care of some of the more repetitive and time-consuming aspects of building software, freeing up experienced developers to focus on the decisions and functionality that really matter.</p>

<p>The result is that we can move from an idea to something tangible much more quickly.</p>

<p>For founders, that means getting a usable version of their product in front of potential customers sooner, gathering feedback earlier and making better-informed decisions about where to invest their development budget.</p>

<p>That’s a big deal.</p>

<h2 data-kicker="Tooling" id="why-claude-code-is-particularly-interesting">Why Claude Code is particularly interesting</h2>

<p>There are plenty of AI tools that can generate code. What’s particularly interesting about Claude Code is that it goes beyond simply suggesting snippets of code or helping you write individual functions.</p>

<p>Claude Code is an agentic coding tool. It can work with an entire codebase, understand how different parts of an application fit together, make changes across multiple files, run commands, execute tests and iterate on its work.</p>

<p>In practical terms, we can describe a feature, ask Claude Code to help implement it and have it work through many of the development tasks that would traditionally require manual effort.</p>

<p>For example, imagine we’re building a platform that helps independent fitness instructors manage their clients.</p>

<p>We can use AI to accelerate the implementation of common functionality such as:</p>

<div class="post-compare">
  <div class="post-compare__card">
    <div class="post-compare__header"><span class="post-compare__title"><span class="material-symbols-outlined text-primary text-[20px]" aria-hidden="true">bolt</span>Common functionality</span><span class="post-compare__badge">Accelerate with AI</span></div>

    <ul>
      <li>User registration and authentication.</li>
      <li>Landing pages and standard website layouts.</li>
      <li>User profiles and account management.</li>
      <li>Basic administrative interfaces.</li>
      <li>Common database operations and application workflows.</li>
    </ul>

  </div>
  <div class="post-compare__card post-compare__card--accent">
    <div class="post-compare__header"><span class="post-compare__title"><span class="material-symbols-outlined text-primary text-[20px]" aria-hidden="true">psychology</span>What makes it different</span><span class="post-compare__badge">Where we spend our time</span></div>

    <ul>
      <li>A unique scheduling algorithm.</li>
      <li>An innovative client engagement process.</li>
      <li>A completely different way of managing memberships.</li>
    </ul>

  </div>
</div>

<p>These are all important parts of an application, but they’re rarely the reason someone chooses one fitness management platform over another.</p>

<p>The real value is in the functionality that makes this particular product different. Perhaps it’s a unique scheduling algorithm, an innovative client engagement process or a completely different way of managing memberships.</p>

<p>That’s where we want to spend our time.</p>

<p>By using Claude Code to accelerate the implementation of common components, we can spend more development time on the features that differentiate the business and create value for its customers.</p>

<p>And because we’re working within an established technical framework, we’re not starting from scratch every time we build something.</p>

<h2 data-kicker="Our Approach" id="ai-doesnt-replace-our-technical-expertise-it-amplifies-it">AI doesn’t replace our technical expertise. It amplifies it.</h2>

<p>One thing I think is important to clarify is that we’re not experimenting with a different technology stack for every project or asking AI to decide how an application should be built.</p>

<p>At Bear &amp; Giraffe, we have a preferred, specialized technology stack built around Ruby and Ruby on Rails.</p>

<p>We’ve invested years in understanding this technology, developing our approach and establishing best practices for building reliable, maintainable applications.</p>

<p>That experience is incredibly valuable when introducing AI into the development process.</p>

<p>Rather than asking an LLM to invent an architecture or make fundamental technical decisions, we can provide it with an established framework, conventions and instructions to work within.</p>

<p>We know how we want our applications structured. We know the patterns we prefer, how we handle authentication, how we organize business logic and how we approach security, testing and performance.</p>

<p>Claude Code can then help us generate much of the code that would traditionally have to be written manually.</p>

<p>Our developers remain responsible for reviewing the output, making architectural decisions, identifying potential issues and ensuring everything meets the standards we’d expect from professionally developed software.</p>

<p>This is an important distinction.</p>

<p>AI-generated code isn’t automatically good code. It still needs to be validated, tested, reviewed and optimized.</p>

<p>But when you combine the speed of AI with the experience of developers who understand the underlying technology, you get something particularly powerful.</p>

<blockquote class="pullquote">
  <p>We’re not replacing engineering expertise with AI. We’re using AI to make that expertise go further.</p>
</blockquote>

<h2 data-kicker="Playbook" id="how-were-using-ai-to-deliver-mvps-faster">How we’re using AI to deliver MVPs faster</h2>

<p>If I were working with a non-technical founder today who wanted to get an MVP off the ground, I’d approach the development process differently than I would have a few years ago.</p>

<p>The fundamentals of good product development haven’t changed. We still need to understand the problem, define the scope, build iteratively and validate our assumptions.</p>

<p>What’s changed is how quickly we can move through those steps.</p>

<p>Here’s how I’d approach it.</p>

<div class="post-steps">
  <div class="post-step">
    <h3 id="start-with-the-problem-not-the-technology">Start with the problem, not the technology</h3>

    <p>Before opening Claude Code or writing a line of code, we need to get really clear about what we’re trying to achieve.</p>

    <ul class="question-list">
      <li>Who is the customer?</li>
      <li>What problem are we solving?</li>
      <li>How are they currently solving it?</li>
      <li>What would make them willing to pay for a better solution?</li>
    </ul>

    <p>These questions are much more important than any technical decision.</p>

    <p>It’s surprisingly easy to get caught up in building features because they’re interesting or because AI makes them easy to create.</p>

    <p>Resist that temptation.</p>

    <p>Your MVP should be the smallest version of your product that allows you to test whether your underlying business idea has merit.</p>

  </div>
  <div class="post-step">
    <h3 id="focus-development-on-what-makes-your-product-different">Focus development on what makes your product different</h3>

    <p>Once we understand the problem, we can work backwards from the outcome we want to test.</p>

    <p>Let’s say you’re building a marketplace.</p>

    <p>You might eventually want customer accounts, seller accounts, listings, search, messaging, payments, reviews, notifications and analytics.</p>

    <p>But do you need all of those things to validate the idea?</p>

    <p>Probably not.</p>

    <p>Some functionality is common across almost every application. Authentication, user profiles, landing pages and basic administrative functionality are necessary, but they’re not necessarily where your competitive advantage lies.</p>

    <p>These are areas where we can leverage Claude Code to accelerate implementation.</p>

    <p>Instead of spending significant development time manually building familiar components, we can use AI to generate much of the initial implementation, with our developers reviewing and refining it.</p>

    <p>That gives us more time to focus on the interesting parts: the unique workflows, business logic and features that solve your customers’ problems in a different way.</p>

    <p>A good technical partner can also help you identify what you don’t need to build yet.</p>

    <p>The goal isn’t to build the complete vision. It’s to build enough of it to learn whether people actually want it.</p>

  </div>
  <div class="post-step">
    <h3 id="keep-the-agile-approach-but-accelerate-the-cycles">Keep the agile approach, but accelerate the cycles</h3>

    <p>One of the biggest misconceptions about AI-assisted development is that you need to change your entire approach to building software.</p>

    <p>I don’t think that’s necessary.</p>

    <p>The principles of agile development are still incredibly relevant.</p>

    <p>We still want to break the product into manageable pieces, prioritize functionality, develop iteratively, review progress and adapt based on feedback.</p>

    <p>What’s changed is the speed at which we can move through these cycles.</p>

    <p>With Claude Code, we can accelerate many of the implementation tasks that previously consumed a significant proportion of a development sprint.</p>

    <p>We can get common components out of the way faster, generate initial implementations of features and make changes without having to manually work through every line of code.</p>

    <p>This allows us to spend more time on product decisions, technical reviews and the functionality that really matters.</p>

    <p>It also means we can potentially go through several iterations in the time it might previously have taken to complete one.</p>

    <p>We’re not abandoning good software development practices. We’re making them more efficient.</p>

  </div>
  <div class="post-step">
    <h3 id="prototype-faster-and-validate-in-the-real-world">Prototype faster and validate in the real world</h3>

    <p>This is probably one of the most exciting opportunities AI brings to early-stage product development.</p>

    <p>Historically, even producing a prototype could involve a considerable amount of time and effort.</p>

    <p>You’d need to work through designs, create screens, define interactions and eventually get something developed before you could put it in front of users.</p>

    <p>AI changes that equation.</p>

    <p>We can now produce low-fidelity prototypes and working feature concepts much faster.</p>

    <p>Want to experiment with a different customer onboarding experience? We can build a basic version and test it.</p>

    <p>Want to see whether customers understand a new workflow? We can put together a prototype and get feedback.</p>

    <p>Want to compare two different approaches to a feature? We can potentially implement both without committing to a significant development effort.</p>

    <p>The important thing is that we’re not spending weeks perfecting something before finding out whether it’s useful.</p>

    <p>We can get ideas into the real world, observe how people interact with them and use that feedback to decide what to build next.</p>

    <p>This is particularly valuable for startups because so many early product decisions are based on assumptions.</p>

    <p>The faster you can test those assumptions, the faster you can establish whether you’re building something people actually need.</p>

    <p>And because the cost of experimenting is lower, you can afford to try more things.</p>

    <blockquote class="pullquote">
      <p>The biggest advantage isn’t simply that we can build faster. It’s that we can learn faster.</p>
    </blockquote>

  </div>
  <div class="post-step">
    <h3 id="make-sure-the-technical-foundations-are-right">Make sure the technical foundations are right</h3>

    <p>This is the part I’d be particularly careful about.</p>

    <p>Even if we’re using Claude Code to generate a significant proportion of the application, someone needs to take responsibility for the technical decisions.</p>

    <ul class="question-list">
      <li>What does the application architecture look like?</li>
      <li>How is authentication handled?</li>
      <li>How are permissions managed?</li>
      <li>How is customer data protected?</li>
      <li>How are automated tests structured?</li>
      <li>What happens when the application needs to support more users?</li>
    </ul>

    <p>You don’t necessarily need to solve every scaling problem on day one. In fact, I’d actively discourage overengineering an MVP.</p>

    <p>But you do need to make sensible decisions that allow the application to grow without having to throw everything away.</p>

    <p>AI can generate code, but it doesn’t automatically understand the commercial and technical implications of every decision.</p>

    <p>That’s where experience matters.</p>

    <p>A good technical foundation should make it easier to move quickly, not slow you down.</p>

  </div>
</div>

<h2 data-kicker="Advisory" id="the-new-role-of-a-fractional-cto">The new role of a fractional CTO</h2>

<p>I think this is where the role of a fractional CTO becomes particularly interesting.</p>

<p>Historically, a fractional CTO might help a founder choose a development team, establish a technical strategy, manage delivery and make sure the product was being built properly.</p>

<p>Those responsibilities haven’t disappeared.</p>

<p>But the way we deliver against them is changing.</p>

<p>Rather than simply managing a traditional development process, we can now work much more directly with founders and AI coding tools to get products built.</p>

<p>That might mean helping define the MVP, establishing the technical architecture, setting up Claude Code with the right project context and development conventions, and guiding the development process.</p>

<p>It might also mean reviewing AI-generated code, identifying potential security issues, making sure the application is tested properly and deciding when something is ready to go live.</p>

<p>The difference is that we’re able to deliver more with less manual development effort.</p>

<p>For some early-stage businesses, that means getting to market without needing to assemble a large development team.</p>

<p>You get access to technical experience when you need it, without necessarily taking on the cost of a full-time CTO or a large development team.</p>

<p>More importantly, you have someone looking at the bigger picture rather than simply making sure the latest prompt produces the desired result.</p>

<h2 data-kicker="For Founders" id="does-this-mean-you-can-build-your-startup-without-a-technical-co-founder">Does this mean you can build your startup without a technical co-founder?</h2>

<p>Potentially, yes.</p>

<p>I think this is one of the biggest opportunities AI presents to non-technical entrepreneurs.</p>

<p>If you’ve got a strong understanding of a market, a genuine problem to solve and the ability to get in front of customers, the barriers to building an initial product are considerably lower.</p>

<p>You might not need to find a technical co-founder before you can get started.</p>

<p>You might not need to raise a significant amount of money to fund an initial development project.</p>

<p>And you might not need to hire a team of developers just to find out whether your idea has potential.</p>

<p>You can get much further with a combination of your own expertise, AI-assisted development and experienced technical guidance.</p>

<p>However, I’d distinguish between building an MVP and running a software business.</p>

<p>As your product becomes more complex, your customer base grows and the consequences of technical problems become more significant, you’ll need to continue investing in the underlying technology.</p>

<p>AI doesn’t remove that responsibility.</p>

<p>It simply gives you more options about when and how you invest in it.</p>

<h2 data-kicker="The Real Advantage" id="the-opportunity-is-to-learn-faster-not-just-build-faster">The opportunity is to learn faster, not just build faster</h2>

<p>I think it’s easy to get caught up in the excitement of AI and focus entirely on how quickly we can generate software.</p>

<p>But speed of development isn’t really the most important thing.</p>

<p>The real opportunity is being able to test assumptions, gather feedback and make improvements much faster.</p>

<p>For a startup, that’s incredibly valuable.</p>

<p>Every week spent building the wrong thing is a week you could have spent learning what customers actually need.</p>

<p>If AI allows you to get a working product into the market sooner, you’ve got more time to validate the business, refine the proposition and work out whether there’s a viable opportunity.</p>

<p>That’s where the competitive advantage comes from.</p>

<p>Not from having the biggest codebase, the most sophisticated architecture or the longest list of features.</p>

<p>It’s from learning faster than everyone else.</p>

<h2 data-kicker="The Verdict" id="so-should-you-be-using-ai-to-build-your-mvp">So, should you be using AI to build your MVP?</h2>

<p>My answer would be yes, absolutely.</p>

<p>If you’re a non-technical founder with an idea for a software product, there has never been a better time to explore it.</p>

<p>Tools like Claude Code are making it possible to develop software faster, experiment with ideas more affordably and get working products into the hands of customers much sooner.</p>

<p>But I’d argue that the biggest opportunity isn’t necessarily for founders to become developers themselves.</p>

<p>It’s for experienced development teams to use these tools to deliver better results, faster.</p>

<p>At Bear &amp; Giraffe, we’re combining our experience building applications with Ruby and Ruby on Rails with AI-assisted development to accelerate the process without compromising on the quality of the end result.</p>

<p>We can spend less time on repetitive implementation work and more time on the things that make a product successful: understanding the problem, building the right features, making good technical decisions and getting real-world feedback.</p>

<div class="post-compare">
  <div class="post-compare__card">
    <div class="post-compare__header"><span class="post-compare__title"><span class="material-symbols-outlined text-primary text-[20px]" aria-hidden="true">lightbulb</span>You bring</span></div>

    <ul>
      <li>The industry knowledge.</li>
      <li>The business idea.</li>
      <li>The understanding of the problem.</li>
    </ul>

  </div>
  <div class="post-compare__card post-compare__card--accent">
    <div class="post-compare__header"><span class="post-compare__title"><span class="material-symbols-outlined text-primary text-[20px]" aria-hidden="true">terminal</span>We bring</span></div>

    <ul>
      <li>The technical expertise.</li>
      <li>The development experience.</li>
      <li>The tools to turn those ideas into working software.</li>
    </ul>

  </div>
</div>

<blockquote class="pullquote">
  <p>The barrier to building software is coming down. The opportunity for entrepreneurs is going up.</p>
</blockquote>

<p>And I think that’s a pretty exciting place to be.</p>

<section class="post-cta">
  <div class="post-cta__label"><span class="material-symbols-outlined text-[20px]" aria-hidden="true">verified</span>Bear &amp; Giraffe</div>
  <h2 id="lets-talk">Thinking about building your MVP? Let's have a conversation.</h2>
  <p>At Bear &amp; Giraffe, we help entrepreneurs turn ideas into software products. If you've got an idea for an MVP but aren't sure where to start, we'd love to help you work out what's possible, what you should build first and how we can use AI to get you there faster.</p>
  <div class="post-cta__actions">
    <a class="post-cta__primary" href="/#contact">Let's have a conversation <span class="material-symbols-outlined text-[18px]" aria-hidden="true">arrow_forward</span></a>
    <a class="post-cta__secondary" href="/#services">Explore our services</a>
  </div>
</section>]]></content><author><name></name></author><category term="engineering" /><category term="ai" /><category term="claude-code" /><category term="mvp" /><category term="rails" /><summary type="html"><![CDATA[How AI, and particularly Claude Code, is changing the way we build software and helping founders get their ideas to market faster.]]></summary></entry><entry><title type="html">Stop Pending Steps From Failing Your CI Build</title><link href="https://bearandgiraffe.com/blog/stop-pending-steps-from-failing-your-ci-build/" rel="alternate" type="text/html" title="Stop Pending Steps From Failing Your CI Build" /><published>2018-04-23T21:54:09+00:00</published><updated>2018-04-23T21:54:09+00:00</updated><id>https://bearandgiraffe.com/blog/stop-pending-steps-from-failing-your-ci-build</id><content type="html" xml:base="https://bearandgiraffe.com/blog/stop-pending-steps-from-failing-your-ci-build/"><![CDATA[<figure>
  <img src="/assets/images/blog/stop-pending-steps-from-failing-your-ci-build/1.png" alt="" width="800" height="326" loading="lazy" />
</figure>

<p>TDD is a big part of how I develop software. I use TDD to help me design the software I’m writing as well as serve as a to-do list for the things that need to be built for the app. That means that sometimes I write tests for things that I know I want to include but not at the moment. These are smaller steps of the bigger feature but possibly not the core functionality. For example, I might want to track some events and I want to keep a reminder of myself not to forget that step, but at the moment I want to focus on the main feature itself and then add the tracking part once I’ve got the basic stuff working.</p>

<p>To make that work, I write pending tests that will show that they are pending in the output. That said, I typically do not want a pending test to fail the test suite. Especially in a new app that has a bunch of core things that need to be built first, before getting to some of the fringe items like event tracking. This workflow works well in my opinion, except for one gotcha, which I will cover in this post.</p>

<p>If you are using <code class="language-plaintext highlighter-rouge">Cucumber</code> and <code class="language-plaintext highlighter-rouge">CircleCI</code> and running the suite using the typical command <code class="language-plaintext highlighter-rouge">bundler exec cucumber</code> you might see something like this at the end of the run:</p>

<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="mi">10</span> <span class="n">scenarios</span> <span class="p">(</span><span class="mi">0</span> <span class="n">undefined</span><span class="p">,</span> <span class="mi">1</span> <span class="n">pending</span><span class="p">,</span> <span class="mi">9</span> <span class="n">passed</span><span class="p">)</span>
<span class="mi">120</span> <span class="n">steps</span> <span class="p">(</span><span class="mi">0</span> <span class="n">undefined</span><span class="p">,</span> <span class="mi">1</span> <span class="n">pending</span><span class="p">,</span> <span class="mi">119</span> <span class="n">passed</span><span class="p">)</span>
<span class="mi">0</span><span class="n">m17</span><span class="o">.</span><span class="mi">414</span><span class="n">s</span>

<span class="no">You</span> <span class="n">can</span> <span class="n">implement</span> <span class="n">step</span> <span class="n">definitions</span> <span class="k">for</span> <span class="n">undefined</span> <span class="n">steps</span> <span class="n">with</span> <span class="n">these</span> <span class="ss">snippets:

</span><span class="no">Then</span><span class="p">(</span><span class="s2">"foo"</span><span class="p">)</span> <span class="k">do</span>
  <span class="n">pending</span> <span class="c1"># Write code here that turns the phrase above into concrete actions</span>
<span class="k">end</span>

<span class="no">Coverage</span> <span class="n">report</span> <span class="n">generated</span> <span class="k">for</span> <span class="no">Cucumber</span> <span class="no">Features</span><span class="p">,</span> <span class="no">MiniTest</span> <span class="n">to</span> <span class="sr">/home/</span><span class="n">circleci</span><span class="o">/</span><span class="n">project</span><span class="o">/</span><span class="n">coverage</span><span class="o">.</span> <span class="mi">968</span> <span class="o">/</span> <span class="mi">1064</span> <span class="no">LOC</span> <span class="p">(</span><span class="mf">90.98</span><span class="o">%</span><span class="p">)</span> <span class="n">covered</span><span class="o">.</span>
<span class="no">Exited</span> <span class="n">with</span> <span class="n">code</span> <span class="mi">1</span>
</code></pre></div></div>

<p>And while you do not have any failing tests, the build is marked as failing and in red. How come?</p>

<p>The last line gives us a hint. The fact that <code class="language-plaintext highlighter-rouge">cucumber</code> returned an exit code of <code class="language-plaintext highlighter-rouge">1</code>, as pointed out in the <code class="language-plaintext highlighter-rouge">Exited with code 1</code> line of the output of the run, is the reason why <code class="language-plaintext highlighter-rouge">CircleCI</code> has marked the build as failed. So if you’d like your build to pass even though you’ve got pending steps, you need to change the output from cucumber to be a <code class="language-plaintext highlighter-rouge">0</code> instead of <code class="language-plaintext highlighter-rouge">1</code>.</p>

<p>Cucumber has the option <code class="language-plaintext highlighter-rouge">--[no-]strict</code> that you can use to make it exit with a code <code class="language-plaintext highlighter-rouge">0</code> instead of <code class="language-plaintext highlighter-rouge">1</code> for a bunch of scenarios. The flag is set to be on by default (i.e <code class="language-plaintext highlighter-rouge">--strict</code>) which means it returns a <code class="language-plaintext highlighter-rouge">1</code> and if you turn it off it would return a <code class="language-plaintext highlighter-rouge">0</code>. The scenarios that are grouped under the general <code class="language-plaintext highlighter-rouge">strict</code> flag are <code class="language-plaintext highlighter-rouge">undefined</code>, <code class="language-plaintext highlighter-rouge">pending</code>, and <code class="language-plaintext highlighter-rouge">flaky</code>. I personally only want it to skip <code class="language-plaintext highlighter-rouge">pending</code> steps because those are purposefully left unimplemented. In that case I can use <code class="language-plaintext highlighter-rouge">--no-string-pending</code> as the flag. I learned about these flags from the PR: <a href="https://github.com/cucumber/cucumber-ruby/pull/1169">https://github.com/cucumber/cucumber-ruby/pull/1169</a>.</p>

<p>Now that we are aware of the flag to use, we can just update the config for CircleCI and push the changes up and see if that works. But builds take a while to finish, and I wanted to make sure that this would work before pushing it up to CircleCI. One problem though: the terminal does not print out the exit codes of each command you run, that would be silly. So how can I make sure that the flag does what I want then? I remembered a <a href="https://www.rubytapas.com/2017/08/07/episode-491-special-variables-part-1/">RubyTapas episode</a> in which Avdi talks about system variables like $1, $?, $! and others and how to use them in Ruby. I knew one of them contains the exit code of the previous process, I just needed to find out which one and then print it out in the terminal after executing the <code class="language-plaintext highlighter-rouge">cucumber</code> command with and without the flag and see if that made any difference. Turns out <code class="language-plaintext highlighter-rouge">$?</code> is the one.</p>

<p>So I ran the following:</p>

<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">ychaker ~/dev/app$</span><span class="w"> </span>be cucumber
<span class="gp">ychaker ~/dev/app$</span><span class="w"> </span><span class="nb">echo</span> <span class="nv">$?</span>
<span class="go">1
</span><span class="gp">ychaker ~/dev/app$</span><span class="w"> </span>be cucumber <span class="nt">--no-strict-pending</span>
<span class="gp">ychaker ~/dev/app$</span><span class="w"> </span><span class="nb">echo</span> <span class="nv">$?</span>
<span class="go">0
</span></code></pre></div></div>

<p>which validates that adding the <code class="language-plaintext highlighter-rouge">--no-strict-pending</code> flag will help resolve the issue of marking the build as failed on CircleCI. After changing the CircleCI config to:</p>

<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="pi">-</span> <span class="na">run</span><span class="pi">:</span>
    <span class="na">name</span><span class="pi">:</span> <span class="s">Run cucumber tests</span>
    <span class="na">command</span><span class="pi">:</span> <span class="s">bundle exec cucumber --no-strict-pending</span>
</code></pre></div></div>

<p>the build started passing.</p>

<p>There you go. That’s the trick. Some times it’s important to know that something exists, or that there’s a tool out there that you can leverage in certain scenarios, even if you’re not an expert in it. As long as you know what to look for, you can then figure it out. Half the battle is knowing what you don’t know so that you can learn it.</p>]]></content><author><name></name></author><category term="engineering" /><category term="testing" /><category term="ci-cd" /><summary type="html"><![CDATA[TDD is a big part of how I develop software. I use TDD to help me design the software I’m writing as well as serve as a to-do list for the things that…]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://bearandgiraffe.com/assets/images/blog/stop-pending-steps-from-failing-your-ci-build/1.png" /><media:content medium="image" url="https://bearandgiraffe.com/assets/images/blog/stop-pending-steps-from-failing-your-ci-build/1.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Ansible, Github, and a Failed to validate the SSL certificate story</title><link href="https://bearandgiraffe.com/blog/ansible-github-and-a-failed-to-validate-the-ssl-certificate-story/" rel="alternate" type="text/html" title="Ansible, Github, and a Failed to validate the SSL certificate story" /><published>2018-03-01T00:52:16+00:00</published><updated>2018-03-01T00:52:16+00:00</updated><id>https://bearandgiraffe.com/blog/ansible-github-and-a-failed-to-validate-the-ssl-certificate-story</id><content type="html" xml:base="https://bearandgiraffe.com/blog/ansible-github-and-a-failed-to-validate-the-ssl-certificate-story/"><![CDATA[<figure>
  <img src="/assets/images/blog/ansible-github-and-a-failed-to-validate-the-ssl-certificate-story/1.png" alt="" width="4705" height="1994" loading="lazy" />
</figure>

<p>Recently Github changed their cryptography policies for SSL connections, something they had previously announced would be deprecated but took effect last week: <a href="https://githubengineering.com/crypto-removal-notice/">https://githubengineering.com/crypto-removal-notice/</a>. Most people around the world probably did not even notice. I, on the other hand, was running the <code class="language-plaintext highlighter-rouge">ansible-galaxy install -r provisioning/requirements.yml</code> and all of the sudden it stopped working.</p>

<p>When you’re running a command using a tool that you didn’t touch, didn’t update, did make a single change to, and then it stops working out of the blue from one minute to the other, that can makes you go mad. What happened? What did I do? What changed? And of course, in a situation like this, there won’t be many examples online that are relevant or helpful. This is when I rely on local communities and other developer to help keep me sane.</p>

<p>So let’s go back in time to the beginning and tell you what I did to fix the issue. It started when I ran the <code class="language-plaintext highlighter-rouge">ansible-galaxy install -r provisioning/requirements.yml</code> command and got the following error:</p>

<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">ychaker ~/dev/vagrant/vagrant-node$</span><span class="w"> </span>ansible-galaxy <span class="nb">install</span> <span class="nt">-r</span> provisioning/requirements.yml <span class="nt">-f</span>
<span class="go">- downloading role 'base', owned by bearandgiraffe
- downloading role from https://github.com/bearandgiraffe/ansible-role-base/archive/master.tar.gz
 [ERROR]: failed to download the file: Failed to validate the SSL certificate for github.com:443. Make sure your managed systems have a valid CA certificate installed. You can use validate_certs=False if you
do not need to confirm the servers identity but this is unsafe and not recommended. Paths checked for this platform: /etc/ssl/certs, /etc/ansible, /usr/local/etc/openssl. The exception msg was: [SSL:
TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590).
</span></code></pre></div></div>

<p>This is a weird error to get in a situation like this. I, personally, have no hand in how <code class="language-plaintext highlighter-rouge">ansible</code> installs roles, and how it downloads them from <code class="language-plaintext highlighter-rouge">github</code>. The fact that the same command had worked 5 minutes prior was the weirdest part. I didn’t change networks, go behind a VPN, or anything of that sort. I didn’t upgrade my OS, or do anything remotely related to something that could affect how <code class="language-plaintext highlighter-rouge">ansible</code> is connecting to <code class="language-plaintext highlighter-rouge">github</code>, so what gives?</p>

<p>I googled the error and got some results but nothing actually related to what I was seeing. So that was frustrating. I couldn’t find anything to guide me towards an answer. I tried multiple variations, checking for answers related to <code class="language-plaintext highlighter-rouge">ansible</code>, or any related to <code class="language-plaintext highlighter-rouge">github</code> itself, or the combo of both, or even just SSL things related to <code class="language-plaintext highlighter-rouge">OS X</code>. I wasn’t getting any answers. So I posted the error in a local dev group and someone had pointed me to <code class="language-plaintext highlighter-rouge">github</code> engineering blog <a href="https://githubengineering.com/crypto-removal-notice/">post</a>. That was the first sign towards progress, but it still wasn’t too helpful because the post didn’t mention anything I could personally do to fix the problem. So either the <code class="language-plaintext highlighter-rouge">ansible</code> team was not aware of these change and fucked up, or something else was up.</p>

<p>I chose to give the <code class="language-plaintext highlighter-rouge">ansible</code> team the benefit of the doubt. So I considered waiting a few minutes because some posts online suggested that this error some times is caused by a network issue, and waiting usually resolves it. I waited 5 minutes, and hour, and even 5 days, but the problem persisted. So that definitely was not the answer.</p>

<p>Continuing to give the <code class="language-plaintext highlighter-rouge">ansible</code> team the benefit of the doubt, I considered that I might have a very old version installed so I ran <code class="language-plaintext highlighter-rouge">brew upgrade ansible</code> and was disappointed to see that I already had the latest version. So what about <code class="language-plaintext highlighter-rouge">openssl</code>? Nope, that’s also on the latest version, at least the latest version <code class="language-plaintext highlighter-rouge">brew</code> knows how to install. What about <code class="language-plaintext highlighter-rouge">python</code>? That’s also the latest version <code class="language-plaintext highlighter-rouge">brew</code> knows how to install. Well… to an extent.</p>

<p>Having worked with <code class="language-plaintext highlighter-rouge">python</code> previously, but not since I got the current laptop, I knew that we’ve got <code class="language-plaintext highlighter-rouge">python2</code> and <code class="language-plaintext highlighter-rouge">python3</code> that are both widely in use. So when the version I was getting was <code class="language-plaintext highlighter-rouge">2.7.10</code>, I knew that I was still on the default system version of <code class="language-plaintext highlighter-rouge">python</code> that ships with OS X.</p>

<p>This will eventually lead me towards the right path. I won’t bore you with all of the steps that I took in order to get to a place where I no longer was seeing the certificate error, instead I will share straight away the steps that you need to take to get it to work on your end.</p>

<p>First, you need to uninstall <code class="language-plaintext highlighter-rouge">ansible</code>, install <code class="language-plaintext highlighter-rouge">python3</code>, <code class="language-plaintext highlighter-rouge">pip</code>, and then install <code class="language-plaintext highlighter-rouge">ansible</code> using <code class="language-plaintext highlighter-rouge">python3</code>. Here’s how:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>brew uninstall ansible
brew <span class="nb">install </span>python3
<span class="nb">sudo </span>pip3 <span class="nb">install </span>ansible
<span class="nb">sudo </span>pip <span class="nb">install </span>virtualenv
virtualenv py3-ansible
ansible <span class="nt">--version</span> | <span class="nb">grep </span>python
</code></pre></div></div>

<p>At the end, you should see something like this come up in the terminal:</p>

<pre><code class="language-output">python version = 3.6.4
</code></pre>

<p>That’s it!</p>

<p>It did take me a while to get to this solution, but I hope this will help you save a lot of time. I must shout out folks in the <a href="http://webchat.freenode.net/?channels=ansible">#ansible freenode channel</a> (yup, people are still using IRC), who pointed me to <a href="https://docs.ansible.com/ansible/latest/python_3_support.html">this post</a> that was the missing link for me in order to get it all to work together.</p>]]></content><author><name></name></author><category term="engineering" /><category term="devops" /><summary type="html"><![CDATA[Recently Github changed their cryptography policies for SSL connections, something they had previously announced would be deprecated but took effect last…]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://bearandgiraffe.com/assets/images/blog/ansible-github-and-a-failed-to-validate-the-ssl-certificate-story/1.png" /><media:content medium="image" url="https://bearandgiraffe.com/assets/images/blog/ansible-github-and-a-failed-to-validate-the-ssl-certificate-story/1.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Attention to Detail</title><link href="https://bearandgiraffe.com/blog/attention-to-detail/" rel="alternate" type="text/html" title="Attention to Detail" /><published>2017-07-17T17:01:01+00:00</published><updated>2017-07-17T17:01:01+00:00</updated><id>https://bearandgiraffe.com/blog/attention-to-detail</id><content type="html" xml:base="https://bearandgiraffe.com/blog/attention-to-detail/"><![CDATA[<figure>
  <img src="/assets/images/blog/attention-to-detail/1.jpg" alt="" width="1280" height="720" loading="lazy" />
</figure>

<p><em>The secret to a successful career as a developer.</em></p>

<p>I hate teaching. But I love mentoring. WAT? Yes, you read that correctly. I hate teaching, teaching requires patience, and I’m inpatient. Mentoring is about guidance and advice, and that’s easy. At least to me. It’s rare, though, to be mentoring someone and not have to do some teaching along the way too.</p>

<p>Because I like mentoring, I’ve had a number of experience teaching someone new to development, or new to Ruby in particular, certain aspects of development. Some have been good experiences, and others not so much. Out of those experiences, I’ve been able to single out a trait that is common between the different experiences and how its presence or absence in the person can shape the development of the person and their progress.</p>

<p>I have mentored people with 10 years of experience in software development, and people with less than 1 year of experience. People with a computer science/engineering background and people with no science background whatsoever. Experience did not matter. A scientific background did not make a difference. The one trait that had a direct effect, in my opinion, is the person’s attention to detail (as you may have guessed from the title of the post, or have you? 🤔).</p>

<p>Before I go any further, I have to preface the rest of the post with the disclaimer that I am by no means saying that this is the one and only important trait, nor that there aren’t any other significant aspects that will affect someone’s progress as an engineer, yada yada yada… It is, however, a significant differentiator that will set someone up for easier and greater success compared to someone else with the same attributes and qualifications. That said, I will always make a bet on someone who’s demonstrated themselves to be very skilled at attention to detail, regardless of their technical background, whereas I will most likely bet against someone who’s very skilled technically but has demonstrated over a period of time a lack of attention to detail.</p>

<p>Now that the first disclaimer is out of the way, some of you will be thinking something along the lines of “Hey Youssef, isn’t attention to detail necessary for success for any career and any field?” and you’d be right. Yes it is. At least mostly, you’d be surprised at how many people in certain careers get to be successful and be at the top of their field without any thought for detail. That said, the last time attention to detail was mentioned in CS class, bootcamp, talk, or anywhere else was my talk at Galvanize earlier this year, and before that was never. For something that is so obvious and so common sense, how come we don’t hear about it? Is it because we assume that everyone posses this skill or gets taught to develop it in school? My experience says otherwise.</p>

<p>A tiny experiment that I run sometimes is show developers this snippet of code and ask them what the result of the code should be:</p>

<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">def</span> <span class="nf">my_method</span>
<span class="n">my_var</span> <span class="o">=</span> <span class="mi">10</span>
<span class="k">while</span> <span class="n">my_var</span> <span class="o">&gt;</span> <span class="mi">0</span>
<span class="nb">puts</span> <span class="n">my_var</span>
<span class="k">end</span>
</code></pre></div></div>

<p>I give them some time to guess, but not too much time. I haven’t had anyone guess the right answer yet. I don’t give out the answer, but instead I show this next snippet of code and ask the same question:</p>

<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">def</span> <span class="nf">my_method</span>
  <span class="n">my_var</span> <span class="o">=</span> <span class="mi">10</span>
</code></pre></div></div>

<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  <span class="k">while</span> <span class="n">my_var</span> <span class="o">&gt;</span> <span class="mi">0</span>
    <span class="nb">puts</span> <span class="n">my_var</span>
  <span class="k">end</span>
</code></pre></div></div>

<p>And I wait about a minute to see if anyone would get it immediately. The slide I show has syntax highlighting and whitespacing is prominent. The devil is in the detail, and the detail is staring everyone in the face. I don’t expect someone with only a few weeks working with Ruby to be as quick as someone who’s been doing it for years in identifying subtle elements of code such as a closing <code class="language-plaintext highlighter-rouge">end</code> but I do expect anyone to notice the mismatched indentation and have that trigger the wheels to starting turning in their head. With this experiment, I get to see how someone with limited experience reacts vs someone with extensive experience. When I get people with what I deem enough experience, yet unable to figure out the output of this snippet of code, it makes me question how much they are paying attention to detail.</p>

<p>A couple of slides in a presentation by no means are a great indicator by themselves. This type of attribute in a person is something you need to pay attention to on a continuous basis. Pull requests and code reviews are a great way to keep track of such a thing. So when I see code delivered that looks like this:</p>

<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">foo</span> <span class="o">=</span> <span class="s1">'foo'</span>
<span class="n">bar</span>    <span class="o">=</span> <span class="s1">'bar'</span>
<span class="n">baz</span> <span class="o">=</span> <span class="s1">'baz'</span>
</code></pre></div></div>

<p>then my radar is activated, and a yellow flag is raised. Now I’m paying closer attention to every line of code, and every subsequent commit or PR. The spacing between <code class="language-plaintext highlighter-rouge">bar</code> and the <code class="language-plaintext highlighter-rouge">=</code> sign is odd. It could be the result of a find/replace all (it’s natural to miss the alignment getting messed up in that case), or the product of carelessness, and that’s worrisome.</p>

<p>My course of action is usually to mention it casually, and see if it reoccurs or not. If it does, I mention the importance of paying attention to everything regarding the code and that the details matter. The hope is that with practice, the developer starts having less and less issues with this kind of stuff. But don’t be fooled by a good PR or two right after the comment. It’s normal to have the critique be fresh in your mind and pay more attention then, but the true indication of progress is if the new behavior is sustained for a longer period of time.</p>

<p>So far I’ve talked about mostly “whitespace” in code. Whether the developer pays attention to indentation, spacing and alignment of assignments, etc. Why is that so important to me? It is important because it is an indication, to me, whether the developer is spending the necessary time to address every single aspect of the coding experience. Are they thinking of every edge case? Do they take pride in the code they are producing? Do they “finish” the job to the last inch or mm, or is it just about delivering something that “works” in order to move a task to the done column? Which brings us to the most important aspect of it all, everything we’ve talked about so far culminates in this crucial part, the definition of done.</p>

<p>For many developers, the definition of done is fleeting. What does it mean for a task to be done? In my first job, one of the Sr. Consultants came up with the term “done done”. He felt the need to have a specific term to signify that the development of a feature or fixing of a bug is actually done. 100% done. Not “works for me” done, or “I did the bare minimum” done. Done done. Let’s take an example to illustrate this, examples always help me illustrate a point better.</p>

<p>Say a developer is tasked to build the sign up/in portion of a new app. They were not given too many instructions, it’s a common feature after all, so it should be straight forward. The developer does a bit of research and lands on <code class="language-plaintext highlighter-rouge">Devise</code> and decides to go with it. In our case, we are talking about a Jr. developer that just graduated and this is their first crack at a real production app. <code class="language-plaintext highlighter-rouge">Devise</code> is a good choice in this case, you don’t want a Jr. developer trying to figure out all of the intricacies of security.</p>

<p>When “done”, the developer demos the feature to everyone, and goes through the process of signing up as a new user and then logging in, logging out, resetting the password. Seems like a complete job, right? That would be a big fat NO!</p>

<p>See, the developer only demoed the happy path. What happens if the email used has already been taken? What happens if the user does not provide a password? Or the password and confirmation do not match? Are there any limitations on the password (length, characters allowed, etc)? <code class="language-plaintext highlighter-rouge">Devise</code> handles all of these cases, if the developer read through the entire documentation of <code class="language-plaintext highlighter-rouge">Devise</code> they would know that, and they probably didn’t have to do much work to get it working. But the moment they don’t demo it, it raises a flag for me: did they even test all of this functionality before claiming to be “done”?</p>

<p>At this point someone asks: “Is this pushed to staging for us to QA?” and the developer happily responds with a “Yes, I pushed the branch to a PR app on Heroku”. Great, but the moment someone tries to access the PR app, they get a server error. See, our Jr. developer forgot to migrate the db with all of the changes they made locally. Rookie mistake, we’ll use this as a teachable moment. We’ve all made those mistakes before, it’s not a big deal.</p>

<p>Now we’re 2 sprints later, and the developer is no longer building common functionality that would have a gem ready to drop in for it. We are also seeing an increased rate of bugs being reported by the rest of the team, related to areas of the app that the Jr. developer touched. It turns out there’s a systemic issue of this particular developer not paying close attention to detail. They are not pushing the app to a staging environment and testing it there. They are not trying to break the app in order to identify edge cases and bugs preemptively. Most of their work is just the bare minimum in order to move the task to the done column. It’s easy at this point to chalk it up to lack of experience, but after having someone mention it on numerous occasions, the expected outcome is to see some sort of improvement and course correction.</p>

<p>In the example above I used the case of a Jr. developer. Would you believe me if I said that I’ve seen the same behavior with developers with over 10 years of experience? I firmly believe that this kind of behavior is not limited to experience, but character. Do you or do you not pay attention to detail? It’s all cute and whatnot when it’s about whitespace and alignment, it’s a problem when the team cannot rely on you to complete a task in the “done done” definition of complete. And the signs are there all along, from the tiniest piece of code or element related to it, to writing an entire feature, and everything in between.</p>

<p>In my book, the biggest indicator of how much someone pays attention to detail is the number of times it is required of me to repeat the same comments. Do I need to tell you to pay attention to whitespace in every PR, or are you set after the first or second?</p>

<p>That is why, ladies and gents and everyone else, I say attention to detail is the secret to success as a developer. If you pay attention to detail your are more likely to be trusted by the team you work with because they wouldn’t have to fret the code you deliver. The trust of your team will lead to the trust of your managers, and so on and so forth. Once you have the trust of the people around you, they will do what they can to help you succeed.</p>

<p>Set yourself up for success, and pay extreme attention to detail!</p>]]></content><author><name></name></author><category term="engineering" /><category term="career" /><summary type="html"><![CDATA[The secret to a successful career as a developer.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://bearandgiraffe.com/assets/images/blog/attention-to-detail/1.jpg" /><media:content medium="image" url="https://bearandgiraffe.com/assets/images/blog/attention-to-detail/1.jpg" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">The Lesson from Ignoring All Lessons</title><link href="https://bearandgiraffe.com/blog/the-lesson-from-ignoring-all-lessons/" rel="alternate" type="text/html" title="The Lesson from Ignoring All Lessons" /><published>2017-06-12T16:31:59+00:00</published><updated>2017-06-12T16:31:59+00:00</updated><id>https://bearandgiraffe.com/blog/the-lesson-from-ignoring-all-lessons</id><content type="html" xml:base="https://bearandgiraffe.com/blog/the-lesson-from-ignoring-all-lessons/"><![CDATA[<p>When the Bear &amp; Giraffe LLC blog started, I set a goal to post at least once a week. I have a reminder set on #Slack for Monday morning to remind me. Setting a schedule forces me to stick to it and not let fall by the waste side like has happened with my many previous attempts at blogging. I’ve been mostly good at keeping up with it. It doesn’t have to be just me who posts, though, Naghmeh Shirazi (or Naghmeh Shirazi, why do you have 2 usernames Naghmeh?) has written a couple of posts for the blog.</p>

<p>I did miss last week’s schedule to post something and honestly, if I had the hour needed to write anything, I would have used it to do something else. Because the last month or so has been non stop for me. It all culminated in two events, back to back. The <a href="http://atxhackforchange.org">#ATXHack4Change</a> that took place on the weekend of June 2-4, and a launch of a product on the Monday of the 5th.</p>

<p>I went to the #ATXHack4Change primarily to support a friend, Veronica from The Better Beehive Project (you might remember her from the <a href="/blog/meet-veronica-from-the-better-beehive-project/">blog</a> I wrote earlier this year), originally I planned to just be there for moral support, but I ended up actually hacking on an MVP for her. I will share more details about that in a separate post.</p>

<p>So what better way to follow up an all weekend hackathon, other than with a product launch, right? Well, how about a product launch that you’re absolutely not ready for 🤔</p>

<p>The team and I have been working tirelessly over the past couple of months on getting a product ready for launch. I won’t mention which product it is because we’d still like to keep it on the DL for now. It was a soft launch in sorts, and I will publicize it once it’s time. The tech team had been working on building the set of featured required to launch this thing, and if it were up to us, we’d wait another month, maybe a year, before we would launch. It was easily one of those scenarios where if we had more time there would always be one more thing that we would add or fix. But “business” wanted to set a date and stick to it, and I said to myself “Fuck it, let’s do it!”.</p>

<p>I knew we would be building new features that were required for launch up until the last moment. Which is a big risk because we weren’t giving ourselves time to test and validate the deliverables. We also did not give ourselves any breathing room to prepare for launch. In fact, the launch was set for Friday, and I had to make the call to push it till Monday because it became clear a couple of days prior that Friday was not doable, and it’s Friday, you really don’t want to launch on a Friday. Yet I was ready to break that rule too.</p>

<p>I was really hoping that we’d have time to do a dry run. Prepare everything that was needed for launch prior to the day itself. Then on the day of the launch, just click the proverbial launch button, and then celebrate. Typically, the nice thing about web development is that launching is as easy as a simple <code class="language-plaintext highlighter-rouge">git push</code>, and even with a platform like Heroku, clicking the “Promote to production” button from the staging environment is all it takes. But our case was not quite just that.</p>

<p>See, the app had been technically live for many months now. We’ve had internal “admins” populating the app with data and uploading pictures of places and whatnot. It was all part of the effort of the entire team to get ready for launch. As we went along and started building things up, we realized that the original architecture had flaws in the way we’re handling the image uploads, and we needed to change how we’re storing the images on S3. Which meant that we needed to move all of the stored images on S3 to a new directory structure, and update all of the references to the files in our app. This is one of those things that would have been prime for a dry run and be done in prep for launch, not at the moment of. But because we were tight on time, and we decided to just move along with the launch regardless of what happens, it became the biggest risk that we had to deal with. So we had this task to move all these files, and update the app, and we had never tested the script that was handling them because our dev environment was not setup to work with S3 but instead to upload the images to the <code class="language-plaintext highlighter-rouge">tmp</code> directory of the app locally. So what could go wrong?</p>

<p>Surprisingly enough, the script worked fine, until Heroku timed out on us mid way through (or maybe 3/4 of the way through, we don’t know) and now we had to deal with that situation. Except we had no way of finding out which files moved and which didn’t, because we were copying the files and not moving in order to keep the originals intact, and we forgot to track in some other way the status of each one. So now we had a situation where we were trying to update the app with the new location of the files except we had a bunch that hadn’t moved to their new location and the script was blowing up because the connection to S3 was raising an exception each time it wasn’t finding a file. Awesomeness!!</p>

<p>I did find a way to move the files that hadn’t moved each time the script raised an exception, but because we weren’t tracking the status, the script had to be rerun from the beginning each time. I was able to add a check to make sure that if the app was updated with the new location to skip this file and move on, but that still meant that we had to check each item at a time, and with thousands of records, that took a while.</p>

<p>As all of this was happening, we had to make some last minute fixes and changes to the code. As Murphy said “Anything that can go wrong will go wrong.”, well it did for us too. In the middle of all the scrambling we had to do, our CI suite starting failing for a reason that we couldn’t figure out a fix for. We had 3 apps trying to install a gem from a private github repo, 2 of them were able to, but the third was failing. Everything matched in terms of settings and access and whatnot. So now we had what was supposed to be our sanity check and fallback giving us a “false negative” and we had no way to fix it in that moment. On top of which, since we were making last minute changes and we were in a hurry to get this thing launched, we neglected to run the tests locally. I found out the next day that I broke some tests with some of the changes that I made.</p>

<p>That day, I threw out all of my rules, all of the lessons that I had learned throughout my career, all of the best practices that I preach all of the time. That day was the opposite of an ideal scenario, or even a reasonable scenario. We were supposed to launch at 3PM, we launched at around 6:30PM. I was supposed to be at the Alamo Draft House on South Lamar before 7PM to watch Wonder Woman with my wife (after postponing from the Friday prior because of the hackathon), I got there at 7:20PM and they don’t let you in after the feature film starts, so we didn’t get to watch it that day. But honestly, that was the worst of it, and we got a refund and got to watch it later that week. Nothing caught fire. A few things broke, and we got to fix them the next day. Yet, as everyone else is concerned, the launch was successful, investors were happy, the founders were ecstatic, and I personally was relieved. It’s done!</p>

<p>My lesson learned from that experience is that no matter what you do “the best-laid plans of mice and men often go awry”, as long as you are prepared to deal with what comes up, you will be OK. There are rules and best practices that you can follow to ensure a smooth operation, but if you throw them all out of the window, well you might just be OK anyway. I don’t recommend this path often, but if you find yourself in this situation, do not panic, no one will die, it’s not the end of the world, you’ll get through it 🙂</p>]]></content><author><name></name></author><category term="engineering" /><category term="devops" /><category term="entrepreneurship" /><summary type="html"><![CDATA[When the Bear & Giraffe LLC blog started, I set a goal to post at least once a week. I have a reminder set on #Slack for Monday morning to remind me…]]></summary></entry></feed>