<?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: Jason Barry</title>
    <description>The latest articles on DEV Community by Jason Barry (@jasonbarry).</description>
    <link>https://dev.to/jasonbarry</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%2F151474%2F945fc83c-a82c-4df4-b219-da02329b5450.jpeg</url>
      <title>DEV Community: Jason Barry</title>
      <link>https://dev.to/jasonbarry</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jasonbarry"/>
    <language>en</language>
    <item>
      <title>The benefits of on-demand staging environments</title>
      <dc:creator>Jason Barry</dc:creator>
      <pubDate>Mon, 19 Oct 2020 18:28:55 +0000</pubDate>
      <link>https://dev.to/featurepeek/the-benefits-of-on-demand-staging-environments-1fjj</link>
      <guid>https://dev.to/featurepeek/the-benefits-of-on-demand-staging-environments-1fjj</guid>
      <description>&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; Test features in isolation. Test releases as a whole. &lt;/p&gt;

&lt;p&gt;You know the drill: it’s the night before a release, and your dev team is scrambling to address last-minute feedback before deploying to production. Most of the feedback surrounds tiny changes that are trivial to fix -- but some of the feedback requires larger, substantial change. These long feedback loops reveal a more fundamental issue of communication breakdown. This should have been discussed earlier. Now you’re left wondering if it’s worth delaying the release to help ensure the stability of the build.&lt;/p&gt;

&lt;p&gt;Sound familiar? I experienced this first-hand while working at a small (~6 engineers, ~2 designers, 1 PM) B2B SaaS startup. The product team would give feedback about the latest build on staging with only a day or two left in the sprint, causing a last-minute rush by the dev team to implement those changes. Corners were cut to meet deadlines, and hastily-written workarounds were rarely refactored, adding to the backlog of technical debt as the next sprint was already underway.&lt;/p&gt;

&lt;p&gt;If you experience these symptoms during the development of your product, then &lt;strong&gt;chances are that your team doesn’t have the right tools at its disposal.&lt;/strong&gt; It turned out that the product team left feedback late because they &lt;em&gt;didn’t have a stable URL where they could verify UI/UX&lt;/em&gt; until changes were on our staging server.&lt;/p&gt;

&lt;p&gt;We needed a way to get stakeholder feedback earlier in the development cycle -- well before features landed on staging.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a staging environment?
&lt;/h2&gt;

&lt;p&gt;A staging environment is a replica of your production environment. There shouldn't be any significant differences between your staging environment and your live website, with one notable exception: the staging environment is private. &lt;/p&gt;

&lt;p&gt;Think of staging as the ultimate quality assurance check, where you can make sure everything works in as close to launch conditions as possible. You'll catch bugs, avoid costly downtime, and give your developers the confidence to take risks. &lt;/p&gt;

&lt;h2&gt;
  
  
  How do you deploy to a staging environment?
&lt;/h2&gt;

&lt;p&gt;The traditional deployment process to a single staging environment usually has four steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The developer builds and tests&lt;/strong&gt; in a local environment, running on their machine.&lt;/li&gt;
&lt;li&gt;Once they are satisfied with their work, the developer pushes their changes to a branch on the git repo, where they &lt;strong&gt;open a pull request&lt;/strong&gt;. Continuous Integration runs automated tests — like linting, type checking, and unit tests — to catch any issues. If issues are found, the developer goes back to step &lt;/li&gt;
&lt;li&gt;Once Continuous Integration passes, the developer's &lt;strong&gt;peers conduct a code review&lt;/strong&gt;. This is necessary to gain consensus among your team that the proposed changes are greenlighted to be merged into the codebase. Not only should reviewers look at the code, but they should run the code to confirm that the code operates as intended. The developer goes back to step 1 to address any feedback left by reviewers. &lt;/li&gt;
&lt;li&gt;Once the changes are deemed copacetic by automated tests and peer reviewers, the developer's branch is &lt;strong&gt;ready to be merged into the main branch&lt;/strong&gt;. If Continuous Delivery is enabled, then merging to the main branch kicks off an automated task to &lt;strong&gt;deploy the changes in the pull request to your company's internal staging server&lt;/strong&gt;. &lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;Depending on how your DevOps team configures your git repo's webhooks, merging to the main branch may trigger additional steps. If your org follows the practices of Continuous Deployment, merging to master could roll the latest changes out to production automatically (hopefully behind a feature flag). Every DevOps team is different — check with yours to see which practice your company follows. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Why multiple staging environments instead of only one?
&lt;/h2&gt;

