<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Viet Nguyen Blog RSS Feed]]></title><description><![CDATA[Viet Nguyen writes about software development, AI projects, fantasy basketball, travel, family, and everyday life, with notes from projects he is building.]]></description><link>https://www.vietnguyen.site</link><generator>GatsbyJS</generator><lastBuildDate>Sat, 10 Oct 2026 13:53:40 GMT</lastBuildDate><item><title><![CDATA[HoopSim Devlog #2: Daily Slate, Multiplayer, data wrangling]]></title><description><![CDATA[This HoopSim update covers Daily Slate fantasy basketball, multiplayer, schedule data, player projections, and the short-form video pipeline for recorded games.]]></description><link>https://www.vietnguyen.site/hoopsim-devlog-2/</link><guid isPermaLink="false">https://www.vietnguyen.site/hoopsim-devlog-2/</guid><pubDate>Thu, 08 Oct 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/a1b1eba8cd98ef1ce964beb7ebdf97f2/b17f8/hero.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 56.08108108108109%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAALABQDASIAAhEBAxEB/8QAGAAAAgMAAAAAAAAAAAAAAAAAAAMBAgX/xAAXAQADAQAAAAAAAAAAAAAAAAABAgME/9oADAMBAAIQAxAAAAHLLxDSkaMP/8QAGBABAQADAAAAAAAAAAAAAAAAAQAREiD/2gAIAQEAAQUC1JCxx//EABcRAQADAAAAAAAAAAAAAAAAAAABERL/2gAIAQMBAT8BpmH/xAAVEQEBAAAAAAAAAAAAAAAAAAAAEf/aAAgBAgEBPwGq/8QAFxAAAwEAAAAAAAAAAAAAAAAAAAEhIP/aAAgBAQAGPwIhVj//xAAaEAEAAQUAAAAAAAAAAAAAAAABABEgMUFx/9oACAEBAAE/IQNQ+FewLY//2gAMAwEAAgADAAAAEFzP/8QAFREBAQAAAAAAAAAAAAAAAAAAERD/2gAIAQMBAT8QAEP/xAAVEQEBAAAAAAAAAAAAAAAAAAARAP/aAAgBAgEBPxBMr//EAB0QAAMAAQUBAAAAAAAAAAAAAAABEUEhMVFxgbH/2gAIAQEAAT8QXRR6PFfhU1Kzg7hsW6H8Hjo//9k=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/a1b1eba8cd98ef1ce964beb7ebdf97f2/cbe2e/hero.webp 148w,
/static/a1b1eba8cd98ef1ce964beb7ebdf97f2/3084c/hero.webp 295w,
/static/a1b1eba8cd98ef1ce964beb7ebdf97f2/5ca24/hero.webp 590w,
/static/a1b1eba8cd98ef1ce964beb7ebdf97f2/dad35/hero.webp 885w,
/static/a1b1eba8cd98ef1ce964beb7ebdf97f2/2baf0/hero.webp 1180w,
/static/a1b1eba8cd98ef1ce964beb7ebdf97f2/fad48/hero.webp 1600w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/a1b1eba8cd98ef1ce964beb7ebdf97f2/a80bd/hero.jpg 148w,
/static/a1b1eba8cd98ef1ce964beb7ebdf97f2/1c91a/hero.jpg 295w,
/static/a1b1eba8cd98ef1ce964beb7ebdf97f2/1c72d/hero.jpg 590w,
/static/a1b1eba8cd98ef1ce964beb7ebdf97f2/a8a14/hero.jpg 885w,
/static/a1b1eba8cd98ef1ce964beb7ebdf97f2/fbd2c/hero.jpg 1180w,
/static/a1b1eba8cd98ef1ce964beb7ebdf97f2/b17f8/hero.jpg 1600w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/jpeg&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/a1b1eba8cd98ef1ce964beb7ebdf97f2/1c72d/hero.jpg&quot;
            alt=&quot;HoopSim hero - orange and black op-art basketball and hoop under the hoopsim.xyz wordmark&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;TL;DR: &lt;a href=&quot;https://app.hoopsim.xyz&quot;&gt;HoopSim&lt;/a&gt; has a second way to play now. Daily Slate drafts only from players whose NBA teams play on the current, sims that one night, and scores every fantasy team head to head against every other one (28 matchups if there are 8 teams and other math bits). Also added multiplayer, playing with friends is better. Also learning how to project the next season of players with college stats for rookies and previous seasons for current players. Welcome back Hali.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In the &lt;a href=&quot;/hoopsim-devlog-1/&quot;&gt;first devlog&lt;/a&gt; I talked about taking the grind out of fantasy basketball. No waiting on box scores, no long season, just strategy. Career mode does that by letting you draft once and sim a whole season in minutes.
For the current features and stack, see my &lt;a href=&quot;/work/&quot;&gt;HoopSim project page&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I wanted to remix the standard fantasy formula a bit.&lt;/p&gt;
&lt;h2&gt;What Daily Slate is&lt;/h2&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/279e07c1e56f65b0df6cd7ceef100d3c/07a9c/daily-slate-new-game-card.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 66.89189189189189%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAANCAIAAAAmMtkJAAAACXBIWXMAAAsTAAALEwEAmpwYAAABEUlEQVR42pWSzU7DMAzH9/4vAC+wF0BiR8ZlQlxoBWOIjn4mbdqm7aKmzVcjDbcHLptEZlmR4+hn/614pS5Max1FsffmeZ5PKTXWSnXdVpcpY0yVhNner6OgSQK2exDRXk1WSekAa83KvAi/6/hYhkFz/NQ1BkFOnUE261qCUX9qwWlVcsYg6SqbNm2KcF6QgpQQD+PoOjM0IYRkGeKcCyHGxW6Aq6rCGAM8DHDwnvMb4FPXpUmCEcrSNMcISrh/laas/8pK1DI6yHrUXBvtBkttJv7zXu82/ccLP7yO/rOID1DSCVbGGv/Jbu6n7dps19PjHVwhOT/9K3suACt5Pqs/t9Z15oWWSgglF5+D69v9C19j5WSseY8SAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/279e07c1e56f65b0df6cd7ceef100d3c/cbe2e/daily-slate-new-game-card.webp 148w,
/static/279e07c1e56f65b0df6cd7ceef100d3c/3084c/daily-slate-new-game-card.webp 295w,
/static/279e07c1e56f65b0df6cd7ceef100d3c/5ca24/daily-slate-new-game-card.webp 590w,
/static/279e07c1e56f65b0df6cd7ceef100d3c/dad35/daily-slate-new-game-card.webp 885w,
/static/279e07c1e56f65b0df6cd7ceef100d3c/2baf0/daily-slate-new-game-card.webp 1180w,
/static/279e07c1e56f65b0df6cd7ceef100d3c/f992d/daily-slate-new-game-card.webp 1440w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/279e07c1e56f65b0df6cd7ceef100d3c/12f09/daily-slate-new-game-card.png 148w,
/static/279e07c1e56f65b0df6cd7ceef100d3c/e4a3f/daily-slate-new-game-card.png 295w,
/static/279e07c1e56f65b0df6cd7ceef100d3c/fcda8/daily-slate-new-game-card.png 590w,
/static/279e07c1e56f65b0df6cd7ceef100d3c/efc66/daily-slate-new-game-card.png 885w,
/static/279e07c1e56f65b0df6cd7ceef100d3c/c83ae/daily-slate-new-game-card.png 1180w,
/static/279e07c1e56f65b0df6cd7ceef100d3c/07a9c/daily-slate-new-game-card.png 1440w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/png&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/279e07c1e56f65b0df6cd7ceef100d3c/fcda8/daily-slate-new-game-card.png&quot;
            alt=&quot;The Create New League screen with the Daily Slate card selected above Career Season&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;You pick Daily Slate on &lt;code class=&quot;language-text&quot;&gt;/new-game&lt;/code&gt; (it’s the first card now, Career Season is second). Tonight’s real NBA games decide everything:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The pool&lt;/strong&gt; is frozen to players on teams that play today. Nobody else is draftable. So if only the Heat play the Knicks, you are only drafting Heat and Knicks players.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The league&lt;/strong&gt; is two fantasy teams per game on the slate, capped at 8.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No bench.&lt;/strong&gt; Every player you draft gets scored.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;One sim.&lt;/strong&gt; You hit &lt;strong&gt;Sim the slate&lt;/strong&gt;, the night’s games run once, and every fantasy team plays every other fantasy team with the same 9-category logic career uses. With 8 teams that’s 28 pairs. The results page ranks everyone by record.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/11ee8b1c2cbc61cc315fc42b879a2e32/07a9c/daily-slate-draft-room.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 66.89189189189189%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAANCAIAAAAmMtkJAAAACXBIWXMAAAsTAAALEwEAmpwYAAABkElEQVR42l1S207DMAzt/38OH4HE9QXxgMYEaNPW9ZKuSevEdi44zRgUy2ojt8fnHMfVqNRut1Nd9/m1DyHElGKUjHKULPHzjkjeGh3vbsLnSzSq6tVQnxprHXKYzurwsR1GA9ZKI++9lIlYUhsDYBHpcDgabaQ9IlbE7JcQTnfa95tXS0HAAkhZRZZxOaSU/xsa07VgRo9QeR/ST4DD/qyFgdhLlq7yFAKRgDABQJZjnRNFzCuwsLVdP466uC22Q0iReUZj3x94aCkkAWebSCuwc3SsW/nAPhTyiwREgxo2j6RaLmAQ9jVYpPRKSdNi8hrJM/CE22c+dwIW0YIHcGtmxLrpphmKz2tmZqdtZu4Ks8xFOP559k3buwvzb6YQwLvCfPGcJ7aWLaW6bmZhFsI/IcwTzXZzT6op4AW7njY6aOo9whgZAs3XjDgBanq7pb4Oy20vKxT+TRtl24bz+Ndw9kw4E7jNg0w770oqCxMqM81aRrTsoVzd8dQYMy2X/BvR88zgtk+oWp8nkGvM/hueaPNXKrmWFwAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/11ee8b1c2cbc61cc315fc42b879a2e32/cbe2e/daily-slate-draft-room.webp 148w,
/static/11ee8b1c2cbc61cc315fc42b879a2e32/3084c/daily-slate-draft-room.webp 295w,
/static/11ee8b1c2cbc61cc315fc42b879a2e32/5ca24/daily-slate-draft-room.webp 590w,
/static/11ee8b1c2cbc61cc315fc42b879a2e32/dad35/daily-slate-draft-room.webp 885w,
/static/11ee8b1c2cbc61cc315fc42b879a2e32/2baf0/daily-slate-draft-room.webp 1180w,
/static/11ee8b1c2cbc61cc315fc42b879a2e32/f992d/daily-slate-draft-room.webp 1440w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/11ee8b1c2cbc61cc315fc42b879a2e32/12f09/daily-slate-draft-room.png 148w,
/static/11ee8b1c2cbc61cc315fc42b879a2e32/e4a3f/daily-slate-draft-room.png 295w,
/static/11ee8b1c2cbc61cc315fc42b879a2e32/fcda8/daily-slate-draft-room.png 590w,
/static/11ee8b1c2cbc61cc315fc42b879a2e32/efc66/daily-slate-draft-room.png 885w,
/static/11ee8b1c2cbc61cc315fc42b879a2e32/c83ae/daily-slate-draft-room.png 1180w,
/static/11ee8b1c2cbc61cc315fc42b879a2e32/07a9c/daily-slate-draft-room.png 1440w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/png&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/11ee8b1c2cbc61cc315fc42b879a2e32/fcda8/daily-slate-draft-room.png&quot;
            alt=&quot;A Daily Slate draft room from a QA run on dev: the pool only has players whose teams play that night, and the roster panel says everyone plays tonight&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Daily sim is free on every plan, guests included. Week sim, advance day and the season sims all reject daily leagues on the server.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/f7b49d50fa541d2de4b385ec6ded78e5/07a9c/daily-slate-sim-the-slate.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 66.89189189189189%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAANCAIAAAAmMtkJAAAACXBIWXMAAAsTAAALEwEAmpwYAAABAUlEQVR42mMQk5ZTUtdiYGCqq6v/+OH94cOHz507d+bMmZs3b/4nBBgMVRVcjHXleNm6mxvu33+wbt36/QcObt+x4/bt24Q1m6gruZsZyPOydTbWAfk/f/74Awb//v0jrJlbQIRHSAzi7A9ff5y+duv4mXOPHz/+8+fvbyD48+c3BPz5g0WzoJCIqJgEUHN9Q9P/u6ffLWn5eOno19//fv0Egl+/fv3+CUIgBhbNAkIiIhDN9Q3/v778fX73/zePQDLEOBummbm+DuRnoPv+Ew0wNP/8SYyd1LSZiRzNgsKiouKSZNosK6+goqYB1FxHhmZxCSklFTUmFva62lpSNQMAan5+02PIopMAAAAASUVORK5CYII=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/f7b49d50fa541d2de4b385ec6ded78e5/cbe2e/daily-slate-sim-the-slate.webp 148w,
/static/f7b49d50fa541d2de4b385ec6ded78e5/3084c/daily-slate-sim-the-slate.webp 295w,
/static/f7b49d50fa541d2de4b385ec6ded78e5/5ca24/daily-slate-sim-the-slate.webp 590w,
/static/f7b49d50fa541d2de4b385ec6ded78e5/dad35/daily-slate-sim-the-slate.webp 885w,
/static/f7b49d50fa541d2de4b385ec6ded78e5/2baf0/daily-slate-sim-the-slate.webp 1180w,
/static/f7b49d50fa541d2de4b385ec6ded78e5/f992d/daily-slate-sim-the-slate.webp 1440w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/f7b49d50fa541d2de4b385ec6ded78e5/12f09/daily-slate-sim-the-slate.png 148w,
/static/f7b49d50fa541d2de4b385ec6ded78e5/e4a3f/daily-slate-sim-the-slate.png 295w,
/static/f7b49d50fa541d2de4b385ec6ded78e5/fcda8/daily-slate-sim-the-slate.png 590w,
/static/f7b49d50fa541d2de4b385ec6ded78e5/efc66/daily-slate-sim-the-slate.png 885w,
/static/f7b49d50fa541d2de4b385ec6ded78e5/c83ae/daily-slate-sim-the-slate.png 1180w,
/static/f7b49d50fa541d2de4b385ec6ded78e5/07a9c/daily-slate-sim-the-slate.png 1440w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/png&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/f7b49d50fa541d2de4b385ec6ded78e5/fcda8/daily-slate-sim-the-slate.png&quot;
            alt=&quot;The daily results page before scoring, with the Sim the slate button&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/f858446b2d900044ea1b7f335bf5dbc1/07a9c/daily-slate-final-standings.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 66.89189189189189%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAANCAIAAAAmMtkJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAB/UlEQVR42oWSzW7TQBDHTUG5QKU2JGkB0VZRaRESEgjEEyDxVkkQJ8S70CNwK8olUkMQ9GCilKa0iY0dx/u93i/bbGwhoCrq6H+Y3ZnfjmZmncadjebuA8dZarXaCIJutzsYDPr9/nA4zC8z5/G9redPHm4sV9686ozHJ2/39vb3P757/2E0Gl0OP91tvnj2aHO58vply56llLqw7P+WW5Xw9ZXajWrDca602h2CUa/Xc13XBrLfGefM3gulhFTWcVartXpj3fbcabdtbOr5GJMkkQiTGAJIcCKFTeVKCMF1IrhMNOWqhFeqtVoBtwv49HQSBjMIURzH3vR4AvwpCuJ5NJ9HsygAsyCIQxD6FBOTpudh3/cBAIktnXA68zgBnCKJUYIpTAgQmFEOE6yNzrP8L7i1GFgYhhhjpTRnJI4mHMUWoYxxQgWCjELELM9Sk14Ae74fQ2i75IzS6CfCc0wAJoQjzGBMMIAUIYKpYP/0XA7sx7dD6B6I8IyHUzF20+NRNj7C3vdoNsHBGZ0ezYMTEHoM+JlRzurNen3tluNcLStrJXKV5FqmdrySWOePVCFjpRbKUufu5tb2zv1F5U4HQnjQ//T5y1dCyAUbLiSV4nZhQqZ22mvrt5vbO0vXKmVlhJBS9tXMblIWy9RKWxmtjTGpMeX/s36e578An9pwIZy+8wwAAAAASUVORK5CYII=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/f858446b2d900044ea1b7f335bf5dbc1/cbe2e/daily-slate-final-standings.webp 148w,
/static/f858446b2d900044ea1b7f335bf5dbc1/3084c/daily-slate-final-standings.webp 295w,
/static/f858446b2d900044ea1b7f335bf5dbc1/5ca24/daily-slate-final-standings.webp 590w,
/static/f858446b2d900044ea1b7f335bf5dbc1/dad35/daily-slate-final-standings.webp 885w,
/static/f858446b2d900044ea1b7f335bf5dbc1/2baf0/daily-slate-final-standings.webp 1180w,
/static/f858446b2d900044ea1b7f335bf5dbc1/f992d/daily-slate-final-standings.webp 1440w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/f858446b2d900044ea1b7f335bf5dbc1/12f09/daily-slate-final-standings.png 148w,
/static/f858446b2d900044ea1b7f335bf5dbc1/e4a3f/daily-slate-final-standings.png 295w,
/static/f858446b2d900044ea1b7f335bf5dbc1/fcda8/daily-slate-final-standings.png 590w,
/static/f858446b2d900044ea1b7f335bf5dbc1/efc66/daily-slate-final-standings.png 885w,
/static/f858446b2d900044ea1b7f335bf5dbc1/c83ae/daily-slate-final-standings.png 1180w,
/static/f858446b2d900044ea1b7f335bf5dbc1/07a9c/daily-slate-final-standings.png 1440w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/png&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/f858446b2d900044ea1b7f335bf5dbc1/fcda8/daily-slate-final-standings.png&quot;
            alt=&quot;Final standings after simming a 6-team slate. Every team played all 5 rivals across the 9 categories&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Those two are from a QA run on my dev backend (a 6-team night, so 15 matchups instead of 28). The team names are generated, and yes, the QA team went 0-5.&lt;/p&gt;
&lt;p&gt;Two small gotchas:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;ESPN’s team abbreviations don’t all match the ones I been using in ConvexDB. &lt;code class=&quot;language-text&quot;&gt;GS&lt;/code&gt; is &lt;code class=&quot;language-text&quot;&gt;GSW&lt;/code&gt;, &lt;code class=&quot;language-text&quot;&gt;NY&lt;/code&gt; is &lt;code class=&quot;language-text&quot;&gt;NYK&lt;/code&gt;, &lt;code class=&quot;language-text&quot;&gt;SA&lt;/code&gt; is &lt;code class=&quot;language-text&quot;&gt;SAS&lt;/code&gt;, &lt;code class=&quot;language-text&quot;&gt;UTAH&lt;/code&gt; is &lt;code class=&quot;language-text&quot;&gt;UTA&lt;/code&gt;, and so on, so there’s a little mapping table.&lt;/li&gt;
&lt;li&gt;Some schedule rows have a placeholder side like &lt;code class=&quot;language-text&quot;&gt;TBD&lt;/code&gt; or &lt;code class=&quot;language-text&quot;&gt;LON&lt;/code&gt;. Those games get dropped entirely, so a team never shows up as draftable on a night it doesn’t actually play.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The sim now runs the real matchups from the schedule (not a round-robin generator), so you’re scored on exactly the games your pool was drafted from. “Today” is the UTC date, which means on the East Coast it flips over at 8pm. That’s something I want to revisit.&lt;/p&gt;
&lt;h2&gt;Why it still couldn’t draft on a normal night&lt;/h2&gt;
&lt;p&gt;With ~6 players per team, a normal four-game night is 8 NBA teams, so roughly 48–56 players. The league is 8 fantasy teams × 8 rounds = 64 picks. It could never fill, so &lt;code class=&quot;language-text&quot;&gt;createLeague&lt;/code&gt; threw &lt;code class=&quot;language-text&quot;&gt;DAILY_SLATE_TOO_SMALL&lt;/code&gt; on most nights. A mode called “Daily” that doesn’t work most days isn’t really a mode.&lt;/p&gt;
&lt;p&gt;So a short pool gets 8 teams × 6 rounds instead of an error, and every pick gets filled. Now it only rejects a slate where a team can’t even get one pick. The “next slate is…” hint uses the same math, so it doesn’t send you to a date that’ll fail too.&lt;/p&gt;
&lt;p&gt;I also bumped the full-import cap from 750 to 800 so the 742-player bundle has some room. And I checked that career didn’t move: against the live dev pool of 742, the career top 175 are all players who meet the minimum games played, they’re spread across all 30 teams, and the cut lands at fantasy value 2.05 (the next player is 2.00).&lt;/p&gt;
&lt;h2&gt;Shorts get a daily version too&lt;/h2&gt;
&lt;p&gt;I already had a pipeline that records career runs for short-form video. Playwright drives the app and captures it, then Remotion composes the video. Daily is a different journey, so now &lt;code class=&quot;language-text&quot;&gt;SHORTS_MODE=daily&lt;/code&gt; records one: create a Daily Slate, draft (capped at 8 rounds), hit &lt;strong&gt;Sim the slate&lt;/strong&gt;, wait for &lt;strong&gt;Final standings&lt;/strong&gt;, and scrape your rank and record off the standings panel. If the standings text doesn’t parse, it fails loudly instead of rendering a broken video.&lt;/p&gt;
&lt;p&gt;The copy changes with the mode: “Simming tonight’s slate…” for the interstitial, “SLATE RESULTS” over the recap, and a rank label like “3rd of 8”. Without the env var, career works exactly like before, and old &lt;code class=&quot;language-text&quot;&gt;props.json&lt;/code&gt; files still render.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/8770f98b87eff3b4672fe4ed74c036bb/302a4/daily-slate-short-results-frame.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 177.7027027027027%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAkCAIAAAAGkY33AAAACXBIWXMAAAPoAAAD6AG1e1JrAAAFFUlEQVR42n2Va0xTZxjHe05bCkUuIr2A3DUu2cXhtmxmuA9j8cMUP6qJMTEYJfti5hc+mcy5tCgBsrJ1yxzZdG6g8bJkNVFpCxtYjTKQi9xKay8M6IWLtLSl97P/Oac9rej25KE853nf3/t/n+ec8x5epihDnJWZLc7KzdlUuDlfVrilWCYtLS4qL9laWVYKR4BLJDGECZiGyUAA8jg4LzcHY3JJ4Va5rGxrcUVpSVV5GRwBLpHEECZgGgtnZYp4+MNSWC+PUS6SSkqK5FCrKi/dVlG2vbICjiWQKSmSyaU0noKhTBIEn8+XSQqLZfTyFaXYasmObdtef20H4oK8vPycnNxssThTJBIIsF+IJWCC4DU2NqrV6oLNBXK5vLb2k6rKqt0f7K6sqMzPyz908ODNGzdvXL9+tetqZ2cn4gN1B/gkQdcNWMDn9/f3h8PhK1d+/UOjGR0b09y+fd9guHnr1m9dXROTkxRFxWJxWDQaRXzh/AUej4cyE7BOq0fWHwgEgkG/PxAMhbxrvvVgcD0YWnm+uri0vOBwYjAUCmFak7IpHSZ7e3qRHX6SsIcPHphNJofDMTQ4ODw8PDo6MjQ05Ha7I5EIDTedfwHW63uQ9Xq9/qQFGPOlWTAYTMAblFkYu0JVsVgsmjTEVNJQc1I5DeaTpE5H18z243+MnaBUKlMwSRK9vb3RaKS5ufny5cuI29raWlpazp07p9FoWM0XYIUyXZnQ62nlvr4+g8EwPT2NO4cYtUxNTb1COQFnJ2CdTofs0vKKG3fF6Vr1eFc9Hu/aWjgceRlWKBSsMv1iANZqtciiH2yHYoxxu0UcQVWRCB6kl2CC0HbTMNRwj5yuRbarHq933uH0+QN4TmaeWS22WTw5DKxMwSTB62Zgn98XCgex20g0HKdigfUAlguFQx6Px+FwYsX0mvFSvwBHXBZq2U6tzMaXbLQzMbU8u7IwbrUPLMw+8TnN3K1KwAQvCS9Mx12muNOEX8plhtOB22Ix33/0VDNl7FmeG0+DxRysY2AjtWihVuz0r/tZ3GWOAV60zlofPTXqLWbD8/lJDsYrKcoQppRjLrPHMjrxUB/4ZxJ8fMkKRzBvHzCa+mZMfQllRRoM69bSyqEF44p5ZECn8c9OQN9tHJobfwzlOdvjv6fujRn16dvelJ2VgO/cuYtsYG4qZBtdvdLo//NSxGUN2Md99vHogsk6Yxgc1kxO6BftY5wyDpIMFtYyylHvPOV3UK6n1NIMFXAmfN0Vt41Qw39RxoGIK9VtwEKhgIej74uzZ3+/cf3axW+6fmjvvKi+1vH9tR+/TXiHuqtV2ak484vizL2rl9KVaVggEH5cW9vQcPLI4UPHjh79dO/ed3bufK+6OuVvv/l+9VtvbK86duQw93ji+EvA+/btP3368+P19adOnaqr27+n5sOP9tRwjss9NTXv7tr1WcNJ7iQBLBAI6Jrr64+r1d+pVO0qlaq1tQ3B1yoVHEG7qr25peWr801fKhQdP/1ss9lPnDgBBB8bGiZJUizOlkok+JjIpBIZvklSqRynf9KZjEQqlRYWbsnNyUGTM4QC7BnNohvG55M4yXCJLBw3EI/eBkeSy2MOjIFJPiJ2AIcDvibo5CsdQ5ggYpSTMGNCYTovQj82OJtnt8DumYZRM/5hJXbDcHYetwR3yY5ysgBTsDAJc/rpzpVNy3IwwXxfN4j/V8M4WRhAGmbFgXPiG3gumS5LEMS/Nb2zRnVfwQwAAAAASUVORK5CYII=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/8770f98b87eff3b4672fe4ed74c036bb/cbe2e/daily-slate-short-results-frame.webp 148w,
/static/8770f98b87eff3b4672fe4ed74c036bb/3084c/daily-slate-short-results-frame.webp 295w,
/static/8770f98b87eff3b4672fe4ed74c036bb/5ca24/daily-slate-short-results-frame.webp 590w,
/static/8770f98b87eff3b4672fe4ed74c036bb/dad35/daily-slate-short-results-frame.webp 885w,
/static/8770f98b87eff3b4672fe4ed74c036bb/260c2/daily-slate-short-results-frame.webp 1080w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/8770f98b87eff3b4672fe4ed74c036bb/12f09/daily-slate-short-results-frame.png 148w,
/static/8770f98b87eff3b4672fe4ed74c036bb/e4a3f/daily-slate-short-results-frame.png 295w,
/static/8770f98b87eff3b4672fe4ed74c036bb/fcda8/daily-slate-short-results-frame.png 590w,
/static/8770f98b87eff3b4672fe4ed74c036bb/efc66/daily-slate-short-results-frame.png 885w,
/static/8770f98b87eff3b4672fe4ed74c036bb/302a4/daily-slate-short-results-frame.png 1080w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/png&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/8770f98b87eff3b4672fe4ed74c036bb/fcda8/daily-slate-short-results-frame.png&quot;
            alt=&quot;A frame from a daily short: the Final Standings page with a SLATE RESULTS overlay reading Night Owls, 5–0, 1st of 6&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;Multiplayer Shenanigans&lt;/h2&gt;
