<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <author>
    <name>Jared Faris</name>
  </author>
  <generator uri="https://hexo.io/">Hexo</generator>
  <id>https://jaredthenerd.com/</id>
  <link href="https://jaredthenerd.com/" rel="alternate"/>
  <link href="https://jaredthenerd.com/atom.xml" rel="self"/>
  <rights>All rights reserved 2026, Jared Faris</rights>
  <subtitle>The archive</subtitle>
  <title>Jared the Nerd</title>
  <updated>2026-10-17T22:02:02.740Z</updated>
  <entry>
    <author>
      <name>Jared Faris</name>
    </author>
    <category term="GPT" scheme="https://jaredthenerd.com/tags/gpt/"/>
    <category term="ChatGPT" scheme="https://jaredthenerd.com/tags/chatgpt/"/>
    <category term="LLM" scheme="https://jaredthenerd.com/tags/llm/"/>
    <category term="AI" scheme="https://jaredthenerd.com/tags/ai/"/>
    <category term="Testing" scheme="https://jaredthenerd.com/tags/testing/"/>
    <content>
      <![CDATA[<div class="center"><figure><img src="/2023/04/The-Robots-Arent-Coming-for-the-Testers/scientist-measuring.webp" class="" title="DALL-E had trouble with Robot Testing"></figure></div><p><em>This post originally was <a target="_blank" rel="noopener" href="https://medium.com/@jaredfaris/the-robots-arent-coming-for-the-testers-26e5dca9cb4">posted on Medium</a>. Go check it out!</em></p><p>ChatGPT is already replacing jobs and information workers have real reasons to be worried. This week I discuss why I don’t think QA and Testing jobs will be replaced. Changed certainly, but not replaced.</p><p>If you haven’t <a target="_blank" rel="noopener" href="https://medium.com/@jaredfaris/what-chatgpt-means-for-engineers-today-fda4992f4472">read my initial thoughts on the impact of Large Language Models to engineering</a>, I suggest you start there since this post builds on those thoughts. My thoughts here are not as fully formed because things are rapidly changing in our industry and I’m learning more daily.</p><p>I hope this sparks some new ideas for you and if it does, I’d love to chat about them!</p><h2 id="Last-week-I-made-three-bets"><a href="#Last-week-I-made-three-bets" class="headerlink" title="Last week I made three bets"></a>Last week I made three bets</h2><ol><li><strong>LLMs will quickly become the normal starting place for development teams</strong> starting a new project. Within 2 years engineers won’t think twice about using them, just like Google or StackOverflow now.</li><li><strong>Lead engineers &#x2F; architects become more valuable</strong> to a team but their roles will change. They’ll still have to set the technical strategy but they’ll spend more time reviewing the work of more junior team members to make sure it fits the strategy.</li><li><strong>The ratio of Engineering to QA moves meaningfully to QA in the next 18 months;</strong> maybe 25–30% more QA. This might mean hiring more specialists, or it might mean your existing team shifts their priorities.</li></ol><p>All three bets are different angles of the same theory:</p><blockquote><p>Software is about to be a lot cheaper, easier, and faster to produce in bulk. Without guardrails, it will also be much poorer quality.</p></blockquote><h2 id="Implications-of-this-to-business"><a href="#Implications-of-this-to-business" class="headerlink" title="Implications of this to business"></a>Implications of this to business</h2><p>If software is cheaper, easier, and faster to build there are a few implications:</p><h3 id="Businesses-will-solve-more-problems-with-software"><a href="#Businesses-will-solve-more-problems-with-software" class="headerlink" title="Businesses will solve more problems with software"></a>Businesses will solve more problems with software</h3><p>It will be possible to solve problems that were too expensive or complicated to solve before. Many of these will be small internal efficiency gains but enough small gains add up to huge impacts on the bottom line. This feels similar to the gains made optimizing a lot of little steps in an assembly line.</p><p>Some of these will be much bigger things that a traditional software engineering team would be relevant but that were too much to tackle before with the team at hand. We’ll come back to this in a second on 3).</p><h3 id="Less-experienced-developers-or-even-non-developers-will-do-a-lot-of-new-work-outside-of-traditional-tech-teams"><a href="#Less-experienced-developers-or-even-non-developers-will-do-a-lot-of-new-work-outside-of-traditional-tech-teams" class="headerlink" title="Less experienced developers or even non-developers will do a lot of new work outside of traditional tech teams"></a>Less experienced developers or even non-developers will do a lot of new work outside of traditional tech teams</h3><p>This has always been happening. I didn’t find a current number but in 2015 <a target="_blank" rel="noopener" href="https://www.microsoft.com/en-us/investor/events/FY-2015/morgan-stanley-qi-lu.aspx?EventID=156417">Microsoft said 1.1 billion people used their productivity tools including Excel</a>. I bet the Google numbers are similar.</p><p>Now imagine a world where someone can ask ChatGPT to generate Python code to analyze data for them.</p><p>Actually, don’t imagine it. You can just ask ChatGPT.</p><p><em>(Note: I didn’t run this code but I have done similar experiments where I actually did and it was pretty close to working with a few minor changes)</em></p><div class="center"><figure><img src="/2023/04/The-Robots-Arent-Coming-for-the-Testers/gpt-example.png" class="" title="GPT generating code that a nontechnical user could use."></figure></div><h3 id="Expectations-of-traditional-tech-teams-will-increase"><a href="#Expectations-of-traditional-tech-teams-will-increase" class="headerlink" title="Expectations of traditional tech teams will increase"></a>Expectations of traditional tech teams will increase</h3><p>The ability to ask ChatGPT for code won’t be limited to business users. Engineering teams will do the same things and integrate this code into <strong>public facing, mission critical apps</strong> where security, performance and reliability are critical.</p><p>Businesses won’t be happy only applying the efficiency gains we talked about above to small internal things. They’ll demand to see their big showcase software accelerate too.</p><p><strong>Bet: Once executives see accounting or marketing get huge efficiency gains from using LLMs they’ll demand their highly compensated engineering teams do the same. They’ll be right to do so.</strong></p><h3 id="The-quality-of-all-of-this-software-is-going-to-be-poor"><a href="#The-quality-of-all-of-this-software-is-going-to-be-poor" class="headerlink" title="The quality of all of this software is going to be poor"></a>The quality of all of this software is going to be poor</h3><p>While professional software engineering artisans still produce bugs, we assume some level of inherent quality in the individual components they create. The most nuanced bugs are usually found when each piece of craftwork has to plug into a bigger system.</p><p>If the same software engineers are now producing 2x (or more!) code, how are they going to maintain any level of quality?</p><p>Now remove the artisan from the system whom we count on for some automatic level of quality and security and hand the tools to people with other skill sets. Then crank out 5x or 10x as much software. You can probably see where this is going.</p><h2 id="What-does-this-mean-for-Quality-Assurance-and-Testing-roles"><a href="#What-does-this-mean-for-Quality-Assurance-and-Testing-roles" class="headerlink" title="What does this mean for Quality Assurance and Testing roles?"></a>What does this mean for Quality Assurance and Testing roles?</h2><p>I think there are two dimensions where things will change for people in quality focused roles.</p><h3 id="A-lot-more-automated-testing-is-going-to-be-needed"><a href="#A-lot-more-automated-testing-is-going-to-be-needed" class="headerlink" title="A lot more automated testing is going to be needed"></a>A lot more automated testing is going to be needed</h3><p>Manual testing doesn’t scale well as teams grow today and it will scale even more poorly with GPT-driven development. Ideally, engineers will wrap their code with unit tests but more code means more regressions across a complicated system.</p><p>A lot of teams already use some combination of engineer-written tests and automated testers. Whatever the strategy here, the amount of testing will need to increase. A lot of teams will try to solve this by hiring more testers.</p><p>GPT can help with automated tests so the pool of people who can be an automated tester today just increased. You can ask GPT to write tests as easily as you can ask it to write code. This will be a huge help to anyone approaching testing from a less technical background.</p><div class="center"><figure><img src="/2023/04/The-Robots-Arent-Coming-for-the-Testers/gpt-example2.png" class="" title="GPT generating unit tests too"></figure></div><h3 id="A-Quality-Strategy-will-be-critical"><a href="#A-Quality-Strategy-will-be-critical" class="headerlink" title="A Quality Strategy will be critical"></a>A Quality Strategy will be critical</h3><p>It will be difficult to test everything, all of the time. In particular, it will be impossible to test the code being generated inside of business departments and outside of standard development processes.</p><p>Quality and Engineering leadership will <strong>need to have defined, published, and enforced architectural and quality strategy</strong> that everyone buys into. This strategy needs to describe how systems integrate, how software boundaries (where testing can easily occur) are defined, and what can and can’t integrate with critical systems.</p><blockquote><p>Bet: Quality Assurance teams in software become more like QA on an assembly line.</p></blockquote><p>They might not test everything but they will sample systems as they evolve and compare them to the strategy. When issues are found, they’ll work to improve processes to prevent that issue again.</p><p>I think these quality experts will have to partner with power users in the business to try to instill the same quality principles that are mandated in engineering. They will definitely need to police the boundaries to make sure nothing flows into mission critical systems that don’t follow quality practices.</p><h3 id="For-mission-critical-software-more-QA-people-will-be-needed"><a href="#For-mission-critical-software-more-QA-people-will-be-needed" class="headerlink" title="For mission critical software, more QA people will be needed"></a>For mission critical software, more QA people will be needed</h3><p>For internal software this might not be the case, but for customer facing software (particularly with any sensitive data or in regulated industries) more QA people will be needed.</p><p><strong>Software complexity and risk don’t scale linearly with lines of code</strong>. More code produces more complex interactions between units of code, and the surface area for defects <strong>increases exponentially</strong>.</p><blockquote><p>Bet: Software teams will see more and more costly defects when they start using LLMs to accelerate their work. Many teams will respond by hiring more testers.</p></blockquote><p>I don’t have a fully formed view of how this will work but I think we’ll also see a need for expanded and different quality teams on SaaS products and in regulated enterprises like healthcare or finance. These expanded quality teams will combine traditional testing with security and compliance awareness.</p><blockquote><p>Bet: In the next couple of years we’ll hear of an entirely new role inside of software teams that’s the evolution of Quality Assurance.</p></blockquote><p>I don’t know what this is, but I hope it’s not another terrible evolution of the AbbreviateEverythingOps naming convention like DevSecTestOps.</p><h2 id="What’s-next"><a href="#What’s-next" class="headerlink" title="What’s next?"></a>What’s next?</h2><p>I expect to come back to the topic of GPT and other LLMs on Quality in the future when I’ve had more time to reflect.</p><p>Next week however, I want to dive deeper into the business impacts of this tech. I’ll touch on how I think executives should be thinking about how LLMs will eventually impact their businesses and what they should be doing right now to prepare.</p>]]>
    </content>
    <id>https://jaredthenerd.com/2023/04/The-Robots-Arent-Coming-for-the-Testers/</id>
    <link href="https://jaredthenerd.com/2023/04/The-Robots-Arent-Coming-for-the-Testers/"/>
    <published>2023-04-11T16:00:00.000Z</published>
    <summary>
      <![CDATA[<div class="center"><figure><img src="/2023/04/The-Robots-Arent-Coming-for-the-Testers/scientist-measuring.webp" class="" title="DALL-E had]]>
    </summary>
    <title>The Robots Aren't Coming for the Testers</title>
    <updated>2026-10-17T22:02:02.740Z</updated>
  </entry>
  <entry>
    <author>
      <name>Jared Faris</name>
    </author>
    <category term="GPT" scheme="https://jaredthenerd.com/tags/gpt/"/>
    <category term="ChatGPT" scheme="https://jaredthenerd.com/tags/chatgpt/"/>
    <category term="AI" scheme="https://jaredthenerd.com/tags/ai/"/>
    <category term="Engineering" scheme="https://jaredthenerd.com/tags/engineering/"/>
    <content>
      <![CDATA[<div class="center"><figure><img src="/2023/04/What-ChatGPT-Means-for-Engineers-Today/header-image.png" class="" title="A really old marketing photo of an early microwave saying Make the greatest cooking discovery since fire. Cooking is crossed out and GPT is added."></figure></div><p><em>This post originally was <a target="_blank" rel="noopener" href="https://medium.com/@jaredfaris/what-chatgpt-means-for-engineers-today-fda4992f4472">posted on Medium</a>. Go check it out!</em></p><p>ChatGPT is an amazing new tool that promises to help engineering teams do everything faster. But like using a microwave to make Thanksgiving dinner, faster is no guarantee of better.</p><h2 id="What-is-ChatGPT-really"><a href="#What-is-ChatGPT-really" class="headerlink" title="What is ChatGPT really?"></a>What is ChatGPT really?</h2><p>Large Language Models (LLMs) like GPT are powerful text generation tools; you can think of them as really advanced autocomplete. They’ve seen millions of patterns. Most of the work a team does is not completely revolutionary, and they can usually find something that matches.</p><p>ChatGPT is a chatbot layered on top of GPT. It’s a human user experience for a complex piece of technology.</p><p>There are already specifically trained tools like GitHub’s Copilot (which is based on GPT’s tech) that are focused on matching the code it’s been trained on with what engineers are writing. ChatGPT is a more general text completion tool or “stochastic parrot” but it does its job well. Specialty tools like Copilot do similar things but embed closer to the developer experience. I expect to see many competing products in 2023.</p><p>None of these LLMs are new brilliant general AIs. They won’t solve your business problems or innovate something completely new. None of them are autocomplete for your business strategy.</p><div class="center"><figure><img src="/2023/04/What-ChatGPT-Means-for-Engineers-Today/llm-email.png" class="" title="A fake screenshot of gmail implying it can write the whole email out."></figure></div><p>The hyperbole today is that LLMs are “changing everything”. I think this is true, but not in the “telegraph ended the Pony Express in 18 months” sense. Engineering isn’t going away.</p><p>This changes everything today in the “Google made it possible to find code on the internet” way that instantly made every developer twice as effective. This is another step in the evolution of engineers gaining knowledge that went from expensive and huge books about software languages to using the internet.</p><h2 id="What-does-this-imply-about-engineering-speed"><a href="#What-does-this-imply-about-engineering-speed" class="headerlink" title="What does this imply about engineering speed?"></a>What does this imply about engineering speed?</h2><p>Let’s take a simplified model of software engineering and say there are two basic modes of work:</p><ul><li><strong>Mode 1</strong> — Tactical delivery: deciding on how to implement features, figuring out how to use libraries and 3rd party tools, deciphering bugs, and actually writing code.</li><li><strong>Mode 2</strong> — Strategic decision making: identifying product features that need built, technical investments that need to be made, and architecture and software patterns that need to evolve.</li></ul><h3 id="Mode-1-—-Tactical-Delivery"><a href="#Mode-1-—-Tactical-Delivery" class="headerlink" title="Mode 1 — Tactical Delivery"></a>Mode 1 — Tactical Delivery</h3><p>In Mode 1, LLMs are useful for generating boilerplate code (i.e. structural code that’s necessary but doesn’t have business value) and for exploring technology or patterns developers aren’t familiar with.</p><p>Most of the examples being talked about are boilerplate. <strong>The actual value is not here.</strong></p><p>The real value in Mode 1 is for giving engineering a head start on complicated technical tasks. When working on complicated work, engineers can spend hours or even days exploring a concept before they get close to writing the first line of useful code. LLMs can short circuit that.</p><p>Here’s an example of me exploring code to work with maps and plotting. I’ve never worked with projections (i.e. how we flatten the roundish Earth to flat images) and would have no idea where to start. ChatGPT gave me a starting point that did a few things:</p><ul><li>Told me about a 3rd party library “proj4” that I’d never heard of</li><li>Gave me a starting point for arcane configuration variables I’d have to figure out</li><li>Gave me actual code I could then start to modify</li></ul><div class="center"><figure><img src="/2023/04/What-ChatGPT-Means-for-Engineers-Today/gpt-example.png" class="" title="A real example of me asking GPT for code to do lat&#x2F;long calculations"></figure></div><p>ChatGPT is surprisingly good at telling you why it did something. You can ask it why it used a library, or ask it where a bug is likely going to happen. I’ve found that for routine tasks it does a good job telling you why and not just what, if you ask.</p><p><strong>My bet — LLMs will quickly become the normal starting place for development teams starting a new project. Within 18 months engineers won’t think twice about using them, just like Google or StackOverflow now.</strong></p><h3 id="Mode-2-—-Strategy"><a href="#Mode-2-—-Strategy" class="headerlink" title="Mode 2 — Strategy"></a>Mode 2 — Strategy</h3><p>Mode 2 is harder to predict and a little different. GPT is already pretty good at laying out how you’d solve a specific problem but it’s not great at suggesting how to make decisions that will set you up for success 6&#x2F;12&#x2F;18 months from now.</p><p>This kind of information is probably not heavily represented in the training data because most companies don’t publish their strategy. It’s also highly unique to each team.</p><p><strong>My bet — Lead engineers &#x2F; architects become more valuable to a team but their roles will change. They’ll still have to set the technical strategy but they’ll spend more time reviewing the work of more junior team members to make sure it fits the strategy.</strong></p><p>It’s unclear to me if this means team’s will need more senior people and become barbell shaped (lots of seniors, few mids, lots of juniors) or stay pyramid shaped.</p><h3 id="So-what-about-quality"><a href="#So-what-about-quality" class="headerlink" title="So what about quality?"></a>So what about quality?</h3><p>Quality is going to take a hit and testing post-development is going to be even more important than it already is.</p><p>Why? None of the code ChatGPT gives you went through the normal learning cycle of engineering:</p><ul><li>Engineer has an idea and writes code; that code fails</li><li>Engineer learns from the failure and modifies the code, learning more about how it works along the way (repeat many times)</li><li>Engineer has deep knowledge about how the code works and where likely failure points still are</li><li>Code is ready for explicit testing</li></ul><p>None of it is test-driven where the rules for how the code should (and shouldn’t) work are defined ahead of time. Engineers may not fully understand the inner workings of their code. In my example above, I have zero idea what the “projectionParameters” really mean. If they work, I probably won’t go figure it out either.</p><p>For internal projects, particularly small one off projects to serve a specific business function, this probably doesn’t matter at all. The ability to solve these projects just got much faster and cheaper.</p><p>For external projects and anywhere security, data integrity, and reliability are key, the need for QA just expanded. This code needs to be treated as untrustworthy until it’s heavily exercised by people trying to break it.</p><p><strong>My bet — The ratio of Engineering to QA moves meaningfully to QA in the next 18 months; maybe 25–30% more QA. This might mean hiring more specialists, or it might mean your existing team shifts their priorities.</strong></p><h2 id="What’s-next"><a href="#What’s-next" class="headerlink" title="What’s next"></a>What’s next</h2><p>Next week I’ll write more on how LLMs will empower QA professionals and anyone testing code. In particular they will make automated testing cheaper and feaster.</p><p>After that, I’ll write about how a business leader should think about balancing speed and risk. I’ll also talk about how you can start future proofing your team to use tools like Copilot and ChatGPT.</p>]]>
    </content>
    <id>https://jaredthenerd.com/2023/04/What-ChatGPT-Means-for-Engineers-Today/</id>
    <link href="https://jaredthenerd.com/2023/04/What-ChatGPT-Means-for-Engineers-Today/"/>
    <published>2023-04-04T16:00:00.000Z</published>
    <summary>
      <![CDATA[<div class="center"><figure><img src="/2023/04/What-ChatGPT-Means-for-Engineers-Today/header-image.png" class="" title="A really old marketi]]>
    </summary>
    <title>What ChatGPT Means for Engineers Today</title>
    <updated>2026-10-17T22:02:02.741Z</updated>
  </entry>
  <entry>
    <author>
      <name>Jared Faris</name>
    </author>
    <category term="Estimation" scheme="https://jaredthenerd.com/tags/estimation/"/>
    <category term="Web" scheme="https://jaredthenerd.com/tags/web/"/>
    <category term="Indy" scheme="https://jaredthenerd.com/tags/indy/"/>
    <category term="Web standards" scheme="https://jaredthenerd.com/tags/web-standards/"/>
    <content>
      <![CDATA[<p>Last week, I had a whirlwind trip to Indianapolis for Indy.Code() 2019, followed by a drive back to Columbus to help run Stir Trek. Phew.</p><p>Indy.Code() was a great event, and I’m glad I finally got to visit. I wish I had been able to hang out a bit more, but I did get to meet a few new speakers and attendees. Interactions were great in both of my sessions, and I saw a few people I recognized who came to both. They must have gotten lost ;)</p><p>Click the images below to download the slides.</p><h2 id="How-Long-Will-It-Take"><a href="#How-Long-Will-It-Take" class="headerlink" title="How Long Will It Take"></a>How Long Will It Take</h2><p>First, I got to brush off of my software estimation talk. My thinking here contnuously evolves, so I feel like it’s better and more useful now than when I first wrote it years ago.</p><div class="center"><a href="/2019/05/indycode-2019-slides/hlwit-faris-indycode-2019.pdf"><figure><img src="/2019/05/indycode-2019-slides/hlwit-slide.jpg" class="" title="The boss asking the question we all hate">  <figcaption>Run!!!</figcaption></figure></a></div><h2 id="Where-the-Web-Is-Going"><a href="#Where-the-Web-Is-Going" class="headerlink" title="Where the Web Is Going"></a>Where the Web Is Going</h2><p>Second, I gave my talk on the future (and past) of web standards. I got good feedback from attendees on this. One told me that he or she has been a web developer for years, and still walked away with some new technologies to research. Mission accomplished!</p><div class="center"><a href="/2019/05/indycode-2019-slides/where-the-web-faris-indycode-2019.pdf"><figure><img src="/2019/05/indycode-2019-slides/where-the-web-slide.jpg" class="" title="The web is moving fast">  <figcaption>The web is changing quickly</figcaption></figure></a></div><p>Thanks again to Indy.Code() for inviting me, and for everyone who came to my talks!!</p>]]>
    </content>
    <id>https://jaredthenerd.com/2019/05/indycode-2019-slides/</id>
    <link href="https://jaredthenerd.com/2019/05/indycode-2019-slides/"/>
    <published>2019-05-02T17:51:26.000Z</published>
    <summary>
      <![CDATA[<p>Last week, I had a whirlwind trip to Indianapolis for Indy.Code() 2019, followed by a drive back to Columbus to help run Stir Trek. Phew.]]>
    </summary>
    <title>Indy.Code() 2019 Slides</title>
    <updated>2026-10-17T22:02:02.745Z</updated>
  </entry>
  <entry>
    <author>
      <name>Jared Faris</name>
    </author>
    <category term="IT Strategy" scheme="https://jaredthenerd.com/tags/it-strategy/"/>
    <category term="CodeStock" scheme="https://jaredthenerd.com/tags/codestock/"/>
    <category term="Speaking" scheme="https://jaredthenerd.com/tags/speaking/"/>
    <content>
      <![CDATA[<p>This week I had the pleasure of attending <a target="_blank" rel="noopener" href="https://codestock.org/">CodeStock</a> in Knoxville for the first time. It was a great experience. If you’ve thought about submitting to speak at CodeStock, or thought about attending, I highly recommend it!</p><h2 id="Speaker-Panel"><a href="#Speaker-Panel" class="headerlink" title="Speaker Panel"></a>Speaker Panel</h2><p>This was another first for me as a speaker as well. I’ve been considering running a panel on becoming a conference speaker for a few years, and CodeStock is the first conference that let it happen! Big thank you to the speaker committee for selecting the panel.</p><div class="center"><a href="/2019/04/CodeStock-2019/HowCanI-FirstSlide-CodeStock.png"><figure><img src="/2019/04/CodeStock-2019/HowCanI-FirstSlide-CodeStock.jpg" class="" title="First slide from the speaker panel slide deck, featuring Chad Green, Kara Luton, and David Neal">  <figcaption>I had an awesome panel</figcaption></figure></a></div><p>Special thanks to Chad Green, Kara Luton, and David Neal for doing all the real work!</p><h2 id="Build-for-the-Future"><a href="#Build-for-the-Future" class="headerlink" title="Build for the Future"></a>Build for the Future</h2><p>I also gave my <em>Build for the Future When Your Users Are in the Past</em> talk. I had great conversations both durin and afterwards, and am grateful to everyone who attended.</p><p>If you’d like to get my slides for this, click here or the image below.</p><div class="center"><a href="/2019/04/CodeStock-2019/Build-for-the-Future-CodeStock-2019-slides.pdf"><figure><img src="/2019/04/CodeStock-2019/Build-for-the-Future-CodeStock.jpg" class="" title="First slide from the Build for the Future presentation">  <figcaption>I'm very happy with this Apple IIc</figcaption></figure></a></div>]]>
    </content>
    <id>https://jaredthenerd.com/2019/04/CodeStock-2019/</id>
    <link href="https://jaredthenerd.com/2019/04/CodeStock-2019/"/>
    <published>2019-04-14T15:30:00.000Z</published>
    <summary>
      <![CDATA[<p>This week I had the pleasure of attending <a target="_blank" rel="noopener" href="https://codestock.org/">CodeStock</a> in Knoxville for]]>
    </summary>
    <title>CodeStock 2019 Slides</title>
    <updated>2026-10-17T22:02:02.674Z</updated>
  </entry>
  <entry>
    <author>
      <name>Jared Faris</name>
    </author>
    <category term="Dev" scheme="https://jaredthenerd.com/tags/dev/"/>
    <category term="Management" scheme="https://jaredthenerd.com/tags/management/"/>
    <category term="Leadership" scheme="https://jaredthenerd.com/tags/leadership/"/>
    <category term="Estimation" scheme="https://jaredthenerd.com/tags/estimation/"/>
    <category term="Web" scheme="https://jaredthenerd.com/tags/web/"/>
    <category term="Progressive Web Apps" scheme="https://jaredthenerd.com/tags/progressive-web-apps/"/>
    <category term="Code PaLOUsa" scheme="https://jaredthenerd.com/tags/code-palousa/"/>
    <category term="QA or the Highway" scheme="https://jaredthenerd.com/tags/qa-or-the-highway/"/>
    <category term="Momentum" scheme="https://jaredthenerd.com/tags/momentum/"/>
    <content>
      <![CDATA[<p>I just realized that I’ve not put up recent slides for a number of my talks in 2018. Sorry!</p><div class="center"><a href="/2018/04/Conferences-2018-So-Far/momentum-wheretheweb-cocktail.jpg"><figure><img src="/2018/04/Conferences-2018-So-Far/momentum-wheretheweb-cocktail.jpg" class="" title="Picture of Jared showing an animated image at Momentum">  <figcaption>Sorry I didn't actually bring cocktails</figcaption></figure></a> Thanks to <a target="_blank" rel="noopener" href="https://twitter.com/momentumdevcon">Momentum Dev Conf</a> for the photo.</div><h2 id="Uh-So-I’m-A-Manager…-Now-What"><a href="#Uh-So-I’m-A-Manager…-Now-What" class="headerlink" title="Uh, So I’m A Manager… Now What?"></a>Uh, So I’m A Manager… Now What?</h2><p>Given at:</p><ul><li><a target="_blank" rel="noopener" href="https://www.qaorthehighway.com/">QA or the Highway</a> - 2&#x2F;27&#x2F;2018</li><li><a target="_blank" rel="noopener" href="http://www.codepalousa.com/">Code PaLOUsa</a> - 3&#x2F;30&#x2F;2018</li></ul><a href="/2018/04/Conferences-2018-So-Far/Manager-CPL2018.pdf" title="Uh, So I&#39;m A Manager... Now What? - Slides">Uh, So I&#39;m A Manager... Now What? - Slides</a><br><h2 id="How-Long-Will-It-Take"><a href="#How-Long-Will-It-Take" class="headerlink" title="How Long Will It Take?"></a>How Long Will It Take?</h2><p>Given at:</p><ul><li><a target="_blank" rel="noopener" href="http://momentumdevcon.com/">Momentum</a> - 4&#x2F;19&#x2F;2018</li></ul><a href="/2018/04/Conferences-2018-So-Far/HowLongWillItTake-Momentum2018.pdf" title="How Long Will It Take? - Slides">How Long Will It Take? - Slides</a><br><h2 id="Where-The-Web-Is-Going"><a href="#Where-The-Web-Is-Going" class="headerlink" title="Where The Web Is Going"></a>Where The Web Is Going</h2><p>Given at: </p><ul><li><a target="_blank" rel="noopener" href="http://www.codepalousa.com/">Code PaLOUsa</a> - 3&#x2F;29&#x2F;2018</li><li><a target="_blank" rel="noopener" href="http://momentumdevcon.com/">Momentum</a> - 4&#x2F;19&#x2F;2018</li></ul><a href="/2018/04/Conferences-2018-So-Far/WhereTheWeb-Momentum2018.pdf" title="Where The Web Is Going - Slides">Where The Web Is Going - Slides</a>]]>
    </content>
    <id>https://jaredthenerd.com/2018/04/Conferences-2018-So-Far/</id>
    <link href="https://jaredthenerd.com/2018/04/Conferences-2018-So-Far/"/>
    <published>2018-04-19T18:13:15.000Z</published>
    <summary>
      <![CDATA[<p>I just realized that I’ve not put up recent slides for a number of my talks in 2018. Sorry!</p>
<div class="center"><a href="/2018/04/Con]]>
    </summary>
    <title>2018 Conferences, So Far</title>
    <updated>2026-10-17T22:02:02.681Z</updated>
  </entry>
  <entry>
    <author>
      <name>Jared Faris</name>
    </author>
    <category term="technology" scheme="https://jaredthenerd.com/tags/technology/"/>
    <category term="API" scheme="https://jaredthenerd.com/tags/api/"/>
    <category term="demo" scheme="https://jaredthenerd.com/tags/demo/"/>
    <category term="progressive web apps" scheme="https://jaredthenerd.com/tags/progressive-web-apps/"/>
    <category term="PWA" scheme="https://jaredthenerd.com/tags/pwa/"/>
    <category term="flow" scheme="https://jaredthenerd.com/tags/flow/"/>
    <category term="webs" scheme="https://jaredthenerd.com/tags/webs/"/>
    <content>
      <![CDATA[<p>I build a lot of demos. As someone who tries to learn and speak about emerging web standards, I spend a lot of time building random, little, useless apps (sometimes <a target="_blank" rel="noopener" href="http://serviceworkerdemo.azurewebsites.net/FetchSW/06-ServiceWorkerPush.html">full of silly movie references</a>). The next app I had kicked around building is a basic mileage tracker PWA which would track start&#x2F;stop latitude and longitude and a few other items, and push them up to a server. This would be a good app to demonstrate offline capabilities, and would actually be useful to me.</p><p>Most interesting web demos require a server of some sort, and I’ve gotten pretty good at writing bad Express applications quickly. But that’s a lot of work that’s tangential to the demo I’m trying to build. I cut corners and definitely don’t build enterprise RESTful APIs for these things, but I’d rather not build any API at all or worry about hosting. </p><h2 id="Here-comes-Edge-Summit"><a href="#Here-comes-Edge-Summit" class="headerlink" title="Here comes Edge Summit"></a>Here comes Edge Summit</h2><p>While I was at the <a target="_blank" rel="noopener" href="https://summit.microsoftedge.com/">Microsoft Edge Summit</a> last week, I had a lightbulb moment. I had spent much of the Summit thinking about PWAs and almost no time thinking about anything on servers. I needed to build the mileage PWA app, and while doing so it was finally time to skip the server. </p><div class="center"><a target="_blank" rel="noopener" href="https://summit.microsoftedge.com/"><figure><svg class="conf-logo" xmlns="http://www.w3.org/2000/svg" width="163" height="67" viewBox="0 0 163 67"><title>The Edge Summit logo - Two mountains with a code tag between them.</title><g fill="#167A3E"><path d="M98 8c-7.7 0-14 6.3-14 14s6.3 14 14 14 14-6.3 14-14-6.3-14-14-14zm-2.5 18L94 27.5 88.5 22l5.5-5.5 1.5 1.5-4 4 4 4zm6.4 1.5l-1.5-1.5 4-4-4-4 1.5-1.5 5.5 5.5-5.5 5.5z"></path><path d="M6.4 67l24.4-30.3 11 9.4L52.1 36l14.7 15.2 12.5-11.6L101.5 67h6.4L97.2 53.7l2.9 3.6 11.5-13.4 10.6 6.4 15.3-5.1L156.2 67h6.4L124 22 97 53.4 54 0 0 67h6.4zM124 29.5l9.9 11.6-11.1 3.7-7.9-4.7 9.1-10.6zM54 8l22.3 27.7-9.2 8.5-14.9-15.4-10.6 10.5-7.6-6.5L54 8z"></path></g></svg><figcaption>Edge Summit has an awesome logo.</figcaption></figure></a></div><p>The rest of this blog post deals with building a RESTful API using <a target="_blank" rel="noopener" href="https://us.flow.microsoft.com/en-us/">Microsoft Flow</a>. I’ve got a post or two in the works about PWAs, but this isn’t one of them.</p><p><em>Side note: Edge Summit was awesome and you should try to attend or stream it next year! This year’s videos are on <a target="_blank" rel="noopener" href="https://channel9.msdn.com/Events/WebPlatformSummit/Microsoft-Edge-Web-Summit-2017">Channel 9</a>.</em></p><p><em>Another side note: I love the Edge Summit logo. Whoever created it did a great job.</em></p><p><em>A third side note: Thank you to the Edge team for inviting me to the Summit and continuing to be an awesome team to work with as a Microsoft MVP. <div class="center"><a href="https://mvp.microsoft.com/en-us/PublicProfile/5000562?fullName=Jared%20Faris" target="_blank"><figure><img src="/2018/04/Creating-Demo-APIs-Without-Code/MVP-badge.jpg" class="" title="Microsoft MVP badge"></figure></a></div></em></p><h2 id="Microsoft-Flow"><a href="#Microsoft-Flow" class="headerlink" title="Microsoft Flow"></a>Microsoft Flow</h2><p>At <a target="_blank" rel="noopener" href="https://hmbnet.com/">HMB</a> we’ve been using Microsoft Flow quite a bit for business automation. It’s sort of like Microsoft’s version of <a target="_blank" rel="noopener" href="https://ifttt.com/discover">IFTT</a>, and it has great integrations with all sorts of other MS products as you’d expect. I feel less weird giving Flow access to my One Drive than other apps since they already have it, and it just works which is nice.</p><p>Flow supports a bunch of useful things that can be pretty advanced, but it also supports basic HTTP requests and responses. Those sound suspiciously like RESTful endpoints.</p><p>Flow allows you to create a Request endpoint based on a <a target="_blank" rel="noopener" href="http://json-schema.org/">JSON Schema</a>, which is pretty powerful. However, JSON Schema can be a little weird and complicated so they created a shortcut. You can simply copy&#x2F;paste in a JSON object, and it will back into a relevant schema for you. This is an awesome user experience and one worth <strike>stealing</strike> copying if you build this sort of tool.</p><pre class="brush: js">{"reason": "Test","dateTime": "2017-09-17T19:49:45.326Z","startLocation": {"latitude": 40.1262,"longitude": -82.9291},"stopLocation": {"latitude": 39.9612,"longitude": -82.9988}}</pre><p>It ended up generating a nice JSON Schema for me, and we were ready to go.</p><div class="center"><figure><img src="/2018/04/Creating-Demo-APIs-Without-Code/Flow-request.png" class="" title="JSON Schema defining the Flow request"><figcaption>The request based on my sample JSON</figcaption></figure></div><h2 id="Bing-Integration"><a href="#Bing-Integration" class="headerlink" title="Bing Integration"></a>Bing Integration</h2><p>Because I’m building a mileage app, the next thing I wanted to accomplish was to lookup the driving directions between the two locations to find the mileage. This was as easy as adding another step to my Flow and choosing a “Get route” action from Bing.</p><p>There was a little confusion becaues it listed “latitude” and “longitude” twice without giving any context about their location in the JSON, but I assumed (correctly) that the first choice in each list was the first one in the document. So this just worked.</p><p>I specified that I wanted driving directions in miles, and set each waypoint to be equal to “latitude, longitude”. That’s really it.</p><div class="center"><figure><img src="/2018/04/Creating-Demo-APIs-Without-Code/Flow-bing-route.png" class="" title="Flow integration with Bing maps to figure out routes"><figcaption>It took a little time to figure out the format for "latitude, longitude". That was the hardest part. The sample text showed parenthesis that I didn't actually need.</figcaption></figure></div><h2 id="Saving-Data-to-One-Drive"><a href="#Saving-Data-to-One-Drive" class="headerlink" title="Saving Data to One Drive"></a>Saving Data to One Drive</h2><p>Finally, I needed to dump this data somewhere. I decided to create a spreadsheet on One Drive to use since Flow integrates easily there.</p><p>This took a little bit of work. You need to attach Flow to your One Drive account by logging into Office 365. Also, you need to creat an Excel spreadsheet with (this is important) <strong>a named table with appropriate column headers</strong>. </p><p>Flow read the POST and created parameters for each column. I then added the relevant data types from the Request object and the Bing response to the correct fields. It took a minute or two for the new spreadsheet on One Drive to show up in Flow but then we were up and running.</p><div class="center"><figure><img src="/2018/04/Creating-Demo-APIs-Without-Code/Flow-excel-output.png" class="" title="Flow writing my request and mapping data to Excel"><figcaption>Excel is definitely an enterprise data store.</figcaption></figure></a></div><h2 id="Magic"><a href="#Magic" class="headerlink" title="Magic"></a>Magic</h2><p>That’s it, and it just works. I’ve used <a target="_blank" rel="noopener" href="https://www.getpostman.com/">Postman</a> to send multiple requests over, and within a few seconds I have a new entry in my spreadsheet with the mileage.</p><div class="center"><figure><img src="/2018/04/Creating-Demo-APIs-Without-Code/Flow-excel-mileage.png" class="" title="Bing mileage stored in One Drive"><figcaption>That was easy</figcaption></figure></div><p>This isn’t a production ready system. There’s no security and I wouldn’t try to scale it to 10 million users. Flow has a limited number of requests before you have to pay although the costs are reasonable after that. All that said though, for building demos, Flow is every bit as awesome as it is for building business automation.</p><p>Now I should probably get back to PWAs!</p>]]>
    </content>
    <id>https://jaredthenerd.com/2018/04/Creating-Demo-APIs-Without-Code/</id>
    <link href="https://jaredthenerd.com/2018/04/Creating-Demo-APIs-Without-Code/"/>
    <published>2018-04-19T18:13:15.000Z</published>
    <summary>
      <![CDATA[<p>I build a lot of demos. As someone who tries to learn and speak about emerging web standards, I spend a lot of time building random, litt]]>
    </summary>
    <title>Creating Demo APIs Without Code Using Microsoft Flow</title>
    <updated>2026-10-17T22:02:02.715Z</updated>
  </entry>
  <entry>
    <author>
      <name>Jared Faris</name>
    </author>
    <category term="Dog Food" scheme="https://jaredthenerd.com/tags/dog-food/"/>
    <category term="Management" scheme="https://jaredthenerd.com/tags/management/"/>
    <category term="Leadership" scheme="https://jaredthenerd.com/tags/leadership/"/>
    <content>
      <![CDATA[<p>Thank you to <a target="_blank" rel="noopener" href="http://dogfoodcon.com/">Dog Food</a> for inviting me to speak, and thank you to everyone who came to my talk on being an effective tech leader: Uh, so I’m A Manager… Now what?</p><div class="center"><a href="/2017/10/Dog-Food-Manager-Now/dfspeaking.jpg"><figure><img src="/2017/10/Dog-Food-Manager-Now/dfspeaking.jpg" class="" title="Picture of Jared speaking at Dog Food">  <figcaption>Emoji make everything better!</figcaption></figure></a> Thanks to <a target="_blank" rel="noopener" href="https://twitter.com/luckygirliegirl">Christina Aldan</a> for the photo.</div><a href="/2017/10/Dog-Food-Manager-Now/Manager-Dog-Food-2017.pdf" title="You can download the slides here">You can download the slides here</a>, and the links I referenced are at the end. Cheers!]]>
    </content>
    <id>https://jaredthenerd.com/2017/10/Dog-Food-Manager-Now/</id>
    <link href="https://jaredthenerd.com/2017/10/Dog-Food-Manager-Now/"/>
    <published>2017-10-05T19:59:18.000Z</published>
    <summary>
      <![CDATA[<p>Thank you to <a target="_blank" rel="noopener" href="http://dogfoodcon.com/">Dog Food</a> for inviting me to speak, and thank you to ever]]>
    </summary>
    <title>Dog Food Conf - Uh, So I'm A Manager... Now What?</title>
    <updated>2026-10-17T22:02:02.717Z</updated>
  </entry>
  <entry>
    <author>
      <name>Jared Faris</name>
    </author>
    <category term="technology" scheme="https://jaredthenerd.com/tags/technology/"/>
    <category term="javascript" scheme="https://jaredthenerd.com/tags/javascript/"/>
    <category term="web" scheme="https://jaredthenerd.com/tags/web/"/>
    <category term="web standards" scheme="https://jaredthenerd.com/tags/web-standards/"/>
    <category term="html5" scheme="https://jaredthenerd.com/tags/html5/"/>
    <category term="css" scheme="https://jaredthenerd.com/tags/css/"/>
    <category term="service workers" scheme="https://jaredthenerd.com/tags/service-workers/"/>
    <category term="fetch" scheme="https://jaredthenerd.com/tags/fetch/"/>
    <content>
      <![CDATA[<p>Big thanks to everyone who attended my <em>Progressive Web Apps Are The Future</em> talk at <a target="_blank" rel="noopener" href="https://www.kcdc.info/">KCDC</a>. Special thanks to those of you who still attended, even after seeing <em><a href="/2017/08/KCDC-Where-The-Web-Is-Going/" title="KCDC - Where The Web Is Going">Where The Web Is Going</a></em>. I’m glad I didn’t scare you off.</p><p>Slides for the PWA talk are available <a target="_blank" rel="noopener" href="https://jaredfaris.github.io/FetchAndServiceWorkerDemo/#/">here</a>.</p><p>If you want to open the demos directly, you can find them on Azure <a target="_blank" rel="noopener" href="http://serviceworkerdemo.azurewebsites.net/">here</a>.</p><p>I don’t have any photos from this talk, so here is a picture of a corgi.</p><div class="center"><a href="/2017/08/KCDC-PWAs-Are-The-Future/ein-laptop-large.jpg"><figure><img src="/2017/08/KCDC-PWAs-Are-The-Future/ein-laptop-thumbnail.jpg" class="" title="Data Dog - Corgi in front of a laptop">  <figcaption>He builds all my demos</figcaption></figure></div>]]>
    </content>
    <id>https://jaredthenerd.com/2017/08/KCDC-PWAs-Are-The-Future/</id>
    <link href="https://jaredthenerd.com/2017/08/KCDC-PWAs-Are-The-Future/"/>
    <published>2017-08-05T13:54:57.000Z</published>
    <summary>
      <![CDATA[<p>Big thanks to everyone who attended my <em>Progressive Web Apps Are The Future</em> talk at <a target="_blank" rel="noopener" href="https]]>
    </summary>
    <title>KCDC - Progressive Web Apps Are The Future</title>
    <updated>2026-10-17T22:02:02.728Z</updated>
  </entry>
  <entry>
    <author>
      <name>Jared Faris</name>
    </author>
    <category term="technology" scheme="https://jaredthenerd.com/tags/technology/"/>
    <category term="javascript" scheme="https://jaredthenerd.com/tags/javascript/"/>
    <category term="web" scheme="https://jaredthenerd.com/tags/web/"/>
    <category term="web standards" scheme="https://jaredthenerd.com/tags/web-standards/"/>
    <category term="html5" scheme="https://jaredthenerd.com/tags/html5/"/>
    <category term="css" scheme="https://jaredthenerd.com/tags/css/"/>
    <category term="service workers" scheme="https://jaredthenerd.com/tags/service-workers/"/>
    <category term="http2" scheme="https://jaredthenerd.com/tags/http2/"/>
    <category term="css grid" scheme="https://jaredthenerd.com/tags/css-grid/"/>
    <category term="css variables" scheme="https://jaredthenerd.com/tags/css-variables/"/>
    <content>
      <![CDATA[<p>Thank you to everyone who attended my talk at <a target="_blank" rel="noopener" href="https://www.kcdc.info/">KCDC</a> on <em>Where The Web Is Going</em> I hope you got value out of it, and that it kept you awake at 8:30 in the morning!</p><p>If you’d like to download the slides, they are available <a href="/2017/08/KCDC-Where-The-Web-Is-Going/WhereTheWebIsGoing-KCDC2017.pdf" title="right here">right here</a>.</p><div class="center"><a href="/2017/08/KCDC-Where-The-Web-Is-Going/focus-large.jpg"><figure><img src="/2017/08/KCDC-Where-The-Web-Is-Going/focus-thumbnail.jpg" class="" title="KCDC - FOCUS slide">  <figcaption>Getting everyone's attention at KCDC</figcaption></figure></a>Thanks to <a target="_blank" rel="noopener" href="https://twitter.com/mrdowden">Michael Dowden</a> for the photo.</div>]]>
    </content>
    <id>https://jaredthenerd.com/2017/08/KCDC-Where-The-Web-Is-Going/</id>
    <link href="https://jaredthenerd.com/2017/08/KCDC-Where-The-Web-Is-Going/"/>
    <published>2017-08-03T13:58:30.000Z</published>
    <summary>
      <![CDATA[<p>Thank you to everyone who attended my talk at <a target="_blank" rel="noopener" href="https://www.kcdc.info/">KCDC</a> on <em>Where The W]]>
    </summary>
    <title>KCDC - Where The Web Is Going</title>
    <updated>2026-10-17T22:02:02.729Z</updated>
  </entry>
  <entry>
    <author>
      <name>Jared Faris</name>
    </author>
    <category term="technology" scheme="https://jaredthenerd.com/tags/technology/"/>
    <category term="javascript" scheme="https://jaredthenerd.com/tags/javascript/"/>
    <category term="web" scheme="https://jaredthenerd.com/tags/web/"/>
    <category term="web standards" scheme="https://jaredthenerd.com/tags/web-standards/"/>
    <category term="html5" scheme="https://jaredthenerd.com/tags/html5/"/>
    <category term="fetch" scheme="https://jaredthenerd.com/tags/fetch/"/>
    <category term="ajax" scheme="https://jaredthenerd.com/tags/ajax/"/>
    <content>
      <![CDATA[<p>Being a web developer right now is exciting <strong>and</strong> confusing. We keep getting <a target="_blank" rel="noopener" href="http://developer.telerik.com/featured/web-going-2016/">new tools</a>, but they all seem to come with <a target="_blank" rel="noopener" href="http://developer.telerik.com/featured/popular-javascript-tools-depend/">more tools of their own</a>.</p><p>It’s refreshing when we get a near-total replacement for something that is actually <strong>simpler</strong>. XMLHttpRequest (XHR) is the definition of an old, confusing, complex tool. <a target="_blank" rel="noopener" href="https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API">Fetch API</a> is the simpler replacement.</p><h2 id="Fetch-vs-XHR"><a href="#Fetch-vs-XHR" class="headerlink" title="Fetch vs. XHR?"></a>Fetch vs. XHR?</h2><p>Fetch is a brand new way of making asynchronous calls to the server. Before we dive into the details, let’s look at an example of Fetch versus XHR. To make this simple, we’ll just request a file (jQuery in this case) from the Google CDN and just dump it to the console. </p><h3 id="Fetch-Example"><a href="#Fetch-Example" class="headerlink" title="Fetch Example"></a>Fetch Example</h3><pre class="brush: js">    // Loading the jQuery code    fetch('https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js')        .then(function (response) {            response.text().then(function (responseText) {                console.log(responseText);                alert('Done using Fetch!');            });        });</pre><center>_You may want to open your F12 network tools to compare it to XHR_<input type="button" id="basicFetchButton" value="Try it"></center><script>    document.getElementById("basicFetchButton").addEventListener("click", function(){        // Loading the jQuery code        fetch("https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js")            .then(function (response) {                response.text().then(function (responseText) {                    console.log(responseText);                    alert("Done using Fetch!");                });            });    });</script><p>Now, let’s take a look at this using XHR.</p><h3 id="XHR-Example"><a href="#XHR-Example" class="headerlink" title="XHR Example"></a>XHR Example</h3><pre class="brush: js">    // Loading the jQuery code    request = new XMLHttpRequest();    request.open("GET", "https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js", true);    request.send(null);    request.onreadystatechange = function() {        if(request.readyState === 4) { // What does this even mean?            if(request.status === 200) {                console.log(request.responseText);                alert("Done using XHR!");            }        }    }</pre><center><input type="button" id="basicXHRButton" value="Try It"></center><script>    document.getElementById("basicXHRButton").addEventListener("click", function() {        // Loading the jQuery code        request = new XMLHttpRequest();        request.open("GET", "https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js", true);        request.send(null);        request.onreadystatechange = function() {            if(request.readyState === 4) { // What does this even mean?                if(request.status === 200) {                    console.log(request.responseText);                    alert("Done using XHR!");                }            }        }    });</script><p>This is a pain to write and read. I had to Google what readyState 4 even meant (request finished and response ready) to write this post. Why do I have to send a null?</p><center><span style="font-size: 1.5em; color: red;">XMLHttpRequest is the definition of an old, confusing, complex tool.</span></center><p>In reality, a lot of devs just include jQuery and write this:</p><pre class="brush: js">    $("#basicjQueryButton").on("click", function() {        // Loading the jQuery code        $.get("https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js", function(data) {            console.log(data);            alert("Done using jQuery!");        });    });</pre> <p>We download 34.5KB (as of 3.1.0), sometimes <strong>just</strong> for this functionality. You don’t need to do this anymore.</p><h2 id="Now-There-Is-Fetch"><a href="#Now-There-Is-Fetch" class="headerlink" title="Now There Is Fetch"></a>Now There Is Fetch</h2><p>The Fetch API gives us a generic Request and Response that we can use to GET&#x2F;POST&#x2F;PUT&#x2F;DELETE&#x2F;HEAD data to and from the server. It uses promises which makes it easier to code, as well as much easier to read. Because it is promise based, it even chains nicely into other methods. </p><p>It’s useable today in Chrome, Edge and Firefox, and other browsers through a <a target="_blank" rel="noopener" href="https://github.com/github/fetch">polyfill</a>.</p><div class="center"><a target="_blank" rel="noopener" href="http://caniuse.com/#feat=fetch"><figure><img src="/2016/11/fetch-modern-async-server-calls/fetch-can-i-use.png" class="" title="Browser support chart"><figcaption>Fetch API Browser Support</figcaption></figure></a></div><h3 id="Promises"><a href="#Promises" class="headerlink" title="Promises?"></a>Promises?</h3><p>Before diving into the advanced features of Fetch, let’s take a brief look at promises. If you want to learn more, I recommend <a target="_blank" rel="noopener" href="http://www.html5rocks.com/en/tutorials/es6/promises/">this really excellent post</a> from <a target="_blank" rel="noopener" href="https://jakearchibald.com/">Jake Archibald</a>.</p><p>Promises are a new way of dealing with asynchronous code in JavaScript that are simpler than chains of callbacks. Promises make it easy to write code that reads like human language. For example, you could write something like this:</p><pre class="brush: js">    LoadMyData()        .then(ProcessMyData)        .then(DoSomethingElse)        .catch(HandleError);</pre><p>There is a lot more to promises, but for this article you should know the following:</p><ul><li>Promises start off <em>pending</em></li><li>Promises resolve as either <em>fulfilled</em> or <em>rejected</em></li><li>Fulfilled promises trigger a <em>.then()</em> call</li><li>Rejected promises trigger a <em>.catch()</em> call</li><li>All of this happens asynchronously, when the previous promise completes</li></ul><h3 id="Request-Response-Object"><a href="#Request-Response-Object" class="headerlink" title="Request &amp; Response Object"></a>Request &amp; Response Object</h3><p>The example shown above defaulted to a simple GET and didn’t set any advanced headers. However, Fetch allows you advanced control of your Request object before making a request, and lets you query the Response object after. For example, say your application wants to do the following:</p><ul><li>Make a <a target="_blank" rel="noopener" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS">CORS</a> request to a remote server (in this case, the very handy <a target="_blank" rel="noopener" href="http://reqres.in/">reqres.in</a>)</li><li>Specify that you’re looking for a content type of “application&#x2F;json”</li><li>Make sure you don’t check cache or store the response in it</li><li>Verify you got JSON back from the server (or maybe choose how to parse based on the data)</li></ul><pre class="brush: js">    var headers = new Headers();    // Set the content type to JSON    headers.append("Content-Type", "application/json");    // Setup GET and disable cache    var init = {        method: "GET",        cache: "no-store",        mode: "cors",        headers: headers    }    fetch("http://reqres.in/api/users", init)        .then(function (response) {            // Check that the response is a 200            if(response.status === 200){                alert("Content type: " + response.headers.get("Content-Type"));            }        });</pre><center><input type="button" id="requestResponseButton" value="Try It"></center><script>    document.getElementById("requestResponseButton").addEventListener("click", function() {        var headers = new Headers();        // Set the content type to JSON        headers.append("Content-Type", "application/json");        // Setup GET and disable cache        var init = {            method: "GET",            cache: "no-store",            mode: "cors",            headers: headers        }        fetch("http://reqres.in/api/users", init)            .then(function (response) {                debugger                // Check that the response is a 200                if(response.status === 200){                    alert("Content type: " + response.headers.get("Content-Type"));                }            });    });</script><h3 id="Stream-Readers"><a href="#Stream-Readers" class="headerlink" title="Stream Readers"></a>Stream Readers</h3><p>You may have seen a call like this above:</p><pre class="brush: js">    response.text().then(function (responseText) {        console.log(responseText);        alert("Done using Fetch!");</pre><p>What I didn’t tell you before was that <em>.text()</em> is actually a <a target="_blank" rel="noopener" href="https://streams.spec.whatwg.org/#rs-model">stream reader</a>. The TL;DR of this is that the response data is a stream of bytes that you can read from. Stream readers pull in the entire stream and parse it for you.</p><p>There are a few methods available to you including:</p><ul><li>.text() - returns the full stream as a string</li><li>.json() - returns a JSON object</li><li>.formData() - returns a FormData object, which may be useful for posting somewhere</li><li>.blob() - returns the stream as a <a target="_blank" rel="noopener" href="https://developer.mozilla.org/en-US/docs/Web/API/Body/blob">blob</a>, useful if you may do non-JS parsing with it</li><li>.arrayBuffer() - returns an array buffer. This may be useful for streaming</li></ul><p>If you need to parse the stream twice it’s a problem, because once you’ve read it, it’s empty. Fortunately there’s one more method:</p><ul><li>.clone() - creates an identical copy of the response</li></ul><p>Alternatively, you can parse the string manually and do what you want. You can find a good example <a target="_blank" rel="noopener" href="https://domenic.github.io/streams-demo/">here</a> (<a target="_blank" rel="noopener" href="https://github.com/domenic/streams-demo/blob/gh-pages/index.html">with source</a>), but note that this doesn’t work in all browsers yet.</p><h2 id="What’s-the-Catch"><a href="#What’s-the-Catch" class="headerlink" title="What’s the Catch?"></a>What’s the Catch?</h2><p>Fetch can do nearly everything that XHR can do. The two things that are missing:</p><ul><li>Fetch requests can’t be canceled. This seems largely due to promises not being cancelable. Luckily, there’s a <a target="_blank" rel="noopener" href="https://github.com/tc39/proposal-cancelable-promises">spec in draft</a> for that.</li><li>Progress is difficult to track. You have to build that yourself. You can see an example of that <a target="_blank" rel="noopener" href="https://gist.github.com/kypflug/f3d19ab442f3732d12ee8d79b6a60ca3#file-fetch-with-streams-js">here</a> from <a target="_blank" rel="noopener" href="https://blogs.windows.com/msedgedev/2016/05/24/fetch-and-xhr-limitations/#pvuUCtX2HEVAiLh7.97">this article</a> from the Edge team.</li></ul><p>That’s really it. I told you this was a big improvement!</p><h2 id="Conclusion"><a href="#Conclusion" class="headerlink" title="Conclusion"></a>Conclusion</h2><p>Fetch is a powerful tool you can use today (with or without the polyfill), and it’s better than XHR for almost any application. You probably weren’t writing XHR yourself, but if you were, life just got better. It’s more likely you are using a library like jQuery to simplify your AJAX calls which won’t be the case anymore. If you want to take a deeper dive into Fetch, the <a target="_blank" rel="noopener" href="https://www.google.com/search?q=mozilla+dos+fetch&ie=&oe=">Mozilla Developer Network</a> is the place to start.</p><p>Fetch really comes into its own when we start looking into Service Workers, but that’s a topic for another post.</p><p>Happy coding!</p>]]>
    </content>
    <id>https://jaredthenerd.com/2016/11/fetch-modern-async-server-calls/</id>
    <link href="https://jaredthenerd.com/2016/11/fetch-modern-async-server-calls/"/>
    <published>2016-11-08T15:35:00.000Z</published>
    <summary>
      <![CDATA[<p>Being a web developer right now is exciting <strong>and</strong> confusing. We keep getting <a target="_blank" rel="noopener" href="http:]]>
    </summary>
    <title>Fetch - Modern Async Server Calls</title>
    <updated>2026-10-17T22:02:02.745Z</updated>
  </entry>
</feed>