&lt;p&gt;Instead of being constrained by all upcoming changes landing on a single server, you could have temporary, ephemeral environments that exist solely for the purposes of hosting the build of a given pull request. This is what we mean when we say that you should &lt;em&gt;test features in isolation&lt;/em&gt;. Giving every branch in your git repo a dedicated environment is very freeing for both your developers and reviewers. &lt;/p&gt;

&lt;p&gt;What you might not is realize that this comes with more benefits than just testing features.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code review won’t block gathering product feedback
&lt;/h2&gt;

&lt;p&gt;With a single staging server, your code won't be deployed until code review passes, and you won't have a link to share with other people on your team. If you want to double-check with a UI/UX designer that the animation you made is up to snuff, too bad — you're gated upon code review passing before you can Slack over a link. &lt;/p&gt;

&lt;p&gt;If any stages above fail (red), you have to go back to square one. This can be costly if you’ve already performed code review, a time-consuming operation.&lt;/p&gt;

&lt;p&gt;But UI/UX designers don't care about the quality of the code — so why should code review be a bottleneck for gathering UX feedback? Ideally, you'd be able to get their opinion before asking your dev peers to give your code a once-over. That way, you'll eliminate an extra speed bump when shipping your feature. &lt;/p&gt;

&lt;p&gt;Ephemeral staging servers that spin up on demand allow for product feedback and code review to occur before (or at the same time) as code review. If there’s something that needs to be addressed, going back to square one isn’t very detrimental, since not much time has passed. You eliminate a speed bump by batching product feedback with code review, rather than having one be a dependency of the other.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prevent an integration warzone
&lt;/h2&gt;

&lt;p&gt;Sure, your new feature that you've worked hard on works now — but since a single staging environment is the landing pad for your entire engineering team's upcoming changes, a developer on your team may inadvertently push code that breaks what you wrote. Even now that you have an internal link you can share with a non-technical stakeholder, &lt;strong&gt;there are no guarantees that the link will continue to work&lt;/strong&gt;, since it is actively being integrated with!&lt;/p&gt;

&lt;p&gt;While a single staging environment is useful for testing a release as a whole, &lt;strong&gt;features should be tested in isolation&lt;/strong&gt;. This means that an environment's purpose should be dedicated to testing the functionality of a single feature, rather than a collection of many features. Save testing the collection of features for your QA server, after you’ve already tested each feature individually.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lower the barrier for running peers' code
&lt;/h2&gt;

&lt;p&gt;Developers face a large amount of context switching when they are asked to review someone else's code. The process is unnecessarily interruptive, and looks something like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Stop what you’re doing &lt;/li&gt;
&lt;li&gt;Stash any unstaged changes&lt;/li&gt;
&lt;li&gt;Fetch from origin&lt;/li&gt;
&lt;li&gt;Checkout their branch&lt;/li&gt;
&lt;li&gt;Install dependencies (and potentially restart your development server)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;➡️ Actually verify the new feature and provide feedback&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Checkout your original branch&lt;/li&gt;
&lt;li&gt;Pop your git stash&lt;/li&gt;
&lt;li&gt;Reinstall dependencies (and potentially restart your development server)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;With on-demand staging environments, on the other hand, &lt;strong&gt;the running branch is waiting for you to verify and provide feedback&lt;/strong&gt;. Developers can jump into the deployment preview straight from the pull request without needing to checkout files, install dependencies, restart their development server, or change anything about their local environment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Avoid redundant code reviews
&lt;/h2&gt;

&lt;p&gt;The point of getting feedback is to make more implementation changes that address the issues raised in the feedback session. The problem is that this will require another code review! Even though the proposed changes the second time around are (hopefully) small, your reviewers will experience déjà vu because they are now going over the same lines of code for the same feature implementation.&lt;/p&gt;

&lt;p&gt;With multiple staging environments at your disposal, you could spin up a preview environment for your designers to critique while your pull request is still open. You wouldn’t need to request a code review from your developer peers until your designer gives the thumbs up ahead of time.&lt;/p&gt;

&lt;h2&gt;
  
  
  More opportunities for testing