&lt;p&gt;I am quite happy that I chose Convex as a backend as it came with all the bells and whistles to implement multiplayer into the draft rooms. First version of HoopSim was a single player experience. I was going for a roguelike experience (single player run based arcade-y adventure). Online though, its a whole network of people who just love drafting against people.&lt;/p&gt;
&lt;p&gt;So I brought that to both the career mode and the daily slate mode.&lt;/p&gt;
&lt;h2&gt;Data&lt;/h2&gt;
&lt;p&gt;The projections algorithm is still very finicky. I have been just using numbers to crunch other numbers. How do statisticians do their jobs with computers or AI or spreadsheets in the 90s? I am still tweaking the algorithm to get rankings correct compared to the big dogs (Yahoo, ESPN, Sleeper, etc). I definitely will need some more data wrangling.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Can You Swap Your LLM for Jev?]]></title><description><![CDATA[A Jev benchmark in Nurse Remotely's resume studio compares latency and cost with Gemini Flash-Lite, then tests model judgments against keyword matching.]]></description><link>https://www.vietnguyen.site/can-you-swap-your-llm-for-jev/</link><guid isPermaLink="false">https://www.vietnguyen.site/can-you-swap-your-llm-for-jev/</guid><pubDate>Sun, 20 Sep 2026 00:00:00 GMT</pubDate><content:encoded>&lt;blockquote&gt;
&lt;p&gt;TL;DR: I swapped three decision-shaped calls in my resume studio over to TypeSafe’s Jev and measured it. Against a cheap Gemini model, Jev came out about 3× faster (215 ms vs 713 ms), not 200×. The swap that mattered most replaced no LLM at all: it replaced a keyword matcher that labeled a Senior Nurse an operating room nurse, because “or nurse” sits inside ”&lt;strong&gt;senior nurse&lt;/strong&gt;“.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The internet went abuzz this week when &lt;a href=&quot;https://typesafe.ai/&quot;&gt;TypeSafe AI&lt;/a&gt; announced their new model, Jev. It’s definitely a bit different from text in, text out AI we have been using for the past year+.&lt;/p&gt;
&lt;p&gt;From reading the &lt;a href=&quot;https://docs.typesafe.ai/introduction&quot;&gt;docs&lt;/a&gt; and other materials, looks to be fast and cheap which I really am for so I tried using Jev as a replacement for some things in a product that uses AI.&lt;/p&gt;
&lt;h2&gt;What Jev is, briefly&lt;/h2&gt;
&lt;p&gt;For those who don’t know: Jev is what TypeSafe calls a System One model, named after the Kahneman thing, fast automatic judgment. It reads in English language but does not write any back. You hand it a &lt;code class=&quot;language-text&quot;&gt;state&lt;/code&gt;, meaning your context, plus typed questions, and you get typed answers back with probabilities attached. Questions come in three shapes: Choice for one-of-a-set, Score for a rubric, and Noul (their word for a yes/no question, which returns a probability between 0 and 1). Every question in a request shares the same state, so asking twenty-five things is one round trip.&lt;/p&gt;
&lt;p&gt;So its not a clean change to use like changing a model in Cursor.  Context moves into &lt;code class=&quot;language-text&quot;&gt;state&lt;/code&gt;, and the thing you were hoping to read out of the JSON becomes an explicit question with an explicit answer space. Input is $0.042 per million tokens. The API still reports output tokens but they are not billed. Their pitch is in the &lt;a href=&quot;https://typesafe.ai/blog/introducing-system-one-models-and-jev&quot;&gt;intro post&lt;/a&gt; and the &lt;a href=&quot;https://docs.typesafe.ai/introduction.md&quot;&gt;docs&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;How I measured&lt;/h2&gt;
&lt;p&gt;The product is the Resume Studio on &lt;a href=&quot;https://www.nurseremotely.com/jobs&quot;&gt;Nurse Remotely&lt;/a&gt;. It takes a nurse’s resume, tailors it against a job description, and runs mock interviews (just released this feature as of this past weekend). I moved three calls over and benched them against the real production code paths, thirty samples each, on 2026-09-19.
I describe the &lt;a href=&quot;/work/&quot;&gt;Resume Studio and its engineering stack on my work page&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Models were &lt;code class=&quot;language-text&quot;&gt;jev-1.13.0&lt;/code&gt; and &lt;code class=&quot;language-text&quot;&gt;gemini-3.1-flash-lite&lt;/code&gt;, the cheap fast Gemini tier.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://typesafe.ai/blog/introducing-system-one-models-and-jev&quot;&gt;TypeSafe’s intro post&lt;/a&gt; publishes 70 to 500 ms typical latency, and a 193.6× faster homepage figure that the same post calls the high end of real world gains. Those are their numbers on their evals. Mine came out at about 3× against Gemini Flash-Lite.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Call&lt;/th&gt;
&lt;th&gt;p50&lt;/th&gt;
&lt;th&gt;p90&lt;/th&gt;
&lt;th&gt;max&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Jev, interview judgments&lt;/td&gt;
&lt;td&gt;215 ms&lt;/td&gt;
&lt;td&gt;294 ms&lt;/td&gt;
&lt;td&gt;465 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Jev, role matrix fit&lt;/td&gt;
&lt;td&gt;226 ms&lt;/td&gt;
&lt;td&gt;321 ms&lt;/td&gt;
&lt;td&gt;847 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Jev, bullet grounding&lt;/td&gt;
&lt;td&gt;200 ms&lt;/td&gt;
&lt;td&gt;258 ms&lt;/td&gt;
&lt;td&gt;281 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gemini, generative answer evaluation&lt;/td&gt;
&lt;td&gt;713 ms&lt;/td&gt;
&lt;td&gt;882 ms&lt;/td&gt;
&lt;td&gt;892 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Note the role matrix row: great p50, 847 ms max. Quoting p50 alone would hide a fat tail.&lt;/p&gt;
&lt;h2&gt;Case 1: the mock interview&lt;/h2&gt;
&lt;p&gt;The old flow called Gemini on every answer. One request did two jobs: decide whether to follow up or advance, and write the follow-up. Every turn paid for a generation even when the answer was already complete.&lt;/p&gt;
&lt;p&gt;Now Jev judges the answer instead. Eight judgments in one request, against the STAR shape interview coaches ask for, meaning situation, task, action, result.&lt;/p&gt;
&lt;p&gt;Tokens went up. The judgment request carries the question, the answer, the resume, and the job description, exactly what the generative evaluation carried. Jev bills more input on a complete turn, 1,569 tokens against Gemini’s 1,246. I replaced a guaranteed generation every turn with a guaranteed judgment, plus a generation only when one is warranted.&lt;/p&gt;
&lt;p&gt;Cost still went down against published paid Gemini prices, because Jev input is roughly six times cheaper per token and its output is not billed. On the published paid numbers: the old path was $0.000391 per turn, always. The new one is $0.000066 for the judgment plus the probe rate times $0.000373. Break-even sits near an 87% probe rate, and at 100% the new path is worse, $0.000438 vs $0.000391.&lt;/p&gt;
&lt;p&gt;To get a probe rate I hand-wrote 34 nursing answers with deliberately mixed quality. 16 got probed, so 47%, which works out to about 38% cheaper per turn.&lt;/p&gt;
&lt;p&gt;So somewhat good but its not clean.&lt;/p&gt;
&lt;h2&gt;Case 2: keywords versus Jev, which is the actual point&lt;/h2&gt;
&lt;p&gt;This one replaced no LLM at all. It replaced a local list of keyword aliases scoring which nursing specialties a resume claims, what I call the role matrix.&lt;/p&gt;
&lt;p&gt;The alias &lt;code class=&quot;language-text&quot;&gt;&quot;or nurse&quot;&lt;/code&gt; substring-matches “seni&lt;strong&gt;or nurse&lt;/strong&gt;”. So a Senior Nurse at an outpatient primary care clinic, with no operating room experience anywhere in the document, came back as Operating Room at high confidence, ranked first. Not a near miss. The top answer was wrong.&lt;/p&gt;
&lt;p&gt;The Jev version asks a yes/no per specialty, one request:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;ts&quot;&gt;&lt;pre class=&quot;language-ts&quot;&gt;&lt;code class=&quot;language-ts&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; fit &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;await&lt;/span&gt; client&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;systemOne&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  state&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; resume&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; resumeText&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; jobDescription&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; jdText &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
  questions&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    specialty_or&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;noul&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;Does this nurse have operating room experience?&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    specialty_icu&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;noul&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;Does this nurse have intensive care experience?&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token comment&quot;&gt;// one Noul per specialty, all sharing the same state&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Live on that exact resume, &lt;code class=&quot;language-text&quot;&gt;specialty_or&lt;/code&gt; came back 0.03. My code keeps specialties at or above 0.6, so operating room got dropped, and Jev picked outpatient clinic primary care at 0.88 instead. The keyword matcher, still sitting right there in the codebase, still reports operating room first.&lt;/p&gt;
&lt;p&gt;The alias list also missed CCU and IMCU entirely, and wanted every word of “Utilization Management” before matching a job description that just said UM reviewer.&lt;/p&gt;
&lt;p&gt;Now the number that should end any speed argument. I timed the keyword matcher over two thousand local iterations: 233 microseconds, median, no network. Jev is 226 ms p50. About a thousand times slower, and it costs real money at $0.000224 a call where the old path cost nothing.&lt;/p&gt;
&lt;p&gt;It was still the right call. Regexes are unbeatable on speed and hopeless at synonymy.&lt;/p&gt;
&lt;h2&gt;So, can you swap?&lt;/h2&gt;
&lt;p&gt;You can swap a call when what you actually needed was a decision. Advance or follow up. Does this resume claim ICU experience. Is this bullet supported.&lt;/p&gt;
&lt;p&gt;For me, I don’t think I need Jev for these use cases.&lt;/p&gt;
&lt;p&gt;Case 1 swap got faster, Case 2 swap got a thousand times slower.&lt;/p&gt;
&lt;p&gt;If you want to poke at it: the &lt;a href=&quot;https://docs.typesafe.ai/sdk/javascript.md&quot;&gt;JS SDK reference&lt;/a&gt;. I am going to keep doing research on it.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[HoopSim Devlog]]></title><description><![CDATA[HoopSim began as an answer to managing fantasy basketball across time zones. This devlog covers its origin, AI-assisted research, simulation design, and stack.]]></description><link>https://www.vietnguyen.site/hoopsim-devlog-1/</link><guid isPermaLink="false">https://www.vietnguyen.site/hoopsim-devlog-1/</guid><pubDate>Mon, 02 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/ca80734ee8fa940826ad13e81d12bd59/3d8dd/hero.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 56.08108108108109%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAALABQDASIAAhEBAxEB/8QAFwABAQEBAAAAAAAAAAAAAAAABAADBv/EABYBAQEBAAAAAAAAAAAAAAAAAAMAAv/aAAwDAQACEAMQAAABHkl1rnJkw//EABsQAAICAwEAAAAAAAAAAAAAAAECAxIAETEy/9oACAEBAAEFAomFXTZOQAUPH9f/xAAYEQEAAwEAAAAAAAAAAAAAAAABAAIREv/aAAgBAwEBPwEpo2Z1P//EABcRAAMBAAAAAAAAAAAAAAAAAAABAhL/2gAIAQIBAT8BdZakyf/EABoQAAICAwAAAAAAAAAAAAAAAAEQAAIREiH/2gAIAQEABj8C7DbQ4ZX/xAAaEAADAQEBAQAAAAAAAAAAAAAAAREhUUFh/9oACAEBAAE/IW+94Pg7fSLihMc2jWngqvD/2gAMAwEAAgADAAAAEIPf/8QAFhEBAQEAAAAAAAAAAAAAAAAAAQAh/9oACAEDAQE/EEYRi//EABURAQEAAAAAAAAAAAAAAAAAAAEQ/9oACAECAQE/EDEI/8QAGxAAAgMBAQEAAAAAAAAAAAAAAREAITFRYZH/2gAIAQEAAT8QZAorFrxnkdwTQS+5hl148JcEDssYQcmCC8mJfJ//2Q==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/ca80734ee8fa940826ad13e81d12bd59/cbe2e/hero.webp 148w,
/static/ca80734ee8fa940826ad13e81d12bd59/3084c/hero.webp 295w,
/static/ca80734ee8fa940826ad13e81d12bd59/5ca24/hero.webp 590w,
/static/ca80734ee8fa940826ad13e81d12bd59/dad35/hero.webp 885w,
/static/ca80734ee8fa940826ad13e81d12bd59/2baf0/hero.webp 1180w,
/static/ca80734ee8fa940826ad13e81d12bd59/5eb16/hero.webp 2752w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/ca80734ee8fa940826ad13e81d12bd59/a80bd/hero.jpg 148w,
/static/ca80734ee8fa940826ad13e81d12bd59/1c91a/hero.jpg 295w,
/static/ca80734ee8fa940826ad13e81d12bd59/1c72d/hero.jpg 590w,
/static/ca80734ee8fa940826ad13e81d12bd59/a8a14/hero.jpg 885w,
/static/ca80734ee8fa940826ad13e81d12bd59/fbd2c/hero.jpg 1180w,
/static/ca80734ee8fa940826ad13e81d12bd59/3d8dd/hero.jpg 2752w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/jpeg&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/ca80734ee8fa940826ad13e81d12bd59/1c72d/hero.jpg&quot;
            alt=&quot;HoopSim hero - basketball hoop with simulation and tech elements&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I first got the idea for this app while traveling to Asia this past winter. Being away from the computer let me actually rest the mind and let it wander for once. And I had time for writing. So I wrote, traveled, ate and just rested and came back rejuvenated.&lt;/p&gt;
&lt;h2&gt;How I learned to build with AI&lt;/h2&gt;
&lt;p&gt;The landscape of development changed with the seasons. I remember in the middle of summer last year (2025), I was attempting to one-shot prompts and &lt;em&gt;&lt;del&gt;vibe code&lt;/del&gt;&lt;/em&gt; and it just would not work out at all. Approaching winter of 2025 and with my vacation in sight, AI tools were actually getting better and better as more models came out and more tools came out as well. I was using Cursor for side projects and Augment at work. I always liked Cursor and it seemed to work within my workflow better than Augment. A few months at work and Augment had caught up to where Cursor was and even had some things that Cursor lacked (mainly the enhance prompt action worked wonders for dev work).&lt;/p&gt;
&lt;p&gt;Enter plan mode in Cursor. This thing turned my prompts from vague shots in the dark and barely any context for the agent to fully fleshed out plans. AI definitely was able to actualize what I was describing. I also learned that I should be trying to one-shot an entire app. I learned to plan and become more detailed and learned how to prompt. I also learned how to break down complexity and use AI to brainstorm. Things were moving fast and the old ways of development were giving way.&lt;/p&gt;
&lt;h2&gt;The research phase&lt;/h2&gt;
&lt;p&gt;So when I got back from Asia, I started a long research phase. How did I want to structure the project, what technologies did I want to use, how much did I want to experiment with, costs, etc. I actually have never done this before for one of my projects. Which is quite weird because at work (I work as a software engineer at a startup), we would have sprints, ceremonies, organized tickets with requirements, just all the efficiencies afforded to get work done in the agile methodologies. Shouldn’t I use what I learned at work for my own side projects as well?&lt;/p&gt;
&lt;h2&gt;What is HoopSim?&lt;/h2&gt;
&lt;p&gt;This is something I came up with while trying my best to manage as commissioner a fantasy basketball league on the Yahoo Fantasy platform while 13 hours ahead due to timezone differences. What if we do away with time constraints in the fantasy platform? What if, also, we do away with injuries as well? The last pain point was what if we got rid of the long long season of the NBA, essentially the grind.&lt;/p&gt;
&lt;p&gt;That led me to the idea of replacing all the pain points with algorithms/simulations. Basically taking the reality out of the fantasy. With simulations, we can turn injuries in the simulation off. With algorithms, we can simulate entire weeks, even seasons if we wanted to. No more grinding. No more waiting for boxscores. Just strategy uninterrupted and streamlined.&lt;/p&gt;
&lt;p&gt;This idea stuck in my head and traveled with me to S. Korea and Japan and then back to the States. I told myself if I can build a quick version of it with AI, I would pursue this until its something that I am proud of. You can check it out at &lt;a href=&quot;https://hoopsim.xyz&quot;&gt;hoopsim.xyz&lt;/a&gt;.
I keep a current overview of the features and technology on my &lt;a href=&quot;/work/&quot;&gt;HoopSim project page&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Tech stack&lt;/h2&gt;
&lt;p&gt;So tech stack I am working with is Vite/React/Typescript/TailwindCSS/&lt;a href=&quot;https://daisyui.com&quot;&gt;DaisyUI&lt;/a&gt; for the front end and &lt;a href=&quot;https://convex.dev&quot;&gt;Convex&lt;/a&gt; for the backend. This is my first time working with Convex and what drew me to it was Convex was marketed as an AI first or AI Agent friendly backend. I was also intrigued by its sync engine capability. I have never worked with sync engines before but I believed it to be a good idea with all the data going back in forth from DB to FE.&lt;/p&gt;
&lt;h2&gt;UI and UX for now&lt;/h2&gt;
&lt;p&gt;I have been playing fantasy basketball for a number of years and the only UI I have really used a bunch and am used to is Yahoo’s. I am no designer and I am also not an expert of UX so the UI patterns of Yahoo will have to do before we get to user testing (done by me probably).&lt;/p&gt;
&lt;h2&gt;The big hurdle&lt;/h2&gt;
&lt;p&gt;The biggest test/hurdle will be tweaking and tuning player generation and the simulation algorithm of a basketball game. Do I need some time in data science or machine learning to crack any of this? I guess we will have to find out. Let’s keep moving forward.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[The Day The World Turned Red]]></title><description><![CDATA[A story of health: hospital tests that ended with a rare blood cancer diagnosis, severe cirrhosis, and a full change of diet, habits, and outlook on life.]]></description><link>https://www.vietnguyen.site/the-day-the-world-turned-red/</link><guid isPermaLink="false">https://www.vietnguyen.site/the-day-the-world-turned-red/</guid><pubDate>Mon, 12 Jan 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/1f85f965b15d3ac46822582a0d341d31/6af66/raining-pills.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 54.72972972972974%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAYAAAB/Ca1DAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC+ElEQVR42h2Q20/TZxyHf5lLBrg5BFqKMJEMWVugoBSkUum59AQ9UqgtPajQEz2NFtC1E2oHzVhwBpkzuF2QLVmyZFmya/+2Z69evPnevJ/D85G09ghLGzWWEvtYo1VM6yWssSor6QPie2c0zv+ldHzJSrZFZOeU+O4p6Re/kT+6JFw+wZl8ij9zSLjYxvW4jmQMpAlkm8QqJzyuvyHbvCDx9Ixg8ZhY7SUZId46vCCYa2KOlEXoDvb4nhA3+KCdd8TQ+9Kk9n4muvsKadLgw7Wep16rEyseUf3pT1LPznDEdwkVjtkQn9ZE2FrlR4LZQ3xbDVzJPUzBNIZgho1sg63yCzbr5x8LSCMzFqb0TozuGG5hsiqarZWO8TzaJ147ofXuP1pv/8GXKDJv9rDoCDCtd2ELZ4hUTyk3XpEvPMO6VkTnTiDNOmNYIwXM4SyuWIVQ5jn55lt2Tv7g0Xevef3Xey7+fs+UdgFJusKN/gG+7O5BPqzEvpZjdfsI62oOcyiDyb+JtOB9wnKqRmr/JemDN2Sen1NovWP78BeS5R+Ilo+oHP1Oofkrs2Y/fruJ20P9dHR+gWJwmOVEDXv4g2FazCAMp81BJhacYthNPFvfE8gdEBbIDyttHpZaxL9tk9xpExW31L7EHYgg7+vj9viMeHdxBJPoLD5uDA4h61cg9Y8ouaW+g3JGz7TOgkq7KDZ1MG8PobUF0Nn9LNpceCNJMoUq4yo1167L+HpMyX2jlYlJDX1yOd29vVwXQdInn16h8/NrfNZ5le6eHrplChRDI6iVEzyYm8duMGIyWLDaPegfWJDJFXR1XUWlnkCluYtao2V4bJyBm7eQDwwg9coGGBy8yajqDhNzZmaMy8zZQkSjT2jlcyQSOaKJPN7YNovuddGin66OThw2NxZ/EosjyOysntFvJhkVE0hfCeSp8WkMOgOzAnnO7ENrXMHjCZFaXcfpjbK4FGDO6EFzz/gRt0PQ3F8woTN7sZtsBIxGNKLpmOYe/wN5UKrkNihtdwAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/1f85f965b15d3ac46822582a0d341d31/cbe2e/raining-pills.webp 148w,
/static/1f85f965b15d3ac46822582a0d341d31/3084c/raining-pills.webp 295w,
/static/1f85f965b15d3ac46822582a0d341d31/5ca24/raining-pills.webp 590w,
/static/1f85f965b15d3ac46822582a0d341d31/0ba47/raining-pills.webp 640w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/1f85f965b15d3ac46822582a0d341d31/12f09/raining-pills.png 148w,
/static/1f85f965b15d3ac46822582a0d341d31/e4a3f/raining-pills.png 295w,
/static/1f85f965b15d3ac46822582a0d341d31/fcda8/raining-pills.png 590w,
/static/1f85f965b15d3ac46822582a0d341d31/6af66/raining-pills.png 640w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/png&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/1f85f965b15d3ac46822582a0d341d31/fcda8/raining-pills.png&quot;
            alt=&quot;Illustration of a person holding an umbrella under falling pills&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
  &lt;/a&gt;
    &lt;/span&gt;
I have been keeping quiet about a big aspect of my life and I am sure some of my closer circle have noticed a few things have changed about/around me. This is that story.&lt;/p&gt;
&lt;p&gt;After two bouts of COVID, I needed to get an overall picture of my health. Also I had a nagging pain on the left side of my abdomen that I wanted to get some insight into. So I found a PCP, and had her order some lab work (comprehensive blood work) to look into it. I also wanted to check out what was going on in my left side (pancreas) so asked to include that as well. I went and got the blood work. The results came back a few days later and they were definitely abnormal. So abnormal in fact, that my PCP recommended I go to the ER to get things checked out.&lt;/p&gt;
&lt;p&gt;That absolutely scared me. So much so, that I doubted it a bit. I felt fine. More normal than fine. So I needed a second opinion, I knew nothing of ERs and their processes. Only what I saw and heard on TV shows and anecdotes from people. I contacted my sister (who’s been working in the healthcare field for a long while now), and gave her the rundown.&lt;/p&gt;
&lt;p&gt;She also recommended a trip to the ER to get everything sorted. So a bit of panic set in, it was already late in the day (7ish pm) and I started get to ready for the ER.&lt;/p&gt;
&lt;p&gt;So we (my wife and I) drove to a hospital that is a bit further away on my sister’s recommendation and got checked into the ER. Got into one of the patient rooms, explained what got us there in the first place to the attending PA, they ordered their own set of blood work labs to be done so they can have it in their records. I gave more blood for labs. We waited for the results. The PA also ordered an ultrasound of my abdomen to try and get to the bottom of the nagging pain I was experiencing.&lt;/p&gt;
&lt;p&gt;Labs came back confirming what we already knew, that my liver was not doing so good as evidenced by the liver enzyme test results being abnormal. They needed to know why so they ordered up some MRIs and CAT scans to be done in the morning. I was to be admitted for an indefinite amount of time until they can figure out why my liver was doing so badly. I actually could not believe it but was in high spirits as this was my first ever ER/hospital anything ever. Optimistic view to everything, let’s see what happens, I thought to myself.&lt;/p&gt;
&lt;p&gt;Now, I definitely had my fair share of alcohol in my life but I do not believe it to be the level of a raging alcoholic. Some specialists came to see me and try and diagnose why my liver is the way it is. Officially, my liver had deep scarring (cirrhosis). The liver can’t come back from something like this. They all asked me about my drinking habits. I do not drink nearly enough to qualify for alcoholic liver failure. The next one was about family history of leukemia. That’s a no from me (and my family) as well. We also ruled out hepatitis as well. So what could it be?&lt;/p&gt;
&lt;p&gt;I had no idea and they (the doctors) had no idea so I was giving blood around the clock so they could test it and see if they can come to any conclusions while the GI doctor came around asking questions. This all happened in the span of 3 days.&lt;/p&gt;
&lt;p&gt;I do have to mention the sporadic around-the-clock nurse schedule they had me on. Every few hours (maybe 3-4), I would be met with 2 nurses for blood draws and vital checks. It did not matter if it was in the middle of the night or if I was in the middle of eating. It was very odd like if they did not check on me, I would pass away or something. I wish I had the nerve to ask to space it out a bit as I could not get any proper rest in.&lt;/p&gt;
&lt;p&gt;I came to realize that there is a big mental toll when it comes to being admitted in a hospital and there does not seem to be an end in sight. It really is a grind when you do not know when you will leave a place. It is fairly similar to being at an airport. The food is adequate, the walls and smells are non offensive but drab. The people (in this instance, nurses and doctors) are all just doing their jobs. And then there’s you, waiting for answers and basically under observation like a guinea pig.&lt;/p&gt;
&lt;p&gt;It was exhausting. I thought I could handle a bit more but I was at the point where no answers were coming and I was still feeling pretty normal besides the fact I gave so much blood over a 3 day span. I finally asked if its alright for me to go home, I was racking up the bill and there does not seem to be an end to the number of tests and questions.&lt;/p&gt;
&lt;p&gt;I was approved for home health care services. A nurse would come around the clock and check up on me as if I was still under observation. I was to have iPad appointments with a doctor so they can ask any questions. It was still better to be home than to be at the hospital. Thank goodness for that.&lt;/p&gt;
&lt;p&gt;The blood tests that were ran ultimately found the problem. To be honest, I never expected this diagnosis. So the DNA in my blood had mutated some time ago (maybe in the last 3-5 years) and my body was starting to produce more blood than normal. That in turn increases the likelihood of blood clots. Another effect of more blood coursing through my blood was that my blood pressure was much higher. And that higher blood pressure caused hypertension throughout all my organs. The organ that was having the roughest time with the increased pressure was my liver.&lt;/p&gt;
&lt;p&gt;My diagnosis is official. I was diagnosed with a rare blood cancer called Polycythemia Vera (PV). That blood cancer led to the portal hypertension in the main portal of the liver and that syndrome is called Budd-Chiari Syndrome. And my liver is beyond repair with severe cirrhosis.&lt;/p&gt;
&lt;p&gt;All big time revelations that a couple of days in the hospital revealed. My life did a big 180 once I got this diagnosis. Since there is no cure (as of this writing) for PV, the hematologist says I will have to be on blood thinners for the rest of my life (to combat blood clots). Since my liver is in such a sorry state, the hepatologist gave me a 5 year window for a liver transplant. The bad news just keeps rolling.&lt;/p&gt;
&lt;p&gt;In order to combat these diagnoses (even if I felt really normal at the time), I decided to switch up my diet, gave up alcohol for good and to try everything to improve my overall health. A rising tide lifts all boats, as the saying goes.&lt;/p&gt;
&lt;p&gt;I changed my diet to be more protein heavy and adopted the Mediterranean diet, gave up red meat, tried to replace carbs with fruits and veggies. The diet change took a long while to get used to. I am a heavy snacker and lover of carbs. It took a while to embrace having protein as the main dish instead of the carbs. I also had to balance these restrictions with some doctor requests: less iron and less salt, no raw foods (goodbye sushi). Giving up red meat already lowers my iron intake but there was a sneaky source of iron that I had a hard time giving up: breakfast cereal. They add more iron in the cereal! Cereal was one of my go-tos at night when I was fiending for a midnight snack. That one was hard to give up.&lt;/p&gt;
&lt;p&gt;It took a couple of months but I finally settled on some food that followed all the restrictions, was easy to cook and nutritious enough. The process along the way was rough. I had lost over 20 pounds trying to figure everything out and trying new things.&lt;/p&gt;
&lt;p&gt;I believe now I am doing pretty well. Diet is good, health is holding steady. Doctor visits are less frequent. I will just need to continue on this path and adapt as things change.&lt;/p&gt;
&lt;p&gt;Looking back at the sequence of events that brought me here was a good reflection on my health and the journey thus far. August 7, 2024 will be a day of remembrance. I know I am secretive in what I put out in the world and I don’t want a pity party whenever I tell this whole story. That’s the reason why I have kept this under wraps. I hope that this telling of this slice of life of mine encourages anyone to schedule that checkup that they have been putting off. You never know what you will find and how your life will change.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[The Day The World Turned Grey]]></title><description><![CDATA[Remembering the December day in 2023 that the author's cousin Trang Van passed away, the drive to the family house, and the grief still felt two years later.]]></description><link>https://www.vietnguyen.site/the-day-the-world-turned-gray/</link><guid isPermaLink="false">https://www.vietnguyen.site/the-day-the-world-turned-gray/</guid><pubDate>Sat, 06 Dec 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/32e19eb7b986f96cfa6dc5fac9db208d/4b190/grey-sky.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 66.89189189189189%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAANABQDASIAAhEBAxEB/8QAGAAAAwEBAAAAAAAAAAAAAAAAAAIEAQP/xAAVAQEBAAAAAAAAAAAAAAAAAAAAAf/aAAwDAQACEAMQAAABxZO6IUC//8QAGRAAAwEBAQAAAAAAAAAAAAAAAAECERIh/9oACAEBAAEFAlPQ48eCuhXVPLP/xAAVEQEBAAAAAAAAAAAAAAAAAAAAEf/aAAgBAwEBPwFH/8QAFREBAQAAAAAAAAAAAAAAAAAAABH/2gAIAQIBAT8BV//EABsQAAEFAQEAAAAAAAAAAAAAAAABESEyoTHh/9oACAEBAAY/ArSSiIeHRnwvh//EABwQAAICAgMAAAAAAAAAAAAAAAABESFRcYGRsf/aAAgBAQABPyGC+AYl7gtpejJkkKNUf//aAAwDAQACAAMAAAAQe8//xAAVEQEBAAAAAAAAAAAAAAAAAAAAEf/aAAgBAwEBPxBb/8QAFREBAQAAAAAAAAAAAAAAAAAAABH/2gAIAQIBAT8QQ//EABsQAQEAAgMBAAAAAAAAAAAAAAERADEhQVFh/9oACAEBAAE/ECa1G4gnkxWBsF0+87yDAQZSTipCnmaIPaHEOBDwAZ//2Q==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/32e19eb7b986f96cfa6dc5fac9db208d/cbe2e/grey-sky.webp 148w,
/static/32e19eb7b986f96cfa6dc5fac9db208d/3084c/grey-sky.webp 295w,
/static/32e19eb7b986f96cfa6dc5fac9db208d/5ca24/grey-sky.webp 590w,
/static/32e19eb7b986f96cfa6dc5fac9db208d/d00b9/grey-sky.webp 800w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/32e19eb7b986f96cfa6dc5fac9db208d/a80bd/grey-sky.jpg 148w,
/static/32e19eb7b986f96cfa6dc5fac9db208d/1c91a/grey-sky.jpg 295w,
/static/32e19eb7b986f96cfa6dc5fac9db208d/1c72d/grey-sky.jpg 590w,
/static/32e19eb7b986f96cfa6dc5fac9db208d/4b190/grey-sky.jpg 800w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/jpeg&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/32e19eb7b986f96cfa6dc5fac9db208d/1c72d/grey-sky.jpg&quot;
            alt=&quot;The grey sky&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
  &lt;/a&gt;
    &lt;/span&gt;
Decemeber 6th, 2023.&lt;/p&gt;
&lt;p&gt;I will remember this day vividly.&lt;/p&gt;
&lt;p&gt;I woke up. I started with a look at my phone. Like any other day.&lt;/p&gt;
&lt;p&gt;She was in the ICU, my phone said. She was admitted the day before. Big medical terms that painted a bleak picture. My heart sank.&lt;/p&gt;
&lt;p&gt;My sister asked if I wanted to drive with her to South Florida to be with her in the hospital.&lt;/p&gt;
&lt;p&gt;I had to wait for the handymen that was going to fix a pipe thats been leaking on the roof and it really needed to be done before the big Asia trip. I got a call that they were delayed until the afternoon. So I had to wait. My heart raced with anxiety.&lt;/p&gt;
&lt;p&gt;I was also juggling work and also speaking with a recruiter about a new role, a role I was ready to accept but had to iron a few details out.&lt;/p&gt;
&lt;p&gt;I was pacing around the house. My heart was in my throat and also in my stomach. It was agony. Time went so slow. And I had to wait it out. Patience was a distant friend today. More updates came and went. She had stabilized. I let out a yell of encouragement in the air. The handymen came and fixed things up rather quickly. Great. I met up with my future boss and ironed out the final details. I accepted the offer right there and then. Excellent. Things were turning around.&lt;/p&gt;
&lt;p&gt;Once I got off the call, I called my dad and started driving towards Daytona to pick him up since he was using my old car to go to work and that car would not survive the 4 hr drive to South Florida.&lt;/p&gt;
&lt;p&gt;Tina prepared an overnight bag for me and had to stay behind for the cats. I had an hour drive ahead of me to pick up my dad. So I went. That was a long hour of uncertainty but I got to my parent’s house. No updates so far so I thought we were in the clear. No news is good news.&lt;/p&gt;
&lt;p&gt;My dad had just got off work so he had to pack some stuff up. I waited around the house. I hadn’t eaten all day and it was already the afternoon so I had a bag of chips and some water. What was this feeling I was feeling? There were still no updates in a while.&lt;/p&gt;
&lt;p&gt;My dad said he had a bad feeling since no updates. I didn’t want to hear that so I waited in the car to leave.&lt;/p&gt;
&lt;p&gt;Now we were all packed up and started our drive to South Florida. Still no updates. I was driving. My dad asked for an update in the family group chat. I now wish he didn’t.&lt;/p&gt;
&lt;p&gt;“She go in peace” was my mom’s reply back.&lt;/p&gt;
&lt;p&gt;I was in the driver’s seat but I felt directionless. I felt hopeless. Sadness filled to the brim. I concentrated on the road with wet eyes. I felt my heart move to the back of my throat. I gripped the wheel tight. The sun was bright but it was greyed out. The roads were empty. We drove in silence for a long while.&lt;/p&gt;
&lt;p&gt;My dad would get random phone calls from people I did not know but they were asking for updates. The vietnamese community runs on gossip and my dad was answering those questions. My vietnamese is not good but I understood what was asked and how my dad replied. “mất rồi”. Loosely translated, it meant “we lost her already” or “she’s gone”. The car ride was no longer quiet.&lt;/p&gt;
&lt;p&gt;We made a driver switch and also to get gas. I was able to catch up on texts and was able to get in contact with my brother. He was actually in the middle of a work trip in Dallas and had to cut it short. We were designated to go pick him up at the airport. We drove further and picked him up and routed our way to the family house where everyone was gathered. We pulled up and there were already plenty of cars there. I did not know what to expect.&lt;/p&gt;
&lt;p&gt;I did know that this was going to be hard. I just didn’t know how to handle it all.&lt;/p&gt;
&lt;p&gt;In Buddhism and maybe in general, there is a lot of talk about energy and its manifestation in feelings and in people. The energy in the house when we arrived was absolutely grey. First person I saw was her oldest sister and she bawled when she saw us. All her young nieces and nephews were gathered on the couch, somber looks on their faces. I really can’t put into words all the feelings in that house that night but this was the moment I finally felt it. She was no longer with us.&lt;/p&gt;
&lt;p&gt;My heart was already broken into pieces but it further broke being in that house that night.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;The she that I was writing about was my cousin Trang Van.&lt;/p&gt;
&lt;p&gt;She made my childhood bright. I feel like I had a very standard millenial childhood, not dominated by social media and technology but one that had a lot of outdoors and MTV and weird 2000s-ness. She was the bit of whimsy in much of my life. She got me into writing, anime and music. She had a hand in shaping alot of my interests today. I am not sure who I would be without her.&lt;/p&gt;
&lt;p&gt;Most of what was written above was done on January 11, 2024. I really did not have the heart to finish writing it as I had just got back from Asia and wanted to keep what I had in my head and my heart but I needed to put it somewhere and come back when I was ready.&lt;/p&gt;
&lt;p&gt;I am still not ready but I am more willing now. Today is the second anniversary of her death. I still remember a lot of the details written above vividly. What really stayed with me was that first walk into the house, her family house. There was just a density of sad energy that beared down on everyone in the house. It was heavy and overbearing like a torrential rainfall that would not quit and we were all standing in it.&lt;/p&gt;
&lt;p&gt;This was the second major loss that I have experienced, first one being my cat Loki. I always thought losing someone in my more immediate life would have happened in my old age (not sure when that starts). This grief felt different. It was piercing, it made me reexamine things in my life.&lt;/p&gt;
&lt;p&gt;One thing I remember from that day is how powerless I felt. There was literally nothing I could do to improve her chances. No amount of money, no amount of good will, no amount of good karma. When I was pacing around the house waiting for updates, waiting for the handymen, just waiting, I started praying. Pleading with whoever would hear, “Please let her pull through! Please!“. That fell on deaf ears. I had no power in this. The only thing left was loss and grief.&lt;/p&gt;
&lt;p&gt;In the movies, when characters deal with grief, maybe while at the bar or in the family house after the funeral (not sure why but Brooklyn 99 comes to mind), they would say things like “He was one of the good ones, I was always happy when he came into the room.” Something to that effect. I somewhat get that now but I am still overcome with grief any time I think of her and that day. So it looks like I am still grieving to this day but I hope one day I can celebrate her life and thank her for everything.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Update 2023]]></title><description><![CDATA[A return to blogging in 2023 with plans to learn in public again, starting with posts on frontend state management tools like Xstate and the Prisma ORM.]]></description><link>https://www.vietnguyen.site/first-post-2023/</link><guid isPermaLink="false">https://www.vietnguyen.site/first-post-2023/</guid><pubDate>Fri, 14 Jul 2023 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/1bdadb1e5d540c96589eae78168bd66a/af3f0/cat.webp&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 100%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/webp;base64,UklGRt4AAABXRUJQVlA4INIAAABwBQCdASoUABQAPtFcpU6oJSMiKAqpABoJZgCdMoMelcnLOQBTCtrhdaz4glLGa+jtchiQAO3VP8LPF+yS6sOcatnzHGwii3SMaNxhh0O3z98jqFmWSCPwGOlYC+R8MtFChGNkCe+9wCePhHXbVGRJN7EVfjT7nue7AZKvKofxDBDuVEoRaTbg2YhFak+8ZGrV0APn4IGspKrz1YtwrC+9MAaiOqrC8wCpUuaY8zYJtB+qufWz3a8r3RN9mjC+rm14vJ1eywbQ4DZ+m0K2yFyPAAA=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/1bdadb1e5d540c96589eae78168bd66a/cbe2e/cat.webp 148w,
/static/1bdadb1e5d540c96589eae78168bd66a/3084c/cat.webp 295w,
/static/1bdadb1e5d540c96589eae78168bd66a/5ca24/cat.webp 590w,
/static/1bdadb1e5d540c96589eae78168bd66a/dad35/cat.webp 885w,
/static/1bdadb1e5d540c96589eae78168bd66a/2baf0/cat.webp 1180w,
/static/1bdadb1e5d540c96589eae78168bd66a/af3f0/cat.webp 1280w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/1bdadb1e5d540c96589eae78168bd66a/cbe2e/cat.webp 148w,
/static/1bdadb1e5d540c96589eae78168bd66a/3084c/cat.webp 295w,
/static/1bdadb1e5d540c96589eae78168bd66a/5ca24/cat.webp 590w,
/static/1bdadb1e5d540c96589eae78168bd66a/dad35/cat.webp 885w,
/static/1bdadb1e5d540c96589eae78168bd66a/2baf0/cat.webp 1180w,
/static/1bdadb1e5d540c96589eae78168bd66a/af3f0/cat.webp 1280w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/webp&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/1bdadb1e5d540c96589eae78168bd66a/5ca24/cat.webp&quot;
            alt=&quot;Illustration of an orange-and-white cat looking up against a blue sky&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Welcome Again!&lt;/p&gt;
