<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Aaron Decker</title>
    <description>The latest articles on DEV Community by Aaron Decker (@ard).</description>
    <link>https://dev.to/ard</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F264058%2F3de64acf-37a6-4726-8357-eb4ea30f85e2.jpeg</url>
      <title>DEV Community: Aaron Decker</title>
      <link>https://dev.to/ard</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ard"/>
    <language>en</language>
    <item>
      <title>Stop JSON.parse From Crashing on LLM Responses</title>
      <dc:creator>Aaron Decker</dc:creator>
      <pubDate>Sun, 22 Mar 2026 15:05:35 +0000</pubDate>
      <link>https://dev.to/ard/stop-jsonparse-from-crashing-on-llm-responses-4n53</link>
      <guid>https://dev.to/ard/stop-jsonparse-from-crashing-on-llm-responses-4n53</guid>
      <description>&lt;p&gt;I want to show you every way an LLM can break your &lt;code&gt;JSON.parse&lt;/code&gt; call, and how to handle all of them in one line.&lt;/p&gt;

&lt;h2&gt;
  
  
  The many ways LLMs break JSON
&lt;/h2&gt;

&lt;p&gt;If you're calling OpenAI, Claude, Gemini, Ollama, or any other LLM and asking for JSON, here's what you'll eventually get back:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Markdown code fences&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The most common one. You ask for JSON, the model gives you a helpful little markdown block:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="err"&gt;Sure!&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Here&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;you&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;go:&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="err"&gt;​```&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="err"&gt;%&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;endraw&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;%&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;json&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"score"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;95&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;​&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="err"&gt;%&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;raw&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;%&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;


**2. Trailing commas**

Models love trailing commas. Especially in arrays.