&lt;/h2&gt;

&lt;p&gt;On-demand staging environments can be configured to be accessible behind a shared URL, which unlocks a wide range of testing and quality assurance opportunities.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cross-browser testing&lt;/strong&gt;: Ensure your product or website works perfectly on a wide range of browsers and devices.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Accessibility testing&lt;/strong&gt;: Run accessibility tests to ensure your content is accessible to individuals with disabilities.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;User testing&lt;/strong&gt;: Create a pool of test users or use a crowd-testing platform to discover usability issues before you launch.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Avoid environment drift
&lt;/h2&gt;

&lt;p&gt;Single staging environments are often configured once and left to decay, becoming a DevOps chore. This leads to drift between the staging and production environments, as similarities between the two decrease. &lt;strong&gt;This increases the risk of bugs appearing in either staging or production&lt;/strong&gt;, which makes bugs difficult to reproduce. &lt;/p&gt;

&lt;p&gt;Examples of these drifts include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Environment and configuration files getting modified by unsuccessful staging deploys, leading to extraneous or incorrectly named settings.&lt;/li&gt;
&lt;li&gt;Time-sensitive security vulnerability updates being applied to production in a rush, leaving staging several versions behind.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Whereas your production environment is under constant care and attention from the DevOps team, an infrequently used staging environment is lower on the priority list.&lt;br&gt;
This can lead to an unreliable staging environment, which blocks your development team from launching new features.&lt;/p&gt;

&lt;h2&gt;
  
  
  More stakeholder engagement
&lt;/h2&gt;

&lt;p&gt;In the past, stakeholders didn’t get to use the finished product until it was live. Instead, they got a brief scripted demo at the end of the sprint.&lt;/p&gt;

&lt;p&gt;By giving stakeholders access to your staging environment, they can help with the quality assurance process and ensure that the development work completed meets their expectations. This saves time and prevents mistakes from accidentally shipping.&lt;/p&gt;

&lt;h2&gt;
  
  
  Increased developer productivity
&lt;/h2&gt;

&lt;p&gt;With on-demand staging environments, developers can create as many staging environments as they require without asking DevOps to configure a new environment. Developers love it because they have the capability to spawn new servers, and DevOps loves it because they don’t need to field manual tasks of spinning up a server only for it to be taken down shortly afterwards. &lt;/p&gt;

&lt;h2&gt;
  
  
  Save your company time and money
&lt;/h2&gt;

&lt;p&gt;Single staging environments are typically available 24/7 on a dedicated server or virtual machine. This is a waste of resources that could otherwise be used for production.&lt;/p&gt;

&lt;p&gt;Furthermore, if you have several development teams, the &lt;strong&gt;single staging environment can become a bottleneck&lt;/strong&gt;. Teams must wait for a staging environment to become available, waiting for other teams' quality assurance processes to complete. This could waste days of developer productivity and encourage teams to skip straight to production, losing all the benefits of an effective staging environment. &lt;/p&gt;

&lt;p&gt;Each on-demand staging environment, on the other hand, is only online for the duration of the pull request. When the PR gets merged or closed, the environment gracefully shuts down, so you only pay for what you use.&lt;/p&gt;

&lt;h2&gt;
  
  
  Single vs. on-demand staging environments
&lt;/h2&gt;

&lt;p&gt;Instead of the single staging environment decaying while it waits for someone to use it, &lt;strong&gt;an on-demand staging environment is created dynamically, triggered by a CI/CD pipeline&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;This means developer teams can have access to staging whenever they need it, simply by opening a pull request. As you’d imagine, this boosts productivity and encourages developers to use staging environments, reducing the chances of costly production bugs. Once a developer is done with the staging environment, the staging environment is destroyed, along with any configuration, environment, or installation inconsistency. &lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Single staging environment&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;On-demand staging environments&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Developer self-serve&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Low maintenance&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Prevents redundant code reviews&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Can test features in isolation&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Can link to a build while pull request is still open&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Number of environments&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;Unlimited&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost&lt;/td&gt;
&lt;td&gt;Pre-allocated&lt;/td&gt;
&lt;td&gt;Allocated on demand and reclaimed automatically&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Having said that, &lt;strong&gt;you should still have a staging server where you can do QA before rolling to production&lt;/strong&gt;. This is where you should do a final spot-check to ensure that everything is working as expected before going live. The difference is that the purpose of this server is to test the release as a whole, rather than each feature on its own. How do the new features operate together? If there’s a bug found, which pull request and which lines of code introduced the bug? These questions are much easier to answer when features are tested while the pull request is still open.&lt;/p&gt;