&lt;p&gt;It’s good to be back here although I wish it was on better terms. Nonetheless, need to push forward and not look back. We all carry baggage, I just have more of it &lt;a href=&quot;https://vietnguyen.site/now/&quot;&gt;now&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I want to get back to writing and learning in public again. I am paying for this domain so mind as well put it to good use.&lt;/p&gt;
&lt;p&gt;To make myself accountable, I would like to make a post comparing all the different state management tools we have available to use in the frontend. I have already explored &lt;a href=&quot;https://www.vietnguyen.site/getting-started-with-xstate/&quot;&gt;Xstate&lt;/a&gt; but it definitely needs an update.&lt;/p&gt;
&lt;p&gt;Another post I want to make is to explore &lt;a href=&quot;https://www.prisma.io/&quot;&gt;Prisma&lt;/a&gt;. After going deep into &lt;a href=&quot;https://www.djangoproject.com/&quot;&gt;Django&lt;/a&gt;, I now know the power of ORMs. I always thought it harder to keep another mental model on top of the DB but not needing to jump between SQL language and your backend language of choice is quite neat.&lt;/p&gt;
&lt;p&gt;That’s all the ideas I had for now. We will see where we are at in a few.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[The Move]]></title><description><![CDATA[Relocating from Orlando to Charlotte during the pandemic: a remote job interview, agonizing decisions, and a stressful eight-hour drive with a stressed out cat.]]></description><link>https://www.vietnguyen.site/the-move/</link><guid isPermaLink="false">https://www.vietnguyen.site/the-move/</guid><pubDate>Mon, 31 Aug 2020 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/761056973c1a07a466d94f745abef2bb/9568a/hades-sit.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 133.1081081081081%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAbABQDASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAMCBQYE/8QAFQEBAQAAAAAAAAAAAAAAAAAAAAH/2gAMAwEAAhADEAAAAWOXxJoTJBN1XcWKFFf/xAAcEAADAAMAAwAAAAAAAAAAAAABAgMAERITIzP/2gAIAQEAAQUCkvqjzMjgga1S69tc7hbxtpFs/NGw/M5//8QAFREBAQAAAAAAAAAAAAAAAAAAIDH/2gAIAQMBAT8Bo//EABURAQEAAAAAAAAAAAAAAAAAABEg/9oACAECAQE/AQj/xAAgEAABAwQCAwAAAAAAAAAAAAABAAIQERIhUQMxYXGi/9oACAEBAAY/ArXAItNPaxGKHzG2ou+VdydnUVj/xAAaEAEAAwEBAQAAAAAAAAAAAAABABEhMUFR/9oACAEBAAE/IQb9V0x6G6DrHYQzInPpD3K1UIxmcMjHenSJDwcpjN7y4OEuoSnqdz//2gAMAwEAAgADAAAAEDA7/f/EABgRAAMBAQAAAAAAAAAAAAAAAAABESEx/9oACAEDAQE/EOtIhlZ//8QAGBEAAwEBAAAAAAAAAAAAAAAAAAERECH/2gAIAQIBAT8QrpMryI//xAAeEAEBAAICAwEBAAAAAAAAAAABEQAhQVExYXGx4f/aAAgBAQABPxB8ts7E+Ji3B6Cj0fzJq/a7uNN1lApMJkJ08Txet4U8REQHoMGDRF/T3g8ysL0cdb3i0oCRHAPvBQjHHINZvnPB8z//2Q==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/761056973c1a07a466d94f745abef2bb/cbe2e/hades-sit.webp 148w,
/static/761056973c1a07a466d94f745abef2bb/3084c/hades-sit.webp 295w,
/static/761056973c1a07a466d94f745abef2bb/5ca24/hades-sit.webp 590w,
/static/761056973c1a07a466d94f745abef2bb/dad35/hades-sit.webp 885w,
/static/761056973c1a07a466d94f745abef2bb/2baf0/hades-sit.webp 1180w,
/static/761056973c1a07a466d94f745abef2bb/e51ec/hades-sit.webp 3024w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/761056973c1a07a466d94f745abef2bb/a80bd/hades-sit.jpg 148w,
/static/761056973c1a07a466d94f745abef2bb/1c91a/hades-sit.jpg 295w,
/static/761056973c1a07a466d94f745abef2bb/1c72d/hades-sit.jpg 590w,
/static/761056973c1a07a466d94f745abef2bb/a8a14/hades-sit.jpg 885w,
/static/761056973c1a07a466d94f745abef2bb/fbd2c/hades-sit.jpg 1180w,
/static/761056973c1a07a466d94f745abef2bb/9568a/hades-sit.jpg 3024w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/jpeg&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/761056973c1a07a466d94f745abef2bb/1c72d/hades-sit.jpg&quot;
            alt=&quot;Tina was in the back just chilling&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Moving. Must look forward.&lt;/p&gt;