```json
{"items": ["a", "b", "c",], "count": 3,}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. Unquoted keys&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The model writes JavaScript instead of JSON:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="err"&gt;name:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Alice"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;age:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;active:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4. Single quotes&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="err"&gt;'name':&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;'Alice'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;'city':&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;'New&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;York'&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;5. Smart quotes and em dashes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Copy-paste artifacts or just models being fancy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Alice"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"range"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"10—20"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Those &lt;code&gt;"&lt;/code&gt; and &lt;code&gt;—&lt;/code&gt; characters look right but they are not ASCII and &lt;code&gt;JSON.parse&lt;/code&gt; will reject them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Inline comments&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Alice"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;user&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"age"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;/*&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;years&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;*/&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;7. JSON buried in a paragraph&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="err"&gt;Based&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;on&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;analysis,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;result&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;is&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"score"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;87&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"pass"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;this&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;input.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;8. Invisible unicode&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;UTF-8 BOM (&lt;code&gt;\uFEFF&lt;/code&gt;) at the start, zero-width spaces (&lt;code&gt;\u200B&lt;/code&gt;) between characters. You can't see them. Your parser can.&lt;/p&gt;

&lt;h2&gt;
  
  
  The one-line fix
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;ai-json-safe-parse
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;aiJsonParse&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ai-json-safe-parse&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;aiJsonParse&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;score&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;llmResponse&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;success&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;score&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That handles every case above. It runs a recovery pipeline — tries direct parse first, then strips markdown, normalizes unicode, does bracket matching to extract JSON from prose, and if needed fixes trailing commas, quotes, keys, and comments.&lt;/p&gt;

&lt;p&gt;It returns a typed discriminated union. Never throws. If you want simpler APIs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Returns T | null&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;aiJsonSafeParse&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;MyType&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;llmResponse&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;// Returns T or your fallback&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;aiJsonSafeParse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;llmResponse&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;score&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;

&lt;span class="c1"&gt;// Throws on failure&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;aiJsonStrictParse&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;MyType&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;llmResponse&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Safe vs aggressive
&lt;/h2&gt;

&lt;p&gt;By default it uses aggressive mode — it will actually repair broken syntax. If you only want extraction (markdown stripping, bracket matching) without modifying the JSON:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;aiJsonParse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;safe&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Details
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Zero dependencies&lt;/li&gt;
&lt;li&gt;~2KB gzipped&lt;/li&gt;
&lt;li&gt;TypeScript with full generics&lt;/li&gt;
&lt;li&gt;ESM and CommonJS&lt;/li&gt;
&lt;li&gt;Works in Node.js, browsers, Cloudflare Workers, Deno&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/a-r-d/ai-json-safe-parse" rel="noopener noreferrer"&gt;a-r-d/ai-json-safe-parse&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;npm:&lt;/strong&gt; &lt;a href="https://www.npmjs.com/package/ai-json-safe-parse" rel="noopener noreferrer"&gt;ai-json-safe-parse&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you hit a format it doesn't handle, open an issue with the raw text.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>typescript</category>
      <category>javascript</category>
      <category>opensource</category>
    </item>
    <item>
      <title>vector-2-trend easily show trending topics from collections of semantic text vectors</title>
      <dc:creator>Aaron Decker</dc:creator>
      <pubDate>Fri, 21 Jul 2023 15:12:35 +0000</pubDate>
      <link>https://dev.to/ard/vector-2-trend-easily-show-trending-topics-from-collections-of-semantic-text-vectors-1g8l</link>
      <guid>https://dev.to/ard/vector-2-trend-easily-show-trending-topics-from-collections-of-semantic-text-vectors-1g8l</guid>
      <description>&lt;p&gt;I recently have been working on a lot of &lt;a href="https://en.wikipedia.org/wiki/Semantic_search" rel="noopener noreferrer"&gt;semantic search&lt;/a&gt; related problems at &lt;a href="https://bounty.co" rel="noopener noreferrer"&gt;Bounty&lt;/a&gt; and kept coming to the same problem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tl;dr&lt;/strong&gt;: &lt;a href="https://github.com/a-r-d/vector-2-trend" rel="noopener noreferrer"&gt;the open source library is published here&lt;/a&gt; and on npm as "&lt;strong&gt;vector-2-trend&lt;/strong&gt;".&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;When you collect user feedback about a product, your boss will come to you and say:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"What feature are people requesting the most?"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;But, semantic search isn't truly suited for these kind of quantitative questions.&lt;/p&gt;

&lt;p&gt;The new generative Q&amp;amp;A process people are doing &lt;a href="https://www.pinecone.io/learn/openai-gen-qa/" rel="noopener noreferrer"&gt;with Pinecone + GPT&lt;/a&gt; will not give you this information.&lt;/p&gt;

&lt;p&gt;So how do you take a bunch of unstructured text data and do some quantitative analysis on it in terms of commonalities and strength of those common topics?&lt;/p&gt;

&lt;p&gt;The answer is &lt;a href="https://en.wikipedia.org/wiki/Cluster_analysis" rel="noopener noreferrer"&gt;you run clustering algorithms on the vectors&lt;/a&gt; (also known as unsupervised machine learning). &lt;/p&gt;

&lt;h2&gt;
  
  
  The process for generative Q&amp;amp;A
&lt;/h2&gt;

&lt;p&gt;Ok hold up maybe I lost you, what am I talking about? I am taking advantage of the new openAI llms ability to make amazingly good semantic vectors so you can generate your own semantic search engines and do other things with the vectors (we are doing clustering on them).&lt;/p&gt;

&lt;p&gt;This is the new hot thing so you have to understand why you would already be generating vectors.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The process looks like this for making semantic search:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;collect text based data (in my case it's tiktok video transcripts)&lt;/li&gt;
&lt;li&gt;convert the transcripts to vectors (I used openAI text-embedding-ada-002 API)&lt;/li&gt;
&lt;li&gt;feed these into pinecone to create a vector db&lt;/li&gt;
&lt;li&gt;when somebody asks a question convert it into a vector embedding using the same text-embedding-ada-002 API&lt;/li&gt;
&lt;li&gt;search this question vector against the vector database&lt;/li&gt;
&lt;li&gt;get back the closest results &lt;strong&gt;semantically&lt;/strong&gt; (this is the key - if somebody has written "sucks" it understand that this is a complaint when you ask about complaints). &lt;/li&gt;
&lt;li&gt;feed into GPT to summarize or analyze, or show the direct results to user&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;OK got it?&lt;/p&gt;

&lt;p&gt;So the point is, if you are doing this kind of stuff you already have semantic vectors!&lt;/p&gt;

&lt;h2&gt;
  
  
  The solution to generate trending topics
&lt;/h2&gt;

&lt;p&gt;Given that people will start asking "what are people complaining about most" you are going to need to generate an list of things. &lt;/p&gt;

&lt;p&gt;But feeding your closest matches into GPT is not going to do this for you. How do you analyze the entire data set, or the most recent 100? &lt;/p&gt;

&lt;p&gt;The way I dealt with this is to use clustering to create groups of similarly structured pieces of data. &lt;/p&gt;

&lt;p&gt;It ended up working pretty well, on the dataset I used I had a group of people complaining about delivery times and I ended up with a grouping of all of those pieces of user feedback related to delivery times!&lt;/p&gt;

&lt;p&gt;If you do this for the entire dataset and you rank the strength of the trend you get something like a trending list like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqsyctcd8r3bhyb4b3zov.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqsyctcd8r3bhyb4b3zov.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What are the steps
&lt;/h2&gt;

&lt;p&gt;Ok I will next outline &lt;a href="https://github.com/a-r-d/vector-2-trend" rel="noopener noreferrer"&gt;the steps I perform in the library&lt;/a&gt;.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Input semantic vectors w/ original text to the clustering library&lt;/li&gt;
&lt;li&gt;run PCA on the vectors to reduce dimensionality (ada-002 outputs 1536 dimensions)&lt;/li&gt;
&lt;li&gt;run kmeans algorithm on this (choses a sane value for number of clusters)&lt;/li&gt;
&lt;li&gt;calculate a silhouette score for each cluster&lt;/li&gt;
&lt;li&gt;create a "custom density" score for each cluster - which is a combo of silhouette score + number of results.&lt;/li&gt;
&lt;li&gt;return all this data, rank by density descending&lt;/li&gt;
&lt;li&gt;pass this to the classifier&lt;/li&gt;
&lt;li&gt;classifier calls GPT-3.5-turbo and asks it classify each cluster with a descriptive name&lt;/li&gt;
&lt;li&gt;output is a simple trending list like above!&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Feedback &amp;amp; PRs
&lt;/h2&gt;

&lt;p&gt;If you want to make a PR I would be happy to accept, this is something that I will continue to work on as it is powering some of our features.&lt;/p&gt;

&lt;p&gt;If you want to just use it and play around feel free to reach out to me on twitter for questions &lt;a href="https://twitter.com/ardninja" rel="noopener noreferrer"&gt;@ardninja&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can find the project here: &lt;a href="https://github.com/a-r-d/vector-2-trend" rel="noopener noreferrer"&gt;https://github.com/a-r-d/vector-2-trend&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Reverse A Positive Integer: a visual code tutorial</title>
      <dc:creator>Aaron Decker</dc:creator>
      <pubDate>Fri, 25 Nov 2022 01:33:15 +0000</pubDate>
      <link>https://dev.to/ard/reverse-a-positive-integer-a-visual-code-tutorial-4mme</link>
      <guid>https://dev.to/ard/reverse-a-positive-integer-a-visual-code-tutorial-4mme</guid>
      <description>&lt;p&gt;There are some new tools to generate cool demos of short code snippets, one of these is &lt;a href="https://www.wavesnippets.com/"&gt;wave snippets&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;I put together a small demo of a very basic problem: &lt;strong&gt;write a function to reverse a positive integer&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;Meaning take a number like &lt;strong&gt;123&lt;/strong&gt; and make it &lt;strong&gt;321&lt;/strong&gt;. Got it?&lt;/p&gt;

&lt;p&gt;I wrote this in typescript, and didn't handle a lot of extra stuff but it works for simple cases. Check it out:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--UMCoFNwg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/lwx8hc743vv7fjqe4y16.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UMCoFNwg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/lwx8hc743vv7fjqe4y16.gif" alt="wave snippet visual - reverse a positive integer" width="648" height="466"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is the finished code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;reversePositiveInt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;toReverse&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;&lt;span class="kr"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;source&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;toReverse&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;accumulator&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;

  &lt;span class="k"&gt;while&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;source&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;break&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;mod&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;source&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;
    &lt;span class="nx"&gt;accumulator&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="nx"&gt;mod&lt;/span&gt;
    &lt;span class="nx"&gt;source&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;floor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;source&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nx"&gt;accumulator&lt;/span&gt; &lt;span class="o"&gt;*=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;accumulator&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;reversePositiveInt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;12345&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="c1"&gt;// 54321&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The method of doing is this is to &lt;em&gt;shave off&lt;/em&gt; the last digit of the input number and put it at the front of a new integer one number at a time.&lt;/p&gt;

&lt;p&gt;There is a way to do it faster, but written like this step by step I think it makes it easier to see what is going on. &lt;/p&gt;

</description>
      <category>computerscience</category>
      <category>typescript</category>
      <category>interviewquestion</category>
      <category>whiteboard</category>
    </item>
    <item>
      <title>5 Questions To Ask Your Recruiter Before You Send Your Resume</title>
      <dc:creator>Aaron Decker</dc:creator>
      <pubDate>Wed, 04 Mar 2020 23:58:56 +0000</pubDate>
      <link>https://dev.to/ard/5-questions-to-ask-your-recruiter-before-you-send-your-resume-4a6b</link>
      <guid>https://dev.to/ard/5-questions-to-ask-your-recruiter-before-you-send-your-resume-4a6b</guid>
      <description>&lt;p&gt;Not all recruiters (and recruiting agencies) are created equal. &lt;br&gt;
Generally you want to work with more experienced recruiters specialized in working with technical candidates. &lt;/p&gt;

&lt;p&gt;There are advantages to working with a recruiter. The chief one is that you can get a lot of extra information about a job before you even apply to go into an interview. You should ask specific questions to maximize this advantage.&lt;/p&gt;

&lt;p&gt;Another thing to understand (and read between the lines on) is that you are the product when working with a recruiter and &lt;strong&gt;the client is actually the hiring manager at the company&lt;/strong&gt;. The recruiter is more concerned about their relationship with the hiring manager because they are the one writing the checks.&lt;/p&gt;

&lt;p&gt;Here are a few questions you can a recruiter before you engage with them about a job. &lt;/p&gt;

&lt;h2&gt;
  
  
  1. How many candidates have you placed at this employer?
&lt;/h2&gt;

&lt;p&gt;This will help you understand if the recruiter / agency has had success working with this company before. If they haven't, you might want to dig into more exactly who the employer is looking for before you spend time trying to set up an interview. &lt;/p&gt;

&lt;p&gt;Recruiters don't always understand who the employer is looking for right away and employers are often indecisive and picky.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. When they reject people why do they reject them?
&lt;/h2&gt;

&lt;p&gt;This is a good question you can ask a recruiter which can give you a huge leg up on other candidates. Often times hiring managers have pet-peeves or dealbreakers that a recruiter might know about. &lt;/p&gt;

&lt;p&gt;Here is an example: the position is for a "fullstack developer" and the hiring manager seems to reject people that have a lot of front-end experience. Downplay that and talk about you backend experience in the interview instead.&lt;/p&gt;

&lt;p&gt;You can tailor your resume here BEFORE you send it to the recruiter, because ultimately they will be passing it to the hiring manager, and the hiring manager decides if they want to bring you in for an interview or not.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. What are the things the hiring manager is most looking for?
&lt;/h2&gt;

&lt;p&gt;Again, this a special advantage you get from working with a recruiter. A good recruiter should really be able to dig in with a hiring manager and understand who they are looking for and will actually extend and offer to. &lt;/p&gt;

&lt;p&gt;If the recruiter doesn't have any insight on this, see question #1. Maybe they don't know?&lt;/p&gt;

&lt;h2&gt;
  
  
  4. What do your other placements say about this employer?
&lt;/h2&gt;

&lt;p&gt;Another special advantage you get from working with a recruiter is that they might have feedback from their previous hires.&lt;/p&gt;

&lt;p&gt;Now, keep in mind a recruiter is ultimately trying to sell you on a job and sell you to their client (the hiring manager), so they may not be truthful with you. It's up to you to ask probing questions and read between the lines. &lt;/p&gt;

&lt;h2&gt;
  
  
  5. How many openings with this employer are you filling right now?
&lt;/h2&gt;

&lt;p&gt;This is a good indicator of how willing a company is to extend offers.&lt;/p&gt;

&lt;p&gt;Are they hiring for a single senior-level position? This could end up being a hard interview and even if you are a great candidate they may pass because they can afford to be picky.&lt;/p&gt;

&lt;p&gt;On the other hand if a company is rapidly expanding and has 20 engineer opens all over the map in terms of experience then you probably have a good chance of getting hired even if you are not the strongest candidate. This is a good thing to understand before you go into an interview.&lt;/p&gt;

&lt;h3&gt;
  
  
  Before you go...
&lt;/h3&gt;

&lt;p&gt;Why am I writing about recruiters? It's because I just launched &lt;a href="https://alcamine.com/"&gt;Alcamine, a site where we give you a special email to avoid recruiter spam&lt;/a&gt;. We want to make job boards suck less!&lt;/p&gt;

</description>
      <category>recruiters</category>
      <category>codenewbie</category>
      <category>career</category>
      <category>interviewing</category>
    </item>
    <item>
      <title>Should developers even bother working with recruiters?</title>
      <dc:creator>Aaron Decker</dc:creator>
      <pubDate>Sun, 08 Dec 2019 23:49:32 +0000</pubDate>
      <link>https://dev.to/ard/should-developers-even-bother-working-with-recruiters-mf</link>
      <guid>https://dev.to/ard/should-developers-even-bother-working-with-recruiters-mf</guid>
      <description>&lt;p&gt;I hear developers complain about working with recruiters a lot. &lt;/p&gt;

&lt;p&gt;Any post on Hacker News or r/cscareerquestions that mentions recruiters usually turns into an all out hate-fest and people start sharing horror stories about their interactions with recruiters. &lt;/p&gt;

&lt;p&gt;I hear the term "used car salesman" thrown around a lot. &lt;/p&gt;

&lt;p&gt;So what is the truth here?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZnNERTgd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/e1kmfvqdtqhnpbrjgkai.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZnNERTgd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/e1kmfvqdtqhnpbrjgkai.jpg" alt="Alt Text" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Recruiters don't work for you, they work for the hiring manager
&lt;/h2&gt;

&lt;p&gt;You need to keep this in mind in every single interaction. The person who pays the recruiter is the hiring manager.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Good recruiters&lt;/strong&gt; do care about maintaining good relationships, finding win-win situations and helping people. But, at the end of the day &lt;em&gt;many&lt;/em&gt; recruiters are just trying to make placements. &lt;/p&gt;

&lt;p&gt;Ultimately you need to understand this dynamic when you enter into a relationship with a recruiter. The recruiter is going to try hard to sell you on companies. &lt;/p&gt;

&lt;h2&gt;
  
  
  Recruiters have warm leads. Job postings are cold leads.
&lt;/h2&gt;

&lt;p&gt;You may not realize this but &lt;a href="https://theundercoverrecruiter.com/why-do-imaginary-job-openings-exist/"&gt;&lt;strong&gt;a lot of job postings are fake&lt;/strong&gt;&lt;/a&gt;. They are there to satisfy bureaucratic requirements, or worse, just make the company look like they are growing.&lt;/p&gt;

&lt;p&gt;Even if it is a real job, applications to job postings often go into a black hole in the ATS (application tracking system) that a company is using. &lt;/p&gt;

&lt;p&gt;A human is likely not even looking at your application when you apply to a job online. &lt;/p&gt;

&lt;p&gt;So when a recruiter comes to you with a job well, that is a &lt;strong&gt;warm lead&lt;/strong&gt;. This means you can usually go directly into interviewing and you can skip the the application process if the hiring manager likes your resume. &lt;/p&gt;

&lt;p&gt;This is the benefit of working with recruiters first and foremost: you skip an entire step of the process.&lt;/p&gt;

&lt;h2&gt;
  
  
  The wash-out rate in recruiting is extremely high
&lt;/h2&gt;

&lt;p&gt;There are 3 or 4 enormous national staffing companies (that I won't name here) that hire tons of new grads straight out college with degrees in things like business, communication, and sports management. &lt;/p&gt;

&lt;p&gt;What are they looking for? Somebody that can make phone calls all day every day and try to sell jobs to candidates in what often amounts to a boiler-room setting. &lt;/p&gt;

&lt;p&gt;You either figure it out or you are gone within a year. &lt;/p&gt;

&lt;p&gt;Do you think these new recruiters understand the technical jobs they are placing people into? Do they understand frontend vs backend or .NET vs Java? No they do not, absolutely not. &lt;/p&gt;

&lt;p&gt;They often have no experience in tech or recruiting for that matter.&lt;/p&gt;

&lt;p&gt;Should you work with a recruiter with 3 months of experience at a big agency? This is the reason for most of the complaints about recruiters from what I can see. &lt;/p&gt;

&lt;h2&gt;
  
  
  There are very good, very experienced recruiters that DO care about relationships.
&lt;/h2&gt;

&lt;p&gt;Generally, there are many smaller search firms that can be great to work with. Recruiters that understand tech, the local market, and how much you should be getting paid are out there. &lt;/p&gt;

&lt;p&gt;So do yourself a favor - check out the recruiter's LinkedIn first. Have they been doing this for 5 years or more? &lt;/p&gt;

&lt;p&gt;Or did they clearly demonstrate they actually read and understood your background before contacting you? These are the people you want to work with. &lt;/p&gt;

&lt;p&gt;I hope I am painting a clearer picture about the industry here - you have a ton of very inexperienced recruiters washing out quickly, then you have a set of experienced recruiters who actually know tech and know recruiting.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fresh out of a university or bootcamp? Generally, don't bother.
&lt;/h2&gt;

&lt;p&gt;I have talked to recent bootcamp grads and recent university grads and they almost universally tell me that recruiters completely ignore them. &lt;/p&gt;

&lt;p&gt;So I have asked different recruiters why they ignore recent grads. Want to know why? &lt;/p&gt;

&lt;p&gt;Hiring managers don't want new grads, and they certainly don't want to pay for somebody to find a new grad for them. &lt;/p&gt;

&lt;p&gt;A hiring manager often pays between 20% to 30% of a new hire's salary as a fee to a recruiter. Are they going to spend that much money on a new grad with no experience when they are getting hundreds of applications a month online? No they are not. &lt;/p&gt;

&lt;h2&gt;
  
  
  What is the answer?
&lt;/h2&gt;

&lt;p&gt;At the end of the day working with recruiters short-cuts the hiring process and it is better than just applying blindly online. &lt;/p&gt;

&lt;p&gt;But I think the thrust of what I'm trying to get across here is this: check out who you are working with, and then understand that they work for the hiring manager first and foremost. &lt;/p&gt;

&lt;h2&gt;
  
  
  By the way...
&lt;/h2&gt;

&lt;p&gt;When you sign up to a job board you are going get a lot of spam. To get around this, I've been working on a system with called &lt;a href="https://alcamine.com/"&gt;Alcamine&lt;/a&gt; with &lt;a href="https://twitter.com/Mwood230"&gt;Marcus Wood&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We give you a special email address you can use on job boards and we rate the recruiter messages coming in. Give it a try!&lt;/p&gt;

</description>
      <category>career</category>
      <category>beginners</category>
      <category>hiring</category>
      <category>recruiting</category>
    </item>
    <item>
      <title>Docker explained visually for the non-technical</title>
      <dc:creator>Aaron Decker</dc:creator>
      <pubDate>Mon, 25 Nov 2019 16:01:22 +0000</pubDate>
      <link>https://dev.to/ard/docker-explained-visually-for-the-non-technical-419g</link>
      <guid>https://dev.to/ard/docker-explained-visually-for-the-non-technical-419g</guid>
      <description>&lt;p&gt;Docker has been out for a while now and is being used widely. I think an understanding of how to use Docker is starting to become as necessary a skill as version control (i.e. &lt;em&gt;git&lt;/em&gt;) for professional software engineers.&lt;/p&gt;

&lt;p&gt;Yet, many non-technical people don't understand Docker. &lt;/p&gt;

&lt;p&gt;And this is not surprising because it is complex and you have to understand several layers of things to really get to what exactly Docker is doing for people.&lt;/p&gt;

&lt;p&gt;Nevertheless, Docker is a hot technology and we have to talk about it!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Falp61r3qern9mryyt1lr.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Falp61r3qern9mryyt1lr.jpg" alt="docker so hot right now"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: This article was originally written for recruiters, but I tried to break this down so that anybody working in tech (but without an engineering background) could follow it. &lt;/p&gt;

&lt;h2&gt;
  
  
  Operating Systems &amp;amp; Virtual Machines
&lt;/h2&gt;

&lt;p&gt;You probably know what an operating system (OS) is and can probably name a few. Windows, Mac OSX, Linux. Those are all operating systems. They are designed to be the software that is the base layer you install onto your physical hardware (your physical computer) and run programs inside of. The OS handles connecting your programs to your input devices like the mouse and keyboard, as well as output devices like monitors. &lt;/p&gt;

&lt;p&gt;Pretty basic stuff right? Well the idea of a &lt;strong&gt;virtual machine&lt;/strong&gt; (VM) means running an operating system virtually. You can actually install programs that let you install another operating system and run it inside of your host operating system. &lt;/p&gt;

&lt;p&gt;So it can look like this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Physical Hardware: &lt;strong&gt;Apple MacBook&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Host OS: &lt;strong&gt;Mac OSX&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Virtualization Program: &lt;strong&gt;Virtual Box&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Virtual OS: &lt;strong&gt;Ubuntu Linux&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I made this diagram below to explain an example of doing this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F6pan6zcsl8141yosgv0m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F6pan6zcsl8141yosgv0m.png" alt="virtual machine diagram"&gt;&lt;/a&gt;&lt;br&gt;
It is actually like having another computer running on your computer. You get a window where you can go inside of it and interact with it.&lt;/p&gt;

&lt;h2&gt;
  
  
  So, what is Docker then?
&lt;/h2&gt;

&lt;p&gt;You can think of Docker like software that runs virtual machines. Specifically it runs things called &lt;strong&gt;Docker containers&lt;/strong&gt;, which are derived from things called &lt;strong&gt;Docker images&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;To be clear, Docker is &lt;em&gt;like&lt;/em&gt; a virtual machine runner. It's not though, it actually does something that is much more efficient than running an entire VM, but I am not going to go into those details in this post. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Docker images&lt;/strong&gt; are like a &lt;em&gt;template&lt;/em&gt; for a virtual machine that can contain anything you want. For example you might define these things when you make a docker image:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A base OS, to start from such as  Alpine Linux&lt;/li&gt;
&lt;li&gt;Programs you installed on the OS (such as Java if your program is a Java app )&lt;/li&gt;
&lt;li&gt;Your program’s code - which would be your Java code&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then, when you run this image, it will run your program you wrote! And it will run it anywhere Docker is installed. That is the important part: if you install Docker somewhere else you can run any docker image on that computer too.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hold on what is the point?
&lt;/h2&gt;

&lt;p&gt;When you "ship" code to the cloud, you are just trying to run your code on another computer in a data center somewhere. So when you read something like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Docker helps you ship code and run applications anywhere&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is what they are talking about. You are trying to run your code for your software on another computer (probably in the cloud) and Docker helps you do this. &lt;/p&gt;

&lt;h2&gt;
  
  
  Using Docker
&lt;/h2&gt;

&lt;p&gt;As I said, when you &lt;em&gt;build&lt;/em&gt; a Docker image, you are usually doing it with the goal of building it with your application code. So when you make the template you write instructions that copies your application code into the image. You do whatever build steps need to be done (such as installing libraries or compiling code). Now you have an image.&lt;/p&gt;

&lt;p&gt;Now that you have an image you can run it anywhere Docker is installed. So for example, on your server running out in a cloud service provider like AWS. You install Docker once, on a machine running in the cloud and then you can just update the Docker image and run the new version of the Docker image! &lt;/p&gt;

&lt;p&gt;Here is a diagram of making a Docker image and running it:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fiygss39ngnb6xkypznif.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fiygss39ngnb6xkypznif.png" alt="using docker diagram"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Vertical Views of what is going on
&lt;/h2&gt;

&lt;p&gt;I made a few more fancy diagrams to show what is happening when you run containers in two different scenarios. This is a more real world example how you might run multiple containers on the same Docker runtime. &lt;/p&gt;

&lt;p&gt;These two containers (a Java application, and a Database) will be like two separate computers running on the host computer just like Virtual Machines. Except that Docker is much more efficient than running entire virtual machines. Docker containers typically run only a single process, which is the thing you want to run. So here you can do this and not experience big performance issues like you would if you were running full VMs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fgwbldj1qsiker0ep1b14.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fgwbldj1qsiker0ep1b14.png" alt="docker on laptop"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fkuoei8uf3oqwgb9j8lw0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fkuoei8uf3oqwgb9j8lw0.png" alt="docker in datacenter"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why are people using Docker
&lt;/h2&gt;

&lt;p&gt;Again, basically because it makes it easy to deploy apps. If you can ship your development environment exactly to your production server environment your customers are going to use (again, in the cloud) that is going to help you cut down on issues by a lot. &lt;/p&gt;

&lt;p&gt;I will let this meme sum it up.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fin95pxiwxh8by7b799rz.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fin95pxiwxh8by7b799rz.jpg" alt="docker is born meme"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In addition to that there are a lot of tools built on top of the idea of running Docker containers, and containerization in general such as Kubernetes or Docker swarm, so generally people have a whole other system layer in the mix. But I will save those details for another post.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusions
&lt;/h2&gt;

&lt;p&gt;There are a lot reasons why people are using Docker:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Makes it easier to reliably build your application&lt;/li&gt;
&lt;li&gt;Makes deploys easier and more reliable&lt;/li&gt;
&lt;li&gt;Makes it easier to share and run a complex dev environment&lt;/li&gt;
&lt;li&gt;Can easily run things like database servers without installation (traditionally, you could not!)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And most newer software projects have Docker somewhere in their process. Whether that is in their development environment, their production environment, or just in their CI servers, Docker is probably there. &lt;/p&gt;

&lt;p&gt;So understanding Docker is important because more and more in the future Docker is going to be foundational to many new technologies coming out. And if you can't understand the foundation, it will be hard to understand the new things building on top of the foundation.&lt;/p&gt;

&lt;p&gt;Did this help you? I got a lot of requests to write this post! Let me know if this cleared things up a bit. Docker is really hard to understand because you need to grok a lot of concepts first to get why you would want to have a tool like this.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>docker</category>
      <category>webdev</category>
      <category>devops</category>
    </item>
    <item>
      <title>How I Built A Custom Art Commissions Site In 2019</title>
      <dc:creator>Aaron Decker</dc:creator>
      <pubDate>Tue, 19 Nov 2019 17:53:57 +0000</pubDate>
      <link>https://dev.to/ard/how-i-built-a-custom-art-commissions-site-in-2019-5ch2</link>
      <guid>https://dev.to/ard/how-i-built-a-custom-art-commissions-site-in-2019-5ch2</guid>
      <description>&lt;p&gt;Late last year my girlfriend Meridith's side hustle was blowing up and she was spending a ton of time on administrative tasks, which of course with me being a software engineer made me want to help her automate everything.&lt;/p&gt;

&lt;p&gt;What was this side hustle you ask? &lt;strong&gt;Pet Portraits&lt;/strong&gt;. She's a classically trained artist (she went to &lt;a href="https://en.wikipedia.org/wiki/Rhode_Island_School_of_Design"&gt;RISD&lt;/a&gt;) working on her own art career but to pay the bills she ended up doing a ton of pet portrait commissions and it kept spreading via word of mouth. &lt;/p&gt;

&lt;p&gt;She was spending too much time emailing back and forth with people to get photos and contact info and accept payments. Yeah! I can solve this!&lt;/p&gt;

&lt;h2&gt;
  
  
  The business process
&lt;/h2&gt;

&lt;p&gt;So let's think about the current ordering process. It goes something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; Customer: Hey I heard you do pet portraits, can you paint my dog? 
&amp;gt; Meridith: Sure! Do you have a good photo?
&amp;gt; Customer: How about this photo?
&amp;gt; ... *Meridith explains the kind of photo she needs*
&amp;gt; Customer: How much does it cost for size "x"?
&amp;gt; ... *Meridith gives pricing info for various sizes*
&amp;gt; Customer: Can you mail it to this address?
&amp;gt; ... *collects mailing address*
&amp;gt; Customer: OK, how do I pay you?
&amp;gt; ... *more back and forth*
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Okay, you get the idea. It's like 20 emails by the end of it. It would be much easier to make a site that tells you all of the important information about the photo and the pricing and collects all of the required information (and photos).&lt;/p&gt;

&lt;p&gt;So I made an order form with these steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Upload Photos&lt;/li&gt;
&lt;li&gt;Pick order type (shows size &amp;amp; number of subjects options)&lt;/li&gt;
&lt;li&gt;Shipping destination - collect address&lt;/li&gt;
&lt;li&gt;Billing info - collect email / phone / let them enter coupons&lt;/li&gt;
&lt;li&gt;Order confirm + pay (shows subtotal then trigger stripe checkout)&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  So I decide to built a custom site
&lt;/h2&gt;

&lt;p&gt;I decided to build something custom instead of using Shopify or Squarespace. I figured "hey I can throw this together in a weekend!". I knew I needed to make something pretty complex where the customer needed to upload images and I figured I might as well build this instead of using some janky plugins. &lt;/p&gt;

&lt;p&gt;Plus, I'm a software engineer, I got this!&lt;/p&gt;

&lt;h2&gt;
  
  
  The tech stack I chose.
&lt;/h2&gt;

&lt;p&gt;I like to call myself a "full-stack developer", but I will admit my front-end skills are a little rusty. In fact, this would be great practice! I almost called this article something like &lt;em&gt;"How I learned how rusty I am at frontend work"&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;I ended up going with MERN stack, and I used &lt;a href="https://github.com/facebook/create-react-app"&gt;Create React App&lt;/a&gt; as my foundation. For my component library I chose &lt;a href="https://ant.design/"&gt;Ant Design&lt;/a&gt; which I had never used before (and some of the docs are in Mandarin) but I don't mind a challenge. &lt;/p&gt;

&lt;p&gt;I used Stripe for payments, AWS SES for email. Just set it all up on a single server on a cloud provider because there was not going to be a lot of traffic. I just threw this thing up on a linux box behind an nginx server and Lets Encrypt was nice and easy to set up. Anyway, I've done all that stuff a million times that was not the hard part. &lt;/p&gt;

&lt;h2&gt;
  
  
  OK site is done right?
&lt;/h2&gt;

&lt;p&gt;Nope, not yet. Again I am a little rusty at dealing with frontend stuff. There are a ton of things I had to end up dealing with that I didn't even think about. I ran into some issues. &lt;/p&gt;

&lt;h2&gt;
  
  
  Social Sharing
&lt;/h2&gt;

&lt;p&gt;You may not realize this but there are special meta tags that dictate how a link for a website will show up when you share it on Facebook or Twitter, for example. &lt;/p&gt;

&lt;p&gt;Yeah... So for example, if you don't tell Facebook what title, description and image to show your link previews with it is going to look like junk when you share it.&lt;/p&gt;

&lt;p&gt;So you need some stuff on your site like this in the header:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;meta property="og:title" content="Starshine Pet Painting"/&amp;gt;
&amp;lt;meta property="og:description" content="Beautiful Hand Painted Art As Unique as your pet."/&amp;gt;
&amp;lt;meta property="og:image" content="https://www.starshinepetpainting.com/images/overlay-logo2-small.jpg"/&amp;gt;
&amp;lt;meta property="og:url" content="https://www.starshinepetpainting.com"/&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Which sucks, because obviously the first time she shared this to Facebook it looked like crap. Protip: &lt;a href="https://developers.facebook.com/tools/debug/sharing/"&gt;Facebook has a tool&lt;/a&gt; you can use to make sure all this stuff is set up correctly. &lt;/p&gt;

&lt;h2&gt;
  
  
  In-App Browser (for instagram and facebook)
&lt;/h2&gt;

&lt;p&gt;Also, here is a thing you may or may not know: mobile traffic exceeds desktop internet traffic these days.&lt;/p&gt;

&lt;p&gt;Yeah, you probably did know that. Ok here is another thing: a lot of mobile web traffic is actually coming from in-app-browsers from the facebook or instagram apps for example.&lt;/p&gt;

&lt;p&gt;Did you know that sometimes, depending on the phone OS, these in-app-browsers are really super out of date? Also did you know it is &lt;a href="https://stackoverflow.com/questions/27199489/how-to-debug-on-facebook-internal-browser-mobile"&gt;very difficult&lt;/a&gt; to debug this junk? &lt;/p&gt;

&lt;p&gt;Well, I do. Now. 🤦&lt;/p&gt;

&lt;p&gt;So what do you do when you photo picker component mysteriously doesn't work on the in-app-browser in facebook in some random Android phones? &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Put in a polyfill and hope it works&lt;/strong&gt; (which it did, thankfully🙏).&lt;/p&gt;

&lt;h2&gt;
  
  
  The general front-end woes
&lt;/h2&gt;

&lt;p&gt;Generally speaking, I still had to do all the things that are hard about front-end. That means testing on multiple browsers (including IE 10), and multiple phone OSes. I still had to test on a bunch of different screen sizes so that means testing on everything from 4k down to 320px wide mobile devices. &lt;/p&gt;

&lt;p&gt;Somehow this all seemed more stressful than normal since if it didn't work I would be turning away paying customers, and it would not be some kind of internal business application like I was used to working on. Or better yet, the backend of a server where I don't have to worry about any of this stuff!&lt;/p&gt;

&lt;h2&gt;
  
  
  Everything just took longer
&lt;/h2&gt;

&lt;p&gt;I guess I didn't realize the reality of things is now that everything is being shared socially and it is super hard to get traffic from Google. So what we ended up doing was just focusing on how things looked in all the various social media platforms and they all have their special quirks and meta tags and whatever.&lt;/p&gt;

&lt;p&gt;Doing the backend even took longer than I thought. The whole goal was to make this quick and easy so I didn't build an auth system since I didn't want people to need to create accounts and all of that, but that meant triggering a emails that had a lot of content in them. Stripe is to easy to use but there still a decent amount of coding involved to handle error scenarios and all of that. &lt;/p&gt;

&lt;p&gt;Ecommerce is a lot more complicated than it first appears. You have to collect a lot of information to successfully fulfill an order and there are lot of things that can go wrong. You have to effectively communicate to the user what you are selling and answer all of their questions or they will just bounce. I'm still &lt;a href="https://www.starshinepetpainting.com/"&gt;not sure I did that totally effectively in the landing page&lt;/a&gt;, but hey, that is a work in progress!&lt;/p&gt;

&lt;h2&gt;
  
  
  Pivoting to $30 Sketches
&lt;/h2&gt;

&lt;p&gt;One weekend in Novemeber we had the opportunity to do an in-person popup show at a local community market where Meridith decided to quick 20 minute sketches for $20. We called them "$20 Dog Doddles", well that was an enormous success, I don't think we had any downtime the whole weekend, and on an hourly basis this was just as profitable as doing more fully rendered paintings.&lt;/p&gt;

&lt;p&gt;We had acheived &lt;strong&gt;product market fit&lt;/strong&gt;. So we redid the website and started to offer a $30 sketch option (to cover shipping) and the price point just makes the whole thing so attractive to a much wider audience. Here is a screenshot of the landing page for the $30 sketch option:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DsWtkDcF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/i1c9sho9giv5uy9a9cvh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DsWtkDcF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/i1c9sho9giv5uy9a9cvh.png" alt="30 dollar sketches screenshot" width="800" height="338"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The other cool thing was since I built the site custom it was pretty trivial to lift any component I needed up one level and refactor the code to handle more order types and prices. In the update to the site I even put in a cool &lt;a href="https://www.starshinepetpainting.com"&gt;timelapse background header video&lt;/a&gt; of Meridith drawing a dog. &lt;/p&gt;

&lt;h2&gt;
  
  
  So what did I learn?
&lt;/h2&gt;

&lt;p&gt;Anything you are selling these days needs to be optimized for social sharing. This takes a fair amount of work and experimenting. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In-app-browsers are a huge pain&lt;/strong&gt;, but facebook and instagram don't want the user to leave the app, so they are here to stay. You just have to deal with it and polyfill if you can.&lt;/p&gt;

&lt;p&gt;Ecommerce sites are hard to make and they have a lot edge cases. But it was a good experience and now I have the ability to really customize the order process for this niche of custom commission pet painting.&lt;/p&gt;

&lt;p&gt;Finally I think another big lesson is that you need to &lt;strong&gt;try different things until you find something that is really a hit&lt;/strong&gt;. The fully rendered portraits starting at $150 a commission (for just a small 5x7) are too expensive for most people, and the more stylized quick $30 sketch option appeals to a much wider audience. So by trying out these different ideas we figured out something that was still economical to produce but had a much wider appeal.&lt;/p&gt;

</description>
      <category>react</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Reviving A 19 Year Old Test To See If An Employer Is Worth Working For</title>
      <dc:creator>Aaron Decker</dc:creator>
      <pubDate>Fri, 08 Nov 2019 19:41:00 +0000</pubDate>
      <link>https://dev.to/ard/reviving-a-19-year-old-test-to-see-if-an-employer-is-worth-working-for-58h2</link>
      <guid>https://dev.to/ard/reviving-a-19-year-old-test-to-see-if-an-employer-is-worth-working-for-58h2</guid>
      <description>&lt;p&gt;Joel Spolsky (the guy responsible for Trello and Stack Overflow among other things), wrote an &lt;a href="https://www.joelonsoftware.com/2000/08/09/the-joel-test-12-steps-to-better-code/"&gt;article on his blog&lt;/a&gt; about questions you should be asking potential employers as a software developer.&lt;/p&gt;

&lt;p&gt;Talking to newer developers I realized that most of them have neither heard of this guy, nor of this set of questions. Not surprising since this famous blog post was written 19 years ago!&lt;/p&gt;

&lt;p&gt;I think this test is still relevant and really will weed out some bad employers, but we should update it! Actually, wait it needs a ton of updates... This was written in the days when you went down to the store and had to physically buy software on disks! 🤢&lt;/p&gt;

&lt;h2&gt;
  
  
  OK, here is the original test:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Do you use source control?&lt;/li&gt;
&lt;li&gt;Can you make a build in one step?&lt;/li&gt;
&lt;li&gt;Do you make daily builds?&lt;/li&gt;
&lt;li&gt;Do you have a bug database?&lt;/li&gt;
&lt;li&gt;Do you fix bugs before writing new code?&lt;/li&gt;
&lt;li&gt;Do you have an up-to-date schedule?&lt;/li&gt;
&lt;li&gt;Do you have a spec?&lt;/li&gt;
&lt;li&gt;Do programmers have quiet working conditions?&lt;/li&gt;
&lt;li&gt;Do you use the best tools money can buy?&lt;/li&gt;
&lt;li&gt;Do you have testers?&lt;/li&gt;
&lt;li&gt;Do new candidates write code during their interview?&lt;/li&gt;
&lt;li&gt;Do you do hallway usability testing?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The idea was, if an employer did all of these things then chances are they would be great to work for as a software developer. So this is a checklist to help you consider if a job is worth taking or not.&lt;/p&gt;

&lt;h2&gt;
  
  
  Is anyone not using source control?
&lt;/h2&gt;

&lt;p&gt;What sounds outdated here? How about the source control, question - who doesn't use source control? For that matter, who doesn't use &lt;strong&gt;git&lt;/strong&gt;? If they don't use source control they are not doing any of this other stuff. How about the build step - people don't build much desktop software anymore and we are not thinking much in terms of passing builds. The master branch should always pass tests and build!&lt;/p&gt;

&lt;p&gt;Lets ask this to cover the question about builds: &lt;em&gt;"Do you have a CI process in place?"&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;And furthermore, maybe a more relevant question in the age of SaaS apps is this: &lt;em&gt;"can you do one-click deploys?"&lt;/em&gt;. Or maybe even, &lt;em&gt;"How fast can you deploy a hotfix"&lt;/em&gt;, that might get an interesting answer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Do you fix bugs before writing new code?
&lt;/h2&gt;

&lt;p&gt;This is a tricky question. I think most software projects have tons of outstanding issues that maybe can't be fixed or are too hard to fix and you have worked around them. Again, this is more of the mindset of building desktop software you are going to ship in releases &lt;strong&gt;once a year&lt;/strong&gt; and you fix the bugs before the next release... If you are working on a web application you care more about the bugs that are actively going to cause users trouble.&lt;/p&gt;

&lt;p&gt;Maybe a better question is this: &lt;em&gt;"How do you monitor you application for errors in production?"&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Do you have a schedule?
&lt;/h2&gt;

&lt;p&gt;I'm not exactly sure what he means here even. I think he is talking about when you did desktop software you were going to ship a certain set of features, and when you decide you are done you go mail off the CD-ROMs to your customers. 🤣&lt;/p&gt;

&lt;p&gt;Let's skip this, and the spec question, and ask about development methodology. Are they doing Agile, Scrum, Kanban? What?&lt;/p&gt;

&lt;h2&gt;
  
  
  Do programmers have quiet working conditions?
&lt;/h2&gt;

&lt;p&gt;Keep this question! In my opinion open offices are the worst possible thing you can foist on developers. Really? Shove us all in a bullpen with people running around everywhere having loud conversations while we try to do a job that requires insane levels of concentrations. Really, that's a good idea huh? 🤦&lt;/p&gt;

&lt;h2&gt;
  
  
  Do you use the best tools money can buy?
&lt;/h2&gt;

&lt;p&gt;Here he is talking about things like nice chairs, servers and services. I think this is important but the most important things are basically free these days. You don't need to buy specific compilers and editors. VSCode is free. You just need to hope your company got you a nice computer. Maybe ask about that if you are worried, but in my experience most companies are now getting devs new MacBook Pros.&lt;/p&gt;

&lt;h2&gt;
  
  
  Do you have testers?
&lt;/h2&gt;

&lt;p&gt;I like having dedicated testers on my team but many places don't anymore and if you have a good process in place for automated testing you can do just fine.&lt;/p&gt;

&lt;p&gt;Instead I would ask this: &lt;em&gt;"How do you test code before you deploy to prod"&lt;/em&gt;? Then you can decide if you like how they answer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Do new candidates write code during their interview?
&lt;/h2&gt;

&lt;p&gt;It makes a big difference if you work with good people or not. There is no substitute for seeing if somebody can code or not. You have to actually see it to know (in my opinion). I think this is still a good question to ask.&lt;/p&gt;

&lt;p&gt;The answer is &lt;strong&gt;yes&lt;/strong&gt; if the company does any of these things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Take home test&lt;/li&gt;
&lt;li&gt;Whiteboard problems&lt;/li&gt;
&lt;li&gt;Pair programming problems&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Do you do hallway usability testing?
&lt;/h2&gt;

&lt;p&gt;This is again, about desktop software. You had to test with your users before you shipped the box of CD-ROMs to Circuit City (RIP⚰️).&lt;/p&gt;

&lt;p&gt;Now, with web applications people use telemetry services to monitor users and track what they are doing, like Hotjar. You can set up A/B testing and see what users prefer, and you can do it at scale with real users in realtime.&lt;/p&gt;

&lt;p&gt;Here is a better question: &lt;em&gt;"How do you collect feedback from users and make design decisions?"&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  A proposed new set of questions:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Do you have a CI process in place?&lt;/li&gt;
&lt;li&gt;Can you do one-click deploys?&lt;/li&gt;
&lt;li&gt;How do you track issues?&lt;/li&gt;
&lt;li&gt;How do you monitor you application for errors in production?&lt;/li&gt;
&lt;li&gt;What development methodology do you follow?&lt;/li&gt;
&lt;li&gt;Do programmers have quiet working conditions?&lt;/li&gt;
&lt;li&gt;How do you test code before you deploy to prod?&lt;/li&gt;
&lt;li&gt;Do new candidates write code during their interview?&lt;/li&gt;
&lt;li&gt;How do you collect feedback from users, and make design decisions?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Yeah, I know, originally you could simply say &lt;strong&gt;"YES"&lt;/strong&gt; or &lt;strong&gt;"NO"&lt;/strong&gt; to all of these so it was an easy metric to measure. Now, you get to judge if something is a "YES", but it's still pretty easy.&lt;/p&gt;

&lt;p&gt;If you ask "What development methodology do you follow?", and the answer is &lt;strong&gt;"We Don't"&lt;/strong&gt; - well then they fail that question!&lt;/p&gt;

&lt;p&gt;I think it's better that some of these are open ended. You can ask them in an interview and sound thoughtful. 🤔&lt;/p&gt;




&lt;p&gt;By the way I originally &lt;a href="https://alcamine.com/blog/reviving-a-19-year-old-test-to-see-if-an-employer-is-worth-working-for"&gt;posted this blog here&lt;/a&gt;, which is the blog for a side project I am working on called &lt;a href="https://alcamine.com/"&gt;Alcamine&lt;/a&gt;. Basically it is going to be a system where you get a special email you can use to sign up to job sites and we will score and filter all of the junk recruiter email coming into it! &lt;/p&gt;

</description>
      <category>career</category>
      <category>jobs</category>
      <category>employers</category>
      <category>joeltest</category>
    </item>
    <item>
      <title>Message Queues And Kafka Explained in Plain English</title>
      <dc:creator>Aaron Decker</dc:creator>
      <pubDate>Sun, 03 Nov 2019 16:54:29 +0000</pubDate>
      <link>https://dev.to/ard/message-queues-and-kafka-explained-in-plain-english-550g</link>
      <guid>https://dev.to/ard/message-queues-and-kafka-explained-in-plain-english-550g</guid>
      <description>&lt;p&gt;Want to understand why kafka is gaining so much traction and hiring managers are looking for people with this skill?&lt;/p&gt;

&lt;p&gt;Well, I wrote this article to help illuminate kafka a little bit, but I also explain message queues in general first to build up the foundation to explain Kafka.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a message queue
&lt;/h2&gt;

&lt;p&gt;The purpose of a message queue is to help reliably deliver communications (or messages). If you google "what is a message queue" you will get an answer like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Message queues provide an asynchronous communications protocol, meaning that the sender and receiver of the message do not need to interact with the message queue at the same time.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But I think you can explain this even more simply. You can think of a message queue like a PO box. The mailman might deliver a message there any time, and can keep putting them there until you go collect them. They can build up or be retrieved immediately. &lt;/p&gt;

&lt;p&gt;In this example the mailman is the &lt;strong&gt;"Publisher"&lt;/strong&gt; or &lt;strong&gt;"Producer"&lt;/strong&gt; and when you go get mail you are the &lt;strong&gt;"Subscriber"&lt;/strong&gt; or &lt;strong&gt;"Consumer"&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Here is a diagram of this system:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--72MNZxLM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/vgwbq3efvwp6ror736fo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--72MNZxLM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/vgwbq3efvwp6ror736fo.png" alt="Alt Text" width="800" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why use a message queue?
&lt;/h2&gt;

&lt;p&gt;Well, there are a lot of reasons but basically the answer is that real world systems are a lot larger and more complicated than a simple single consumer, single producer postal system.&lt;/p&gt;

&lt;p&gt;You might have many consumers of the same message, you might have to deal with fault tolerance (what if something breaks while processing a message?) or you might want to be able to track when messages are being delivered. &lt;/p&gt;

&lt;p&gt;Here is a diagram of what things might actually look like inside of a social media application that would allow you to upload photos. A user uploads a photo and it is saved to a database, in addition to a message queue. Multiple consumers use this notification so that they know a user has uploaded a new photo, but ultimately it will show up in the "notifications" of your friends.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2xUUA3g---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/92wxegrmncz10nmducjt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2xUUA3g---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/92wxegrmncz10nmducjt.png" alt="Alt Text" width="800" height="442"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Kafka
&lt;/h2&gt;

&lt;p&gt;So with the basics of the "what" and "why" of message queues out of the way, now what is Kafka?&lt;/p&gt;

&lt;p&gt;The chief difference with kafka is storage, it saves data using a &lt;strong&gt;commit log&lt;/strong&gt;. Kafka stores the messages that you send to it in &lt;strong&gt;Topics&lt;/strong&gt;. Consumers can "replay" these messages if they wish. Normally in message queues, the messages are removed after subscribers have confirmed their receipt. &lt;/p&gt;

&lt;p&gt;Another thing different about kafka is that the topics are ordered (by date they were added). Not all message queues guarantee this. &lt;/p&gt;

&lt;p&gt;Individual Kafka servers that store messages are called &lt;strong&gt;"Brokers"&lt;/strong&gt;. Brokers are typically used in a cluster, which means many servers are linked together to handle lots of data and traffic. Topics may be further broken down in &lt;strong&gt;"Partitions"&lt;/strong&gt; which are divided across brokers. &lt;/p&gt;

&lt;p&gt;Kafka easily lets you divide up the work of publishing and consuming messages across a cluster of brokers. This is what it looks like:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GwFClCZo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/4ezahzlqnp3z8ok3sv3p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GwFClCZo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/4ezahzlqnp3z8ok3sv3p.png" alt="Alt Text" width="800" height="461"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why is Kafka so big now?
&lt;/h2&gt;

&lt;p&gt;Kafka was originally developed at LinkedIn to handle large quantities of traffic and provide a platform for handling real-time data feeds. &lt;/p&gt;

&lt;p&gt;Kafka is designed to store data in what could be thought of as a transactional nature. Groups of consumers keep track of where they are while reading a topic so multiple consumers can read lots of the data from the same topic while breaking up the work between them. If you wish, can read any existing topic starting from the beginning to get all of the messages that were sent. &lt;/p&gt;

&lt;h2&gt;
  
  
  Things to talk about when it comes to Kafka
&lt;/h2&gt;

&lt;p&gt;In terms of evaluation of somebody's experience with Kafka, there are a couple of things you could ask about. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How many transactions per second did your system handle?&lt;/li&gt;
&lt;li&gt;How did you decide how to size your cluster?&lt;/li&gt;
&lt;li&gt;Why did you decide to go with Kafka over something simpler?&lt;/li&gt;
&lt;li&gt;You can ask things about the number of topics, partitions, consumer groups, etc.&lt;/li&gt;
&lt;li&gt;What challenges did you encounter implementing kafka in your system?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Generally asking "why" questions is a great way really understand if a person had decision making power, or if they really understood why they were doing something. But asking more specific questions about scale and challenges faced in implementation can be useful as well. &lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;Message queues are a common architecture that might be encountered on the backend of many types of applications. Almost every significant application or company building software will have a message queue somewhere in their infrastructure once they get to a certain size.&lt;/p&gt;

&lt;p&gt;Kafka is being adopted in many large organizations because of the ability to store data messages indefinitely and deal with high amounts of traffic. There are a lot of other features of Kafka that I didn't touch on (such as the &lt;a href="https://kafka.apache.org/documentation/streams/"&gt;stream processing system&lt;/a&gt;) but these are the basics and should help you understand a little bit about why people are using it and what it is for.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: I originally published this on the &lt;a href="https://www.iteachrecruiters.com/blog/message-queues-and-kafka-explained-in-plain-english/"&gt;ITeach Recruiters blog here&lt;/a&gt; which is where I am building courses for recruiters, but I thought this article was general enough that new developers just getting into these concepts would be interested. &lt;/p&gt;

</description>
      <category>messagequeue</category>
      <category>kafka</category>
      <category>queue</category>
    </item>
  </channel>
</rss>