&lt;h2&gt;
  
  
  Shorten cross-functional feedback loops with on-demand staging environments
&lt;/h2&gt;

&lt;p&gt;As a front-end developer, being able to dynamically create a dedicated environment for an unlimited number of branches is a very powerful feeling. I can control my own network of machines without needing to ask for cycles from DevOps! The asynchronous nature of asking for feedback on a fleet of ephemeral environments is liberating -- I know that each deployment will be waiting for my reviewer exactly how I left it. And while I review my peers’ code, I can visually review the build alongside it without having to check out their branch locally. &lt;/p&gt;

&lt;p&gt;It’s not only helpful to the developers on my team, but also helpful to the non-technical stakeholders too -- they get a lens into the engineering process, and can voice their opinions while the implementation details are still fresh in the developer’s mind. &lt;/p&gt;

&lt;p&gt;If your organization is struggling with shipping features (on time) that meets everyone’s acceptance criteria, the solution may lie in tooling. Notice where and when the speed bumps occur -- handoff, development, code review, etc -- to help identify bottlenecks. Ask yourself whether your single staging server is a limiting factor during your team’s development processes. &lt;/p&gt;

&lt;h2&gt;
  
  
  Learn more
&lt;/h2&gt;

&lt;p&gt;The easiest way to set up on-demand frontend staging environments is with &lt;a href="https://featurepeek.com" rel="noopener noreferrer"&gt;FeaturePeek.&lt;/a&gt; FeaturePeek creates a deployment preview of your frontend every time you open a pull request. A drawer overlay is added on top that &lt;strong&gt;makes it easy for your reviewers to leave feedback&lt;/strong&gt; by allowing them to leave comments, take screenshots with annotations, capture screen recordings, create tickets on popular bug-tracking platforms, and more.&lt;/p&gt;

&lt;p&gt;FeaturePeek works with static sites and sites containerized with Docker. Best of all, you don't have to migrate to a new cloud ecosystem. Whether your company's website is hosted on AWS, Google Cloud, Heroku, Digital Ocean, whatever — since FeaturePeek is infrastructure-agnostic, &lt;strong&gt;you can use FeaturePeek no matter who your hosting provider is&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Try the &lt;a href="https://dashboard.featurepeek.com" rel="noopener noreferrer"&gt;2-week free trial&lt;/a&gt; to see how FeaturePeek can improve your team's development productivity.&lt;/p&gt;

</description>
      <category>frontend</category>
      <category>devops</category>
      <category>productivity</category>
      <category>uiux</category>
    </item>
    <item>
      <title>Where should your team review your front-end changes?</title>
      <dc:creator>Jason Barry</dc:creator>
      <pubDate>Tue, 26 Nov 2019 12:12:03 +0000</pubDate>
      <link>https://dev.to/featurepeek/where-should-your-team-review-your-front-end-changes-1873</link>
      <guid>https://dev.to/featurepeek/where-should-your-team-review-your-front-end-changes-1873</guid>
      <description>&lt;p&gt;&lt;strong&gt;You've just finished developing a new feature&lt;/strong&gt; for your web app, and you're ready to get feedback from the rest of your team. You're pretty sure it's what your designer intended in their prototypes, although you had to take &lt;em&gt;a few&lt;/em&gt; liberties – you did some guesswork when mockups for tablet breakpoints weren't supplied, and you had to come up with a workaround or two due to a technical constraint. You want to get some feedback on your work before rolling out the feature to production. &lt;/p&gt;

&lt;p&gt;Engineers can leave feedback on GitHub or similar during code review, but this part of the &lt;a href="https://blog.ycombinator.com/product-development-cycle-fundamentals/" rel="noopener noreferrer"&gt;product development lifecycle&lt;/a&gt; isn't accessible to those in non-code-savvy roles. What's the best way to open up your work to the rest of your team? &lt;/p&gt;