&lt;p&gt;In another sense, I have just completed my first out of state move into a relatively unknown place with no contacts in the immediate vicinity. It is both fresh and daunting.&lt;/p&gt;
&lt;p&gt;It all started with a LinkedIn message from a recruiter whom I have had previously said no to about two years prior. In February of this year(2020), the recruiter messaged me if I was on the market for a new position. Since LinkedIn keeps conversation history, it showed our previous conversation about the same topic. I was surprised the recruiter still remembered me and also was still recruiting with the same company.&lt;/p&gt;
&lt;p&gt;At that time, I might have felt a bit stagnant at my (at the time) current place of work and just said yes to their inquiry and jump started the ‘let us get to know each other’ of the recruitment process.&lt;/p&gt;
&lt;p&gt;February 2020 feels like a very distant and faraway time. At that time, the whole world was just getting to know the deadly virus know as COVID-19. At that time, I was still able to go into the office but was slowly shifting into a remote state partially due to the stagnation and my laziness surrounding commuting (it wasn’t even that bad though lol).&lt;/p&gt;
&lt;p&gt;So me and the company got to ‘know each other’ (screening call and preliminary questions) and on the surface, I liked what I heard, and they liked what I was dishing out (by this time, I was well adept at recruiter-speak) so we were heading to an on-site interview arrangement.&lt;/p&gt;
&lt;p&gt;The interview was scheduled in the middle of March 2020 and a few weeks before that, I was trying my hardest to get myself and my wife to get an all-expenses-paid trip up to Charlotte, NC, so we can tour the area on the company’s dime. If booking flights was easier (there was a third party service choosing which flights and hotels the company can accommodate), it would have been a nice trip. Since there was a little of difficulty trying to arrange for me and my wife, that was enough time for COVID to have cases start popping up in Orlando which made me wary.&lt;/p&gt;
&lt;p&gt;I brought that up to the company, and they understood immediately and switched my on-site interview into a remote interview. I had mixed feelings about this. On one hand, I do not have to endure an early morning/late night flight into unfamiliar territory. On the other, I lose a personal edge by establishing a rapport with the interviewers in person as opposed to through a screen or a phone. So remote interview it is then.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Aside: Not sure if I told many people but I had an onsite interview in Austin in Winter 2019. Lets just say that I did not have the most favorable experience and that has led me to believe that out-of-state onsite interviews are basically my ‘Away’ game with a division rival. The unfamiliar-ness plus the flying-to day of really puts me off my game. Just showing the one side of my uneasiness with onsites. I have also had unfavorable experiences with remote interviews through Zoom/other streaming apps. Especially the portion where you have to code in front of them. I feel like I am talking to a wall and I actually don’t usually verbalize my thoughts while coding so it feels like am streaming to one viewer and that viewer has the power to yes/no my interview. It is mucho nerve-wracking.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Come the day of the remote interview, I put on my best button-up and just wear shorts because they are not going to see the other half of me (hopefully). Get ready and jump onto the Zoom call. After 4 grueling hours with seven different engineers and product managers, my interview is done and honestly I recall that it did not suck. I had a good time asking and answering questions and there was no coding portion which was great.&lt;/p&gt;
&lt;p&gt;Feeling good about my interview, I went about my day. A few weeks later, I received an offer. This part terrified me.&lt;/p&gt;
&lt;p&gt;Big time change is hard to undergo willingly. They gave me a week to think about the offer. At the end of that week, I still did not know whether to take it or not. I asked for and receieved an extension of a week. Another agonizing week went by. What ifs and unknowns circled around my thoughts. It was a great opportunity but to leave comfort and support was scary. I talked it over with my wife. I paced around a lot and sighed a lot. I thought of people who have done a move of this magnitude and pondered whether to reach out and ask ‘hey, why did you do it?’&lt;/p&gt;
&lt;p&gt;Ultimately, I think I just crave new experiences and I talked it over and over with my wife and over and over in my head. So I was like ‘What the hell, lets do it!’ And now, after countless hours of packing, lots of stress with the storage pods (another story for another time) and a stressful eight-hour car ride with a stressed out cat, I am finally in my new place in Charlotte, North Carolina.&lt;/p&gt;
&lt;p&gt;It has been quite the journey from acceptance of the offer, to telling all the friends and family of the news, to packing and getting rid of belongings, to saying goodbyes and see-you-laters to our loved ones but I believe this choice and this move will be new life experience to look back and smile.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Getting Started with XState]]></title><description><![CDATA[A beginner's guide to XState state machines in React: defining states and transitions, assigning context, and invoking services to call the Rick and Morty API.]]></description><link>https://www.vietnguyen.site/getting-started-with-xstate/</link><guid isPermaLink="false">https://www.vietnguyen.site/getting-started-with-xstate/</guid><pubDate>Wed, 09 Oct 2019 00:00:00 GMT</pubDate><content:encoded>&lt;blockquote&gt;
&lt;p&gt;TL;DR State machines are an interesting topic that I have not been properly introduced to even though I probably, unintentionally, use it in alot of my programming tasks/projects. I am still a bit inexperienced with modeling my UI to a state machine but I hope &lt;a href=&quot;https://css-tricks.com/using-react-and-xstate-to-build-a-sign-in-form/&quot;&gt;these&lt;/a&gt; &lt;a href=&quot;https://css-tricks.com/robust-react-user-interfaces-with-finite-state-machines/&quot;&gt;links&lt;/a&gt; &lt;a href=&quot;https://xstate.js.org/docs/&quot;&gt;that&lt;/a&gt; &lt;a href=&quot;https://xstate.js.org/viz/&quot;&gt;I&lt;/a&gt; used will help you in using state machines in JS, particularly with the xstate library and react.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So State Machines…&lt;/p&gt;
&lt;p&gt;I am not so sure how to start to explain it but I do know it can help organize what your UI elements will do in certain states. The best way to show this is just give you the code but it gets more complex as more states are added so I will try to go step by step.&lt;/p&gt;
&lt;p&gt;I used my &lt;a href=&quot;https://github.com/ulukfuni/nextjs-boilerplate&quot;&gt;NextJs&lt;/a&gt; boilerplate and added xstate with a few other libraries.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token function&quot;&gt;npm&lt;/span&gt; i &lt;span class=&quot;token parameter variable&quot;&gt;-s&lt;/span&gt; xstate @xstate/react @rebass/forms&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;I went through the &lt;a href=&quot;https://css-tricks.com/using-react-and-xstate-to-build-a-sign-in-form/&quot;&gt;tutorial&lt;/a&gt; on how to make a login form using react and xstate but I found myself doing more copying and pasting than actually understanding how xstate works.&lt;/p&gt;
&lt;p&gt;So I decided to just make a simple search input and with a submit button and I will use the Rick and Morty &lt;a href=&quot;https://rickandmortyapi.com/&quot;&gt;API&lt;/a&gt; to just search for a name and bring back a character from the popular Adult Swim TV show, Rick and Morty.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/4b0049ea9b7d4e6e647555c3b228fe4e/ea7fb/search.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 80.4054054054054%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAQCAYAAAAWGF8bAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAu0lEQVR42t2TuQ6DMBBE+f9fMxUFJYj7sgSY03Yx0VpygQgIUIokxWi32afZy1mWBZ+U89vAeZ53egxc1xVKKUgpjWz+CEiwsiwRhiGSJEGapgiCAFVVbZzfAhIkiiJkWWYUxzGKokDbtkac87fQw5apYBiGnfq+hxACTdNgmqbrwK7rTLGF2GjzcRzvtVzXNVzXNfJ9H4wxeJ5n3J0t59QhzY5mSQuiGeZ5fujs0h3SqWitN/HPX+8rgC/NU9WcHFKmtAAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/4b0049ea9b7d4e6e647555c3b228fe4e/cbe2e/search.webp 148w,
/static/4b0049ea9b7d4e6e647555c3b228fe4e/3084c/search.webp 295w,
/static/4b0049ea9b7d4e6e647555c3b228fe4e/5ca24/search.webp 590w,
/static/4b0049ea9b7d4e6e647555c3b228fe4e/4d911/search.webp 788w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/4b0049ea9b7d4e6e647555c3b228fe4e/12f09/search.png 148w,
/static/4b0049ea9b7d4e6e647555c3b228fe4e/e4a3f/search.png 295w,
/static/4b0049ea9b7d4e6e647555c3b228fe4e/fcda8/search.png 590w,
/static/4b0049ea9b7d4e6e647555c3b228fe4e/ea7fb/search.png 788w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/png&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/4b0049ea9b7d4e6e647555c3b228fe4e/fcda8/search.png&quot;
            alt=&quot;Search form with a Character Name input, a Search button, and the XState state label set to ready&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/3bd75e8de8a80c05a84d494f71b1991d/21482/rick.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 60.810810810810814%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAMCAIAAADtbgqsAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC50lEQVR42gHcAiP9AN/p5LvU0ay6wcW7sE5oW0x5gaS2uiBBRWl6SYCXZ4KXcnNzVXJ0dpWWlYeEhXOEfKXTvJ/o27fjxt/j0gDc5OKwzdbFxsLKzsRlgnJrhYDOv7YmYmZgfWCxyJScpoByeGl6fH+rrKuenJx9h4if7uZr2c6V3c3h4t0A1MvDsbGqwLWpzbSgaGxbM1BUenR5Hjc6VWRMnLFoipZZYV9HaWlpj5CQkIyNZnp4gce1iL+3s9C21tfNAN/f29fV0MvT0d/MwISRiVd0goOBkmRoaI2AZsDFup6bg5GBZo+Pj7W3trq2t46inry8orevnNfaz83LyADz8fL19PT7/fz9/f/39vf49/f9/f3+/v708fT39vn+/P38/Pzu6+z49fT//v78+Pj49vX5+Pf9/fz7+voAyNHNqLOx1d/h1+HVr7Crr6+sub27sLCsvrqlxcGqzcq1x8iyzN/Yzd7jy+Dfw9TTnJ+ky9Xav8jMy8zNAI+upmiSmKq5vqXGzzdPPVBiTHqFeRw0FFdLDJKWZpSQZ2JkHJjGsqu2sHawrmGOgGRvaLvL0nmMlG92ewDT3uGnxNG0ppizws5Qel1siWN7knk7WCaCbze9ysO0qZCKfjqYw760qI+SxMKStaWqsZ/o4tyboKBweYAA29jVp7GzpKago7Cxc5tliaR1YoVcPUwluJpJurOOt6hstKZQp9XQt9DQqNPYn7midnhOm5aOPkRGY2xzAN/e29DLx9nh4M3U06rCo7fIsJmolZmekNfVstzby9PPqNPbtdTi3tvo587l58XRwqKkipGYm4eRlLa7vQDv8fLw8vT9+/37/Pz59Pr79/v////+/v739Pr7+vz////9/P3x9PX6+fj//v37+/759fz///7////8/PwA3uHYytG+3uXU09rSydnAq8WwxNXAwc/AiJqNlJyMqKqbqKSN0KKQzb640ru5zLWPtOWezeThxuWh3/LGnx7y7b4pXdcAAAAASUVORK5CYII=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/3bd75e8de8a80c05a84d494f71b1991d/cbe2e/rick.webp 148w,
/static/3bd75e8de8a80c05a84d494f71b1991d/3084c/rick.webp 295w,
/static/3bd75e8de8a80c05a84d494f71b1991d/5ca24/rick.webp 590w,
/static/3bd75e8de8a80c05a84d494f71b1991d/dad35/rick.webp 885w,
/static/3bd75e8de8a80c05a84d494f71b1991d/2baf0/rick.webp 1180w,
/static/3bd75e8de8a80c05a84d494f71b1991d/e5c51/rick.webp 1350w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/3bd75e8de8a80c05a84d494f71b1991d/12f09/rick.png 148w,
/static/3bd75e8de8a80c05a84d494f71b1991d/e4a3f/rick.png 295w,
/static/3bd75e8de8a80c05a84d494f71b1991d/fcda8/rick.png 590w,
/static/3bd75e8de8a80c05a84d494f71b1991d/efc66/rick.png 885w,
/static/3bd75e8de8a80c05a84d494f71b1991d/c83ae/rick.png 1180w,
/static/3bd75e8de8a80c05a84d494f71b1991d/21482/rick.png 1350w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/png&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/3bd75e8de8a80c05a84d494f71b1991d/fcda8/rick.png&quot;
            alt=&quot;Search results listing Rick and Morty characters including Rick Sanchez and Black Rick with species, status, and origin&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;So XState is a configuration based library in that you will pass a configuration object into your ‘machine’ and it will monitor your state based on transistion actions that you pass into.&lt;/p&gt;
&lt;p&gt;Starting with your config object:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;js&quot;&gt;&lt;pre class=&quot;language-js&quot;&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; config &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token literal-property property&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;charSearch&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;token literal-property property&quot;&gt;context&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token literal-property property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token literal-property property&quot;&gt;results&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;token literal-property property&quot;&gt;initial&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;ready&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;token literal-property property&quot;&gt;states&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;id&lt;/code&gt; denotes the id of the state machine because you might use multiple state machines. &lt;code class=&quot;language-text&quot;&gt;context&lt;/code&gt; is basically a React State object where you can store data. &lt;code class=&quot;language-text&quot;&gt;initial&lt;/code&gt; denotes what the first state the machine is in and &lt;code class=&quot;language-text&quot;&gt;state&lt;/code&gt; is where all your states that you declare are going to be.&lt;/p&gt;
&lt;p&gt;So let us add some states:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;js&quot;&gt;&lt;pre class=&quot;language-js&quot;&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; config &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token operator&quot;&gt;...&lt;/span&gt;
  &lt;span class=&quot;token literal-property property&quot;&gt;states&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token literal-property property&quot;&gt;ready&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token literal-property property&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token literal-property property&quot;&gt;searching&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token literal-property property&quot;&gt;success&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;ready&lt;/code&gt; is the first state, &lt;code class=&quot;language-text&quot;&gt;error&lt;/code&gt; will be when something breaks or does not go as planned, &lt;code class=&quot;language-text&quot;&gt;searching&lt;/code&gt; will be when fire up an API request and are waiting for a response and &lt;code class=&quot;language-text&quot;&gt;success&lt;/code&gt; denotes that API request returned with something. I am sure I am missing a few states or can break them down further but for simpilicity (and laziness), we will use these four for now.&lt;/p&gt;
&lt;p&gt;Next we will add transistions. These will be in CAPS and it is what we will be using to send to the machine in order to do things.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;js&quot;&gt;&lt;pre class=&quot;language-js&quot;&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; assign &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;xstate&apos;&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; config &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token operator&quot;&gt;...&lt;/span&gt;
  &lt;span class=&quot;token literal-property property&quot;&gt;states&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token literal-property property&quot;&gt;ready&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;token literal-property property&quot;&gt;on&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;token constant&quot;&gt;INPUT_NAME&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
          &lt;span class=&quot;token literal-property property&quot;&gt;actions&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;assign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;ctx&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; evt&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;token literal-property property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; evt&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;name
          &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;token constant&quot;&gt;SUBMIT&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
          &lt;span class=&quot;token literal-property property&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;searching&apos;&lt;/span&gt;
        &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
      &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token operator&quot;&gt;...&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Using the &lt;code class=&quot;language-text&quot;&gt;on&lt;/code&gt; property name, we can define our transistions within the ready state. &lt;code class=&quot;language-text&quot;&gt;INPUT_NAME&lt;/code&gt; and &lt;code class=&quot;language-text&quot;&gt;SUBMIT&lt;/code&gt; will be the name sent from the UI to make a transistion to another state or to do something. &lt;code class=&quot;language-text&quot;&gt;target&lt;/code&gt; denotes what the next state to go to is. So for example, if you send the &lt;code class=&quot;language-text&quot;&gt;SUBMIT&lt;/code&gt; event, the state machine will transistion from &lt;code class=&quot;language-text&quot;&gt;ready&lt;/code&gt; -&gt; &lt;code class=&quot;language-text&quot;&gt;searching&lt;/code&gt;. Now if we want to do something when a particular transistion is sent in, we can use the &lt;code class=&quot;language-text&quot;&gt;actions&lt;/code&gt; property.&lt;/p&gt;
&lt;p&gt;In order to set things in your context, you will need to use the &lt;code class=&quot;language-text&quot;&gt;assign&lt;/code&gt; function provided to you by xstate. It works the same as &lt;code class=&quot;language-text&quot;&gt;setState&lt;/code&gt; in React except if given a function for a property, the function takes two arguments, the &lt;code class=&quot;language-text&quot;&gt;ctx&lt;/code&gt; (context) and &lt;code class=&quot;language-text&quot;&gt;evt&lt;/code&gt; (event). Context is your context that was declared in the config and the event is whatever you passed in with your transistion.&lt;/p&gt;
&lt;p&gt;Forgot to touch on one other thing, these transistions that you are declaring in the ready state will only work in the ready state. If a transistion is passed in and the state is different, nothing will happen and you will get a warning in your console. The inverse is also true, if a different transistion is sent in on ready state, warning in the console and nothing will happen.&lt;/p&gt;
&lt;p&gt;Here is some UI code to see what sending a transistion looks like:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;js&quot;&gt;&lt;pre class=&quot;language-js&quot;&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; useMachine &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;@xstate/react&apos;&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; Machine &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;xstate&apos;&lt;/span&gt;
&lt;span class=&quot;token operator&quot;&gt;...&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; rickAndMortyMachine &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;Machine&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;config&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt; current&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; send &lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;useMachine&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;ramMachine&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;token operator&quot;&gt;...&lt;/span&gt;
&lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;Input
  id&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&apos;email&apos;&lt;/span&gt;
  name&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&apos;email&apos;&lt;/span&gt;
  defaultValue&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&apos;&apos;&lt;/span&gt;
  onChange&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;send&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token literal-property property&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&apos;INPUT_NAME&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token literal-property property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; e&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;target&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;value &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token operator&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;&gt;&lt;/span&gt;
&lt;span class=&quot;token operator&quot;&gt;...&lt;/span&gt;
&lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;Button
  variant&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;grey&quot;&lt;/span&gt;
  onClick&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;send&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token literal-property property&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;SUBMIT&apos;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token operator&quot;&gt;&gt;&lt;/span&gt;
  Search
&lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;/&lt;/span&gt;Button&lt;span class=&quot;token operator&quot;&gt;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;I am using a custom React Hook &lt;code class=&quot;language-text&quot;&gt;useMachine&lt;/code&gt; for the XState machine and &lt;code class=&quot;language-text&quot;&gt;send&lt;/code&gt; is the function we will use to send transistions to our machine.&lt;/p&gt;
&lt;p&gt;Now lets add our &lt;code class=&quot;language-text&quot;&gt;searching&lt;/code&gt; state information for when we send an API request to the Rick and Morty API. We are going to &lt;a href=&quot;https://xstate.js.org/docs/guides/communication.html&quot;&gt;invoke&lt;/a&gt; a service to do API calls.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;js&quot;&gt;&lt;pre class=&quot;language-js&quot;&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; config &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token operator&quot;&gt;...&lt;/span&gt;
  &lt;span class=&quot;token literal-property property&quot;&gt;states&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token operator&quot;&gt;...&lt;/span&gt;
    &lt;span class=&quot;token literal-property property&quot;&gt;searching&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;token literal-property property&quot;&gt;invoke&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;token literal-property property&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;getChar&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;token function-variable function&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;ctx&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; evt&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
          &lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; url &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token template-string&quot;&gt;&lt;span class=&quot;token template-punctuation string&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;https://rickandmortyapi.com/api/character/?name=&lt;/span&gt;&lt;span class=&quot;token interpolation&quot;&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;${&lt;/span&gt;ctx&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;name&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token template-punctuation string&quot;&gt;`&lt;/span&gt;&lt;/span&gt;
          &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;fetch&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;url&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;res&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; res&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;json&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;token literal-property property&quot;&gt;onDone&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
          &lt;span class=&quot;token literal-property property&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;success&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
          &lt;span class=&quot;token literal-property property&quot;&gt;actions&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt;  &lt;span class=&quot;token function&quot;&gt;assign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;token function-variable function&quot;&gt;results&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;ctx&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; evt&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; evt&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;data&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;results
          &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;token literal-property property&quot;&gt;onError&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
          &lt;span class=&quot;token literal-property property&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;error&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
          &lt;span class=&quot;token literal-property property&quot;&gt;actions&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;assign&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token literal-property property&quot;&gt;msg&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;error&apos;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token operator&quot;&gt;...&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;You can invoke Promises, Callbacks, Observables or even other Machines. Here we are just using a Promise using the Fetch Web API. So once we get into the &lt;code class=&quot;language-text&quot;&gt;searching&lt;/code&gt; state, it immediately invokes our &lt;code class=&quot;language-text&quot;&gt;getChar&lt;/code&gt; service. Once the Promise resolves it goes to the &lt;code class=&quot;language-text&quot;&gt;onDone&lt;/code&gt; transistion and there you can assign it to your context and then pick a target state to go to. If the Promise rejects, you go to the &lt;code class=&quot;language-text&quot;&gt;onError&lt;/code&gt; transisition and ther you can also assign and pick another target state.&lt;/p&gt;
&lt;p&gt;And from there you go and display your results in the success state. Thats the very gist of it. I passed over &lt;a href=&quot;https://xstate.js.org/docs/guides/guards.html#guard-functions&quot;&gt;guards&lt;/a&gt; (transistion will only go thru if certain conditions are met) and probably other important things but this is a small introduction into state machines using XState.&lt;/p&gt;
&lt;p&gt;The code used in this post is &lt;a href=&quot;https://github.com/ulukfuni/state-machine-example/blob/master/pages/rickandmorty.js&quot;&gt;here&lt;/a&gt;. I am hoping to get more use out of state machines moving forward as I can see the benefit of mapping out state before you moving to building your UI. Hope this helps you out.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Getting Started With GraphQL]]></title><description><![CDATA[A beginner's look at GraphQL: building a simple Apollo Server schema with types and resolvers, writing queries, and comparing the approach to REST APIs.]]></description><link>https://www.vietnguyen.site/getting-started-with-graphql/</link><guid isPermaLink="false">https://www.vietnguyen.site/getting-started-with-graphql/</guid><pubDate>Tue, 30 Jul 2019 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/c6ca6e92aeee70b8fb90eb201a9c0926/b768e/graph.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 66.89189189189189%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAANABQDASIAAhEBAxEB/8QAFwAAAwEAAAAAAAAAAAAAAAAAAAQFA//EABUBAQEAAAAAAAAAAAAAAAAAAAAC/9oADAMBAAIQAxAAAAFRudtNLFsP/8QAGxAAAgIDAQAAAAAAAAAAAAAAAgMBEgAEERT/2gAIAQEAAQUCWgZaWqNaZBSMehnASNf/xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAEDAQE/AT//xAAXEQEAAwAAAAAAAAAAAAAAAAAAAREx/9oACAECAQE/AYxT/8QAGxAAAgIDAQAAAAAAAAAAAAAAAAERIRASMTL/2gAIAQEABj8C1boqaxK6ehTZ/8QAGhAAAwEAAwAAAAAAAAAAAAAAAREhADFBUf/aAAgBAQABPyEwoBhHDsyu8aox4des2zs4wdhEPf/aAAwDAQACAAMAAAAQcx//xAAXEQEBAQEAAAAAAAAAAAAAAAABABEh/9oACAEDAQE/EE15aX//xAAXEQADAQAAAAAAAAAAAAAAAAAAAREh/9oACAECAQE/EKUPSj//xAAcEAEBAAICAwAAAAAAAAAAAAABEQAxIUFhcZH/2gAIAQEAAT8QTUPgCNOMvNAngLx66xK2Z3qSiu/ORBAlEa+YsTRNm+pn/9k=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/c6ca6e92aeee70b8fb90eb201a9c0926/cbe2e/graph.webp 148w,
/static/c6ca6e92aeee70b8fb90eb201a9c0926/3084c/graph.webp 295w,
/static/c6ca6e92aeee70b8fb90eb201a9c0926/5ca24/graph.webp 590w,
/static/c6ca6e92aeee70b8fb90eb201a9c0926/dad35/graph.webp 885w,
/static/c6ca6e92aeee70b8fb90eb201a9c0926/2baf0/graph.webp 1180w,
/static/c6ca6e92aeee70b8fb90eb201a9c0926/e5c51/graph.webp 1350w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/c6ca6e92aeee70b8fb90eb201a9c0926/a80bd/graph.jpg 148w,
/static/c6ca6e92aeee70b8fb90eb201a9c0926/1c91a/graph.jpg 295w,
/static/c6ca6e92aeee70b8fb90eb201a9c0926/1c72d/graph.jpg 590w,
/static/c6ca6e92aeee70b8fb90eb201a9c0926/a8a14/graph.jpg 885w,
/static/c6ca6e92aeee70b8fb90eb201a9c0926/fbd2c/graph.jpg 1180w,
/static/c6ca6e92aeee70b8fb90eb201a9c0926/b768e/graph.jpg 1350w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/jpeg&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/c6ca6e92aeee70b8fb90eb201a9c0926/1c72d/graph.jpg&quot;
            alt=&quot;Chart titled Weekly Plan contrasting Not Sucking with Sucking for the past and future&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;So if you haven’t heard, GraphQL is the newest kid on the block (I might just be late, it’s the newest kid on MY block anyway).&lt;/p&gt;
&lt;p&gt;So for those who do not know, GraphQL is a specification for building APIs just like REST (more familiar with this) and SOAP (no idea what this is). Whereas in REST you are using CRUD methods (HTTP GET, POST, PUT, DELETE), for GraphQL, you are using a query language to do your CRUD methods.&lt;/p&gt;
&lt;p&gt;The reason I wanted to try GraphQL was because this very blog that you are looking at is running using GraphQL queries to serve this content. I wanted to understand the underlying parts.&lt;/p&gt;
&lt;p&gt;I really just dove in and grabbed a &lt;a href=&quot;https://letslearngraphql.com&quot;&gt;tutorial&lt;/a&gt; (pretty good tutorial as there are videos and github code examples) and just started seeing what the code looked like and how it all works. It is a fairly different experience and paradigm to get used to.&lt;/p&gt;
&lt;p&gt;I wrote some &lt;a href=&quot;https://github.com/ulukfuni/learn-graphql&quot;&gt;code&lt;/a&gt; in JS to mess around with GraphQL so lets break it down a little.&lt;/p&gt;
&lt;p&gt;We will be using &lt;a href=&quot;https://www.apollographql.com/docs/apollo-server/&quot;&gt;ApolloServer&lt;/a&gt; because it includes the Apollo Playground (where you can enter queries) which is pretty awesome to test your API and it is well documented.&lt;/p&gt;
&lt;p&gt;To create a server in Apollo Server is super simple:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;js&quot;&gt;&lt;pre class=&quot;language-js&quot;&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; ApolloServer &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&apos;apollo-server&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; server &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;ApolloServer&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    typeDefs&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token comment&quot;&gt;// will get to these in a second&lt;/span&gt;
    resolvers
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
server&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;listen&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;data&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; console&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token template-string&quot;&gt;&lt;span class=&quot;token template-punctuation string&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;server started at port &lt;/span&gt;&lt;span class=&quot;token interpolation&quot;&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;${&lt;/span&gt;data&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;port&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token template-punctuation string&quot;&gt;`&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;So first off, you have to type everything in GraphQL. The API will probably break if this is not done and not done properly. So setting up and understanding your schemas is pretty key. The &lt;code class=&quot;language-text&quot;&gt;typeDefs&lt;/code&gt; and &lt;code class=&quot;language-text&quot;&gt;resolvers&lt;/code&gt; will define a schema and methods to query your data.&lt;/p&gt;
&lt;p&gt;To define your types, you will have to write in gql (graph query language) and luckily it’s bundled with ApolloServer.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;js&quot;&gt;&lt;pre class=&quot;language-js&quot;&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; ApolloServer&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; gql &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&apos;apollo-server&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; typeDefs &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; gql&lt;span class=&quot;token template-string&quot;&gt;&lt;span class=&quot;token template-punctuation string&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;
    type House {
        houseName: String!,
        members: [Member!]!
    }
    type Member {
        # member name
        name: String!,
        # whether they are the leader or not
        leader: Boolean,
        # to show how to add properties that are not in the info
        favorite: Boolean,
    }
    type Query {
        allHousesInfo: [House],
        member(name: String!): Member,
        getLeaders: [Member]
    }
&lt;/span&gt;&lt;span class=&quot;token template-punctuation string&quot;&gt;`&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;It is seemingly like object notation in JS but you need to use the word &lt;code class=&quot;language-text&quot;&gt;type&lt;/code&gt; before each definition. The default scalar types you can use in GraphQL is &lt;code class=&quot;language-text&quot;&gt;String&lt;/code&gt;, &lt;code class=&quot;language-text&quot;&gt;Int&lt;/code&gt;, &lt;code class=&quot;language-text&quot;&gt;Float&lt;/code&gt;, &lt;code class=&quot;language-text&quot;&gt;Boolean&lt;/code&gt;, and &lt;code class=&quot;language-text&quot;&gt;ID&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;To define an array, you can just wrap a scalar or a type  in a [] (i.e. [String]).&lt;/p&gt;
&lt;p&gt;The ! you see defines that the property is non-nullable which means that a value will return that is not null and it is required in the schema.&lt;/p&gt;
&lt;p&gt;So that is a little primer into the very basics of type definitions but looking through the &lt;a href=&quot;https://graphql.org/learn/schema/&quot;&gt;docs&lt;/a&gt;, I haven’t even touched the surface (interfaces, enums, inputs!?!?!).&lt;/p&gt;
&lt;p&gt;After setting the type definitions, we will move onto the resolvers which are basically our methods to grab our data.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;js&quot;&gt;&lt;pre class=&quot;language-js&quot;&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; resolvers &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token literal-property property&quot;&gt;Query&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;token function-variable function&quot;&gt;allHousesInfo&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; threeHouses&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;token function-variable function&quot;&gt;member&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;parent&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; params&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; ctx&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;params&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;name&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; member &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; threeHouses&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;map&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;house&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; house&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;members&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;filter&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;member&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
                        &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; member&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;name&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;includes&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;params&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;name&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
                    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
                &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;flat&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
                &lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;!&lt;/span&gt;member&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;member&apos;&lt;/span&gt;
                &lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;member&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; member
            &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;token function-variable function&quot;&gt;getLeaders&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; threeHouses&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;map&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;house&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; house&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;members&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;filter&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;member&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; member&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;leader
                &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
            &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;flat&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;So the &lt;code class=&quot;language-text&quot;&gt;threeHouses&lt;/code&gt; data is imported from another source but its an array of objects that contain an array of objects.&lt;/p&gt;
&lt;p&gt;So the resolvers is just an object of functions that return the data that you want. The cool thing about Apollo Server or maybe other tooling around GraphQL does this as well, but you never call these functions. What you do instead is you pass a query object to specify which function you are going to use and then you further have to specify what fields of the schema that you want from the data that you want.&lt;/p&gt;
&lt;p&gt;Here is an example query:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;js&quot;&gt;&lt;pre class=&quot;language-js&quot;&gt;&lt;code class=&quot;language-js&quot;&gt;query &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    allHousesInfo &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
        houseName&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
        members &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
            name&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
            leader
        &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;So you choose the function and then you specify the fields you want. So &lt;code class=&quot;language-text&quot;&gt;houseName&lt;/code&gt; is not necessary in this query but if you want it, you can have it. The query above is probably synonymous to sending a GET request to /api/allHousesInfo and returning a json of all the houses. What GraphQL can do is return only the data you are requesting. For example, if you only wanted the member’s names of each house, the query object you would send is:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;js&quot;&gt;&lt;pre class=&quot;language-js&quot;&gt;&lt;code class=&quot;language-js&quot;&gt;query &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    allHousesInfo &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
        members &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
            name&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;In REST, you would have to write some another route and another function to achieve this so therein lies the power of GraphQL.&lt;/p&gt;
&lt;p&gt;The second function &lt;code class=&quot;language-text&quot;&gt;member&lt;/code&gt; returns a member by name and the query you would send is this:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;js&quot;&gt;&lt;pre class=&quot;language-js&quot;&gt;&lt;code class=&quot;language-js&quot;&gt;query &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token function&quot;&gt;member&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;name&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;Claude von Riegan&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
        name&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
        leader
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Again, you can specify the fields you want to see.&lt;/p&gt;
&lt;p&gt;So those are the very basics of getting a GraphQL server up and running and how to write the queries to get your data. It is a very interesting way to build APIs in my opinion as I have only had experience build REST APIs.&lt;/p&gt;
&lt;p&gt;I did not get too far in yet as I have not touched on how to connect to databases or other APIs, how to POST or PUT data or even how to consume the API in the frontend space. Probably articles for another time as I build out this test API further to include those.&lt;/p&gt;
&lt;p&gt;So for this particular mess-around of code, I wanted to use the newest &lt;a href=&quot;https://www.nintendo.com/games/detail/fire-emblem-three-houses-switch/&quot;&gt;Fire Emblem game&lt;/a&gt; as data because I have been playing it nonstop and it is the only thing on my mind as of right now. For those who do not know, Fire Emblem is a Nintendo strategy role-playing video game series with an emphasis on medieval fantasy with themes of war. I will playing around and updating this &lt;a href=&quot;https://github.com/ulukfuni/learn-graphql&quot;&gt;repo&lt;/a&gt; as time goes along with more data and more functions.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Failing Fast]]></title><description><![CDATA[Reflections on the programming idea of failing fast and why real life offers no reset button or redo, only hard lessons learned from the choices we make.]]></description><link>https://www.vietnguyen.site/failing-fast/</link><guid isPermaLink="false">https://www.vietnguyen.site/failing-fast/</guid><pubDate>Mon, 10 Jun 2019 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/de185413c739901d754aaf585f7956bc/e752c/lost.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 125%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAZABQDASIAAhEBAxEB/8QAGQAAAwEBAQAAAAAAAAAAAAAAAAMEAgUG/8QAFgEBAQEAAAAAAAAAAAAAAAAAAgAB/9oADAMBAAIQAxAAAAG3exFY8tkp832bKRIV/8QAHhAAAgIBBQEAAAAAAAAAAAAAAQIAEQMEEBIxMjP/2gAIAQEAAQUCDgoOuIMG76hVaxVXMnvF8DP/xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAEDAQE/AR//xAAWEQADAAAAAAAAAAAAAAAAAAAAEBH/2gAIAQIBAT8BdP/EAB0QAAEDBQEAAAAAAAAAAAAAAAABITECEBFhgSD/2gAIAQEABj8Czw2PPhKZND26If/EABwQAQACAwADAAAAAAAAAAAAAAEAESExQRCRsf/aAAgBAQABPyEzVMlKieIoWYPqbcQJq4dswEctM6LyL5T/2gAMAwEAAgADAAAAELcBfP/EABYRAQEBAAAAAAAAAAAAAAAAAAARAf/aAAgBAwEBPxCIrMr/xAAXEQADAQAAAAAAAAAAAAAAAAAAAREQ/9oACAECAQE/EC44Z//EAB0QAQADAQADAQEAAAAAAAAAAAEAETEhUWFxQfD/2gAIAQEAAT8QNJOAnq0V6gqb3zz3LgcvjtMYpQqeKJQqd1lJkqIIonD1KD7gRSoW/l1R4m/2ZfEx/es//9k=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/de185413c739901d754aaf585f7956bc/cbe2e/lost.webp 148w,
/static/de185413c739901d754aaf585f7956bc/3084c/lost.webp 295w,
/static/de185413c739901d754aaf585f7956bc/5ca24/lost.webp 590w,
/static/de185413c739901d754aaf585f7956bc/dad35/lost.webp 885w,
/static/de185413c739901d754aaf585f7956bc/2baf0/lost.webp 1180w,
/static/de185413c739901d754aaf585f7956bc/c53a6/lost.webp 1601w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/de185413c739901d754aaf585f7956bc/a80bd/lost.jpg 148w,
/static/de185413c739901d754aaf585f7956bc/1c91a/lost.jpg 295w,
/static/de185413c739901d754aaf585f7956bc/1c72d/lost.jpg 590w,
/static/de185413c739901d754aaf585f7956bc/a8a14/lost.jpg 885w,
/static/de185413c739901d754aaf585f7956bc/fbd2c/lost.jpg 1180w,
/static/de185413c739901d754aaf585f7956bc/e752c/lost.jpg 1601w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/jpeg&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/de185413c739901d754aaf585f7956bc/1c72d/lost.jpg&quot;
            alt=&quot;Person standing in a concrete stairwell&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;So in programming, there is a concept called failing fast. It usually deals with testing the code and figuring out what doesn’t work first until you get to your desired result. For instance, a login form. In order to check if your password has the proper protections on it (special chars, uppercase/lowercase chars, numbers, etc.), you would try all the sequences of password without those protections first and then keep inputting it with more and more protections until the password finally passes through and you have logged in.&lt;/p&gt;
&lt;p&gt;You essentially found out all the failures first and you were able to achieve your desired result after finding out what was wrong. This concept of failing fast is a pretty essential tool in programming in that it makes your code more secure and easily testable. You have navigated all routes and all possibilities (hopefully) and your users are better for it.&lt;/p&gt;
&lt;p&gt;So I have gotten the concept of failing fast down pat in the programming sense, but I wish I also had a way to use the same concept in life. This is probably going to turn into my own rambling or a rant of sorts, so bear with me.&lt;/p&gt;
&lt;p&gt;So failing fast in life doesn’t make sense in the slightest but if there were a way to CTRL+Z a situation and redo it with a better result, I would probably want that to be my super power if I ever was granted one.&lt;/p&gt;
&lt;p&gt;Better result is a little subjective though. I do know that time is linear and you only get one choice at one point in time at any time and place so who knows if the result is actually better if done a different way.&lt;/p&gt;
&lt;p&gt;Last sentence was a bit confusing so I’ll help with a little example (might not be a good example). Say, you have a choice of picking what route you want to take to work. There are three routes with small changes between each of them. You consult Google Maps to tell you how long each route will take and it tells you that all three are about the same considering traffic and such.&lt;/p&gt;
&lt;p&gt;So you pick route A today because its the first one and you don’t particularly care which one you take. Well, you take route A and you hit all the red lights and almost get into an accident. On that day, at that particular moment, perhaps route B or C would be better but how could you have known that?&lt;/p&gt;
&lt;p&gt;In life, there is no way to “fail fast” and reset and pick the right choice.&lt;/p&gt;
&lt;p&gt;And that sucks.&lt;/p&gt;
&lt;p&gt;But I think I finally have come around to not being able to “fail fast” in life. I have learned to accept the choices I make in life. If it ends in failure, it becomes a lesson, however hard and hurtful it was to face it.&lt;/p&gt;
&lt;p&gt;So I’ll leave the “failing fast” to my day job and let life take its course.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Integrating Another Cat into the Family]]></title><description><![CDATA[Bringing a new kitten named Loki into the house and the long, messy process of getting him to coexist with the resident cat Hades, including one scary vet stay.]]></description><link>https://www.vietnguyen.site/loki-story/</link><guid isPermaLink="false">https://www.vietnguyen.site/loki-story/</guid><pubDate>Wed, 29 May 2019 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/7225eeffa4ae8e42adc3d77e7848c354/ee25b/loki-ball.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 100%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAUABQDASIAAhEBAxEB/8QAGQABAQEAAwAAAAAAAAAAAAAAAAQCAQMF/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAEC/9oADAMBAAIQAxAAAAGSjquzfMbVZyZugf/EABsQAAIDAQEBAAAAAAAAAAAAAAACAQMREhMi/9oACAEBAAEFAqV7tdJITYp+HtfqPIwww//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQMBAT8BH//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQIBAT8BH//EABoQAAICAwAAAAAAAAAAAAAAAAABAjERICL/2gAIAQEABj8CwUkWKTOS9P/EABoQAAMAAwEAAAAAAAAAAAAAAAABESExUUH/2gAIAQEAAT8hkvrYtU8DxGYhCMguOTFWxHBJwg//2gAMAwEAAgADAAAAECvAQv/EABcRAAMBAAAAAAAAAAAAAAAAAAAQIUH/2gAIAQMBAT8Q0r//xAAYEQACAwAAAAAAAAAAAAAAAAAAARARIf/aAAgBAgEBPxBUZP8A/8QAHRABAAIBBQEAAAAAAAAAAAAAAQARIRAxQVFhgf/aAAgBAQABPxAQggUPNG0xF31QSTOmKDbshwRSFuAcB7FF5Xep5tOOuf/Z&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/7225eeffa4ae8e42adc3d77e7848c354/cbe2e/loki-ball.webp 148w,
/static/7225eeffa4ae8e42adc3d77e7848c354/3084c/loki-ball.webp 295w,
/static/7225eeffa4ae8e42adc3d77e7848c354/5ca24/loki-ball.webp 590w,
/static/7225eeffa4ae8e42adc3d77e7848c354/3440c/loki-ball.webp 759w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/7225eeffa4ae8e42adc3d77e7848c354/a80bd/loki-ball.jpg 148w,
/static/7225eeffa4ae8e42adc3d77e7848c354/1c91a/loki-ball.jpg 295w,
/static/7225eeffa4ae8e42adc3d77e7848c354/1c72d/loki-ball.jpg 590w,
/static/7225eeffa4ae8e42adc3d77e7848c354/ee25b/loki-ball.jpg 759w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/jpeg&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/7225eeffa4ae8e42adc3d77e7848c354/1c72d/loki-ball.jpg&quot;
            alt=&quot;loki sitting on couch&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;So my wife and I recieved Loki from the breeder and made the long trek back home to start the integration into our house, our family, our lives. You see, as we have read online and heard from friends, it’s a process to introduce a new cat to an already existing cat. Our mainstay and docile of a black cat had unchallenged rule in our household for the last (at the time of this writing) 5 years.&lt;/p&gt;
&lt;p&gt;She (Hades, the black fury; nightfury if you like How to train your dragon) has not taken a liking to any other animals in or around her vicinity at all. Dogs or cats, even humans. A hard to please, must-earn-her-affection kind of breed. Must be the upbringing of the streets and the &lt;a href=&quot;https://www.vietnguyen.site/my-cats/&quot;&gt;hard knock childhood that did this to her&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/9c2dd9edea223a98e670abe496e4aaa1/80e3c/loki-n-hades.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 177.7027027027027%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAkABQDASIAAhEBAxEB/8QAGgABAAIDAQAAAAAAAAAAAAAAAAIFAQMEBv/EABYBAQEBAAAAAAAAAAAAAAAAAAIBAP/aAAwDAQACEAMQAAABzHmgHfPNtNvdWbo7FWKdUiKY2//EAB0QAQACAgIDAAAAAAAAAAAAAAEAAgMQBBIRFCL/2gAIAQEAAQUCukxJbl+xjnf5pcbFWMwVOrjovmCm66//xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAEDAQE/AV//xAAVEQEBAAAAAAAAAAAAAAAAAAABIP/aAAgBAgEBPwEr/8QAHRAAAQQCAwAAAAAAAAAAAAAAAQACETEQISAigf/aAAgBAQAGPwJpXi06l2tPMwSICvAzo8f/xAAcEAEAAwACAwAAAAAAAAAAAAABABEhMVFBcdH/2gAIAQEAAT8h5pTECOfEb0Dwgd4C1RzDVEmjs9SiS3ZrsujZ6lr2CaBFt1WEW1En/9oADAMBAAIAAwAAABBrF7P4H//EABoRAQEAAgMAAAAAAAAAAAAAAAEAEBEhMVH/2gAIAQMBAT8QWBk2cWn2O8f/xAAaEQEBAAIDAAAAAAAAAAAAAAABABARITFR/9oACAECAQE/EBIRxbPJ6x//xAAdEAEAAwEAAwEBAAAAAAAAAAABABEhMUFRkXHB/9oACAEBAAE/EGPkt48PyXPitqvA/sZtJYtUjLdhZRUJx+TrJJxtoz5NJQothuZEEdF3JqOS9D1xZCp0eZoYemFct7WekS1sgXP/2Q==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/9c2dd9edea223a98e670abe496e4aaa1/cbe2e/loki-n-hades.webp 148w,
/static/9c2dd9edea223a98e670abe496e4aaa1/3084c/loki-n-hades.webp 295w,
/static/9c2dd9edea223a98e670abe496e4aaa1/5ca24/loki-n-hades.webp 590w,
/static/9c2dd9edea223a98e670abe496e4aaa1/bc514/loki-n-hades.webp 720w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/9c2dd9edea223a98e670abe496e4aaa1/a80bd/loki-n-hades.jpg 148w,
/static/9c2dd9edea223a98e670abe496e4aaa1/1c91a/loki-n-hades.jpg 295w,
/static/9c2dd9edea223a98e670abe496e4aaa1/1c72d/loki-n-hades.jpg 590w,
/static/9c2dd9edea223a98e670abe496e4aaa1/80e3c/loki-n-hades.jpg 720w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/jpeg&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/9c2dd9edea223a98e670abe496e4aaa1/1c72d/loki-n-hades.jpg&quot;
            alt=&quot;loki and hades&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;So we finally arrived home and unleashed the playful cat that we have got. Instant regret as Hades started hissing and unleashing fury swipes at the small white kitten that was invading her space. We had bought a playpen tent in order to keep Loki in and tried that immediately. It was a bit small but would have to do while we gameplanned on how to handle this situation. All while Hades was circling the playpen menacingly like a shark and going in for quick jabs like a nimble boxer when me or my wife would take our eyes off of them.&lt;/p&gt;
&lt;p&gt;We finally came to the idea of walling off the kitchen and keeping Loki there in order to give me a little more space. To give you an idea of what the kitchen is like, its like an L shape and the entrance and exit are the same with no door. We have cabinets that face each other and the fridge sits at the right angle of the L.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/73e7f4d5b8f631f04f11b91a2e16928b/ee25b/hades-tent.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 133.1081081081081%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAbABQDASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAIBBAUD/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAEC/9oADAMBAAIQAxAAAAHLuVOsu2YANCznQOJ//8QAGxABAAICAwAAAAAAAAAAAAAAAQACAxAEESH/2gAIAQEAAQUCxezGuOxyhlxonTq6NgjTRr//xAAWEQADAAAAAAAAAAAAAAAAAAAAEBH/2gAIAQMBAT8BK//EABYRAAMAAAAAAAAAAAAAAAAAAAAQEf/aAAgBAgEBPwEj/8QAHRAAAQQCAwAAAAAAAAAAAAAAAAECITEQESAyQf/aAAgBAQAGPwIR3qFmkcdpLzHD/8QAHhAAAgICAgMAAAAAAAAAAAAAAAERIUFhEDGBkbH/2gAIAQEAAT8hRpWJOsCc/BFLRaY1tIgzVFF5PP2ObUxsQ+5gspWx8JP/2gAMAwEAAgADAAAAENMDs//EABURAQEAAAAAAAAAAAAAAAAAABAR/9oACAEDAQE/EIIf/8QAFhEBAQEAAAAAAAAAAAAAAAAAABGB/9oACAECAQE/EK2qv//EABwQAQACAgMBAAAAAAAAAAAAAAEAESExQVGBcf/aAAgBAQABPxAhS7W9Ja4BQ5d+iWQPOwgMCuqtgtKzRpgbuIGDBjEMurb2Y5sW6lj+XlNom4ruf//Z&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/73e7f4d5b8f631f04f11b91a2e16928b/cbe2e/hades-tent.webp 148w,
/static/73e7f4d5b8f631f04f11b91a2e16928b/3084c/hades-tent.webp 295w,
/static/73e7f4d5b8f631f04f11b91a2e16928b/5ca24/hades-tent.webp 590w,
/static/73e7f4d5b8f631f04f11b91a2e16928b/3440c/hades-tent.webp 759w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/73e7f4d5b8f631f04f11b91a2e16928b/a80bd/hades-tent.jpg 148w,
/static/73e7f4d5b8f631f04f11b91a2e16928b/1c91a/hades-tent.jpg 295w,
/static/73e7f4d5b8f631f04f11b91a2e16928b/1c72d/hades-tent.jpg 590w,
/static/73e7f4d5b8f631f04f11b91a2e16928b/ee25b/hades-tent.jpg 759w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/jpeg&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/73e7f4d5b8f631f04f11b91a2e16928b/1c72d/hades-tent.jpg&quot;
            alt=&quot;Hades messing with the playpen tent&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Since there is no door to deter Loki from leaving the kitchen, we had the bright idea of walling the kitchen off with our dining table. Essentially we laid the table down on its side, object-that-acts-as-cover-in-action-movies style. Set up a temporary litter box and had two bowls for food and water. It was a good plan for a few hours.&lt;/p&gt;
&lt;p&gt;And then it wasn’t a good plan anymore. Loki found out he can jump over the table that was walling off the kitchen. This cat has got some hoppers on him. When he found out he could, he did with consitency and conviction. He wanted to explore the outside-of-the-kitchen world, other-cat-lying-in-wait-to-kill-him be damned.&lt;/p&gt;
&lt;p&gt;So back to the playpen tent he goes so we can figure out what’s the next plan to keep this little hyper cat safe from harm.&lt;/p&gt;
&lt;p&gt;Our next plan was to use our guest bathroom as his spot until Hades is familiar enough (we hoped it would take a month) with his smell to just tolerate him. There was no way she was okay with this and we can only hope for a co-existence between one another. Originally, we thought Hades needed a companion to soften her cold exterior. We were so wrong and so naive.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/76a06cbba20e13c6a477720cb747c9dd/ee25b/loki-bed.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 133.1081081081081%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAbABQDASIAAhEBAxEB/8QAGAAAAwEBAAAAAAAAAAAAAAAAAAIEAwX/xAAVAQEBAAAAAAAAAAAAAAAAAAACAf/aAAwDAQACEAMQAAABV65QoDviOOVWBVIxZ//EAB0QAAICAQUAAAAAAAAAAAAAAAECAAMREiEiMTL/2gAIAQEAAQUC2VlcMWqfVaMxVxEPG0QKTAuIfCQdf//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQMBAT8BH//EABURAQEAAAAAAAAAAAAAAAAAABAB/9oACAECAQE/ASn/xAAaEAEAAQUAAAAAAAAAAAAAAAABAAIRIjCB/9oACAEBAAY/Amt4y0ctX//EAB4QAAMBAAEFAQAAAAAAAAAAAAABESFhEDFBUXGB/9oACAEBAAE/Icm1z6DTTvIxsieY2UuqiPH9EJCG7yyR6EJBa9H79D//2gAMAwEAAgADAAAAEK8Vjv/EABYRAQEBAAAAAAAAAAAAAAAAAAEAEP/aAAgBAwEBPxAmM//EABcRAAMBAAAAAAAAAAAAAAAAAAABERD/2gAIAQIBAT8QYpNf/8QAHBABAQEBAAMBAQAAAAAAAAAAAREAITFBUWFx/9oACAEBAAE/EJGaFOwfD1/cpoeqGY5AggU8kZ+4wgiIb5iEwGUxQKXn6fN2CK43yYiPWKZYXv3Iivbuwu//2Q==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/76a06cbba20e13c6a477720cb747c9dd/cbe2e/loki-bed.webp 148w,
/static/76a06cbba20e13c6a477720cb747c9dd/3084c/loki-bed.webp 295w,
/static/76a06cbba20e13c6a477720cb747c9dd/5ca24/loki-bed.webp 590w,
/static/76a06cbba20e13c6a477720cb747c9dd/3440c/loki-bed.webp 759w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/76a06cbba20e13c6a477720cb747c9dd/a80bd/loki-bed.jpg 148w,
/static/76a06cbba20e13c6a477720cb747c9dd/1c91a/loki-bed.jpg 295w,
/static/76a06cbba20e13c6a477720cb747c9dd/1c72d/loki-bed.jpg 590w,
/static/76a06cbba20e13c6a477720cb747c9dd/ee25b/loki-bed.jpg 759w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/jpeg&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/76a06cbba20e13c6a477720cb747c9dd/1c72d/loki-bed.jpg&quot;
            alt=&quot;loki on the bed&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Anyway, the guest bathroom was now Loki’s home base and protection from Hades. It was decided. Except my wife wanted to try and have Loki sleep with us in our room for the first night. For that first night, he would not stay still and still wanted to explore his surroundings. For him to be the exploring cat that he is, he would need a closed door away from Hades so he could have free reign in our room. And unbeknownst to his child-like mind (he still has this), Hades has a no-closed-door policy.&lt;/p&gt;
&lt;p&gt;So began the first battle of Hades vs. Loki to assert their dominance of us, their owners. The setting: our bedroom, closed door with Loki and us sleeping and Hades on their other side of the door, free range of the house. The time: way too early for this (5 or 6 am). Hades launches the first strike by clawing at the door and crying just right outside.&lt;/p&gt;
&lt;p&gt;Loki counters by running up to the door, curiously trying to figure out why his new roommate is crying. He foolishly tries to stick his paws under the door to offer assistance to his new roommate (bless his heart). I stare in horror and try to react to his friendly but foolish behavior but I know in my hearts of hearts that Hades is the type to fight in a flight-or-fight situation. His small, little chicken tender-like paws would not stand a chance against Hades.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/588b35b38ddebde90be36a3aee5baafe/ee25b/loki-couch.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 133.1081081081081%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAbABQDASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAECAwQF/8QAFQEBAQAAAAAAAAAAAAAAAAAAAQL/2gAMAwEAAhADEAAAAVRYxmXELz9DLREAf//EAB0QAAICAQUAAAAAAAAAAAAAAAECAAMRBBASITP/2gAIAQEAAQUCb0aCnq5So065exsPfTyIrCzAhh2//8QAFxEAAwEAAAAAAAAAAAAAAAAAAQIQIf/aAAgBAwEBPwFcEE//xAAXEQADAQAAAAAAAAAAAAAAAAABAhAh/9oACAECAQE/AW0wz//EABwQAQABBAMAAAAAAAAAAAAAAAERAAIQISBBYf/aAAgBAQAGPwJesbmatF3FHmJHl//EAB0QAAIDAAIDAAAAAAAAAAAAAAABESExEFFhcZH/2gAIAQEAAT8hSpTLWajfQlJ8hWGWgUzPmPYlROv33Y8mXI3aNRrj/9oADAMBAAIAAwAAABBw80z/xAAYEQACAwAAAAAAAAAAAAAAAAAAARARIf/aAAgBAwEBPxBMC5f/xAAYEQACAwAAAAAAAAAAAAAAAAAAARARIf/aAAgBAgEBPxBtCnL/xAAfEAEAAwABBAMAAAAAAAAAAAABABEhMRBRcZFBYaH/2gAIAQEAAT8Q4IULqLuByLLRyvxNQ0W1w+oZQEPe25+zTwbR+b4fcR7HId5q4Vt2niHytd3PURsC96iKtvrf/9k=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/588b35b38ddebde90be36a3aee5baafe/cbe2e/loki-couch.webp 148w,
/static/588b35b38ddebde90be36a3aee5baafe/3084c/loki-couch.webp 295w,
/static/588b35b38ddebde90be36a3aee5baafe/5ca24/loki-couch.webp 590w,
/static/588b35b38ddebde90be36a3aee5baafe/3440c/loki-couch.webp 759w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/588b35b38ddebde90be36a3aee5baafe/a80bd/loki-couch.jpg 148w,
/static/588b35b38ddebde90be36a3aee5baafe/1c91a/loki-couch.jpg 295w,
/static/588b35b38ddebde90be36a3aee5baafe/1c72d/loki-couch.jpg 590w,
/static/588b35b38ddebde90be36a3aee5baafe/ee25b/loki-couch.jpg 759w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/jpeg&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/588b35b38ddebde90be36a3aee5baafe/1c72d/loki-couch.jpg&quot;
            alt=&quot;Loki on the couch&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;No one is going to win this standoff (in actuality, Hades always wins), so I decide to sacrifice myself. I pull Loki off the door and open the door. Loki is going to stay in the room while I fend Hades off the closed door any way I can. I put the playpen tent in the way of the door to cover the area where Loki can put his paws through. It doesn’t work and Hades just uses her head to force her way past the tent and to the door. I needed to add weight to the tent to keep it’s place in front of the door.&lt;/p&gt;
&lt;p&gt;So next are pillows and other objects I find around the house. I’m tired and desparate. Hades is persistent and knows she will get her way eventually. It was basically an infinite loop of me placing another object in her way, she finds a way through or cries loudly enough that it did not make a difference, I scold her and go back to the couch to try to sleep and repeat. Eventually daylight breaks and the battle is won in favor of Hades.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/c1d59c53595412e0898592898830e626/80e3c/loki-jacket.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 177.7027027027027%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAkABQDASIAAhEBAxEB/8QAGQABAQADAQAAAAAAAAAAAAAAAAQBAgMF/8QAGAEAAwEBAAAAAAAAAAAAAAAAAQMEBQD/2gAMAwEAAhADEAAAAfK759AdKwrz1U28WlwQHI3pFOkBH//EAB0QAAICAgMBAAAAAAAAAAAAAAECAAMRIRITIjH/2gAIAQEAAQUCmwqHVWCXQNV8lVLELyI7VlFhEY4WGWHxP//EABoRAAICAwAAAAAAAAAAAAAAAAECABAREhP/2gAIAQMBAT8BRtVhGa4pf//EABoRAAICAwAAAAAAAAAAAAAAAAABAhAREyH/2gAIAQIBAT8BfXWTZIdf/8QAHhAAAQMEAwAAAAAAAAAAAAAAAAECERASQVEgMTL/2gAIAQEABj8CrOi5F6wYJQdckHggc7fH/8QAHhAAAwABBAMAAAAAAAAAAAAAAAERIRBBUXExYdH/2gAIAQEAAT8hdtQnGubRClvcWp2Qye2D2QKCFeyCxsKD4jGrZ34ZAkFGngfK0//aAAwDAQACAAMAAAAQDMxAhD//xAAcEQEAAQQDAAAAAAAAAAAAAAABABARITFRYaH/2gAIAQMBAT8QuKnMBLAE1idHrDVP/8QAGREBAAMBAQAAAAAAAAAAAAAAAQARYRAx/9oACAECAQE/EKCELCpYdmk9HP/EAB8QAQEAAgIBBQAAAAAAAAAAAAERACExQVFhcZGh4f/aAAgBAQABPxAMUo5GkWENsmXLEWWcJD2J6YmSI7EvW+94aAGtnjCik8SJ4p1iXQ5HQlifPOAYq7dbcsASN5fxjmcDR+srE3TffE6EWTIZ/9k=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/c1d59c53595412e0898592898830e626/cbe2e/loki-jacket.webp 148w,
/static/c1d59c53595412e0898592898830e626/3084c/loki-jacket.webp 295w,
/static/c1d59c53595412e0898592898830e626/5ca24/loki-jacket.webp 590w,
/static/c1d59c53595412e0898592898830e626/bc514/loki-jacket.webp 720w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/c1d59c53595412e0898592898830e626/a80bd/loki-jacket.jpg 148w,
/static/c1d59c53595412e0898592898830e626/1c91a/loki-jacket.jpg 295w,
/static/c1d59c53595412e0898592898830e626/1c72d/loki-jacket.jpg 590w,
/static/c1d59c53595412e0898592898830e626/80e3c/loki-jacket.jpg 720w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/jpeg&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/c1d59c53595412e0898592898830e626/1c72d/loki-jacket.jpg&quot;
            alt=&quot;loki wrapped in my jacket&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Loki goes back to his bathroom sanctuary and does not sleep with us in the room for another 2 months.&lt;/p&gt;
&lt;p&gt;So basically, those type of things happened in the house for Loki’s first few months. And those were just the troubles with just having to introduce Loki to Hades.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/8d8a65b47614041509102b8060fd9071/ee25b/loki-burrito.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 133.1081081081081%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAbABQDASIAAhEBAxEB/8QAGAABAQADAAAAAAAAAAAAAAAABAABAgP/xAAXAQEBAQEAAAAAAAAAAAAAAAAAAQID/9oADAMBAAIQAxAAAAHQ7uPPYpNZkLRUqPH/xAAdEAABBAIDAAAAAAAAAAAAAAABAAIDEQQhEBIT/9oACAEBAAEFAijxKae6NpPmFkSWg7YPZSnZG3Cl/8QAFBEBAAAAAAAAAAAAAAAAAAAAIP/aAAgBAwEBPwEf/8QAFBEBAAAAAAAAAAAAAAAAAAAAIP/aAAgBAgEBPwEf/8QAGRAAAwEBAQAAAAAAAAAAAAAAAAEREAIx/9oACAEBAAY/AtjSLVM8KXpiW//EABsQAQACAwEBAAAAAAAAAAAAAAEAESExUYEQ/9oACAEBAAE/IYfzTlDILi4GZF9i7FLxKcHkoYLy2JyEKQRXOz//2gAMAwEAAgADAAAAENjhc//EABkRAAIDAQAAAAAAAAAAAAAAAAABEBEhQf/aAAgBAwEBPxBuK6Yf/8QAFhEBAQEAAAAAAAAAAAAAAAAAEQAQ/9oACAECAQE/ECN//8QAHRABAQACAgMBAAAAAAAAAAAAAREAITFhQVFx0f/aAAgBAQABPxAZK3FrjsJU3xOv3GRbkDfzJRP2RcHEBCeJ0+fuAdCeDpwohOAUPWse5JAENYRgalmGNgldu8//2Q==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/8d8a65b47614041509102b8060fd9071/cbe2e/loki-burrito.webp 148w,
/static/8d8a65b47614041509102b8060fd9071/3084c/loki-burrito.webp 295w,
/static/8d8a65b47614041509102b8060fd9071/5ca24/loki-burrito.webp 590w,
/static/8d8a65b47614041509102b8060fd9071/3440c/loki-burrito.webp 759w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/8d8a65b47614041509102b8060fd9071/a80bd/loki-burrito.jpg 148w,
/static/8d8a65b47614041509102b8060fd9071/1c91a/loki-burrito.jpg 295w,
/static/8d8a65b47614041509102b8060fd9071/1c72d/loki-burrito.jpg 590w,
/static/8d8a65b47614041509102b8060fd9071/ee25b/loki-burrito.jpg 759w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/jpeg&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/8d8a65b47614041509102b8060fd9071/1c72d/loki-burrito.jpg&quot;
            alt=&quot;loki as a purrito&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In his first week with us, we actually had to bring the little guy to the pet ER. At the time, I was working from home so I could watch over him. It was just any other day to me and I had noticed that he was not his playful self when I went in to his safe haven in the bathroom. No running around, he did not want to eat or drink anything. He was just huddled in a corner and just looked relatively faint.&lt;/p&gt;
&lt;p&gt;I was quite fearful that the new changes in his environment (new home) caused this reaction and was super grateful that on that day, I already set up an appointment with a vet to just check him out.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/e8babf4c7fa72a272598d91f959e7096/ee25b/loki-carrot.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 133.1081081081081%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAbABQDASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAMBAgQF/8QAFgEBAQEAAAAAAAAAAAAAAAAAAQIA/9oADAMBAAIQAxAAAAGWNBYVKmM+Bw6DnBv/xAAcEAACAwEAAwAAAAAAAAAAAAABAgADEhEhIzL/2gAIAQEAAQUCqqRR9Phpcvsrsm4X1C3nUpJ5GJ7/AP/EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQMBAT8BH//EABYRAAMAAAAAAAAAAAAAAAAAAAAQEf/aAAgBAgEBPwF0/8QAHRAAAgEEAwAAAAAAAAAAAAAAAAExAhAREiIyQf/aAAgBAQAGPwJbdjiiEZU4IwyTdQ71LxX/AP/EABsQAQADAAMBAAAAAAAAAAAAAAEAESExQXFR/9oACAEBAAE/IQwlfs8oK3IARVFNNzB4pXkWsCnDg8ga7lJuumEVljs//9oADAMBAAIAAwAAABBgFY//xAAXEQEBAQEAAAAAAAAAAAAAAAAAEQEx/9oACAEDAQE/EN5V1Ef/xAAYEQADAQEAAAAAAAAAAAAAAAAAAREhEP/aAAgBAgEBPxBLdIi8f//EAB4QAQACAgIDAQAAAAAAAAAAAAEAESExYYFBUXGh/9oACAEBAAE/EKSkLM3hrv8AJd9qJBy5IXGzzlmDEqO3LUYRKCH08cy6KO5rQNXaNPeWaqUEH0T7TMGhwXGGWCAYfZ//2Q==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/e8babf4c7fa72a272598d91f959e7096/cbe2e/loki-carrot.webp 148w,
/static/e8babf4c7fa72a272598d91f959e7096/3084c/loki-carrot.webp 295w,
/static/e8babf4c7fa72a272598d91f959e7096/5ca24/loki-carrot.webp 590w,
/static/e8babf4c7fa72a272598d91f959e7096/3440c/loki-carrot.webp 759w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/e8babf4c7fa72a272598d91f959e7096/a80bd/loki-carrot.jpg 148w,
/static/e8babf4c7fa72a272598d91f959e7096/1c91a/loki-carrot.jpg 295w,
/static/e8babf4c7fa72a272598d91f959e7096/1c72d/loki-carrot.jpg 590w,
/static/e8babf4c7fa72a272598d91f959e7096/ee25b/loki-carrot.jpg 759w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/jpeg&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/e8babf4c7fa72a272598d91f959e7096/1c72d/loki-carrot.jpg&quot;
            alt=&quot;Loki with his carrot toy in the tent&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I took Loki in and they discovered he had a fever and told me that fevers in kittens and young cats can turn dangerous if left unnoticed and untreated. He had to be admitted to the pet hospital for IV fluid to keep him hydrated and to monitor him. This particular hospital did not have an overnight staff so we had to pick him up and bring him to an overnight pet hospital for extra IV fluids and monitoring because he was still not stable when we picked him up at the end of the day.&lt;/p&gt;
&lt;p&gt;That sleep the night Loki stayed overnight at the pet hospital was not a pleasant one. I readied himself for bad news but I was hopeful because as I can tell from the past few days with Loki, he was a fighter. We got the good news at like 7am the next day that we was stable and ready for pick up. They still told us to go back to his regular care provider for a quick check up and when we got there, they told us he should still be held for a bit longer and more IVs just in case.&lt;/p&gt;
&lt;p&gt;In the end, he was discharged with a clean bill of health but the whole episode was soooo stressful and also soooo expensive. I am just very glad and grateful that I was working from home at that time and had that appointment on the day he fell sick. Not sure how it would have turned out otherwise.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/a4292a54934cf96d27a9c4d0dedd2570/ee25b/loki-vet.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 133.1081081081081%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAbABQDASIAAhEBAxEB/8QAGAAAAwEBAAAAAAAAAAAAAAAAAAQFAQP/xAAVAQEBAAAAAAAAAAAAAAAAAAAAAf/aAAwDAQACEAMQAAABVVxuVklBQoSuQ4Jh/8QAHhAAAwACAQUAAAAAAAAAAAAAAQIDABEEEBITITP/2gAIAQEAAQUCvVu5QC3jXH+q+sooDyMlqb8fHM2NRp9dP//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQMBAT8BH//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQIBAT8BH//EAB4QAAICAQUBAAAAAAAAAAAAAAABESECAxIgMXEi/9oACAEBAAY/AtmL6MZZ85tL0folFFdGT1Zkqya4f//EABwQAQADAAMBAQAAAAAAAAAAAAEAESExQYFx4f/aAAgBAQABPyHXwcq7jRdYrsv8sTvXlQgUvaMj5TmwMyyfkKlBB9gKBKPUCf/aAAwDAQACAAMAAAAQoMUC/8QAFxEAAwEAAAAAAAAAAAAAAAAAAAEREP/aAAgBAwEBPxBKl3//xAAYEQADAQEAAAAAAAAAAAAAAAAAAREhYf/aAAgBAgEBPxBuE6LSH//EAB4QAQACAgEFAAAAAAAAAAAAAAEAESFBMVFhcZGh/9oACAEBAAE/EGMzUlTht7ELETrxS6L6wAPhWiaaEFkdz3mS1UWQ6hfLTqEpUlaqj7K2iqrOUcj3DlCBnG5//9k=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/a4292a54934cf96d27a9c4d0dedd2570/cbe2e/loki-vet.webp 148w,
/static/a4292a54934cf96d27a9c4d0dedd2570/3084c/loki-vet.webp 295w,
/static/a4292a54934cf96d27a9c4d0dedd2570/5ca24/loki-vet.webp 590w,
/static/a4292a54934cf96d27a9c4d0dedd2570/3440c/loki-vet.webp 759w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/a4292a54934cf96d27a9c4d0dedd2570/a80bd/loki-vet.jpg 148w,
/static/a4292a54934cf96d27a9c4d0dedd2570/1c91a/loki-vet.jpg 295w,
/static/a4292a54934cf96d27a9c4d0dedd2570/1c72d/loki-vet.jpg 590w,
/static/a4292a54934cf96d27a9c4d0dedd2570/ee25b/loki-vet.jpg 759w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/jpeg&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/a4292a54934cf96d27a9c4d0dedd2570/1c72d/loki-vet.jpg&quot;
            alt=&quot;Loki at the vet&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;That really does not tell the whole troublesome story of Loki though. I will end with this last story that can sum up how much of a troublemaker we have on our hands.&lt;/p&gt;
&lt;p&gt;It was in the dead of night, probably around midnight or 1 am. All the lights were off and I was just surfing the web on the couch in the darkness. Behind our couch, was a huge mirror. About 8 ft tall and 3 ft wide with about a 3 inch thickness for a base and it was a heavy mirror. To hold up such a mirror, we just leaned it against the wall and used a 35 lb dumbbell to keep it from moving.&lt;/p&gt;
&lt;p&gt;We also saw Loki running behind the mirror from time to time to hide or just because cats like small enclosed spaces but we never thought nothing of it because he was small.&lt;/p&gt;
&lt;p&gt;And that’s when we were wrong.&lt;/p&gt;
&lt;p&gt;I am not sure how but in the dead of night with the lights off and me just minding my own business, I hear the mirror slowly tip over the dumbbell and then and super loud bang and smash on the floor. Glass flung everywhere. I jump out of my seat and fumble around for my flashlight on my cell phone. I at once have to confirm that Loki is not under the glass. I go and fetch some towels to lift the glass up at once while yelling for my wife to get up and help.&lt;/p&gt;
&lt;p&gt;The whole time I was dumbfounded. My mind was racing thinking about Loki’s shortlived life with us.&lt;/p&gt;
&lt;p&gt;Fortunately, he was not under the mirror but my next thought was how. Just how did a 5 lb kitty cat push over a giant mirror like that?&lt;/p&gt;
&lt;p&gt;He’s trouble for sure but we are glad to have him.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Music I'm Listening To (April 2019)]]></title><description><![CDATA[Albums on repeat in April 2019, including Anderson .Paak, Little Simz, PNTHN, Anonymuz, Ta-ku, and Alina Baraz, plus a few loose singles worth checking out.]]></description><link>https://www.vietnguyen.site/recent-music-ive-listened-to-Apr-2019/</link><guid isPermaLink="false">https://www.vietnguyen.site/recent-music-ive-listened-to-Apr-2019/</guid><pubDate>Mon, 29 Apr 2019 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;em&gt;I will list the albums I am listening to and then dive into which songs stand out to me.&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;Anderson .Paak - Ventura&lt;/h3&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 100%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAUABQDASIAAhEBAxEB/8QAGAABAAMBAAAAAAAAAAAAAAAAAAEDBQL/xAAVAQEBAAAAAAAAAAAAAAAAAAAAAf/aAAwDAQACEAMQAAAB3OaaI0UiAAf/xAAaEAACAgMAAAAAAAAAAAAAAAABAgADEBIg/9oACAEBAAEFAiQJuuLgzRaircf/xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAEDAQE/AR//xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAECAQE/AR//xAAbEAABBAMAAAAAAAAAAAAAAAABAAIhgRARIP/aAAgBAQAGPwKcgNtRu+f/xAAcEAACAQUBAAAAAAAAAAAAAAABEQAQICExYaH/2gAIAQEAAT8hWtudvKDnRlkowNBItf/aAAwDAQACAAMAAAAQ9x99/8QAFBEBAAAAAAAAAAAAAAAAAAAAIP/aAAgBAwEBPxAf/8QAFBEBAAAAAAAAAAAAAAAAAAAAIP/aAAgBAgEBPxAf/8QAHRABAQACAQUAAAAAAAAAAAAAAREAIWEgQVFxgf/aAAgBAQABPxAVQFDlzRbntg0Eu/OPsOpChO3OL0ugAgfen//Z&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/711b106794abd49f4ec4fe0717ceac25/cbe2e/ventura.webp 148w,
/static/711b106794abd49f4ec4fe0717ceac25/3084c/ventura.webp 295w,
/static/711b106794abd49f4ec4fe0717ceac25/5ca24/ventura.webp 590w,
/static/711b106794abd49f4ec4fe0717ceac25/dad35/ventura.webp 885w,
/static/711b106794abd49f4ec4fe0717ceac25/a5d4d/ventura.webp 1000w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/711b106794abd49f4ec4fe0717ceac25/a80bd/ventura.jpg 148w,
/static/711b106794abd49f4ec4fe0717ceac25/1c91a/ventura.jpg 295w,
/static/711b106794abd49f4ec4fe0717ceac25/1c72d/ventura.jpg 590w,
/static/711b106794abd49f4ec4fe0717ceac25/a8a14/ventura.jpg 885w,
/static/711b106794abd49f4ec4fe0717ceac25/a2510/ventura.jpg 1000w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/jpeg&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/711b106794abd49f4ec4fe0717ceac25/1c72d/ventura.jpg&quot;
            alt=&quot;Ventura album cover by Anderson .Paak&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
    &lt;/span&gt;
&lt;a href=&quot;https://www.youtube.com/watch?v=hEdBe04dwms&quot;&gt;Listen&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Standout Tracks - &lt;code class=&quot;language-text&quot;&gt;Come Home&lt;/code&gt;, &lt;code class=&quot;language-text&quot;&gt;Winner&apos;s Circle&lt;/code&gt;, &lt;code class=&quot;language-text&quot;&gt;Jet Black&lt;/code&gt;, &lt;code class=&quot;language-text&quot;&gt;Twilight&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;If you want an easy listening album filled with soul, funk, jazz and R n B, Anderson .Paak got you. Some tracks will even make you sing along or get up out your to groove to.&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;Come Home&lt;/code&gt; is the first track of the album and definitely sets the whole album up with a lush opening filled with a harmony of piano and background vocals and then when Anderson finally comes in, his crooning is offset with some light guitar and bass (my music terminology sucks lol). The opening song also comes with a feature from the great feature-killer Andre 3000. It warrants a listen just from his presence alone.&lt;/p&gt;
&lt;p&gt;My other favorite track is &lt;code class=&quot;language-text&quot;&gt;Winner&apos;s Circle&lt;/code&gt;. It starts with a great quote (not sure where it comes from) and I usually don’t like these type of interjections in music but it works. I really like the production on this track and super love the scat-scat (right term, I hope) in the chorus. Since this album dropped, I been trying to get the scatting to mimic but always fail when I get back to listening to this track.&lt;/p&gt;
&lt;p&gt;As I was looking through the producing credits, I saw that &lt;code class=&quot;language-text&quot;&gt;Winner&apos;s Circle&lt;/code&gt; was co-produced by &lt;a href=&quot;https://www.allmusic.com/artist/vicky-farewell-nguyen-mn0003472723&quot;&gt;Vicky Farewell Nguyen&lt;/a&gt;. Though I do not know her, I think it is super awesome that there is a Vietnamese producer out there and I will now start following her work closely.&lt;/p&gt;
&lt;h3&gt;Little Simz - GREY Area&lt;/h3&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 100%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAUABQDASIAAhEBAxEB/8QAGAABAAMBAAAAAAAAAAAAAAAAAAECAwX/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIQAxAAAAHgzfUyBWQ2B//EABkQAAIDAQAAAAAAAAAAAAAAAAEQABESAv/aAAgBAQABBQJAXBmd4pUv/8QAFBEBAAAAAAAAAAAAAAAAAAAAIP/aAAgBAwEBPwEf/8QAFBEBAAAAAAAAAAAAAAAAAAAAIP/aAAgBAgEBPwEf/8QAGxAAAQQDAAAAAAAAAAAAAAAAAAEQIDEhIqH/2gAIAQEABj8CazJqvIUf/8QAGhABAQEBAAMAAAAAAAAAAAAAAQAhERAxQf/aAAgBAQABPyG+QD0LY5bjrc0YaeALPMxf/9oADAMBAAIAAwAAABBTDzz/xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAEDAQE/EB//xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAECAQE/EB//xAAcEAEAAgIDAQAAAAAAAAAAAAABABEhUTFBYaH/2gAIAQEAAT8QHycWpl1U9jHRwnKOGMRdUqM+OoEHjwhBY2XqAgAo25+z/9k=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/24f2af9f4a20f965832730608f42e8ac/cbe2e/greyarea.webp 148w,
/static/24f2af9f4a20f965832730608f42e8ac/3084c/greyarea.webp 295w,
/static/24f2af9f4a20f965832730608f42e8ac/5ca24/greyarea.webp 590w,
/static/24f2af9f4a20f965832730608f42e8ac/dad35/greyarea.webp 885w,
/static/24f2af9f4a20f965832730608f42e8ac/2baf0/greyarea.webp 1180w,
/static/24f2af9f4a20f965832730608f42e8ac/92f8c/greyarea.webp 1200w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/24f2af9f4a20f965832730608f42e8ac/a80bd/greyarea.jpg 148w,
/static/24f2af9f4a20f965832730608f42e8ac/1c91a/greyarea.jpg 295w,
/static/24f2af9f4a20f965832730608f42e8ac/1c72d/greyarea.jpg 590w,
/static/24f2af9f4a20f965832730608f42e8ac/a8a14/greyarea.jpg 885w,
/static/24f2af9f4a20f965832730608f42e8ac/fbd2c/greyarea.jpg 1180w,
/static/24f2af9f4a20f965832730608f42e8ac/e5166/greyarea.jpg 1200w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/jpeg&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/24f2af9f4a20f965832730608f42e8ac/1c72d/greyarea.jpg&quot;
            alt=&quot;GREY Area album cover by Little Simz&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
    &lt;/span&gt;
&lt;a href=&quot;https://www.youtube.com/watch?v=iSSKDIcpdSE&quot;&gt;Listen&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Standout Tracks - &lt;code class=&quot;language-text&quot;&gt;Selfish&lt;/code&gt;, &lt;code class=&quot;language-text&quot;&gt;Venom&lt;/code&gt;, &lt;code class=&quot;language-text&quot;&gt;Pressure&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;First time listening to a female MC from UK but she blew me away with this album.&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;Selfish&lt;/code&gt; was my first introduction and it hooked me. The simple drum and bass beat layered with soft piano and the chorus really drew me in.&lt;/p&gt;
&lt;p&gt;I think &lt;code class=&quot;language-text&quot;&gt;Venom&lt;/code&gt; is a clearer introduction to who Little Simz is as an artist. She has bars and a nasty flow on this track. A menacing violin starts the track off while Little Simz just launches into a tirade against her non-believers. When the drums finally drop, it sounds like this song could fit right into the semi-recent Marvel movie of the same name as this track.&lt;/p&gt;
&lt;h3&gt;PNTHN - Potluck&lt;/h3&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 100%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAUABQDASIAAhEBAxEB/8QAGQABAAIDAAAAAAAAAAAAAAAAAAMFAQIE/8QAGAEBAAMBAAAAAAAAAAAAAAAAAAECAwT/2gAMAwEAAhADEAAAAYumukZTK5KzwX5dAf/EABsQAAMAAgMAAAAAAAAAAAAAAAABAhESAxAh/9oACAEBAAEFAotD0Q+SE5nJXnbWTST/xAAaEQACAgMAAAAAAAAAAAAAAAAAAQISEyFR/9oACAEDAQE/AaRMUR6ZZ9P/xAAWEQEBAQAAAAAAAAAAAAAAAAARABD/2gAIAQIBAT8BZ3//xAAbEAABBAMAAAAAAAAAAAAAAAABABAhMQIRIv/aAAgBAQAGPwLqlGWw5AeVS//EABwQAAICAgMAAAAAAAAAAAAAAAERACEQMWGhsf/aAAgBAQABPyEsglyUEjZdRYEYRoQbqvcg0PH/AP/aAAwDAQACAAMAAAAQC899/8QAGhEAAgIDAAAAAAAAAAAAAAAAAAEQITFhkf/aAAgBAwEBPxBuwontVG90/8QAFxEAAwEAAAAAAAAAAAAAAAAAAAERIf/aAAgBAgEBPxC0WLURH//EABwQAQADAAIDAAAAAAAAAAAAAAEAESExkUFh0f/aAAgBAQABPxAA2wGE+wLQV2dLlQHDaCbKlunma64WsPMGD1Qnqds//9k=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/3d59a2a6373beb1350fcb2461b4cb69d/cbe2e/potluck.webp 148w,
/static/3d59a2a6373beb1350fcb2461b4cb69d/3084c/potluck.webp 295w,
/static/3d59a2a6373beb1350fcb2461b4cb69d/5ca24/potluck.webp 590w,
/static/3d59a2a6373beb1350fcb2461b4cb69d/426ac/potluck.webp 700w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/3d59a2a6373beb1350fcb2461b4cb69d/a80bd/potluck.jpg 148w,
/static/3d59a2a6373beb1350fcb2461b4cb69d/1c91a/potluck.jpg 295w,
/static/3d59a2a6373beb1350fcb2461b4cb69d/1c72d/potluck.jpg 590w,
/static/3d59a2a6373beb1350fcb2461b4cb69d/29d31/potluck.jpg 700w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/jpeg&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/3d59a2a6373beb1350fcb2461b4cb69d/1c72d/potluck.jpg&quot;
            alt=&quot;Potluck album cover by PNTHN&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
    &lt;/span&gt;
&lt;a href=&quot;https://www.youtube.com/watch?v=pfmGxpNwtMs&quot;&gt;Listen&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Standout Tracks - &lt;code class=&quot;language-text&quot;&gt;CHUMBUCKET&lt;/code&gt;, &lt;code class=&quot;language-text&quot;&gt;CHROME&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Pronounced ‘pantheon’, I stumbled upon this 8 man group and immediately took to their sound. Imagine Bun B’s, Chamillionaire’s, or Paul Wall’s sound brought to this era of innovation. The Potluck EP actually sounds like they took Rich Boy’s “Throw Some D’s” and extended its infectious sound into six songs.&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;CHUMBUCKET&lt;/code&gt; is a great introduction to this group and even samples Bun B in the beginning and the beat is so smooth. The members take turns flowing and really bringing back old 2008 vibes with each bar. I am looking forward to what PNTHN has in store for the future.&lt;/p&gt;
&lt;h3&gt;Anonymuz - There is No Threat&lt;/h3&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 500px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 100%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAUABQDASIAAhEBAxEB/8QAGAABAAMBAAAAAAAAAAAAAAAAAAECAwT/xAAWAQEBAQAAAAAAAAAAAAAAAAABAgD/2gAMAwEAAhADEAAAAcOGaJLVm8EvELn/xAAZEAADAQEBAAAAAAAAAAAAAAABAhEAEgP/2gAIAQEAAQUCecUUdHFt5isnUU1fRQjb/8QAFBEBAAAAAAAAAAAAAAAAAAAAIP/aAAgBAwEBPwEf/8QAFREBAQAAAAAAAAAAAAAAAAAAEEH/2gAIAQIBAT8BKf/EABsQAAIDAAMAAAAAAAAAAAAAAAABEBEhEjFh/9oACAEBAAY/AozTwwykcaXY0o//xAAcEAACAwADAQAAAAAAAAAAAAAAAREhMUFRYaH/2gAIAQEAAT8h8Rg0S9GnaJLeuDGXwnYm9U9kY3uiycHF9G2nHR//2gAMAwEAAgADAAAAENTAff/EABgRAAIDAAAAAAAAAAAAAAAAAAABEBFB/9oACAEDAQE/ECmZH//EABcRAAMBAAAAAAAAAAAAAAAAAAABERD/2gAIAQIBAT8QhULH/8QAHhABAAICAgMBAAAAAAAAAAAAAQARITFRgUFhkbH/2gAIAQEAAT8QsKjcb8SkLW8D65hiINeD9iguUaDutnrcBhbLwFP2X+ZMY2/euoBQKYwZMCNrmg2X1HAWlQcT/9k=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/a3802f79898b815ad9776981453e029b/cbe2e/tint.webp 148w,
/static/a3802f79898b815ad9776981453e029b/3084c/tint.webp 295w,
/static/a3802f79898b815ad9776981453e029b/b0a15/tint.webp 500w&quot;
              sizes=&quot;(max-width: 500px) 100vw, 500px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/a3802f79898b815ad9776981453e029b/a80bd/tint.jpg 148w,
/static/a3802f79898b815ad9776981453e029b/1c91a/tint.jpg 295w,
/static/a3802f79898b815ad9776981453e029b/41099/tint.jpg 500w&quot;
            sizes=&quot;(max-width: 500px) 100vw, 500px&quot;
            type=&quot;image/jpeg&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/a3802f79898b815ad9776981453e029b/41099/tint.jpg&quot;
            alt=&quot;There Is No Threat album cover by Anonymuz&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
    &lt;/span&gt;
&lt;a href=&quot;https://www.youtube.com/watch?v=Uo4B4cZlzDo&quot;&gt;Listen&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Standout Tracks - &lt;code class=&quot;language-text&quot;&gt;Sun Down&lt;/code&gt;, &lt;code class=&quot;language-text&quot;&gt;Feel So Good Pt2&lt;/code&gt;, &lt;code class=&quot;language-text&quot;&gt;Smoke&lt;/code&gt;, &lt;code class=&quot;language-text&quot;&gt;Rxdical Forever&lt;/code&gt;, &lt;code class=&quot;language-text&quot;&gt;No Threat&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;I first found out about Anonymuz when he released an EP and it was called Urameshi and had Yusuke on the cover (from the anime, Yu Yu Hakusho). Instantly intrigued. To my surprise, the music was just as good as the anime that it was using, really good.&lt;/p&gt;
&lt;p&gt;This latest EP features excellent production and a lyrical prowess that I really enjoy. &lt;code class=&quot;language-text&quot;&gt;Feel So Good Pt2&lt;/code&gt; actually has Anonymuz trying his hand at some crooning.&lt;/p&gt;
&lt;p&gt;This EP is one where you can listen from front to back and will not find a bad song and I encourage everyone to give Anonymuz a listen.&lt;/p&gt;
&lt;h3&gt;Ta-ku - 25 Nights for Nujabes&lt;/h3&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 100%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAUABQDASIAAhEBAxEB/8QAGAABAQEBAQAAAAAAAAAAAAAAAAUEAQP/xAAVAQEBAAAAAAAAAAAAAAAAAAABAP/aAAwDAQACEAMQAAABmZLckvJw1LKRnA//xAAcEAABBQADAAAAAAAAAAAAAAACAAEDEhMQISP/2gAIAQEAAQUCqbR8QCWRt2mnLK3iv//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQMBAT8BH//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQIBAT8BH//EABwQAAEEAwEAAAAAAAAAAAAAABEAAQISECExQf/aAAgBAQAGPwKwiNLi4oSOrsj4cV0AE7DH/8QAHhABAAEEAgMAAAAAAAAAAAAAAQARITFBYfEQkdH/2gAIAQEAAT8hSa7ivfqOcCLwJXTajoO4w9iD3GX+L4oOpDfOzx//2gAMAwEAAgADAAAAEFvIQv/EABURAQEAAAAAAAAAAAAAAAAAABAB/9oACAEDAQE/ECH/xAAWEQEBAQAAAAAAAAAAAAAAAAABEBH/2gAIAQIBAT8QNjP/xAAdEAEBAAICAwEAAAAAAAAAAAABEQAhMZFBobHh/9oACAEBAAE/EG0pAFKGfWF3aNzcy76RlAgGSVEe8PY6FP1nLHmmdhqDDzyTGQEUY7Es35mLXP/Z&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/2885ca0891ad50a9218b821e7faad5b2/cbe2e/taku.webp 148w,
/static/2885ca0891ad50a9218b821e7faad5b2/3084c/taku.webp 295w,
/static/2885ca0891ad50a9218b821e7faad5b2/5ca24/taku.webp 590w,
/static/2885ca0891ad50a9218b821e7faad5b2/426ac/taku.webp 700w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/2885ca0891ad50a9218b821e7faad5b2/a80bd/taku.jpg 148w,
/static/2885ca0891ad50a9218b821e7faad5b2/1c91a/taku.jpg 295w,
/static/2885ca0891ad50a9218b821e7faad5b2/1c72d/taku.jpg 590w,
/static/2885ca0891ad50a9218b821e7faad5b2/29d31/taku.jpg 700w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/jpeg&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/2885ca0891ad50a9218b821e7faad5b2/1c72d/taku.jpg&quot;
            alt=&quot;25 Nights for Nujabes album cover by Ta-ku&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
    &lt;/span&gt;
&lt;a href=&quot;https://www.youtube.com/watch?v=5Fp1viiRJnw&amp;#x26;t=588s&quot;&gt;Listen&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Producer Ta-ku does some good work and is a master of atmospheric and moody backdrops for artist to sing/rap to. This compilation/tribute to Nujabes has got me through many a day at work or late at night when I am doing some writing or coding.&lt;/p&gt;
&lt;h3&gt;Alina Baraz - Urban Flora&lt;/h3&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 100%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAUABQDASIAAhEBAxEB/8QAGAABAQEBAQAAAAAAAAAAAAAAAAQCAwH/xAAWAQEBAQAAAAAAAAAAAAAAAAABAAL/2gAMAwEAAhADEAAAAbZapS8did8mXQr/xAAZEAADAQEBAAAAAAAAAAAAAAAAARECECH/2gAIAQEAAQUCLePxZdIMWUuf/8QAFBEBAAAAAAAAAAAAAAAAAAAAIP/aAAgBAwEBPwEf/8QAFBEBAAAAAAAAAAAAAAAAAAAAIP/aAAgBAgEBPwEf/8QAGhAAAgIDAAAAAAAAAAAAAAAAAAEQESAhMf/aAAgBAQAGPwKXZpHMP//EABoQAQEBAQADAAAAAAAAAAAAAAEAESEQYYH/2gAIAQEAAT8hYW9LJCuOQe3bg0yQ0A+eP//aAAwDAQACAAMAAAAQoBi8/8QAFBEBAAAAAAAAAAAAAAAAAAAAIP/aAAgBAwEBPxAf/8QAFxEAAwEAAAAAAAAAAAAAAAAAAAEQEf/aAAgBAgEBPxBG3//EABoQAQACAwEAAAAAAAAAAAAAAAEAERAhMVH/2gAIAQEAAT8Qr1iCABoRsSO+oJ9C1+S3btdWAJ3EFlx7Lcz0Bj//2Q==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/8a70e37c11271124494f2161d3134e0c/cbe2e/urbanflora.webp 148w,
/static/8a70e37c11271124494f2161d3134e0c/3084c/urbanflora.webp 295w,
/static/8a70e37c11271124494f2161d3134e0c/5ca24/urbanflora.webp 590w,
/static/8a70e37c11271124494f2161d3134e0c/0ba47/urbanflora.webp 640w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/8a70e37c11271124494f2161d3134e0c/a80bd/urbanflora.jpg 148w,
/static/8a70e37c11271124494f2161d3134e0c/1c91a/urbanflora.jpg 295w,
/static/8a70e37c11271124494f2161d3134e0c/1c72d/urbanflora.jpg 590w,
/static/8a70e37c11271124494f2161d3134e0c/c08c5/urbanflora.jpg 640w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/jpeg&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/8a70e37c11271124494f2161d3134e0c/1c72d/urbanflora.jpg&quot;
            alt=&quot;Urban Flora album cover by Alina Baraz&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
    &lt;/span&gt;
&lt;a href=&quot;https://www.youtube.com/watch?v=CCYjEU4pglg&quot;&gt;Listen&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Standout Tracks - &lt;code class=&quot;language-text&quot;&gt;Show Me&lt;/code&gt;, &lt;code class=&quot;language-text&quot;&gt;Pretty Thoughts&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Before Alina was on her breakout hit &lt;code class=&quot;language-text&quot;&gt;Electric&lt;/code&gt; with Khalid, I found her with this EP and was mesmerized by the spacey production and her excellent vocals that accompany. Each song feels like you are just floating through.&lt;/p&gt;
&lt;h3&gt;Loosies&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Single songs that I just happened upon, no album or EP accompanied.&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Billie Eilish - bad guy&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=DyDfgMOUjCI&quot;&gt;Listen&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I like this song. Beat makes me move. Singing is not bad (can it be called singing on this one?). Song was stuck in my head for a little while so I keep on coming back.&lt;/p&gt;
&lt;h4&gt;Joey Bada$$ - TEMPTATION&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=75rKK3xyoHM&quot;&gt;Listen&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Joey really surprised me with this one as most of his previous offerings was 90s boom-bap NY hip-hop. This one is more soulful and feels impactful. Also very catchy guitar riffs and hook.&lt;/p&gt;
&lt;h4&gt;Masayuki Suzuki - Love Dramatic ft. Rikka Ihara&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=HOSJLXTz2uQ&quot;&gt;Listen&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Way out of left field, I know. This J-pop (not even sure if this categorizes as such) song is so catchy that I just randomly start blurting out ‘Love is War, love is war, love is war’ at odd times when I am alone. It feels so oldies but it really works for me.&lt;/p&gt;
&lt;h4&gt;Vince Staples - Big Fish&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=0l9kzS_B7gg&quot;&gt;Listen&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Back to your regular scheduled music, you really feel the west coast on this song. A hook that you can just scream to your boss when you are feeling it. A bass line that can rattle a few trunks. It’s perfect.&lt;/p&gt;
&lt;h4&gt;Jaden Smith - B , L , U , E&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=6aBhu3AfOiM&quot;&gt;Listen&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is probably going to be the only time I recommend a Jaden Smith listen because he really blew me away with this one.&lt;/p&gt;
&lt;p&gt;It’s actually four tracks but I am going to treat them as one because the tracks have continuity. The lyrics are very subpar (almost kills the vibe) but the musicality, melody, harmony and production value just outclasses any thing he does.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Getting Started with TypeScript and NextJs]]></title><description><![CDATA[My notes on adding TypeScript to a React and Next.js app: variable types, interfaces, tuples, async functions, and the configuration files that make it work.]]></description><link>https://www.vietnguyen.site/getting-started-with-typescript-and-nextjs/</link><guid isPermaLink="false">https://www.vietnguyen.site/getting-started-with-typescript-and-nextjs/</guid><pubDate>Tue, 23 Apr 2019 00:00:00 GMT</pubDate><content:encoded>&lt;blockquote&gt;
&lt;p&gt;TL;DR I am an amateur when it comes to type systems as I came from a JavaScript and PHP background, so this new must-type-everything-before-running is tedious and new to me. Learned a few things and made a small guide to Typescript as it pertains to writing React code.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So I was always curious about TypeScript and I wanted to make something with it to see all the gains I can make to my coding if I were to add it in to a project. Typescript is a typed superset of Javascript and it compiles to plain Javascript. So prior knowledge of Javascript is required, first and foremost.&lt;/p&gt;
&lt;p&gt;On top of the javascript that you are coding, you have to declare a type for everything. At first, this was super tedious to me. Things like:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;js&quot;&gt;&lt;pre class=&quot;language-js&quot;&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; str &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;hello world&apos;&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; num &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;8&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; isClicked &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;true&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; dontWantToType &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;whatever&apos;&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; things &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;ball&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;string&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;wool&apos;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; numList &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;4&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; notSameThings &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;ball&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;true&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; obj &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token literal-property property&quot;&gt;stuff&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;stuff&apos;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;token function-variable function&quot;&gt;doThis&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;things&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;calculateStuff&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt; things&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;turn into&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;js&quot;&gt;&lt;pre class=&quot;language-js&quot;&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;token literal-property property&quot;&gt;str&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt;string &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;hello world&apos;&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;token literal-property property&quot;&gt;num&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt;number &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;8&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;token literal-property property&quot;&gt;isClicked&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt;boolean &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;true&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;token literal-property property&quot;&gt;dontWantToType&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt;any &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;whatever&apos;&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;token literal-property property&quot;&gt;things&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt;string&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;ball&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;string&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;wool&apos;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;token literal-property property&quot;&gt;numList&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt;number&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;4&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;token literal-property property&quot;&gt;notSameThings&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;string&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; number&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; boolean&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;ball&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;true&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;token literal-property property&quot;&gt;obj&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt;object &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token literal-property property&quot;&gt;stuff&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;stuff&apos;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; doThis &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;things&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt;string&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;string&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;calculateStuff&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt; things&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;TypeScript won’t yell at you for missing a type declaration though (unless you made your IDE yell at you). No type declaration means no type checking and all the good stuff Typescript comes with so it would benefit you to type everything.&lt;/p&gt;
&lt;p&gt;Some of the type declarations are pretty straightforward for your variable declarations. Basically, after declaring the variable you just follow the variable name with a colon and the type that the variable is going to be.&lt;/p&gt;
&lt;p&gt;The &lt;code class=&quot;language-text&quot;&gt;any&lt;/code&gt; type is your get-out-of-jail-free card but you should only use it if you have no idea what the type is going to be. This is probably the type you will be using the most if adding TypeScript to an existing project (for API requests and the like).&lt;/p&gt;
&lt;p&gt;The &lt;code class=&quot;language-text&quot;&gt;notSameThings&lt;/code&gt; variable is typed as a Tuple. A tuple type is a way to type an array that has a fixed number of elements that are all not the same type.&lt;/p&gt;
&lt;p&gt;For functions, if there are arguments, you have to declare a type for each argument. If the argument returns a value, you also have to declare a type for the return value.&lt;/p&gt;
&lt;p&gt;If you have a long list of arguments, it can become too cumbersome to declare types. You can use interfaces for that. Interfaces are like objects that declare types for multiple things. For instance:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;js&quot;&gt;&lt;pre class=&quot;language-js&quot;&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;interface&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;Things&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token literal-property property&quot;&gt;ball&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; string
    &lt;span class=&quot;token literal-property property&quot;&gt;wool&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; string
    &lt;span class=&quot;token literal-property property&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; string
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;and then you can use it as so:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;js&quot;&gt;&lt;pre class=&quot;language-js&quot;&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; doThis &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;things&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt;Things&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;string&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;calculateStuff&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt; things&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;ball&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;You can also denote if a property in an interface is optional by adding a ? to the property name right before the colon. Like so:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;js&quot;&gt;&lt;pre class=&quot;language-js&quot;&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;interface&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;Things&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token literal-property property&quot;&gt;ball&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; string
    wool&lt;span class=&quot;token operator&quot;&gt;?&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; string
    id&lt;span class=&quot;token operator&quot;&gt;?&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; string
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This is as deep as I got into TypeScript in order to start integrating or building stuff. You can look at the official docs &lt;a href=&quot;https://www.typescriptlang.org/&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Let’s jump into seeing if our new-found prowess in typing can help us with React.&lt;/p&gt;
&lt;p&gt;I started with the &lt;a href=&quot;https://www.vietnguyen.site/getting-started-with-nextjs-styled-components-and-rebass/&quot;&gt;boilerplate&lt;/a&gt; I made. Next, you should install TypeScript and the types that the other libraries would require. Luckily, since we are arriving to the TypeScript movement late, there have been type libraries already written for each library we are using. If you are using the boilerplate, you need to do this:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token function&quot;&gt;npm&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;install&lt;/span&gt; &lt;span class=&quot;token parameter variable&quot;&gt;--save&lt;/span&gt; @types/next @types/react @types/rebass @types/styled-components @zeit/next-typescript typescript&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Make a new file at the root of the project and call it next.config.js&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;js&quot;&gt;&lt;pre class=&quot;language-js&quot;&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; withTypescript &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&apos;@zeit/next-typescript&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
module&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;exports &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;withTypescript&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Make another new file at the root of the project and call it tsconfig.json&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;json&quot;&gt;&lt;pre class=&quot;language-json&quot;&gt;&lt;code class=&quot;language-json&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token property&quot;&gt;&quot;compilerOptions&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;token property&quot;&gt;&quot;allowJs&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;token property&quot;&gt;&quot;allowSyntheticDefaultImports&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;token property&quot;&gt;&quot;jsx&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;preserve&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;token property&quot;&gt;&quot;lib&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;dom&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;es2017&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;token property&quot;&gt;&quot;module&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;esnext&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;token property&quot;&gt;&quot;moduleResolution&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;node&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;token property&quot;&gt;&quot;noEmit&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;token property&quot;&gt;&quot;noUnusedLocals&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;token property&quot;&gt;&quot;noUnusedParameters&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;token property&quot;&gt;&quot;preserveConstEnums&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;token property&quot;&gt;&quot;removeComments&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;token property&quot;&gt;&quot;skipLibCheck&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;token property&quot;&gt;&quot;sourceMap&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;token property&quot;&gt;&quot;strict&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;token property&quot;&gt;&quot;target&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;esnext&quot;&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token property&quot;&gt;&quot;include&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;
        &lt;span class=&quot;token string&quot;&gt;&quot;components&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;token string&quot;&gt;&quot;pages&quot;&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token property&quot;&gt;&quot;exclude&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;
        &lt;span class=&quot;token string&quot;&gt;&quot;node_modules&quot;&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The include section is for folders that will have TypeScript that you wanna compile down to javascript. The exclude is for what you want to exclude for compilation.&lt;/p&gt;
&lt;p&gt;Last new file at the root of the project and call it .babelrc&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;{
    &quot;presets&quot;: [
        &quot;next/babel&quot;,
        &quot;@zeit/next-typescript/babel&quot;
    ]
}&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;and now you are ready to integrate TypeScript into your react code.&lt;/p&gt;
&lt;p&gt;Here is an example of what a component that’s using styled components could look like.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;jsx&quot;&gt;&lt;pre class=&quot;language-jsx&quot;&gt;&lt;code class=&quot;language-jsx&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; Flex &lt;span class=&quot;token keyword&quot;&gt;as&lt;/span&gt; Base &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;rebass&apos;&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;import&lt;/span&gt; styled &lt;span class=&quot;token keyword&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;styled-components&apos;&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;interface&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;FlexProps&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    boxShadow&lt;span class=&quot;token operator&quot;&gt;?&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; string
    height&lt;span class=&quot;token operator&quot;&gt;?&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; string
    center&lt;span class=&quot;token operator&quot;&gt;?&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; boolean
    border&lt;span class=&quot;token operator&quot;&gt;?&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; string
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; Flex &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;styled&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;Base&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;FlexProps&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;`
    ${props =&gt; (props.boxShadow ? `box-shadow: ${props.boxShadow};` : null)}
    ${props =&gt; (props.height ? `height: ${props.height};` : null)}
    ${props =&gt; (props.center ? `justify-content: center; align-items: center;` : null)}
    ${props =&gt; (props.border ? `border: ${props.border};` : null)}
`