&lt;p&gt;Let's explore some options. Ideally, we'd want a solution that: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Reduces the duration of feedback loops&lt;/strong&gt; between cross-functional teams. You should be able to send a link for someone to review as soon as &lt;em&gt;you&lt;/em&gt; are ready, not as soon as your internal infrastructure allows you to be ready.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Circumvents performing code review on the same feature twice.&lt;/strong&gt; You shouldn't depend on your developer peers to finish reviewing your code before you're able to share your work with someone else on your team. If you receive feedback to make changes, your peers will have to do code review &lt;em&gt;again&lt;/em&gt; for what is essentially the same feature.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Requires as little maintenance and code changes as possible.&lt;/strong&gt; You shouldn't have to spend time building infrastructure to support a basic review process. If possible, you'd like to lean on an existing tool that has already solved this problem.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  In person (or screensharing) 👎
&lt;/h1&gt;

&lt;p&gt;While rolling up to your colleague's desk (or &lt;a href="https://tandem.chat" rel="noopener noreferrer"&gt;virtual desk&lt;/a&gt; if your team is remote) can clear up quick clarifying questions, it poses problems when trying to gather detailed critique. Common pitfalls include: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Scheduling common availability is difficult.&lt;/strong&gt; What if your reviewer is in a meeting? Or working heads-down on an upcoming deliverable? You both need to have uninterruptible availability to get their feedback synchronously. Trying to get two people's schedule to sync up is too time-intensive and breaks their flow, especially in fast-moving startups. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;You miss out widening your surface area of test cases.&lt;/strong&gt; When you show someone a feature that you've coded up on your own machine, you are forgoing the opportunity to apply variance to it.  How does it respond to production data? Does it require a font that is only installed locally? How does it behave when you're logged in under a different user account? You've tested responsiveness in Chrome DevTools — how about on a real device? &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;You become responsible for taking notes of reviewer feedback.&lt;/strong&gt; You can jot reviewer feedback down while in person, or create a quick todo list, but ad-hoc review that exists outside of formal tools is undocumented and bound to slip through the cracks. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The productivity benefits of &lt;a href="https://blog.remote.com/why-you-should-be-doing-async-work/" rel="noopener noreferrer"&gt;asynchronous communication&lt;/a&gt; are clear. You should avoid collecting feedback synchronously whenever possible.&lt;/p&gt;

&lt;h1&gt;
  
  
  Local dev server tunnel 👎
&lt;/h1&gt;

&lt;p&gt;How about opening a tunnel to your local development server's running port? You could use &lt;a href="https://ngrok.com" rel="noopener noreferrer"&gt;ngrok&lt;/a&gt; to expose a port so that someone outside of your LAN could access your local dev server. &lt;/p&gt;

&lt;p&gt;There are lots of problems with this approach:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Your machine must be powered on and online.&lt;/strong&gt; As soon as you close your laptop, the bridge to your dev server is terminated. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;You can't checkout another branch while the tunnel is live.&lt;/strong&gt; If you wanted to show someone something on a specific branch, you'd have to stay on that branch. This means that you are blocked from working on anything else.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your reviewers aren't getting a production build.&lt;/strong&gt; Instead, what they're seeing is the development build, which isn't as performant as what eventually gets pushed to production.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Local build during code review 👎
&lt;/h1&gt;

&lt;p&gt;As a developer, you're familiar with conducting code review when your coworkers open pull requests. The code may look correct... but does it work? A good way to test if it works is to run the code yourself. However, to do that on your own machine requires you to jump through a few hoops. The following flow should look all too familiar:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Stop what you're doing &lt;/li&gt;
&lt;li&gt;Stash any unstaged changes&lt;/li&gt;
&lt;li&gt;Fetch from origin&lt;/li&gt;
&lt;li&gt;Checkout their branch&lt;/li&gt;
&lt;li&gt;Install dependencies (and potentially restart your development server)&lt;/li&gt;
&lt;li&gt;➡️ &lt;strong&gt;Actually verify the new feature and provide feedback&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Checkout your original branch&lt;/li&gt;
&lt;li&gt;Pop your git stash&lt;/li&gt;
&lt;li&gt;Reinstall dependencies (and potentially restart your development server)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can see the trouble with this — there are &lt;strong&gt;many steps you must accomplish before and after verifying&lt;/strong&gt; that make the task a tedious effort. Most of the cognitive load of verifying someone else's feature on your machine comes from stopping what you're doing. &lt;/p&gt;