export default (props:any) =&gt; (
    &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Flex&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token spread&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;...&lt;/span&gt;props&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;props&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;children&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Flex&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Pretty simple. Adding an interface will make sure that the props coming in will only be those props. As for why I added the &lt;code class=&quot;language-text&quot;&gt;any&lt;/code&gt; type to the props on the export function, &lt;a href=&quot;https://rebassjs.org/&quot;&gt;Rebass&lt;/a&gt; has more props that can be added to the Flex component that will allow it to be do more (i.e. m for margin, p for padding) and I have yet to account for that, so get-out-of-jail-free AKA the &lt;code class=&quot;language-text&quot;&gt;any&lt;/code&gt; type.&lt;/p&gt;
&lt;p&gt;Here is an example of using async/await with TypeScript:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;js&quot;&gt;&lt;pre class=&quot;language-js&quot;&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; fetchStuff &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;async&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;url&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt;string&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt;Promise&lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;object&lt;span class=&quot;token operator&quot;&gt;&gt;&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;token literal-property property&quot;&gt;res&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt;any &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;await&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;fetch&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;url&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;token literal-property property&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt;object &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;await&lt;/span&gt; res&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;json&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; data
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Declaring a function to be an async function will in turn make the function into a Promise so we can declare that a promise will be returned and since we are returning a value back we can type the returned promise as an object when it resolves.&lt;/p&gt;
&lt;p&gt;I am sure I am just scratching the surface of TypeScript but I am enjoying the process and learning as I go. You can look at a recent (at the time of this writing) &lt;a href=&quot;https://github.com/ulukfuni/card-game&quot;&gt;project&lt;/a&gt; that I was able to incorporate Typescript into.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Japan Preparation and Other Information]]></title><description><![CDATA[A practical Japan travel guide from an American's perspective, covering what to do after landing, lodging, transit cards, cash, food, and local quirks.]]></description><link>https://www.vietnguyen.site/japan-prep/</link><guid isPermaLink="false">https://www.vietnguyen.site/japan-prep/</guid><pubDate>Sun, 14 Apr 2019 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/7bc26c989ecb0d954d68b93bc42e8f69/d69c4/map.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 54.72972972972974%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAIAAADwazoUAAAACXBIWXMAAAsTAAALEwEAmpwYAAACCElEQVR42k1Sa3OiMBTl//+OblXQ2nYdW6U+llqpVmtVLJDwDkWJuOpgER+Qje7srDP5kMw9J+fcey7DAnKvpxmVtJx1zYyuVZIHCX3mAMmqhF7utH3Dirpo1fX24S4laTLwkyuFlPSEKWoJb+06yMOLielrbWcm2PhOiwvw+FOPi/Ao2Ks+8sdfAW9sBzgh6eGXc/ihEApgqtqobXWg/zZy2xOvBf1XE7d1/C6i5bsHFF9UZpI7d+Tp6tmKetOdGhzu4J76fTI0piaXOjo/Qi8VudyAvKA3edOrGvhGjisAVxW7LlfHnvjiTN+Q+2BElMaC9F5f13SJkdAwmMsYD2d4gmaDtikW5TX7scmPt9w4vh4fmxPJ1p/aRqOhibcwzJ3HwZu2aPQYb+4ufpsLPArmH2PU6zjLZz3MKITVCAvTDCQVMwpmo/6nUPhcZM+yNzCx5liarRm89Fro+9X+4oFU0lx2tM4NAhaeQGeHp4E/mmFV8Urqhn5HR1W3NtsQxhuL6SOXxkOhBfhdUIOssuXU+C/t30lpZhzcPypCWenRIDhwKGuLpi4yvIk5QDiQ5tS0bMSa7wpWkFEvyecqIHVNHjoPNRPTKtXrOZChcZ3JJ3s1K0ILLE29rJpyILkk062gu9BFkMK4sxfBDpnchQItXCm01WMeHDhwvBSn6Jbl38J9Vv0P/gOBkCy3i6QY7gAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/7bc26c989ecb0d954d68b93bc42e8f69/cbe2e/map.webp 148w,
/static/7bc26c989ecb0d954d68b93bc42e8f69/3084c/map.webp 295w,
/static/7bc26c989ecb0d954d68b93bc42e8f69/5ca24/map.webp 590w,
/static/7bc26c989ecb0d954d68b93bc42e8f69/dad35/map.webp 885w,
/static/7bc26c989ecb0d954d68b93bc42e8f69/0a92e/map.webp 1002w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/7bc26c989ecb0d954d68b93bc42e8f69/12f09/map.png 148w,
/static/7bc26c989ecb0d954d68b93bc42e8f69/e4a3f/map.png 295w,
/static/7bc26c989ecb0d954d68b93bc42e8f69/fcda8/map.png 590w,
/static/7bc26c989ecb0d954d68b93bc42e8f69/efc66/map.png 885w,
/static/7bc26c989ecb0d954d68b93bc42e8f69/d69c4/map.png 1002w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/png&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/7bc26c989ecb0d954d68b93bc42e8f69/fcda8/map.png&quot;
            alt=&quot;Route map from Florida to Tokyo, Japan&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;First Things to Do After Landing in Japan&lt;/h2&gt;
&lt;p&gt;Congratulations, you have just landed in the fine country of Japan! First things first, definitely stretch your legs and whole body. No matter where you came from, sitting for that period of time is really bad for your body.&lt;/p&gt;
&lt;p&gt;Depending on what airport you landed in, you could be heading to the luggage pick up or perhaps you could find yourself heading to a customs checkpoint. After that, you will find yourself in an area where you can purchase transit stuff and there are information booths that cater to english speakers. You can even exchange your money here.&lt;/p&gt;
&lt;p&gt;I highly recommend purchasing a portable WIFI hotspot or maybe even exploring the option of getting an international SIM card. Traveling around without the use of Google Maps on your phone will be a nightmare. There should be a place in the area that you can rent out the hotspots or SIM cards.&lt;/p&gt;
&lt;h2&gt;Lodging&lt;/h2&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/d04f208bdd262172e92100e3a9f96a9a/1c72d/skytree.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 133.1081081081081%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAbABQDASIAAhEBAxEB/8QAFwAAAwEAAAAAAAAAAAAAAAAAAAIEA//EABcBAQEBAQAAAAAAAAAAAAAAAAIAAQP/2gAMAwEAAhADEAAAAcWShhCc5ueiUWZjFf/EAB4QAAEEAQUAAAAAAAAAAAAAAAMBAhESABMgISIx/9oACAEBAAEFAmVgidZy8obgetXEWGFPdvuz/8QAFhEAAwAAAAAAAAAAAAAAAAAAAiAx/9oACAEDAQE/ASqf/8QAFhEAAwAAAAAAAAAAAAAAAAAAAiAx/9oACAECAQE/ARif/8QAIBAAAQMDBQEAAAAAAAAAAAAAAQACERAhMRITIDOBkf/aAAgBAQAGPwKxmnY34gHafKRtMKsZnIQELPD/xAAbEAEAAwEBAQEAAAAAAAAAAAABABEhMVFhcf/aAAgBAQABPyF6LxdkEvR3yaCucmYESnn8mT7CgxDvszNDYngiKqwk+R5co8n/2gAMAwEAAgADAAAAEHwcv//EABgRAAMBAQAAAAAAAAAAAAAAAAABERAh/9oACAEDAQE/EE5aKXP/xAAWEQEBAQAAAAAAAAAAAAAAAAABABH/2gAIAQIBAT8QeMbGCy//xAAgEAEAAgICAQUAAAAAAAAAAAABABEhMUFRcWGBkdHh/9oACAEBAAE/ENiVBoB4T0/JYurliiRYWOj1MKQ96WXfsw+06scvFNyx+SQXyjdfIUAiI97gZwvOMVX3EgB4YYKagCrdy7KPif/Z&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/d04f208bdd262172e92100e3a9f96a9a/cbe2e/skytree.webp 148w,
/static/d04f208bdd262172e92100e3a9f96a9a/3084c/skytree.webp 295w,
/static/d04f208bdd262172e92100e3a9f96a9a/5ca24/skytree.webp 590w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/d04f208bdd262172e92100e3a9f96a9a/a80bd/skytree.jpg 148w,
/static/d04f208bdd262172e92100e3a9f96a9a/1c91a/skytree.jpg 295w,
/static/d04f208bdd262172e92100e3a9f96a9a/1c72d/skytree.jpg 590w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/jpeg&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/d04f208bdd262172e92100e3a9f96a9a/1c72d/skytree.jpg&quot;
            alt=&quot;Tokyo SkyTree&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I have had no problems using &lt;a href=&quot;https://www.airbnb.com&quot;&gt;Airbnb&lt;/a&gt; for lodging in Japan and all the places that I have used have been great. Most of the listings in Airbnb in Japan have hosts that generally have english descriptions. Also, you can chat with them in english as well which is a super plus.&lt;/p&gt;
&lt;p&gt;In the past, I have used Airbnb to ask our hosts about recommendations around the area we are staying as well as directions from the airport. Generally, they have been super polite (as are most if not all of the Japanese people you come across) and super helpful.&lt;/p&gt;
&lt;p&gt;Airbnb is good for booking with large groups (small groups too, I guess, basically all groups all sizes) but you can also try out the capsule hotels (or regular hotels for that matter).&lt;/p&gt;
&lt;p&gt;Capsule hotels are hotels that give you a smaller space instead of entire room for your group. It is relatively cheaper than hotels and maybe even some Airbnb places but you are sacrificing some comfort for it. They basically give you a space (think a little smaller than a twin size bed and sometimes you have to climb into it with a ladder) to sleep and the bathroom/showers are public and communal but separate (one separate bathroom/shower area for males and one for females).&lt;/p&gt;
&lt;p&gt;It is a very interesting experience and it works if you are doing a day trip to a city and need a quick place to book and stay.&lt;/p&gt;
&lt;h2&gt;Transit&lt;/h2&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/c22405c8da76871117bf8517b8cd6491/1c72d/building.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 133.1081081081081%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAbABQDASIAAhEBAxEB/8QAGQAAAwEBAQAAAAAAAAAAAAAAAAQFAwEC/8QAFgEBAQEAAAAAAAAAAAAAAAAAAgEA/9oADAMBAAIQAxAAAAH0xFZlsksRnsL9C0MS7//EABsQAAIDAQEBAAAAAAAAAAAAAAECAAMSESEy/9oACAEBAAEFAq7gyLYEiuGFP058zqUnkc6mmEE4JkT/xAAVEQEBAAAAAAAAAAAAAAAAAAARIP/aAAgBAwEBPwEj/8QAFhEAAwAAAAAAAAAAAAAAAAAAESAh/9oACAECAQE/ATU//8QAHhAAAQMEAwAAAAAAAAAAAAAAAAEREgIQIHExQYH/2gAIAQEABj8Ch3ybHcXR7ZSNOP8A/8QAHBABAAIDAQEBAAAAAAAAAAAAAQARITFBYVGB/9oACAEBAAE/IccNsn9lwd0gWov2MGdQdEdRgG3GJbsbgdXYopUYMR+E8J//2gAMAwEAAgADAAAAELPpzv/EABcRAAMBAAAAAAAAAAAAAAAAABARIQH/2gAIAQMBAT8Q2A4h/8QAGBEAAgMAAAAAAAAAAAAAAAAAABEQIUH/2gAIAQIBAT8QwGK3H//EAB8QAQEAAgIBBQAAAAAAAAAAAAERACExQWFRcZGh8P/aAAgBAQABPxCdbCD1p598E0vb0U61lHIVOmOBBHMDZm5qFjQ+8sgoqM/c5TaCD4MKoJdmDrzkFZpBu/nCRezeXceJxgpU5//Z&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/c22405c8da76871117bf8517b8cd6491/cbe2e/building.webp 148w,
/static/c22405c8da76871117bf8517b8cd6491/3084c/building.webp 295w,
/static/c22405c8da76871117bf8517b8cd6491/5ca24/building.webp 590w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/c22405c8da76871117bf8517b8cd6491/a80bd/building.jpg 148w,
/static/c22405c8da76871117bf8517b8cd6491/1c91a/building.jpg 295w,
/static/c22405c8da76871117bf8517b8cd6491/1c72d/building.jpg 590w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/jpeg&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/c22405c8da76871117bf8517b8cd6491/1c72d/building.jpg&quot;
            alt=&quot;Uniqlo Building&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The Japan subway is the best! Clean, on time, signs are informative, and easy to use (once you know what’s going on at least). First things first is you will need to purchase a &lt;a href=&quot;https://www.pasmo.co.jp/en/faq/&quot;&gt;Pasmo&lt;/a&gt; or Suica card. These are smart train cards that will allow you to use the subway system (you can also buy individual paper tickets but the convenience of these cards just beats paper tickets by a lot).&lt;/p&gt;
&lt;p&gt;The card itself works like a debit card and by tapping certain spots that are marked with a symbol that looks like a IC, the system automatically deducts money from your account and you are on your way to the platform to board your train. More info on how to use the pasmo &lt;a href=&quot;https://www.pasmo.co.jp/en/use/&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Most train stations have overhead signs that show you where to go and they are written in english and also denoted by a color as well. Something like this:&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/eb266e83fd6450f40afd6b7874b9337c/07a9c/google-maps.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 177.7027027027027%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAkCAIAAAAGkY33AAAACXBIWXMAAAsTAAALEwEAmpwYAAAEFklEQVR42pVWy47jRBStf+MLEH8CK8SG4QvYIcQOCUGvmR1CGlgw00NIdw8onaRjx04c2+W3HT+q/KhwqirtSae7R3BVKZXree859xFyc3Pzj5Lr6+vJU/LXvUyn09lsNp/PsRkD7Cd1XTdNg74sy/1+X0upVJOCmeKhYAY75aaqImVZJUnati1jDLe4rudTGoYhBp7nY/LwUIQQ6HEYR0jXdYzzYRh423LO0zRLsyzP81QJDmOpPxHsHwaBkxgTfR+O4Vl8Y7feAcEjwyPBKubbFlcMRKsRxzG0hDKrlWHb9m63c5wdlrWeo+BTT4ZhJG0ezdADqMR43/V4QfT3r+mTw8mn3k+g8GK5BDpry5KI88OrOZ9a/I8l81LR963nuXhn57rAGTpb9oYG4dqywYdUewRDXi8OBRNFM2T1wFp8Ct7irQEQaEVgGnYBFmwmwKmsKvSwAQ/nRcE5w7I0Ar8uEWxW1Uzjh7muF7i3aETbCxLHiW1vJLHQz3UBFbxAWaUMY4ZILsIog3XazoqLpd/ZcV8yQTQAoABNai2Gh8RiQZxRLeROuZ/AIebLlblxty5drGzTcjQZo0dpsg5PCel4XcXbfDMpt5PCes2zTS/ZYodnBMYDIO1LpIiczZsfpt9+Mvnm48uvP6JvvwfIpmme8n/q1UmaWra9WCzhyASXRFGsPSZJkjCKEBK49bmX8SbQBecyMBBbPjzTc6nvBxSdt9lsEBi4CP1ja3EvqOYqlgjQbJVwJQzmKmmUjL555uHaCqKoEIop6UmKk6MLYwC/0k1ydmzvWSRIDXem6Xi+4/t3lkWj6PCfhfCG5T4t1uvcNNLVXWEYQ1nCj8uijsN9FBQRLUKaq+DvtbfARpUSBlLHAX3167sXX77+4vO/v3px+dmn2eWbtGS//TJ5eTH5+ae3Ly/+/PG7371t4noucgzomM1uF4sF8gyxo/7KqHJ365nrnNKC+lEQ0CCoq4azviqZbjr4ZLbiPAiCLMsAKvFT/s5AunNM2/aDwKMUceI4Ds6DzFOq9Bg66yQLzQmAbhUvip5aD3B9VSG51u+hf5Iquaoj8D7XSIbuD2Fw3joA1knE4NvwSuQ6uBj8eb22oNJjr36WKnhWrgSpHz1M+vCB0wRM+n3ahLvFyoQzf/hNvQSob29vj1EFpy7LYw1C2dIlClmtULny7DBsBL3YjR7Qkrpq4yhX9SVDrEZxjNwCZ0BuA+7ARRWH4y2legdcYCBDMqGMbvfFXh7QVRCH9yqNomglqnQhRR+OCfEhYIf/I2eIkDDOXC+Celz5PlQaw1sH3jgD0e45CslzqR6QgNmGYejajR5+tkLVMwwMxsmrqyuQossDRP0zUGUeH6ABvR4DTKpElhQ1CUEBxRv6b0FVVf8CElwKYvMmLQMAAAAASUVORK5CYII=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/eb266e83fd6450f40afd6b7874b9337c/cbe2e/google-maps.webp 148w,
/static/eb266e83fd6450f40afd6b7874b9337c/3084c/google-maps.webp 295w,
/static/eb266e83fd6450f40afd6b7874b9337c/5ca24/google-maps.webp 590w,
/static/eb266e83fd6450f40afd6b7874b9337c/dad35/google-maps.webp 885w,
/static/eb266e83fd6450f40afd6b7874b9337c/2baf0/google-maps.webp 1180w,
/static/eb266e83fd6450f40afd6b7874b9337c/f992d/google-maps.webp 1440w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/eb266e83fd6450f40afd6b7874b9337c/12f09/google-maps.png 148w,
/static/eb266e83fd6450f40afd6b7874b9337c/e4a3f/google-maps.png 295w,
/static/eb266e83fd6450f40afd6b7874b9337c/fcda8/google-maps.png 590w,
/static/eb266e83fd6450f40afd6b7874b9337c/efc66/google-maps.png 885w,
/static/eb266e83fd6450f40afd6b7874b9337c/c83ae/google-maps.png 1180w,
/static/eb266e83fd6450f40afd6b7874b9337c/07a9c/google-maps.png 1440w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/png&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/eb266e83fd6450f40afd6b7874b9337c/fcda8/google-maps.png&quot;
            alt=&quot;Google Map Search&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Above is a google maps search (super MUST-HAVE app for traveling in Japan) between two places you will probably visit in Tokyo. Lots of helpful information here like price and which lines to take, even how many minutes of walking you have to do between transfers.&lt;/p&gt;
&lt;p&gt;Those colors will also show up in the station when you are busy trying to get on the train. Since the trains all run on a schedule, missing one means you probably have to re-do your google maps search.&lt;/p&gt;
&lt;p&gt;I know the Pasmo and Suica cards also allow you to take the buses but I have not tried to use those. I have heard that they are also an inexpensive way to get around as well and using them is easy as just tapping your card and away you go.&lt;/p&gt;
&lt;p&gt;Another thing you should look into if you plan on traveling between cities across large distances is the &lt;a href=&quot;https://www.japan-rail-pass.com/&quot;&gt;JR Rail Pass&lt;/a&gt;. The JR Rail Pass can be used with the JR line of trains for free within a certain time period. It even lets you get shinkansen (bullet train) tickets within that certain time period as well.&lt;/p&gt;
&lt;p&gt;It is pretty pricey (around 250USD at the time of this writing for the 7 day pass), but it will pay for itself if you take a few bullet trains (one way bullet train tickets go for around 120USD if I remember correctly).&lt;/p&gt;
&lt;h2&gt;Money&lt;/h2&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/c39d8cb196fdac0defad715e8c377635/1c72d/city.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 133.1081081081081%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAbABQDASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAIBAwQF/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAEC/9oADAMBAAIQAxAAAAHnvN0VlIMufesijP8A/8QAHRAAAgEEAwAAAAAAAAAAAAAAAAIBAwQREiExQf/aAAgBAQABBQLJsZFXaIhNhbhlKUs9SUViO7Tlvf/EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQMBAT8BH//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQIBAT8BH//EABwQAAICAgMAAAAAAAAAAAAAAAEQABEhMUFRgf/aAAgBAQAGPwJ8+QrEAvfcso2v/8QAGxABAAMBAQEBAAAAAAAAAAAAAQARIUFRYYH/2gAIAQEAAT8hGch8xpVlXLhq3FQoGtYMwzc9JdtD8jgo2bhGjZvcPeyKir2f/9oADAMBAAIAAwAAABCn5Y//xAAYEQACAwAAAAAAAAAAAAAAAAAAARARIf/aAAgBAwEBPxBoyKZ//8QAFxEBAQEBAAAAAAAAAAAAAAAAAQARMf/aAAgBAgEBPxAbWMnt/8QAHhABAAMAAgIDAAAAAAAAAAAAAQARITFBUWFxgZH/2gAIAQEAAT8QWBTbRncFOH5AOoLM6ilZ8Zv23BaOIEb7aYmBvh0R8czZs6tIVOyF6XPmAG3KaUgKBYF19QlARmyG6QtP/9k=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/c39d8cb196fdac0defad715e8c377635/cbe2e/city.webp 148w,
/static/c39d8cb196fdac0defad715e8c377635/3084c/city.webp 295w,
/static/c39d8cb196fdac0defad715e8c377635/5ca24/city.webp 590w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/c39d8cb196fdac0defad715e8c377635/a80bd/city.jpg 148w,
/static/c39d8cb196fdac0defad715e8c377635/1c91a/city.jpg 295w,
/static/c39d8cb196fdac0defad715e8c377635/1c72d/city.jpg 590w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/jpeg&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/c39d8cb196fdac0defad715e8c377635/1c72d/city.jpg&quot;
            alt=&quot;Night view of city buildings and street lights through a rain-speckled window&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Japan is a country where cash is king.&lt;/p&gt;
&lt;p&gt;There are a few places that will take card but make sure you have a card that does not charge an international fee. With cash being used almost everywhere, it is a good idea to either exchange at the airport or just bring your debit card to one of the 7/11 convenience stores where they have international ATMs and do exchanges there.&lt;/p&gt;
&lt;p&gt;Make sure you have placed a travel notice on your credit/debit cards so you are not stranded in another country with no way to pay for anything.&lt;/p&gt;
&lt;p&gt;Paper bills start at 1000 yen so anything under is coins (the denomination of coins is 500, 100, 50, 10, 5, 1 yen). You will be racking up a lot of the 1 yen coins. They feel like board game money and accumulate so fast.&lt;/p&gt;
&lt;p&gt;I would highly recommend a coin purse (weird thing to recommend but do you really want to walk around with that much change in your pockets?).&lt;/p&gt;
&lt;p&gt;In shops and restaurants, they do not give you the check at your seat like in the US. You will have to approach the counter/register to pay. There will usually be a small tray that you place your bills and coins in. This is customarily the way money is handled especially in smaller shops/restaurants. Also, Japan is a country where tipping for service is not necessary.&lt;/p&gt;
&lt;h2&gt;Useful Apps&lt;/h2&gt;
&lt;p&gt;Google Maps and Google Translate are going to be your most used apps. Google Maps will load up bus and train schedules and estimate how much and all your transfers for you all while directing you. Google Translate is a no-brainer and try to have it activated on your camera for the real-time translations.&lt;/p&gt;
&lt;p&gt;You may want to look into messaging apps that can use WIFI to message if you do not have an international SIM card installed into your phone. A few that I have used are WhatsApp, GroupMe, Facebook Messenger and LINE.&lt;/p&gt;
&lt;h2&gt;Useful Phrases&lt;/h2&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;konnichiwa&lt;/code&gt; こんにちわ&lt;/p&gt;
&lt;p&gt;&lt;em&gt;hello&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;sumimasen&lt;/code&gt; すみません&lt;/p&gt;
&lt;p&gt;&lt;em&gt;excuse me&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;onegai shimas[u]&lt;/code&gt; おねがいします&lt;/p&gt;
&lt;p&gt;&lt;em&gt;please&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;hai&lt;/code&gt; はい&lt;/p&gt;
&lt;p&gt;&lt;em&gt;yes&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;arigatou gozaimas[u]&lt;/code&gt; ありがとう ございます&lt;/p&gt;
&lt;p&gt;&lt;em&gt;thank you&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;gomen nasai&lt;/code&gt; ごめんなさい&lt;/p&gt;
&lt;p&gt;&lt;em&gt;I’m sorry&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;wakari-mas[u]&lt;/code&gt; わかります&lt;/p&gt;
&lt;p&gt;&lt;em&gt;I understand&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;wakari-masen&lt;/code&gt; わかりません&lt;/p&gt;
&lt;p&gt;&lt;em&gt;I don’t understand&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;Food&lt;/h2&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/c4871016c6b5bb5572df385c821ded1c/1c72d/food1.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 133.1081081081081%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAbABQDASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAEDBAUC/8QAFwEAAwEAAAAAAAAAAAAAAAAAAAECA//aAAwDAQACEAMQAAABodaSzrOENzVaU1Sxgf/EABwQAAIDAAMBAAAAAAAAAAAAAAECAAMSBBARE//aAAgBAQABBQLLvHX13of1fpoPuC01yzkhgztMMeqwCS7If//EABYRAQEBAAAAAAAAAAAAAAAAAAAhEP/aAAgBAwEBPwFMj//EABYRAQEBAAAAAAAAAAAAAAAAACEAEP/aAAgBAgEBPwFnG//EAB8QAAIBBAIDAAAAAAAAAAAAAAABEQISIUEDEDIzUf/aAAgBAQAGPwJxxTny2WuiKUfSWlGi20dKeJLaN7PYYT6yRS4R/8QAHxABAAICAgIDAAAAAAAAAAAAAQARITFBYRBRcaHB/9oACAEBAAE/IWgpOwftEBeKY/YsoVSzo9RF0vU5+YiVYdiMSDoqzLFVyeKihMh3TAloOvGFLl8ocT//2gAMAwEAAgADAAAAEG8Lg//EABcRAQEBAQAAAAAAAAAAAAAAABEAASH/2gAIAQMBAT8QF7ZsZn//xAAXEQEBAQEAAAAAAAAAAAAAAAABEQAQ/9oACAECAQE/EFEhk2Tj/8QAHRABAAMAAwEBAQAAAAAAAAAAAQARITFRYUGBkf/aAAgBAQABPxC3ZJUlt+LhOeUNUG3i17j5TFu7NNdTaQ1zfU/HyPxzkD+xxSwW4478hdNhxR8+3Hq8gxfLhJ54SowjgoHsZ7iBwT//2Q==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/c4871016c6b5bb5572df385c821ded1c/cbe2e/food1.webp 148w,
/static/c4871016c6b5bb5572df385c821ded1c/3084c/food1.webp 295w,
/static/c4871016c6b5bb5572df385c821ded1c/5ca24/food1.webp 590w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/c4871016c6b5bb5572df385c821ded1c/a80bd/food1.jpg 148w,
/static/c4871016c6b5bb5572df385c821ded1c/1c91a/food1.jpg 295w,
/static/c4871016c6b5bb5572df385c821ded1c/1c72d/food1.jpg 590w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/jpeg&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/c4871016c6b5bb5572df385c821ded1c/1c72d/food1.jpg&quot;
            alt=&quot;Tonkatsu cutlet with shredded cabbage and rice on a tray&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;My favorite topic!&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/55f574fc50d16a1624aefeaf2ea02ca8/1c72d/food2.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 133.1081081081081%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAbABQDASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAMCBAUG/8QAFgEBAQEAAAAAAAAAAAAAAAAAAgEA/9oADAMBAAIQAxAAAAHMX0GaFSL5ZBr5l1zRLv/EABwQAAMAAwADAAAAAAAAAAAAAAABAgMREhQiQ//aAAgBAQABBQLx8yPY0Vm7i9xSlsmmjroWhn00j//EABYRAQEBAAAAAAAAAAAAAAAAABEAEP/aAAgBAwEBPwEjf//EABYRAQEBAAAAAAAAAAAAAAAAABEAEP/aAAgBAgEBPwFmM//EAB0QAAEEAgMAAAAAAAAAAAAAAAABAhEhEDEzYYH/2gAIAQEABj8C43GlLkqGyWTXospSEqm8NTsbj//EABwQAQADAQEAAwAAAAAAAAAAAAEAESExQVFxkf/aAAgBAQABPyFIr+EqtPKonyGYFDG6yiNjxIL1++wlW+vzDJzwEw5UJdWIyOVZks6E/9oADAMBAAIAAwAAABDb4Ez/xAAYEQEBAAMAAAAAAAAAAAAAAAABABEhUf/aAAgBAwEBPxDqVZTUN//EABYRAQEBAAAAAAAAAAAAAAAAAAERAP/aAAgBAgEBPxBNmMBbpv/EAB4QAQADAAICAwAAAAAAAAAAAAEAESExYUFxUYGh/9oACAEBAAE/EAwg1ekc3PJXiEQFnCzVAlt09BCSGxtWfctKh4WPxPE0qw9PniI6YIiyuomQAMBuOYNumOQlSclGF0xKNroqf//Z&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/55f574fc50d16a1624aefeaf2ea02ca8/cbe2e/food2.webp 148w,
/static/55f574fc50d16a1624aefeaf2ea02ca8/3084c/food2.webp 295w,
/static/55f574fc50d16a1624aefeaf2ea02ca8/5ca24/food2.webp 590w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/55f574fc50d16a1624aefeaf2ea02ca8/a80bd/food2.jpg 148w,
/static/55f574fc50d16a1624aefeaf2ea02ca8/1c91a/food2.jpg 295w,
/static/55f574fc50d16a1624aefeaf2ea02ca8/1c72d/food2.jpg 590w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/jpeg&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/55f574fc50d16a1624aefeaf2ea02ca8/1c72d/food2.jpg&quot;
            alt=&quot;Tsukemen noodles with a separate bowl of dipping broth&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;If you did not come to Japan to eat, you are totally missing out. There is a large variety of food with a large range of prices. It is very possible to go the cheap route and still enjoy many of the cultural dishes in Japan.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/261767460049f7612e13a545f6c921c2/1c72d/food3.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 133.1081081081081%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAbABQDASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAQBAgUD/8QAFgEBAQEAAAAAAAAAAAAAAAAAAgED/9oADAMBAAIQAxAAAAFSGq5vGHxnQTzXQpOZZ//EABoQAAMBAQEBAAAAAAAAAAAAAAECAxEAEgT/2gAIAQEAAQUCMHWYTZHdVPShKa8GLmizApPh9RA7wueR3//EABcRAQADAAAAAAAAAAAAAAAAAAAQESH/2gAIAQMBAT8BjVP/xAAXEQEBAQEAAAAAAAAAAAAAAAAAEQEh/9oACAECAQE/AVcXH//EAB4QAAMAAgEFAAAAAAAAAAAAAAABEQIxEhAhIkFR/9oACAEBAAY/AsvbPHcO5z5qTRUxtDpXb8SI8E+mjR//xAAeEAACAgICAwAAAAAAAAAAAAABEQAhMWEQQVGhwf/aAAgBAQABPyFihh6LqGb51G4ZWEncNQsFoEzTsATEgS6hmTQibj0HuUwG4Azcq/XC/9oADAMBAAIAAwAAABAYDrH/xAAYEQEAAwEAAAAAAAAAAAAAAAAAARFRcf/aAAgBAwEBPxDipRhd/8QAGREAAwADAAAAAAAAAAAAAAAAAAERITFh/9oACAECAQE/EKJBxvJwP//EAB0QAQACAgMBAQAAAAAAAAAAAAERIQAxQWFxUZH/2gAIAQEAAT8Qh6AAmO8+NZDxGJXI4j9xVBK3k6wHvFJqH1IueMJTmABBOm5DN+aoktxWxVZa8RgqySMk9ricIaEGQxwd4B2fXIU29Yk0M//Z&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/261767460049f7612e13a545f6c921c2/cbe2e/food3.webp 148w,
/static/261767460049f7612e13a545f6c921c2/3084c/food3.webp 295w,
/static/261767460049f7612e13a545f6c921c2/5ca24/food3.webp 590w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/261767460049f7612e13a545f6c921c2/a80bd/food3.jpg 148w,
/static/261767460049f7612e13a545f6c921c2/1c91a/food3.jpg 295w,
/static/261767460049f7612e13a545f6c921c2/1c72d/food3.jpg 590w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/jpeg&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/261767460049f7612e13a545f6c921c2/1c72d/food3.jpg&quot;
            alt=&quot;Japanese set meal with rice, glazed meat, and side dishes&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Japan has many konbini (convenience stores) that offer super cheap snacks and actual food. I really enjoy the packaged onigiri (rice balls, around 2USD) and they even have lunch sets that range anywhere from 4-10 USD.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/38f2737375ab0cf9e9df48fba50d64d2/1c72d/food4.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 133.1081081081081%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAbABQDASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAUBAgME/8QAFgEBAQEAAAAAAAAAAAAAAAAAAgED/9oADAMBAAIQAxAAAAHgoxnNqzIZZC6Qti5F/8QAGxAAAgMAAwAAAAAAAAAAAAAAAQIAAxESEyH/2gAIAQEAAQUCvs08lM7SIqBlZAisntLc49dPXi4SdHsFaz//xAAYEQEBAAMAAAAAAAAAAAAAAAAAARESMf/aAAgBAwEBPwGxl1q//8QAGBEAAwEBAAAAAAAAAAAAAAAAAAEREBL/2gAIAQIBAT8BTyQ6P//EAB8QAAIBAwUBAAAAAAAAAAAAAAABERAhMQISIkFRcf/aAAgBAQAGPwI7IRLUx6jm092IUU1Xdx+/RUuYP//EAB0QAQACAwADAQAAAAAAAAAAAAEAESExQVFhgdH/2gAIAQEAAT8h46XqBXTFuewOIUeo/QOoX3XqFIg6LICD2VwgXDV+4LsKOMAqUvxM8JP1P//aAAwDAQACAAMAAAAQhN0M/8QAGBEAAwEBAAAAAAAAAAAAAAAAAAERUWH/2gAIAQMBAT8QZo2KK4f/xAAaEQADAAMBAAAAAAAAAAAAAAAAAREhMUFR/9oACAECAQE/EEp6IjpcEes//8QAIRABAAMAAQMFAQAAAAAAAAAAAQARITFBcZFRYYGhscH/2gAIAQEAAT8QTAAKJTRwyuecPXwPqLSFlnIWcLSWZ/IMqsZr5FENmsxuZzFTX2Tvh4lbXAi4fu+ZQDUDhb6xQ6otVy1CUOC6IBXfdP/Z&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/38f2737375ab0cf9e9df48fba50d64d2/cbe2e/food4.webp 148w,
/static/38f2737375ab0cf9e9df48fba50d64d2/3084c/food4.webp 295w,
/static/38f2737375ab0cf9e9df48fba50d64d2/5ca24/food4.webp 590w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/38f2737375ab0cf9e9df48fba50d64d2/a80bd/food4.jpg 148w,
/static/38f2737375ab0cf9e9df48fba50d64d2/1c91a/food4.jpg 295w,
/static/38f2737375ab0cf9e9df48fba50d64d2/1c72d/food4.jpg 590w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/jpeg&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/38f2737375ab0cf9e9df48fba50d64d2/1c72d/food4.jpg&quot;
            alt=&quot;Ramen meal with rice, miso soup, and fried chicken on a tray&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;There are also a lot of ramen shops, gyudon (meat bowl) shops, sushi places, and other places that you can get a meal for under 10 USD. There is no need to break the bank to eat good in Japan.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/05c34b879f1a6f1616b0d55978313de6/1c72d/ramen.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 133.1081081081081%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAbABQDASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAECAwQF/8QAFwEAAwEAAAAAAAAAAAAAAAAAAAEDAv/aAAwDAQACEAMQAAAB5c1qnTEA30blcZiMD//EABsQAAMAAwEBAAAAAAAAAAAAAAABAgMREhMi/9oACAEBAAEFAm9HbPRix1t4rRS+nPU45tOtU0IZ/8QAGBEAAgMAAAAAAAAAAAAAAAAAAQIAEBL/2gAIAQMBAT8BViJtr//EABcRAAMBAAAAAAAAAAAAAAAAAAABEBH/2gAIAQIBAT8BZl//xAAgEAACAQEJAAAAAAAAAAAAAAABEQACAxASIDEyQUJx/9oACAEBAAY/AuzvpxBObX5CxFpHVaGpcRkZP//EAB0QAAICAgMBAAAAAAAAAAAAAAABESExQRBRYaH/2gAIAQEAAT8h7SdGeH0aHg1RKbIVOyg1IgapplNdcRoV9ANgWGJ8rhkZH//aAAwDAQACAAMAAAAQv8xx/8QAGBEAAwEBAAAAAAAAAAAAAAAAAAERMVH/2gAIAQMBAT8QwHB9CIiP/8QAFxEBAQEBAAAAAAAAAAAAAAAAAAERUf/aAAgBAgEBPxBkca2v/8QAHhABAAMAAgIDAAAAAAAAAAAAAQARIUFRMZFhgaH/2gAIAQEAAT8QNgYCeJH7nz/SVi3uK4BbB3F6goaQKDr4i5X0FIwxWFf5ISi3zHb3Kw1ad29MABXMziLc/9k=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/05c34b879f1a6f1616b0d55978313de6/cbe2e/ramen.webp 148w,
/static/05c34b879f1a6f1616b0d55978313de6/3084c/ramen.webp 295w,
/static/05c34b879f1a6f1616b0d55978313de6/5ca24/ramen.webp 590w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/05c34b879f1a6f1616b0d55978313de6/a80bd/ramen.jpg 148w,
/static/05c34b879f1a6f1616b0d55978313de6/1c91a/ramen.jpg 295w,
/static/05c34b879f1a6f1616b0d55978313de6/1c72d/ramen.jpg 590w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/jpeg&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/05c34b879f1a6f1616b0d55978313de6/1c72d/ramen.jpg&quot;
            alt=&quot;A bowl of Ichiran ramen&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;My favorite ramen spot has to be Ichiran. It is a ramen chain all around Japan and it is the ramen spot that sports the “concentrate on your food” vibe. Well it literally makes you concentrate on your food.&lt;/p&gt;
&lt;p&gt;To order, there is a vending machine that you place money into and press what broth and size you want. The vending machine dispenses a ticket and you bring that to the place where you will be eating. So the spot is like a small cubby with an opening for them to serve food to you and you hand the ticket to me and you fill out a form with your ramen specifications (firmness of noodles, saltiness of broth, etc.) and then you wait for you meal.&lt;/p&gt;
&lt;p&gt;The ramen is rich and flavorful (depending on what you chose) and since the spot where you are eating is sort of isolated, it makes you focus more on your food. It’s great.&lt;/p&gt;
&lt;p&gt;If sushi is more your jam, you are definitely not going to be disappointed. There is the famous Tsukiji Fish Market (which I heard was moved into another area from its previous location), which is a market where most sushi chefs get their ingredients from and there are a bunch of vendors there that do the farm-to-table bit with their stuff you can get some of the freshest sushi right there.&lt;/p&gt;
&lt;p&gt;Since its super famous, its probably going to be super crowded, so if you want to avoid the crowds, there are many sushi shops around all over (which, I mean, why wouldn’t there be). I definitely recommend trying the conveyor belt sushi spots, the sushi’s quality does not drop because its on a conveyor.&lt;/p&gt;
&lt;p&gt;I have to give a shout out to two items that I went into glutton mode for over in Japan: ice cream and vending machine coffees. The ice cream over there is amazing. Its soft and creamy and not super sweet. Also, its cheap and they are everywhere. I think all those adjectives that describe ice cream in japan, can also apply to vending machine coffee. Its only around 1USD, its not too sweet, and they have heated cans inside the vending machine. Super fast hot coffee on the go that’s cheap. Revolutionary.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/016d543717bed4da7679628e6c639929/1c72d/food5.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 133.1081081081081%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAbABQDASIAAhEBAxEB/8QAGAAAAwEBAAAAAAAAAAAAAAAAAAMEAQX/xAAWAQEBAQAAAAAAAAAAAAAAAAAAAwL/2gAMAwEAAhADEAAAAZ2uyW+cdEbmRLlI1Ewf/8QAHRAAAgIDAAMAAAAAAAAAAAAAAAIBEQMSEyIxMv/aAAgBAQABBQLeiFmRl8qhRdbqBmyHyezq52cjI5//xAAXEQADAQAAAAAAAAAAAAAAAAAAAREQ/9oACAEDAQE/AYVb/8QAFxEAAwEAAAAAAAAAAAAAAAAAABARIf/aAAgBAgEBPwGmv//EACAQAAICAQMFAAAAAAAAAAAAAAABAiExAxESIjJhgaH/2gAIAQEABj8CajTEpakfO4+Ko4qI8eyjvOmRZn4ZMn//xAAdEAEAAgMAAwEAAAAAAAAAAAABABEhMWFBUeGR/9oACAEBAAE/IR5C5xWIvpXwibK3iWsg7AqbZ3B5AcisAO1mA7B77HK3bEtD8RX5JSn/2gAMAwEAAgADAAAAEH/E/wD/xAAYEQADAQEAAAAAAAAAAAAAAAAAAREQIf/aAAgBAwEBPxBxFhwqP//EABgRAAMBAQAAAAAAAAAAAAAAAAABESFh/9oACAECAQE/EEr0jE4Rn//EAB8QAQACAgIDAQEAAAAAAAAAAAEAESExQXFRYfCBkf/aAAgBAQABPxDLLIu48UnPEpQNZ2jy+1GXY0sWXzEhAXdLX99wkQ3uzFcY59ymo6tp03nuWgBKSCvczaqVRP6le4yxbC+PE2X26jMlvwT/2Q==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/016d543717bed4da7679628e6c639929/cbe2e/food5.webp 148w,
/static/016d543717bed4da7679628e6c639929/3084c/food5.webp 295w,
/static/016d543717bed4da7679628e6c639929/5ca24/food5.webp 590w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/016d543717bed4da7679628e6c639929/a80bd/food5.jpg 148w,
/static/016d543717bed4da7679628e6c639929/1c91a/food5.jpg 295w,
/static/016d543717bed4da7679628e6c639929/1c72d/food5.jpg 590w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/jpeg&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/016d543717bed4da7679628e6c639929/1c72d/food5.jpg&quot;
            alt=&quot;Tempura rice bowl and soba noodle soup served on a tray&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;All in all, try everything, you won’t regret it.&lt;/p&gt;
&lt;h2&gt;Shrines&lt;/h2&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/70dc0d90cfc0c5a487def5c7cbbf1565/1c72d/shrine.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 133.1081081081081%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAbABQDASIAAhEBAxEB/8QAGAABAQEBAQAAAAAAAAAAAAAAAAMBBQT/xAAVAQEBAAAAAAAAAAAAAAAAAAAAAf/aAAwDAQACEAMQAAABpDnzOqgPRTUGq//EAB4QAAIBAwUAAAAAAAAAAAAAAAACAwESFAQREyAi/9oACAEBAAEFApdXxPmRs/uYe5yypkSCqbFtOn//xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAEDAQE/AR//xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAECAQE/AR//xAAgEAACAQQBBQAAAAAAAAAAAAAAAQIDESExEiBBcYGR/9oACAEBAAY/AnF0xOUHg5Rpu3k7+zCZqRe7Ns2/vR//xAAfEAEAAgIABwAAAAAAAAAAAAABABEhMSBRYXGh4fH/2gAIAQEAAT8hTMxkRwkfJ9RUqtTSLYN6rjaWO5EKw40S1uCnOV9s+i4P/9oADAMBAAIAAwAAABCEFcH/xAAVEQEBAAAAAAAAAAAAAAAAAAARIP/aAAgBAwEBPxAj/8QAFhEBAQEAAAAAAAAAAAAAAAAAEQAQ/9oACAECAQE/EGd//8QAHxABAQACAQQDAAAAAAAAAAAAAREAIUEQMWFxgZHw/9oACAEBAAE/ENz2IVXZk/OaFCgCAvdnOXmPKoOZTI6MBGiOEh2rp34wgyAAdE195cLI9CzjzkwFvn0irT1l3POG8//Z&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/70dc0d90cfc0c5a487def5c7cbbf1565/cbe2e/shrine.webp 148w,
/static/70dc0d90cfc0c5a487def5c7cbbf1565/3084c/shrine.webp 295w,
/static/70dc0d90cfc0c5a487def5c7cbbf1565/5ca24/shrine.webp 590w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/70dc0d90cfc0c5a487def5c7cbbf1565/a80bd/shrine.jpg 148w,
/static/70dc0d90cfc0c5a487def5c7cbbf1565/1c91a/shrine.jpg 295w,
/static/70dc0d90cfc0c5a487def5c7cbbf1565/1c72d/shrine.jpg 590w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/jpeg&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/70dc0d90cfc0c5a487def5c7cbbf1565/1c72d/shrine.jpg&quot;
            alt=&quot;Large wooden entrance gate at a Japanese shrine with a visitor in the courtyard&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Shrines are plentiful all throughout Japan. They are a big change of pace from the big city skyscrapers and subways and city streets. The shrines are still going to be crowded probably but if you go to the lesser known ones, it is a serene and calming experience.&lt;/p&gt;
&lt;p&gt;So at most shrines, you can make a small prayer for good fortune at the temple, or buy good luck charms or talisman at the small shops or just marvel at the japanese traditional architecture.&lt;/p&gt;
&lt;h2&gt;Japan Quirks&lt;/h2&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/cfc4c8cbf25a2616e23d250032316d46/1c72d/park.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 133.1081081081081%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAbABQDASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAQBAgUD/8QAFwEAAwEAAAAAAAAAAAAAAAAAAAEDBP/aAAwDAQACEAMQAAABYpjt1m4Zgm90imethMD/xAAdEAACAgIDAQAAAAAAAAAAAAAAAQIDERMQEiIy/9oACAEBAAEFAsGDArbB2NrZI1xPKOy4fwoo/8QAFhEBAQEAAAAAAAAAAAAAAAAAEgAQ/9oACAEDAQE/ARHf/8QAGREAAgMBAAAAAAAAAAAAAAAAABMBEBFh/9oACAECAQE/AWjeVkH/xAAdEAABBAIDAAAAAAAAAAAAAAAAAhARMQEhMlGh/9oACAEBAAY/An5ZLk0TKjsrxlN//8QAHRABAAMBAAIDAAAAAAAAAAAAAQARIUExUWFxkf/aAAgBAQABPyFljemzlLezfUfGRJq1QZEidgYF09zWhn1CtxUx5lPv6z//2gAMAwEAAgADAAAAEETB/P/EABgRAAMBAQAAAAAAAAAAAAAAAAABEVEQ/9oACAEDAQE/EE2l7ys//8QAGBEBAQADAAAAAAAAAAAAAAAAAQARITH/2gAIAQIBAT8QQHIjMtu//8QAHhABAQACAgIDAAAAAAAAAAAAAREAMSFRQXGBodH/2gAIAQEAAT8QymK8HbgAJDpMtNk4V37wMAO3gZvJrY4pZmsgFRPrEoeYO4ihwyJ+ZEK7xkkAxNnzjkwXovB05//Z&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/cfc4c8cbf25a2616e23d250032316d46/cbe2e/park.webp 148w,
/static/cfc4c8cbf25a2616e23d250032316d46/3084c/park.webp 295w,
/static/cfc4c8cbf25a2616e23d250032316d46/5ca24/park.webp 590w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/cfc4c8cbf25a2616e23d250032316d46/a80bd/park.jpg 148w,
/static/cfc4c8cbf25a2616e23d250032316d46/1c91a/park.jpg 295w,
/static/cfc4c8cbf25a2616e23d250032316d46/1c72d/park.jpg 590w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/jpeg&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/cfc4c8cbf25a2616e23d250032316d46/1c72d/park.jpg&quot;
            alt=&quot;Japanese garden with a pine tree supported by ropes&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;From an American going to Japan.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;When riding the escalator, there is a side where people stand and there is a side where people walk.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When entering a department store or maybe a small to medium size restaurant, some of the staff will scream out &lt;code class=&quot;language-text&quot;&gt;SUMIMASEN&lt;/code&gt; (supposedly means excuse me but I am guessing its a welcoming gesture?) in a long loud tone.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;While walking around in the city streets and maybe even in the suburbs walkways, you will encounter close to zero trash cans. Explains the clean streets and sidewalks.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When riding the subway, barely anyone speaks.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When walking in the park, you may encounter a group of old people doing tai chi.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In some restaurants, they encourage and sometimes enforce a no-shoe policy (locker for shoes, and everyone is given slippers).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In some restrooms, they still have the squatty potty installed.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In some restrooms, they have more features than just a toilet (bidet, heated seats, sounds).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Most bathrooms do not carry paper towels.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In some restaurants, they serve DIY green tea instead of water. Also in some restaurants, they do not ask you what you want to drink as the first thing the server asks.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In some stores/shops, after purchasing something, the staff sometimes ties up the purchased item neatly for you. If it is raining outside, they might go the extra mile and try to rainproof the purchased item.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Probably a circumstance of the season that I have been visiting Japan, but I have yet to see sandals or flip-flops in Japan.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;It is frowned upon to eat or drink while walking.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Tattoos are frowned upon perhaps because of the Yakuza.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Some cities have you walking on one side of the walkway (Tokyo, you walk on your right hand side) and then in a different city, it’s the inverse.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title><![CDATA[Getting Started with NextJS, Styled Components and Rebass]]></title><description><![CDATA[A walkthrough of a Next.js starter boilerplate that combines Styled Components for CSS-in-JS and Rebass for UI components, and a look at server-side rendering.]]></description><link>https://www.vietnguyen.site/getting-started-with-nextjs-styled-components-and-rebass/</link><guid isPermaLink="false">https://www.vietnguyen.site/getting-started-with-nextjs-styled-components-and-rebass/</guid><pubDate>Wed, 10 Apr 2019 00:00:00 GMT</pubDate><content:encoded>&lt;blockquote&gt;
&lt;p&gt;TL;DR I made a starter pack for someone who wants to get started with a server rendered &lt;a href=&quot;https://nextjs.org/&quot;&gt;React&lt;/a&gt; framework with the power of &lt;a href=&quot;https://www.styled-components.com/&quot;&gt;Styled Components&lt;/a&gt; and a standard component library in &lt;a href=&quot;https://rebassjs.org/&quot;&gt;Rebass&lt;/a&gt; to work with. You can fork or download this boilerplate &lt;a href=&quot;https://github.com/ulukfuni/nextjs-boilerplate&quot;&gt;here&lt;/a&gt; and jump right in and start coding.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This write up is going to be targeted at people who have experience already using React and want to write server-side rendered apps in React while using the styled components system of writing css-in-js and also using a primitive UI component library as a base for all components. I just word-vomited all the buzzwords and trends in the intro alone, so if I have not scared you off already, let’s continue.&lt;/p&gt;
&lt;h3&gt;Why Server Side Rendering&lt;/h3&gt;
&lt;p&gt;I learned about server side rendering when I first started learning to use the &lt;a href=&quot;https://expressjs.com/&quot;&gt;Express&lt;/a&gt; library in NodeJS. So I will try to put in my own words what I think it is from my own experience but everyone is welcome to google it and find out themselves.&lt;/p&gt;
&lt;p&gt;Server side rendering is when the server that you are communicating with actually sends you the HTML and its fully rendered already, no need for the browser that you are using to do anything to get what it needs to show you. For example, when you get to your Facebook feed (first page after you login), you get the navigation bar at the top and some other navigation menus on the side before you even see any of your friends’ post or ads that Facebook has targeted you with. The navigation stuff has been rendered on the server and sent to you first and that is why its the first for you to see and then the browser takes care of grabbing your friends’ post for you to see.&lt;/p&gt;
&lt;p&gt;So server side rendering helps with speed of delivering the content you want your users to see quickly. Another reason to use server side rendering is search engine optimization. Server side rendered sites are more easily crawlable by search engines like Google so your search rank should be a little higher (although I need to learn more about SEO to confirm this).&lt;/p&gt;
&lt;h3&gt;Why &lt;a href=&quot;https://www.styled-components.com/&quot;&gt;Styled Components&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Before React and the componentization of the web, I was doing CSS the old-fashioned way: writing all my css in one separate file for entire web applications. I did not know how much it sucked until I started implementing &lt;a href=&quot;https://sass-lang.com/&quot;&gt;SASS&lt;/a&gt; in my application. What a game-changer! Separate files can be imported into one file, mixins, nesting, variables. SASS made CSS so much more fun to write and solved the monolith of CSS in monolithic projects. And then came React and ways to write CSS in JS. Sure, there was a whole battle of inline-styles in JS vs. separate file of CSS vs. splitting out the CSS in the same file of the component but I really enjoy that there are all these different ways to style your application. Many more ways than just writing all your css into one file. So now we get to use another nuanced way to write css in your application: Styled Components. I enjoy this way of styling the most right now because you basically build in the styling into the component itself. No .css files needed. Here is an example:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;js&quot;&gt;&lt;pre class=&quot;language-js&quot;&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;import&lt;/span&gt; styled &lt;span class=&quot;token keyword&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;styled-components&apos;&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; Flex &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;styled&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;div&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token template-string&quot;&gt;&lt;span class=&quot;token template-punctuation string&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;
    display: flex;
    &lt;/span&gt;&lt;span class=&quot;token interpolation&quot;&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;props&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;props&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;boxShadow &lt;span class=&quot;token operator&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;token template-string&quot;&gt;&lt;span class=&quot;token template-punctuation string&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;box-shadow: &lt;/span&gt;&lt;span class=&quot;token interpolation&quot;&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;${&lt;/span&gt;props&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;boxShadow&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;token template-punctuation string&quot;&gt;`&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;token interpolation&quot;&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;props&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;props&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;height &lt;span class=&quot;token operator&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;token template-string&quot;&gt;&lt;span class=&quot;token template-punctuation string&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;height: &lt;/span&gt;&lt;span class=&quot;token interpolation&quot;&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;${&lt;/span&gt;props&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;height&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;token template-punctuation string&quot;&gt;`&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;token interpolation&quot;&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;props&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;props&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;center &lt;span class=&quot;token operator&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;token template-string&quot;&gt;&lt;span class=&quot;token template-punctuation string&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;justify-content: center; align-items: center;&lt;/span&gt;&lt;span class=&quot;token template-punctuation string&quot;&gt;`&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;token interpolation&quot;&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;props&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;props&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;border &lt;span class=&quot;token operator&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;token template-string&quot;&gt;&lt;span class=&quot;token template-punctuation string&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;border: &lt;/span&gt;&lt;span class=&quot;token interpolation&quot;&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;${&lt;/span&gt;props&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;border&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;token template-punctuation string&quot;&gt;`&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;token template-punctuation string&quot;&gt;`&lt;/span&gt;&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;default&lt;/span&gt; &lt;span class=&quot;token parameter&quot;&gt;props&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;
    &lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;Flex &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;...&lt;/span&gt;props&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;&gt;&lt;/span&gt;
        &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;props&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;children&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;/&lt;/span&gt;Flex&lt;span class=&quot;token operator&quot;&gt;&gt;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Above, we have a customized div that can take props of height or box shadow or border and can be reused throughout your entire application if you wanted. You can add more conditionals to add more customizability to your div and basically eliminate writing css and just add the prop that you need. The pitfalls of styled components that I can see (so far in my experience), is with the use of pseudo selectors like :last and :nth. Not sure how to implement those just yet in styled components but by using javascript, that can be mitigated with some creativity. I am sure there are other pitfalls but I really like how styled components fits in with the react ecosystem.&lt;/p&gt;
&lt;h3&gt;Why &lt;a href=&quot;https://rebassjs.org/&quot;&gt;Rebass&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;There are many component libraries that you can go with (i.e &lt;a href=&quot;https://material-ui.com/&quot;&gt;Material&lt;/a&gt;, &lt;a href=&quot;https://react.semantic-ui.com/&quot;&gt;Semantic&lt;/a&gt;, &lt;a href=&quot;https://react-bootstrap.github.io/&quot;&gt;React Bootstrap&lt;/a&gt; to name a few), but I like Rebass because of its small filesize and how well it works with Styled Components in order to extend its foundational components. Here is an example of using a Rebass component and extending it with Styled Components.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;js&quot;&gt;&lt;pre class=&quot;language-js&quot;&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; Card &lt;span class=&quot;token keyword&quot;&gt;as&lt;/span&gt; Base &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;rebass&apos;&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;import&lt;/span&gt; styled &lt;span class=&quot;token keyword&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;styled-components&apos;&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; Card &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;styled&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;Base&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token template-string&quot;&gt;&lt;span class=&quot;token template-punctuation string&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;token interpolation&quot;&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;props&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;props&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;border &lt;span class=&quot;token operator&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;token template-string&quot;&gt;&lt;span class=&quot;token template-punctuation string&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;border: &lt;/span&gt;&lt;span class=&quot;token interpolation&quot;&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;${&lt;/span&gt;props&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;border&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;token template-punctuation string&quot;&gt;`&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;
    minHeight: 200px
&lt;/span&gt;&lt;span class=&quot;token template-punctuation string&quot;&gt;`&lt;/span&gt;&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;default&lt;/span&gt; &lt;span class=&quot;token parameter&quot;&gt;props&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;
    &lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;Card &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;...&lt;/span&gt;props&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;&gt;&lt;/span&gt;
        &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;props&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;children&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;/&lt;/span&gt;Card&lt;span class=&quot;token operator&quot;&gt;&gt;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Using the Rebass Card component as a base, we can add more conditionals or css that we want on the Card component and make it our own.&lt;/p&gt;
&lt;h3&gt;Awesome &lt;a href=&quot;https://nextjs.org/&quot;&gt;NextJS&lt;/a&gt; features I Like&lt;/h3&gt;
&lt;p&gt;One of my favorite features of NextJS is the file-system routing. There is a directory in your project called pages and each file in there is a pathname matching the filename (i.e. &lt;code class=&quot;language-text&quot;&gt;/pages/blog.js&lt;/code&gt; is served as &lt;code class=&quot;language-text&quot;&gt;whateveryoursiteiscalled.com/blog&lt;/code&gt;). This makes routing so simple and it comes right out of the box. The file-system routing also comes with automatic code splitting for each of your pages in the pages directory. What this means is the page will only come bundled with whatever you imported into your js file. This keeps the bundles that are served up to the browser smaller and other packages that you are not using on that actually file will not be served alongside saving you more space and increasing load speed.&lt;/p&gt;
&lt;p&gt;Another feature that I really like in NextJS is the way it handles fetching data for pages from the server. Instead of doing this:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;js&quot;&gt;&lt;pre class=&quot;language-js&quot;&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;span class=&quot;token function&quot;&gt;componentDidMount&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    api&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;fetch&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;url&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;res&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;setState&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token literal-property property&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; res &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;and letting the browser handle the data fetch, NextJS comes with a method that you can use to offload the data fetch onto the server and pass it into your page as props. Here is the code for that:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;js&quot;&gt;&lt;pre class=&quot;language-js&quot;&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;async&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;getInitialProps&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; res &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;await&lt;/span&gt; api&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;fetch&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;url&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; data &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;await&lt;/span&gt; res&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;json&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;

    &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; data &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token function&quot;&gt;constructor&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;props&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;state &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;token literal-property property&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; props&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;data
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Now your page can have server loaded data already before the browser needs to do any data fetching.&lt;/p&gt;
&lt;p&gt;Hope you enjoyed this write up and think about exploring all of these technologies whether together (which they all do so really well together) or separately. Again, you can fork or download this boilerplate &lt;a href=&quot;https://github.com/ulukfuni/nextjs-boilerplate&quot;&gt;here&lt;/a&gt; and jump right in and start coding.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[My Cats and My Start as a Pet Owner]]></title><description><![CDATA[The story of how I became a pet owner, from rescuing a stray little black cat named Hades to bringing home a playful white Scottish Fold kitten named Loki.]]></description><link>https://www.vietnguyen.site/my-cats/</link><guid isPermaLink="false">https://www.vietnguyen.site/my-cats/</guid><pubDate>Thu, 04 Apr 2019 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/73ae1a21363775b9bbaebedde2f1f344/1c72d/hades-n-loki.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 133.1081081081081%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAbABQDASIAAhEBAxEB/8QAGAAAAwEBAAAAAAAAAAAAAAAAAAMEAQL/xAAVAQEBAAAAAAAAAAAAAAAAAAAAAf/aAAwDAQACEAMQAAABqVssVEBTV0cgSEv/xAAcEAACAgMBAQAAAAAAAAAAAAABAgADERITISL/2gAIAQEAAQUCDfXZtw9hlRhS0Nm4TTM621m06u3jMMm/23//xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAEDAQE/AR//xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAECAQE/AR//xAAdEAACAQQDAAAAAAAAAAAAAAAAARECEBIxMoGR/9oACAEBAAY/AoVMmOKHxOhtP0jFG9I3KvSM/8QAGxABAAIDAQEAAAAAAAAAAAAAAQARITFBUWH/2gAIAQEAAT8hRegu1lqB1u2bkKa1BUro7mGktbQTtf25w2oIUa/BzDUMEzagWjpNnP/aAAwDAQACAAMAAAAQbAAA/8QAFxEAAwEAAAAAAAAAAAAAAAAAAAEQEf/aAAgBAwEBPxDKj//EABcRAAMBAAAAAAAAAAAAAAAAAAABERD/2gAIAQIBAT8QpVjR/8QAHhABAQADAQACAwAAAAAAAAAAAREAITFBUXGBkaH/2gAIAQEAAT8Qj5pega5Pc43ukhcqJ1HVnuXSKsIOPj3DY6gRwDE+47/uFUQBPHuFDFB0p+dmLcJELy58F5zJFNt+83O8QPqGf//Z&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/73ae1a21363775b9bbaebedde2f1f344/cbe2e/hades-n-loki.webp 148w,
/static/73ae1a21363775b9bbaebedde2f1f344/3084c/hades-n-loki.webp 295w,
/static/73ae1a21363775b9bbaebedde2f1f344/5ca24/hades-n-loki.webp 590w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/73ae1a21363775b9bbaebedde2f1f344/a80bd/hades-n-loki.jpg 148w,
/static/73ae1a21363775b9bbaebedde2f1f344/1c91a/hades-n-loki.jpg 295w,
/static/73ae1a21363775b9bbaebedde2f1f344/1c72d/hades-n-loki.jpg 590w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/jpeg&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/73ae1a21363775b9bbaebedde2f1f344/1c72d/hades-n-loki.jpg&quot;
            alt=&quot;Hades, the black cat, and Loki, the white kitten&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;TL;DR Cat pics and the internet have to go together so incoming cat picture post with sappy story: My journey to owning two furry animals was a very rewarding albeit stress-inducing adventure. The decision to even be a pet owner was like a knee-jerk choice but it has really humbled me and furthered my growth as a person. Pets can really enrich your life and I would super recommend one to anyone.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So I own two cats but I really feel like they own me. They sleep all day and play all night. My first cat’s name is Hades (the King of the Underworld in Greek mythology) and she is almost 5 human years old at the time of this writing. She is a black domestic long haired cat. No idea what her breed is but I would say a mix of hellcat and angry fury would best describe her personality. Basically, she’s an ice queen.&lt;/p&gt;
&lt;p&gt;My other cat’s name is Loki (Norse God of Mischief, see a running theme here?) and he is a one human year old (at the time of this writing) white long-hair Scottish Fold Chinchilla. He is definitely appropriately named because of all the trouble he has caused on his first successful rotation of the planet Earth around the sun. Whereas Hades is icy and edgy, Loki is a small ball of warm playful energy.&lt;/p&gt;
&lt;p&gt;I never would have guess that I would be a cat owner in my younger years. My elementary, middle and high school self did not know the first thing about cats, never have petted one, nor hardly ever came into contact with their kind. Did not have much association with dogs either (my dad was allergic to pet hair and dander, the deadly kind I would guess from his ninja like avoidance of them). My first interaction with our smaller furry friends was when I was in high school and I was tasked with walking my cousin’s dog (I stayed at their place my senior year in high school) at night.  His name was Porkchop and he was a small Yorkshire Terrier. He was one of those dogs who would cuddle with anyone that would give him attention and loved pets and rubs. He also loved trying to pick fights with any other dog ever (when I mean any, I mean any thing with four legs and in a 10 feet radius of him).&lt;/p&gt;
&lt;p&gt;Porkchop was my first “Hey, maybe I’ll get a dog one day” type of thought way back when. See, no cat thoughts or anything.&lt;/p&gt;
&lt;p&gt;Let’s fast forward to the year 2014 when I was well into college and my then-girlfriend (now wife) were sort of living together. My now-brother-in-law was working at a car dealership which had a cat colony situated relatively nearby to him and he would feed the cats of the colony (colony might imply that there was like a Lion King-esque unity between felines, but really it was just a bunch of stray cats). Maybe through sympathy, empathy or pity, he would hit up the family group chat with pics and ask if anyone would want one. He was insistent on an orange one.&lt;/p&gt;
&lt;p&gt;I am still not sure or maybe I don’t remember, but we went to his car dealership to see this orange cat. I remember distinctly that it was a dreary, rainy, wet day. In some cover, the cats were fed hard food on the ground. That was the first time I have seen so many cats. We saw the orange cat and thought “How cute”. Out of the corner of both of our eyes, we saw a small black furball in the corner of the building hiding under a picnic table just staring at the pile of hard food that the other cats were eating but never moving towards it. When all the other cats were done eating was when little small black furball would make its move. By then, my wife had her mind made up and chose this little loner of a cat. She was fast, ferocious and very hard to capture but fate had other plans for this loner cat.&lt;/p&gt;
&lt;p&gt;On the storming night of the eve of Friday the 13th with a full moon looming, we got a notification that our new addition was on its way over. She was hiding out in the car dealership’s storage unit, trying to get away from the rain. With the small space and the help of coworkers, they were able to secure little loner cat in a a blue bin that they poked a hole into (Thank you Tuan). Right when I opened the box, a little black lightning shot out and went into a frenzy trying to find a safe spot. The cat went into the farthest corner of the laundry room and decided to pee in fear of its new aggressors.&lt;/p&gt;
&lt;p&gt;Let me tell you, you never forget the first time you smell cat pee especially the smell of it when it belongs to your first cat. I picked up the cat (first time handling a cat), cleaned up the pee and with the help of my wife and her two youngest siblings (Thank you Emily and Lilian), we all gave the cat a sink bath (first time for everyone, cat included). Dirt, grime, mud and probably a few (disgusting) bugs came off. The cat was clean. We got a cage for her and fresh food and water, and a warm water bottle wrapped in a towel that would act as a mother cat’s warmth. She was not going to be the loner cat at feeding time anymore. That day she became our Hades.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/7a72ec74bfc3f23205d724845c49920e/baby-hades.jpg&quot; alt=&quot;Hades as a kitten&quot;&gt;&lt;/p&gt;
&lt;p&gt;Fast forward a few years and a slow melting of Hades’s first layer of her icy exterior, and we came to the conclusion that maybe another one of her species being around could lead to another layer slowly dissipating. By this time, I learned of other cat breeds, stared intently at all the cat pics the internet had to offer, and ooohhhhh’d and ahhhhhh’d at all the disgustingly cute kitten pictures on IG. We decided we were ready for another cat without Hades’s consent.&lt;/p&gt;
&lt;p&gt;We got Loki through a breeder (no dramatic story here, it was a very cut and dry hand off) and we were pleasantly surprised that a cat can be this warm and loving towards humans. Big smiles as we came home with him. Finally, Loki might be the last piece of the puzzle to unlock Hades’s icy heart.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/6aceb1afdb7a38903d4b4e4c97c401bb/1c72d/baby-loki.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 133.1081081081081%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAbABQDASIAAhEBAxEB/8QAGAAAAwEBAAAAAAAAAAAAAAAAAAMFBAL/xAAWAQEBAQAAAAAAAAAAAAAAAAAAAQL/2gAMAwEAAhADEAAAAcJu7zYo8q6pkyKgB//EABsQAAMBAQADAAAAAAAAAAAAAAECEQMAEzEy/9oACAEBAAEFAvGT0hJ5UaOsD50lgoLBs8hM5QfSfP8A/8QAFBEBAAAAAAAAAAAAAAAAAAAAIP/aAAgBAwEBPwEf/8QAFBEBAAAAAAAAAAAAAAAAAAAAIP/aAAgBAgEBPwEf/8QAGhAAAgMBAQAAAAAAAAAAAAAAAAECECERcf/aAAgBAQAGPwI2nh1YdjCT8tG0j//EABwQAQADAQEAAwAAAAAAAAAAAAEAESExQVFhcf/aAAgBAQABPyHuszyXQJfM7BHdlstv3EvseJ2YYE8cl5Y+pc78z9hsRULiRVGy/9oADAMBAAIAAwAAABB7zED/xAAYEQADAQEAAAAAAAAAAAAAAAAAAREQIf/aAAgBAwEBPxArxdVP/8QAFxEBAQEBAAAAAAAAAAAAAAAAAREAEP/aAAgBAgEBPxDQ4NLv/8QAHRABAAIDAAMBAAAAAAAAAAAAAQARITFBUWFxgf/aAAgBAQABPxAOs9VDvx9qNeuUcxjddJjNXmZNCiXRj68NIa+O3KQPF1rpqXdu9HWFqMUGn4wOzLIrsSBHsiCkaSyOueT/2Q==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/6aceb1afdb7a38903d4b4e4c97c401bb/cbe2e/baby-loki.webp 148w,
/static/6aceb1afdb7a38903d4b4e4c97c401bb/3084c/baby-loki.webp 295w,
/static/6aceb1afdb7a38903d4b4e4c97c401bb/5ca24/baby-loki.webp 590w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/6aceb1afdb7a38903d4b4e4c97c401bb/a80bd/baby-loki.jpg 148w,
/static/6aceb1afdb7a38903d4b4e4c97c401bb/1c91a/baby-loki.jpg 295w,
/static/6aceb1afdb7a38903d4b4e4c97c401bb/1c72d/baby-loki.jpg 590w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/jpeg&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/6aceb1afdb7a38903d4b4e4c97c401bb/1c72d/baby-loki.jpg&quot;
            alt=&quot;Loki as a kitten&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Nope. Big time NOPE.&lt;/p&gt;
&lt;p&gt;If anything, Hades became a blizzard, Elsa-from-Frozen levels distant and cold and we had a whole new set of problems to deal with. The adjustment period for the two cats alone is an entire story for another time. After said adjustment period, we come to the present with me, my wife, and our yin and yang cats.&lt;/p&gt;
&lt;p&gt;And that is how I came to have two troublesome cats but this is the life I chose and I do not have any regrets about it.&lt;/p&gt;
&lt;p&gt;You can find more pictures of Hades and Loki &lt;a href=&quot;https://www.instagram.com/catterblack/&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Case Study - Web Scrapers]]></title><description><![CDATA[An experiment comparing web scrapers in Node.js, PHP, and Python using Cheerio, Goutte, and BeautifulSoup to pull Dwyane Wade stats from Basketball Reference.]]></description><link>https://www.vietnguyen.site/web-scraper-case-study/</link><guid isPermaLink="false">https://www.vietnguyen.site/web-scraper-case-study/</guid><pubDate>Mon, 01 Apr 2019 00:00:00 GMT</pubDate><content:encoded>&lt;blockquote&gt;
&lt;p&gt;TL;DR: I made a bunch of web scraper scripts in different languages to see which one I liked and for experimentation purposes. NodeJs was easy to work with since I worked with it in the past, PHP was easy to start up, easy to code, and low barrier for entry and Python was the hardest to get started as well as code but most fun because it was a new experience. Also as a highlight to Dwyane Wade, greatest Heat Player of all Time.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Just an experiment to see if I can do this and also to explore different languages that I have not used before for web scraping and see how fast I can adapt to them.&lt;/p&gt;
&lt;p&gt;Web Scraping, for those who don’t know, is going to a web page/site and grabbing some sort of data from the web page/site. Then you can use the data however you want. There are some unethical aspects but for this little project, we are just doing it for experimentation.&lt;/p&gt;
&lt;p&gt;So I will be looking at ease of starting up (how much setup before I can do something cool), available libraries or packages to use (installs and such), ease of language tools (Fun Factor) and anything else I can think of in the process.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;https://www.basketball-reference.com/players/w/wadedw01.html&quot;&gt;webpage&lt;/a&gt; we will be scraping is:
&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 64.86486486486486%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAANCAIAAAAmMtkJAAAACXBIWXMAAAsTAAALEwEAmpwYAAACWUlEQVR42l1SS2/TQBD2j+MHcCp3rvwJDki9IB49cUJtL4AqgZpGIUBTlaoqUJLSNKUlcRLb8SP2xo9de+19+BHGKVUlPo1m5xvvtzO7Y2Xpnjj99sn37unp6Xm/73leVVW5lIWUWZaFYUTiOE4SmrG8WjLOhRBMbZfXb82TbcU7fI7O3hvaeDK6ch0rjQklQRKi2HNI5GcJXszN0dVA7e4PDrZm6iVyQ9/zcUAmo5Hy7un6cbv1q9/v9bpD1XA9DGcva1RVWcCi95qtZ2uNF2sfntxDeh8yuczBu66nDI87aKb5aOHqWujYoW0lUVTk9eeiqMVHXxqPH97vPXrwe2+zqCRkyrIEDxdUkogIxinGKcZxEGC0SDAGytNsVX+JSWLopjAsmdBVQ9BS9U983v1hWaaHEBDf9xe+HwQBQogQsvwPtaZarbfiwbfDPxeX07Exn7tRFMUxvC4ICaUUNlVlKRnlKSmLvLrFXdvp2Tbrvaazs5iyhGBAGGKQxwQTHIW+P+hs9ZovI2TC5GgSpzQBLwU3dE2Zjj0SRlXOBMyQc9tJgyCDIJecs5qCgmdJIXlKWRCwIhdSMHi1uWMpusEMk2UphyxoJhp1vUwKAZQzMRxTD7E8l0Ap5UOVkpiXRT3LuWMrhpk5LmNMLuG/EtK0GYlBmVclHJaPp5kxYx7iQFkm1UlGUwFNQWUHKtu2N1KN4QiuoN/AnOmGfgdNqw0AO8CwFU0vppPryfByonSOfm6++bize7jXPmh+qu0m2FvZbaYDcaN93Ggd7W58bm0c7L/6urPe/AuSjbvsVxkJMgAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;picture&gt;
          &lt;source
              srcset=&quot;/static/545db7ab97c0f2879769d78efa46c580/cbe2e/dwade.webp 148w,
/static/545db7ab97c0f2879769d78efa46c580/3084c/dwade.webp 295w,
/static/545db7ab97c0f2879769d78efa46c580/5ca24/dwade.webp 590w,
/static/545db7ab97c0f2879769d78efa46c580/dad35/dwade.webp 885w,
/static/545db7ab97c0f2879769d78efa46c580/2baf0/dwade.webp 1180w,
/static/545db7ab97c0f2879769d78efa46c580/1ccea/dwade.webp 2766w&quot;
              sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
              type=&quot;image/webp&quot;
            /&gt;
          &lt;source
            srcset=&quot;/static/545db7ab97c0f2879769d78efa46c580/12f09/dwade.png 148w,
/static/545db7ab97c0f2879769d78efa46c580/e4a3f/dwade.png 295w,
/static/545db7ab97c0f2879769d78efa46c580/fcda8/dwade.png 590w,
/static/545db7ab97c0f2879769d78efa46c580/efc66/dwade.png 885w,
/static/545db7ab97c0f2879769d78efa46c580/c83ae/dwade.png 1180w,
/static/545db7ab97c0f2879769d78efa46c580/38abd/dwade.png 2766w&quot;
            sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
            type=&quot;image/png&quot;
          /&gt;
          &lt;img
            class=&quot;gatsby-resp-image-image&quot;
            src=&quot;/static/545db7ab97c0f2879769d78efa46c580/fcda8/dwade.png&quot;
            alt=&quot;Dwyane Wade&quot;
            title=&quot;&quot;
            loading=&quot;lazy&quot;
            decoding=&quot;async&quot;
            style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
          /&gt;
        &lt;/picture&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;We will be grabbing the Summary Stat box. Let’s get started!!!!&lt;/p&gt;
&lt;h2&gt;NodeJs&lt;/h2&gt;
&lt;p&gt;We will first start with the language that I am super familiar with: Javascript. Here is the scorecard for my look into web scraping with Javascript:&lt;/p&gt;
&lt;p&gt;As Javascript is the first language that I used in my professional career, it has been a constant throughout all my jobs. I have gone through jQuery all the way up to React/NodeJs.&lt;/p&gt;
&lt;h4&gt;Ease of Starting Up&lt;/h4&gt;
&lt;p&gt;NodeJs was pretty easy to start up with because I already had all the dependencies installed to use NodeJs. For a beginner, you would have to install &lt;a href=&quot;https://nodejs.org/en/download/&quot;&gt;NodeJS&lt;/a&gt; and &lt;a href=&quot;https://www.npmjs.com/get-npm&quot;&gt;NPM&lt;/a&gt; and then after that install the individual packages. Even before that you will need a bit of knowledge surrounding the command line/terminal. Not very hard but a few steps before you can get started.&lt;/p&gt;
&lt;h4&gt;Available Libraries/Packages&lt;/h4&gt;
&lt;p&gt;Since Javascript is so popular, the number of tools available to get started are numerous and there are also many tutorials out there on web scraping.&lt;/p&gt;
&lt;h4&gt;Fun Factor&lt;/h4&gt;
&lt;p&gt;I am glad the Basketball Reference web site we are using is somewhat proper when it comes to HTML as I have seen some crazy websites with auto-generated HTML classes that make it a pain to scrape. I only had some trouble setting up the async operations of requesting the website and then scraping the response coming back. Still a blast to write javascript.&lt;/p&gt;
&lt;p&gt;For web scraping, I chose the &lt;a href=&quot;https://cheerio.js.org/&quot;&gt;Cheerio&lt;/a&gt; library (server-side jQuery) and &lt;a href=&quot;https://github.com/axios/axios&quot;&gt;Axios&lt;/a&gt; (http library) library to grab the HTML to parse through. You can easily go with a lesser known library called &lt;a href=&quot;https://github.com/matthewmueller/x-ray&quot;&gt;X-ray&lt;/a&gt; which does both of what axios and cheerio does though. For the API routing, I chose &lt;a href=&quot;https://hapijs.com/&quot;&gt;Hapi&lt;/a&gt; but you can easily use &lt;a href=&quot;https://expressjs.com/&quot;&gt;Express&lt;/a&gt; (far more popular but I wanted to try something new) instead.&lt;/p&gt;
&lt;p&gt;Here is the scraping code in 4 lines:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;js&quot;&gt;&lt;pre class=&quot;language-js&quot;&gt;&lt;code class=&quot;language-js&quot;&gt;
&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; url &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;https://www.basketball-reference.com/players/w/wadedw01.html&apos;&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; response &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;await&lt;/span&gt; axios&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;url&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; $ &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; cheerio&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;load&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;response&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;data&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&apos;.stats_pullout&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;html&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;You can take a look at the rest of the code &lt;a href=&quot;https://github.com/ulukfuni/web-scrape-blog-js&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;PHP&lt;/h2&gt;
&lt;p&gt;The second programming language I learned after Javascript is PHP and I almost forgot to try web scraping with it.&lt;/p&gt;
&lt;h4&gt;Ease of Starting Up&lt;/h4&gt;
&lt;p&gt;Since I have a MacBook, PHP 7 is already installed which is really nice. I believe on other OS, you would have to download it (probably just Windows). The only thing you need to install afterwards is &lt;a href=&quot;https://getcomposer.org/&quot;&gt;composer&lt;/a&gt; for package management. PHP even has a built in web server on the command line which makes it super easy to get started.&lt;/p&gt;
&lt;h4&gt;Available Libraries/Packages&lt;/h4&gt;
&lt;p&gt;I had to do a little research into different web scraping packages and I was surprised that there were a lot of to choose from. I chose &lt;a href=&quot;https://github.com/FriendsOfPHP/Goutte&quot;&gt;Goutte&lt;/a&gt; simply because it was the first one that showed up on google search (the power of SEO!). Since there is a built in web server for PHP, we technically do not need a package for that.&lt;/p&gt;
&lt;h4&gt;Fun Factor&lt;/h4&gt;
&lt;p&gt;I will probably never get used to using dollar signs to denote variables but PHP is also not a strongly typed language similarly to Javascript so I can go about coding in PHP the same way I go about coding in Javascript (Spaghetti code FTW). As an aside, I have noticed the rise in strongly typed languages and even TypeScript is growing in popularity at the time of this writing. Anyway, PHP is fairly easy to get up and running and I did not have any trouble at all. Probably the fastest from start to finish for me to write.&lt;/p&gt;
&lt;p&gt;Here is the scraping code in 4 lines:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;php&quot;&gt;&lt;pre class=&quot;language-php&quot;&gt;&lt;code class=&quot;language-php&quot;&gt;&lt;span class=&quot;token variable&quot;&gt;$url&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string double-quoted-string&quot;&gt;&quot;https://www.basketball-reference.com/players/w/wadedw01.html&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token variable&quot;&gt;$client&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;Client&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token variable&quot;&gt;$crawler&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token variable&quot;&gt;$client&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;-&gt;&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string single-quoted-string&quot;&gt;&apos;GET&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token variable&quot;&gt;$url&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token variable&quot;&gt;$output&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token variable&quot;&gt;$crawler&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;-&gt;&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;filter&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string double-quoted-string&quot;&gt;&quot;.stats_pullout&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;-&gt;&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;extract&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string double-quoted-string&quot;&gt;&quot;_text&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;You can take a look at the rest of the code &lt;a href=&quot;https://github.com/ulukfuni/web-scrape-blog-php&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Python&lt;/h2&gt;
&lt;p&gt;I always had an interest in learning Python due to the supposed ease of making games and also its ties to the Data Science and Big Data movements. Lets see how it fares with a simple webpage scrape.&lt;/p&gt;
&lt;h4&gt;Ease of Starting Up&lt;/h4&gt;
&lt;p&gt;Just like PHP, Python is already installed on my MacBook but only Python 2 and not the latest one which is 3. So I had to go through the process of installing Python 3 and dealing with having two versions of Python installed. I also had to install &lt;a href=&quot;https://pypi.org/project/pip/&quot;&gt;Pip&lt;/a&gt; which is the package manager for python I suppose. After that, I was ready to install packages and start writing code.&lt;/p&gt;
&lt;h4&gt;Available Libraries/Packages&lt;/h4&gt;
&lt;p&gt;Python also had a bunch of libraries that are useful for web scraping and many useful tutorials around web scraping. I had a hard time choosing which one to use as I wanted to use the one that had the most stars on GitHub and landing on &lt;a href=&quot;https://pypi.org/project/beautifulsoup4/&quot;&gt;BeautifulSoup&lt;/a&gt;. It uses a jQuery-lite look up so that is what sold it for me.&lt;/p&gt;
&lt;h4&gt;Fun Factor&lt;/h4&gt;
&lt;p&gt;It was a change of pace to ditch curly brackets (a JS staple) and instead use spaces to denote scope. After the initial startup, writing code was very easy even though I had to look up some JS to python equivalents (console.log equivalent in python was my first search). Since it was my first foray into the language, this took me the longest but since it was the most unknown to me, I had the most fun in using python. Kind of like getting a new car and driving it for the first time. By driving it, you discover some kinks and little flaws but you still know how to drive it since it is a car. I hope to do more little projects in python soon.&lt;/p&gt;
&lt;p&gt;Here is the scraping code in 4 lines:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;python&quot;&gt;&lt;pre class=&quot;language-python&quot;&gt;&lt;code class=&quot;language-python&quot;&gt;url &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;https://www.basketball-reference.com/players/w/wadedw01.html&apos;&lt;/span&gt;
response &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; get&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;url&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
soup &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; BeautifulSoup&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;response&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;text&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;html.parser&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;soup&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;findAll&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&apos;div&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; class_&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&apos;stats_pullout&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;You can take a look at the rest of the code &lt;a href=&quot;https://github.com/ulukfuni/web-scrape-blog-py&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[My Career Thus Far]]></title><description><![CDATA[A look back at a career path from an electrical engineering degree into software development jobs at several companies and startups, with resume shotgunning.]]></description><link>https://www.vietnguyen.site/my-career-thus-far/</link><guid isPermaLink="false">https://www.vietnguyen.site/my-career-thus-far/</guid><pubDate>Wed, 20 Mar 2019 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;I have often thought about the ‘what if’ about multiple things in my life but my career seems to be one that I think about the most. For those who don’t know, I graduated with a degree in Electrical Engineering (took me about 6 years, I know all about slacking) but I do software for my day job. Before graduating at all and maybe even before entering college, I did not have the faintest idea of what I wanted to do in regards to my career or finding a way to earn money to survive. I was quite stupid back then. &lt;del&gt;I had a ton of interest in making video games but did not do any research into that career field.&lt;/del&gt;&lt;/p&gt;
&lt;p&gt;The greatest driving force that brought me into programming and software development was my Senior Design Course. This class was like the final boss at the end of the tunnel, but you didn’t have to slay the boss, more like present a culmination of all that you have learned into a small tidy project with a group of your peers and hope you smile big enough and have enough pages of big words in your research paper/thesis that you hand over and pray a year plus of work does not get thrown down the dumpster and you can finally graduate. High pressure makes diamonds, they say.&lt;/p&gt;
&lt;p&gt;See, that course taught me that working with others is fun, if they are super capable and know their role in the project well. I was put in the programming lead of the project and it basically was the first real world experience of making things and breaking things to see if they worked. And you weren’t penalized for breaking the thing, you learned from it. No failing a whole course because your program did not run on the twentieth try or you fried a capacitor because you ran a crapton of voltage through and did not do the math first. Consequence-free learning was pretty blissful.&lt;/p&gt;
&lt;p&gt;So why was I not an electrical engineer right now? Well, programming on my own was fun and also not a danger to my physical being. I finally learned how to learn and also how to Google (writing the perfect search query is a skill). I also found out that websites can be made through programming. I always had an interest in design or artsy stuff but did not have the creative chops to make/draw/design things from pure nothing. So making code into artsy stuff, amazed me quite a bit.&lt;/p&gt;
&lt;p&gt;To keep the software movement I had going, I looked around job boards for something, anything that can keep this going. &lt;del&gt;Should have been looking for EE jobs lol&lt;/del&gt; I implemented the shotgun-resume method of job application. After a week, I had an interview request, my first as a prospective programmer, for an internship position at Riptide Software. The interview was nerve-wracking. I finally realized what I was experiencing back then was anxiety, my heart was beating so fast that I thought it was going to jump out of my body and run a marathon outside. I remember they asked me questions about what coursework I did, if I knew some of the technologies they were using and some other standard interview stuff I got to hear over the years. I lied my ass off. I said ‘yes’ to everything. I probably heard of some of the technology they used (JavaScript, HTML, databases) but look, I was fresh off graduating from Electrical Engineering courses that taught nothing close to those technologies.&lt;/p&gt;
&lt;p&gt;To this day, I am still not sure why I was hired. It could have been my enthusiasm for programming (I was honest in saying that I liked how code turned words into artsy stuff). It could have been that I was a convincing liar. Who knows? I am eternally grateful that they gave me a chance and I learned a whole bunch and it started me down the path that leads to my here and now.&lt;/p&gt;
&lt;p&gt;So after Riptide Software (I was let go), I scrambled because no one plans on being let go. Shotgun all the resumes into all the job boards. I got an interview with BookIt.com. I went through a grueling (at the time, I thought it was long and arduous, but it was standard for the software industry) three hour interview complete with online quiz, whiteboard programming questions and grilling from three developers. First time doing something like that, but by then I had some experience in the field and could lie better and be even more convincing. To my surprise (really big imposter syndrome stuff right here), I got the job.&lt;/p&gt;
&lt;p&gt;So BookIt taught me a lot of the principles that go into software development. BookIt also had some of the most awesome people that I had the pleasure of working with. I took on some of the more difficult tasks (for me at the time) and finally felt comfortable experimenting with some side projects. BookIt also had a good work culture. It was a great time and I had planned to stay there a while but there were other plans in store. I was one of the couple of people that had to be let go because of budget cuts. It was pretty unfortunate, and the day they delivered the news was pretty upsetting (the whole scene as you would imagine it in the movies: called into superior’s office, told the news, rushed to desk to pack things up, said goodbyes and left the building forever). At the time, I tried to rationalize their decision, probably a mix of “It’s a business” and I was probably an easy cut because I was last one in (no seniority).&lt;/p&gt;
&lt;p&gt;Alright so back to scrambling because no one plans to be the victim of budget cuts. Shotgun all the resumes into all the job boards once again. For whatever reason, I caught the eye of a startup by the name of Listing Power Tools (LPT). Interview was not to industry standard so I got through just fine. Since LPT was in its early days, there were a lot of open positions and I was able to refer some people * &lt;strong&gt;&lt;em&gt;cough&lt;/em&gt;&lt;/strong&gt; * &lt;strong&gt;&lt;em&gt;cough&lt;/em&gt;&lt;/strong&gt; * &lt;del&gt;from early budget cuts company&lt;/del&gt; * &lt;strong&gt;&lt;em&gt;cough&lt;/em&gt;&lt;/strong&gt; * &lt;strong&gt;&lt;em&gt;cough&lt;/em&gt;&lt;/strong&gt; * and it was like I was back at BookIt again. Startup life was nice but different. LPT was where I expanded my knowledge base immensely and wore many different hats. Basically a level up. It was all going so well. And then one day, we were all rounded up for an impromptu meeting in the morning by our HR person and we were all told that operations have been shut down and we were all out of the job. This one was a heartbreaker. There were signs but no immediate red flags so the blindside was a tsunami. At least some scathing Glassdoor reviews were made in the aftermath.&lt;/p&gt;
&lt;p&gt;And on cue once again was scrambling and shotgunning resumes because no one plans to be at a failed startup when it actually goes down. This one took a while to come back from. I cast a wide net. I had many interviews at many different companies and not one offer for a while. It was disheartening. Finally, I accepted an offer from a company called Veristream. The company was almost fully remote and that was a first for me. No commuting for the first time in my career was truly awesome. My poor 12 year old car can take a break. It was nice for a while.&lt;/p&gt;
&lt;p&gt;Even though I was employed by Veristream, I was still accepting interviews. The wide net worked a little too well. One company that just had an insanely long process (probably due to startup reasons) was eMindful. I had to go through a few separate interviews and a take home project in the span of 2 months. The take home project was nerve wracking because it was in a new technology that I wasn’t too familiar with but I worked at it hard because eMindful had a former LPT alumni at the helm and I was super interested in working with him again. By a miracle, I was offered a position at eMindful.&lt;/p&gt;
&lt;p&gt;For the first time, I did not have to scramble or grab my resume shotgun. I actually had a choice and a plan. I decided to leave Veristream (first time putting in a two week notice, that conversation was awkward) for eMindful. Similar to LPT, eMindful was a startup that was just starting to build out their software development department. No referrals this time though but I did end up working with someone else from my BookIt days. Also, another similarity to LPT, I was tasked with building a product from scratch and delivering it on a deadline. I have to say that this final product that me and the dev team built is one of my crowning achievements as I wrote a lot of the code in a crunch and it works (this matters the most) and it looks good (matters second most).&lt;/p&gt;
&lt;p&gt;So after said crowning achievement has been achieved, comes my present job. A rather pesky recruiter presented a rather lucrative opportunity that I could not pass up. Here is where I had my second time putting in my 2 week notice and the conversation was the same amount of awkward (at least for me, I think). I said my farewells to eMindful and went over to Fortress Information Security. Still getting a feel for this new job but I think I am going to like it.&lt;/p&gt;
&lt;p&gt;And that is my career thus far. A lot of scrambling and resume shotgunning to mask all the scrambling. The ups and downs has taught me a lot and I am looking forward to what else my career will throw at me (hoping for no more surprises, please!). Now ‘what if’ that first opportunity never accepted me, where would I be? Electrical engineering for the government or NASA or an electric company? I’m just glad someone took a chance on me.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[My First Post]]></title><description><![CDATA[The very first post ever on this blog, promising writing on whatever is on my mind: tech, basketball and fantasy sports, video games, anime, music, and life.]]></description><link>https://www.vietnguyen.site/first-post/</link><guid isPermaLink="false">https://www.vietnguyen.site/first-post/</guid><pubDate>Mon, 18 Mar 2019 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Welcome!&lt;/p&gt;
&lt;p&gt;My first ever blog and I am not sure where this will take me but I have a lot of thoughts that I want to put into words. Probably going to write about a bunch of things, whatever is on my mind at the moment or something I always wanted to write about, we will see. Topics will probably include &lt;strong&gt;tech&lt;/strong&gt;, &lt;strong&gt;sports&lt;/strong&gt; (basketball and fantasy sports), &lt;strong&gt;video games&lt;/strong&gt;, &lt;strong&gt;anime&lt;/strong&gt;, &lt;strong&gt;music&lt;/strong&gt;, &lt;strong&gt;life&lt;/strong&gt; in general, etc. Yup, its a broad spectrum. Hope you find something that you like.&lt;/p&gt;</content:encoded></item></channel></rss>