&lt;p&gt;Furthermore, unless your entire team is fluent with git, this option is only available to developers. What about the non-developers on your team?&lt;/p&gt;

&lt;h1&gt;
  
  
  Staging or QA server 👎
&lt;/h1&gt;

&lt;p&gt;Your continuous integration pipeline builds the latest changes from a protected branch in your git repo, and deploys the build to an internal server. It seems like a safe place to review new features, because it's a close representation of what production will look like when it eventually goes out the door. However, there are some problems with using this traditional method: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Feedback from reviewers causes more code review.&lt;/strong&gt; When you ask someone for feedback on your work, they will most likely respond with at least &lt;em&gt;some&lt;/em&gt; critique, which will require code changes to fix.  Your developer peer must be asking themselves, "Didn't I already review this feature?" You should aim to have every new feature only go through code review once to avoid bottlenecks in your workflow.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Other developers could break your changes.&lt;/strong&gt; The problem with this approach is that other developers on your team could inadvertently merge a change of theirs that breaks the functionality of your new feature. By passing around a link to an environment that gets fed from top-of-tree, you aren't guaranteeing that your feature is isolated. By the time your reviewer tests your new feature, a part of it (or the whole thing!) could not function as intended, even though it worked when it was on its own branch. Not only does this waste your reviewer's time, but it causes them to think that you incompetently didn't perform a basic test of your own work. A better option would be to guarantee that the code you push is the code your reviewer tests — this is what we mean when we say &lt;strong&gt;you should test features in isolation&lt;/strong&gt;. A staging / QA environment is great for testing a whole release, not individual features. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Feature environments 👍
&lt;/h1&gt;

&lt;p&gt;The best place to review your feature is on the feature branch itself. Ideally, as soon as you push your branch to your repo, your CI builds an image that is deployed to a dedicated host. &lt;strong&gt;Feature environments are automatic and ephemeral&lt;/strong&gt;, orchestrated via webhooks from your repo.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Asynchronous.&lt;/strong&gt; No scheduling calendars, syncing up for in-person walkthroughs, or tunneling to your local dev server.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Instant.&lt;/strong&gt; No need to wait for unit tests or code review to pass before you can get feedback from designers, marketers, or other stakeholders on your team. No need to checkout branches and install dependencies just to verify your coworker's code. Shorten feedback loops with your reviewers so that you don't need to ask your developer peers to review the same feature multiple times.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Accurate.&lt;/strong&gt; You can find more issues ahead of time by running your code on a machine that isn't your local dev box. Rest assured that what you see is what you will deploy, because your build comes from your CI server.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Isolated.&lt;/strong&gt; Since the feature environment spins up from &lt;em&gt;your&lt;/em&gt; branch, no one else will accidentally break your feature. Reviewers won't be upset that your feature clearly doesn't work. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Imagine every pull request in your repo having its own live, up-to-date environment. Links to the environment are posted as a comment in your pull request, and to a Slack channel. As soon as your feature gets merged, the environment gets torn down.&lt;/p&gt;

&lt;h1&gt;
  
  
  Feature environments as a service 👍👍
&lt;/h1&gt;

&lt;p&gt;Developing the infrastructure in-house to support feature environments yourself takes developer time and ongoing maintenance. You should instead focus on building the product(s) that are core to your business. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://featurepeek.com" rel="noopener noreferrer"&gt;FeaturePeek&lt;/a&gt; is a feature-environments-as-a-service platform that integrates with your GitHub organization. In just a few clicks, you can start building on-demand feature environments for every front-end pull request. On top of that, &lt;strong&gt;FeaturePeek overlays feedback and collaboration tools over every feature environment&lt;/strong&gt;, so your reviewers can leave comments, file bugs, attach screen recordings, and more — all from the context of the environment itself.&lt;/p&gt;

&lt;p&gt;We launched to solve this problem that we've seen so many small- to medium-sized companies encounter. &lt;a href="https://dashboard.featurepeek.com" rel="noopener noreferrer"&gt;Start a free trial today&lt;/a&gt; and let us know what you think. &lt;/p&gt;

</description>
      <category>frontend</category>
      <category>review</category>
      <category>feedback</category>
      <category>collaboration</category>
    </item>
  </channel>
</rss>
