<?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: James Murdza</title>
    <description>The latest articles on DEV Community by James Murdza (@jamesmurdza).</description>
    <link>https://dev.to/jamesmurdza</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%2F1240211%2F182b5c33-82d0-4662-a493-3915edd3b934.png</url>
      <title>DEV Community: James Murdza</title>
      <link>https://dev.to/jamesmurdza</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jamesmurdza"/>
    <language>en</language>
    <item>
      <title>Making an Alexa chatbot with Tambo+Deezer 🎶</title>
      <dc:creator>James Murdza</dc:creator>
      <pubDate>Fri, 29 Aug 2025 18:40:51 +0000</pubDate>
      <link>https://dev.to/jamesmurdza/making-an-alexa-chatbot-with-tambdeezer-2o01</link>
      <guid>https://dev.to/jamesmurdza/making-an-alexa-chatbot-with-tambdeezer-2o01</guid>
      <description>&lt;p&gt;Today we're going to see how to start with a basic AI chatbot and add in tools and custom UI components. For this tutorial we'll add a "music search tool" and a "music miniplayer" to give a chatbot musical abilities in about ten minutes.&lt;/p&gt;

&lt;p&gt;But first, here's quick demo:&lt;/p&gt;



&lt;p&gt;(Link to the code: &lt;a href="https://github.com/jamesmurdza/my-music-player" rel="noopener noreferrer"&gt;jamesmurdza/my-music-player&lt;/a&gt;)&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Create a New Tambo App
&lt;/h2&gt;

&lt;p&gt;We'll start by creating a new &lt;a href="https://tambo.co/" rel="noopener noreferrer"&gt;Tambo app&lt;/a&gt; (Tambo is an open source generative UI framework):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx tambo create-app my-music-player
&lt;span class="nb"&gt;cd &lt;/span&gt;my-music-player
npx tambo init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once you have your Tambo project set up, you can delete a few of the template files from the example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;rm &lt;/span&gt;src/components/ui/card-data.tsx src/services/population-stats.ts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  2. Define Music Types
&lt;/h2&gt;

&lt;p&gt;We'll be using the &lt;a href="https://developers.deezer.com/api" rel="noopener noreferrer"&gt;Deezer API&lt;/a&gt; to search for music, so let's define a few types which we'll use later.&lt;/p&gt;

&lt;p&gt;Put these into &lt;code&gt;src/lib/types.ts&lt;/code&gt;:&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="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;z&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="s2"&gt;zod&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// This schema is used both the server function output and the props of the music card component:&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;songSchema&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;artist&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Artist name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="na"&gt;title&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Title&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="na"&gt;album&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Album name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="na"&gt;duration&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;number&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Duration in seconds&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="na"&gt;preview&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Preview URL (30 seconds)&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="na"&gt;link&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Full song link&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="na"&gt;albumCover&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;optional&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Album cover URL&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;Song&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;infer&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="nx"&gt;songSchema&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// This schema defines the server function input &lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;searchMusicInputSchema&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;query&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Music search query (song title, artist name, or genre)&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;SearchMusicInput&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;infer&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="nx"&gt;searchMusicInputSchema&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// This schema defines the server function input and output&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;searchMusicSchema&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;args&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;searchMusicInputSchema&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;returns&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;songSchema&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  3. Create a Music Search Service
&lt;/h2&gt;

&lt;p&gt;Now, let's define a NextJS server function to query the Deezer API. We'll use this later as a tool for the chatbot.&lt;/p&gt;

&lt;p&gt;Save this to &lt;code&gt;src/services/music-search.ts&lt;/code&gt;:&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;use server&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;SearchMusicInput&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Song&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="s2"&gt;@/lib/types&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;searchMusic&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;query&lt;/span&gt; &lt;span class="p"&gt;}:&lt;/span&gt; &lt;span class="nx"&gt;SearchMusicInput&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Song&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="s2"&gt;`https://api.deezer.com/search?q=&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nf"&gt;encodeURIComponent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="s2"&gt;&amp;amp;limit=10`&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;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&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;data&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="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&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;error&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="c1"&gt;// Map Deezer API results to MusicSearchResult type&lt;/span&gt;
  &lt;span class="k"&gt;return &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;data&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="p"&gt;[]).&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="na"&gt;item&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;any&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="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;artist&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;artist&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;album&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;album&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;albumCover&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;album&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;cover&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="dl"&gt;""&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;Note that we are using the same types which we defined in step 2.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Build the Music Miniplayer Component
&lt;/h2&gt;

&lt;p&gt;For the next step, we'll design a music miniplayer React Component that looks something like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fy74n14grzezcyg124uos.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fy74n14grzezcyg124uos.png" alt=" " width="800" height="237"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Put this in &lt;code&gt;src/components/ui/music-card.tsx&lt;/code&gt;:&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="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;z&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="s2"&gt;zod&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;useRef&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="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;songSchema&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="s2"&gt;@/lib/types&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;MusicCardProps&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;infer&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="nx"&gt;songSchema&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;MusicCard&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;artist&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;album&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;preview&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;link&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;albumCover&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}:&lt;/span&gt; &lt;span class="nx"&gt;MusicCardProps&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// ...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can find the full code for this component &lt;a href="https://github.com/jamesmurdza/my-music-player/blob/main/src/components/ui/music-card.tsx" rel="noopener noreferrer"&gt;here&lt;/a&gt;. Note that again, we are using the types from step 2.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. Register Tools and Components with Tambo
&lt;/h2&gt;

&lt;p&gt;The final step is to integrate both our music search tool and our miniplayer component into the AI chat template. That can be done simply by registering these elements (and their type definitions) with Tambo.&lt;/p&gt;

&lt;p&gt;To do that, replace the entire contents of &lt;code&gt;src/lib/tambo.ts&lt;/code&gt; with this 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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;use client&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Central configuration file for Tambo components and tools&lt;/span&gt;
&lt;span class="c1"&gt;// Read more about Tambo at https://tambo.co/docs&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;TamboComponent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;TamboTool&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="s2"&gt;@tambo-ai/react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;MusicCard&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="s2"&gt;@/components/ui/music-card&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;searchMusic&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="s2"&gt;@/services/music-search&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;songSchema&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;searchMusicSchema&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="s2"&gt;@/lib/types&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Tambo tools registered for AI use.&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;TamboTool&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;searchMusic&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Searches for music by song title, artist name, or any music-related query.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;tool&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;searchMusic&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;toolSchema&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;searchMusicSchema&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;];&lt;/span&gt;

&lt;span class="c1"&gt;// Tambo components registered for AI use.&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;components&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;TamboComponent&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;MusicCard&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;A component that plays a song from Deezer.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;component&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;MusicCard&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;propsSchema&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;songSchema&lt;/span&gt;&lt;span class="p"&gt;,&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;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;That's it! Your app should work now (or &lt;a href="https://x.com/jamesmurdza" rel="noopener noreferrer"&gt;let me know&lt;/a&gt; 😉). There's a lot more that can be added, such as a loading state for the miniplayer component and any additional tools or components you can think of.&lt;/p&gt;

&lt;p&gt;Join the &lt;a href="https://discord.gg/dJNvPEHth6" rel="noopener noreferrer"&gt;Tambo Discord&lt;/a&gt; to see more projects you can build with Tambo!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to extend the disk space of an AWS EC2 instance</title>
      <dc:creator>James Murdza</dc:creator>
      <pubDate>Mon, 19 Aug 2024 22:55:12 +0000</pubDate>
      <link>https://dev.to/jamesmurdza/how-to-extend-the-disk-space-of-an-aws-ec2-instance-h3n</link>
      <guid>https://dev.to/jamesmurdza/how-to-extend-the-disk-space-of-an-aws-ec2-instance-h3n</guid>
      <description>&lt;p&gt;This works for instances running Amazon Linux:&lt;/p&gt;

&lt;h2&gt;
  
  
  0. If you need to free up space quickly
&lt;/h2&gt;

&lt;p&gt;Delete some journals:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo journalctl --vacuum-size=100M
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  1. Add space in the AWS console
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Go to EC2, and select your instance.&lt;/li&gt;
&lt;li&gt;Scroll to the horizontal tab bar, and click storage.&lt;/li&gt;
&lt;li&gt;Click on the volume ID.&lt;/li&gt;
&lt;li&gt;Select the volume, and under actions, click "Modify Volume". If this is grayed out, you have to wait.&lt;/li&gt;
&lt;li&gt;Enter the new disk size and click modify.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  2. Grow the partition
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Determine the partition you want to grow:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo lsblk
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use growpart to grow the partition, changing xvda to the name of the partition you just determined:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo growpart /dev/xvda 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Extend the filesystem to use the additional space:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo resize2fs /dev/root
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

</description>
    </item>
    <item>
      <title>Host your own PaaS (platform as a service) on Amazon Web Services</title>
      <dc:creator>James Murdza</dc:creator>
      <pubDate>Sun, 14 Jul 2024 22:30:42 +0000</pubDate>
      <link>https://dev.to/jamesmurdza/host-your-own-paas-platform-as-a-service-on-amazon-web-services-3f0d</link>
      <guid>https://dev.to/jamesmurdza/host-your-own-paas-platform-as-a-service-on-amazon-web-services-3f0d</guid>
      <description>&lt;p&gt;&lt;a href="https://dokku.com/" rel="noopener noreferrer"&gt;Dokku&lt;/a&gt; is an open-source PaaS that allows you to deploy and host multiple applications on a single server. Its functionality is similar to the backend of a service like Heroku, managing tasks such as scaling, load balancing, and database management.&lt;/p&gt;

&lt;p&gt;Here's how you can set up Dokku from scratch on AWS:&lt;/p&gt;

&lt;h2&gt;
  
  
  Deployment
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Launch the server
&lt;/h3&gt;

&lt;p&gt;In the AWS control panel, create a new EC2 instance.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Select Ubuntu 12&lt;/li&gt;
&lt;li&gt;Create a new SSH key pair&lt;/li&gt;
&lt;li&gt;Allow public SSH, HTTP, and HTTPS access to the server&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Configure DNS
&lt;/h3&gt;

&lt;p&gt;Let's assume your domain is mydomain.com, and you want to host applications as appname.mydomain.com.&lt;/p&gt;

&lt;p&gt;In your DNS control panel, create two records:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A Record pointing @ to the EC2 instance's public IP address&lt;/li&gt;
&lt;li&gt;A Record pointing * to the EC2 instance's public IP address&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Setup the server
&lt;/h3&gt;

&lt;p&gt;SSH into the EC2 instance and install Dokku:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;wget -NP . https://dokku.com/bootstrap.sh
sudo DOKKU_TAG=v0.34.6 bash bootstrap.sh
dokku domains:set-global mydomain.com
cat ~/.ssh/authorized_keys | dokku ssh-keys:add admin
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your Dokku server should now be up and running! If you want, you can use the following steps to test your installation and see how Dokku works.&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing that it works
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Create a test application
&lt;/h3&gt;

&lt;p&gt;On the same EC2 instance, run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dokku apps:create myapp
sudo dokku plugin:install https://github.com/dokku/dokku-postgres.git
dokku postgres:create railsdatabase
dokku postgres:link railsdatabase ruby-getting-started
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Set up SSH authentication
&lt;/h3&gt;

&lt;p&gt;On your local machine, add the following to .ssh/config:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Host mydomain.com
    HostName mydomain.com
    User dokku
    IdentityFile ~/ServerKey.pem
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Deploy a test application
&lt;/h3&gt;

&lt;p&gt;Then, on your local machine, run these commands to deploy a test application:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/heroku/ruby-getting-started
cd ruby-getting-started
git remote add dokku dokku@example.com:myapp
git push
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>🧑‍💻 12 Discord Communities for Learning to Code</title>
      <dc:creator>James Murdza</dc:creator>
      <pubDate>Sat, 13 Jul 2024 15:11:23 +0000</pubDate>
      <link>https://dev.to/jamesmurdza/12-discord-communities-for-learning-to-code-2a7h</link>
      <guid>https://dev.to/jamesmurdza/12-discord-communities-for-learning-to-code-2a7h</guid>
      <description>&lt;p&gt;When you're learning to code, having a strong community can make all the difference in your learning journey! If you have no community around you, you can quickly find some like-minded learners on Discord. Here's a curated list of Discord server that an aspiring coder should consider joining:&lt;/p&gt;

&lt;p&gt;Certainly! Here's the revised list in the requested format:&lt;/p&gt;




&lt;h2&gt;
  
  
  1. The Odin Project
&lt;/h2&gt;

&lt;p&gt;🟢 Members Online: 17k&lt;/p&gt;

&lt;p&gt;The Odin Project is a supportive community focused on web development, offering a comprehensive curriculum and discussions for all levels.&lt;/p&gt;

&lt;p&gt;🔗 Join link: &lt;a href="https://discord.gg/fbFCkYabZB" rel="noopener noreferrer"&gt;Join The Odin Project Discord Server&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  2. The Coding Den
&lt;/h2&gt;

&lt;p&gt;🟢 Members Online: 23k&lt;/p&gt;

&lt;p&gt;The Coding Den is a welcoming space for coders of all levels, providing resources, coding help, and general programming discussions.&lt;/p&gt;

&lt;p&gt;🔗 Join link: &lt;a href="https://discord.com/invite/code" rel="noopener noreferrer"&gt;Join The Coding Den Discord Server&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  3. The Programmer's Hangout
&lt;/h2&gt;

&lt;p&gt;🟢 Members Online: 22k&lt;/p&gt;

&lt;p&gt;The Programmer's Hangout is a friendly community for discussing various programming topics, sharing knowledge, and getting coding help.&lt;/p&gt;

&lt;p&gt;🔗 Join link: &lt;a href="https://discord.com/invite/programming" rel="noopener noreferrer"&gt;Join The Programmer's Hangout Discord Server&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Harvard CS50
&lt;/h2&gt;

&lt;p&gt;🟢 Members Online: 23k&lt;/p&gt;

&lt;p&gt;Harvard CS50's official Discord offers resources, peer support, and guidance for course participants.&lt;/p&gt;

&lt;p&gt;🔗 Join link: &lt;a href="https://discord.gg/cs50" rel="noopener noreferrer"&gt;Join Harvard CS50 Discord Server&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  5. Codecademy
&lt;/h2&gt;

&lt;p&gt;🟢 Members Online: 8k&lt;/p&gt;

&lt;p&gt;Codecademy's official community provides support, project sharing, and discussions for learners.&lt;/p&gt;

&lt;p&gt;🔗 Join link: &lt;a href="https://discord.com/invite/codecademy" rel="noopener noreferrer"&gt;Join Codecademy Discord Server&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  6. JavaScript Mastery
&lt;/h2&gt;

&lt;p&gt;🟢 Members Online: 4k&lt;/p&gt;

&lt;p&gt;JavaScript Mastery is a focused community for JavaScript enthusiasts, offering resources, project collaborations, and coding help.&lt;/p&gt;

&lt;p&gt;🔗 Join link: &lt;a href="https://discord.com/invite/javascript-mastery-programming-coding-community-710138849350647871" rel="noopener noreferrer"&gt;Join JavaScript Mastery Discord Server&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  7. Python
&lt;/h2&gt;

&lt;p&gt;🟢 Members Online: 46k&lt;/p&gt;

&lt;p&gt;Python's community is one of the largest for Python learners, providing resources, coding help, and discussions on Python topics.&lt;/p&gt;

&lt;p&gt;🔗 Join link: &lt;a href="https://discord.com/invite/python" rel="noopener noreferrer"&gt;Join Python Discord Server&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  8. Devcord
&lt;/h2&gt;

&lt;p&gt;🟢 Members Online: 4k&lt;/p&gt;

&lt;p&gt;Devcord is a community for web developers, offering support, resources, and discussions on front-end and back-end development.&lt;/p&gt;

&lt;p&gt;🔗 Join link: &lt;a href="https://discord.com/invite/devcord" rel="noopener noreferrer"&gt;Join Devcord Discord Server&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  9. Free Code Camp
&lt;/h2&gt;

&lt;p&gt;🟢 Members Online: 4k&lt;/p&gt;

&lt;p&gt;Free Code Camp's official Discord provides support, resources, and collaboration opportunities for learners.&lt;/p&gt;

&lt;p&gt;🔗 Join link: &lt;a href="https://discord.gg/KVUmVXA" rel="noopener noreferrer"&gt;Join Free Code Camp Discord Server&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  10. CodeSupport
&lt;/h2&gt;

&lt;p&gt;🟢 Members Online: 3k&lt;/p&gt;

&lt;p&gt;CodeSupport is a helpful community offering coding help, resources, and discussions on various programming topics.&lt;/p&gt;

&lt;p&gt;🔗 Join link: &lt;a href="https://discord.gg/invite/codesupport-240880736851329024" rel="noopener noreferrer"&gt;Join CodeSupport Discord Server&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  11. Devpost
&lt;/h2&gt;

&lt;p&gt;🟢 Members Online: 1k&lt;/p&gt;

&lt;p&gt;Devpost's official Discord offers support and collaboration opportunities for hackathon enthusiasts.&lt;/p&gt;

&lt;p&gt;🔗 Join link: &lt;a href="https://discord.com/invite/HP4BhW3hnp" rel="noopener noreferrer"&gt;Join Devpost Discord Server&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  12. DonTheDeveloper
&lt;/h2&gt;

&lt;p&gt;🟢 Members Online: 230&lt;/p&gt;

&lt;p&gt;DonTheDeveloper is a smaller community offering personalized support, career advice, and discussions.&lt;/p&gt;

&lt;p&gt;🔗 Join link: &lt;a href="https://discord.gg/donthedeveloper" rel="noopener noreferrer"&gt;Join DonTheDeveloper Discord Server&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Know a great server that I missed? Leave a comment below!&lt;/p&gt;

</description>
      <category>programming</category>
      <category>community</category>
      <category>learning</category>
    </item>
    <item>
      <title>Host your own web-based collaborative IDE</title>
      <dc:creator>James Murdza</dc:creator>
      <pubDate>Sat, 01 Jun 2024 00:49:59 +0000</pubDate>
      <link>https://dev.to/jamesmurdza/how-to-setup-ishaan1013sandbox-locally-503p</link>
      <guid>https://dev.to/jamesmurdza/how-to-setup-ishaan1013sandbox-locally-503p</guid>
      <description>&lt;h2&gt;
  
  
  Intro
&lt;/h2&gt;

&lt;p&gt;I recently got to try Ishaan Dey's Sandbox, (&lt;a href="https://github.com/ishaan1013/sandbox" rel="noopener noreferrer"&gt;ishaan1013/sandbox&lt;/a&gt;) which is an open source web-based editor similar to Replit that lets you write and run code in your browser. &lt;/p&gt;

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

&lt;p&gt;In this post I write down the steps I followed to get the project running locally.&lt;/p&gt;

&lt;p&gt;Quick note—in some of the text below you may see the use of emojis like 🍎 in example code. It should be very obvious what you need to put in place of the emojis—if not, leave a comment!&lt;/p&gt;

&lt;h2&gt;
  
  
  0. Requirements
&lt;/h2&gt;

&lt;p&gt;The application uses NodeJS and can be run with Docker.&lt;/p&gt;

&lt;p&gt;Needed accounts to set up:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://clerk.com/" rel="noopener noreferrer"&gt;Clerk&lt;/a&gt;: Used for user authentication.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://liveblocks.io/" rel="noopener noreferrer"&gt;Liveblocks&lt;/a&gt;: Used for collaborative editing.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://e2b.dev/" rel="noopener noreferrer"&gt;E2B&lt;/a&gt;: Used for the terminals and live preview.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.cloudflare.com/" rel="noopener noreferrer"&gt;Cloudflare&lt;/a&gt;: Used for relational data storage (D2) and file storage (R2).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A quick overview of the tech before we start: The deployment uses a &lt;strong&gt;NextJS&lt;/strong&gt; app for the frontend and an &lt;strong&gt;ExpressJS&lt;/strong&gt; server on the backend. Presumably that's because NextJS integrates well with Clerk middleware but not with Socket.io.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Initial setup
&lt;/h2&gt;

&lt;p&gt;No surprise in the first step:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/jamesmurdza/sandbox
&lt;span class="nb"&gt;cd &lt;/span&gt;sandbox
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run &lt;code&gt;npm install&lt;/code&gt; in:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/frontend
/backend/database
/backend/storage
/backend/server
/backend/ai
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Adding Clerk
&lt;/h2&gt;

&lt;p&gt;Setup the Clerk account.&lt;br&gt;
Get the API keys from Clerk.&lt;/p&gt;

&lt;p&gt;Update &lt;code&gt;/frontend/.env&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY='🔑'
CLERK_SECRET_KEY='🔑'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. Deploying the storage bucket
&lt;/h2&gt;

&lt;p&gt;Go to Cloudflare.&lt;br&gt;
Create and name an R2 storage bucket in the control panel.&lt;br&gt;
Copy the account ID of one domain.&lt;/p&gt;

&lt;p&gt;Update &lt;code&gt;/backend/storage/src/wrangler.toml&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;account_id = '🔑'
bucket_name = '🔑'
key = 'SUPERDUPERSECRET'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the &lt;code&gt;/backend/storage/src&lt;/code&gt; directory:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  4. Deploying the database
&lt;/h2&gt;

&lt;p&gt;Create a database:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx wrangler d1 create sandbox-database
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use the output for the next setp.&lt;/p&gt;

&lt;p&gt;Update &lt;code&gt;/backend/database/src/wrangler.toml&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;database_name = '🔑'
database_id = '🔑'
KEY = 'SUPERDUPERSECRET'
STORAGE_WORKER_URL = 'https://storage.🍎.workers.dev'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the &lt;code&gt;/backend/database/src&lt;/code&gt; directory:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  5. Applying the database schema
&lt;/h2&gt;

&lt;p&gt;Delete the &lt;code&gt;/backend/database/drizzle/meta&lt;/code&gt; directory.&lt;/p&gt;

&lt;p&gt;In the &lt;code&gt;/backend/database/&lt;/code&gt; directory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm run generate
npx wrangler d1 execute sandbox-database --remote --file=./drizzle/0000_🍏_🍐.sql
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  6. Configuring the server
&lt;/h2&gt;

&lt;p&gt;Update &lt;code&gt;/backend/server/.env&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DATABASE_WORKER_URL='https://database.🍎.workers.dev'
STORAGE_WORKER_URL='https://storage.🍎.workers.dev'
WORKERS_KEY='SUPERDUPERSECRET'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  7. Adding Liveblocks
&lt;/h2&gt;

&lt;p&gt;Setup the Liveblocks account.&lt;/p&gt;

&lt;p&gt;Update &lt;code&gt;/frontend/.env&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NEXT_PUBLIC_LIVEBLOCKS_PUBLIC_KEY='🔑'
LIVEBLOCKS_SECRET_KEY='🔑'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  8. Adding E2B
&lt;/h2&gt;

&lt;p&gt;Setup the E2B account.&lt;/p&gt;

&lt;p&gt;Update &lt;code&gt;/backend/server/.env&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  9. Adding AI code generation
&lt;/h2&gt;

&lt;p&gt;In the &lt;code&gt;/backend/ai&lt;/code&gt; directory:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;Update &lt;code&gt;/backend/server/.env&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;AI_WORKER_URL='https://ai.🍎.workers.dev'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  10. Configuring the frontend
&lt;/h2&gt;

&lt;p&gt;Update &lt;code&gt;/frontend/.env&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NEXT_PUBLIC_DATABASE_WORKER_URL='https://database.🍎.workers.dev'
NEXT_PUBLIC_STORAGE_WORKER_URL='https://storage.🍎.workers.dev'
NEXT_PUBLIC_WORKERS_KEY='SUPERDUPERSECRET'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  11. Running the IDE
&lt;/h2&gt;

&lt;p&gt;Run &lt;code&gt;npm run dev&lt;/code&gt; simultaneously in:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>The halting problem in computer science...actually explained</title>
      <dc:creator>James Murdza</dc:creator>
      <pubDate>Fri, 24 May 2024 13:33:10 +0000</pubDate>
      <link>https://dev.to/jamesmurdza/the-halting-problem-in-computer-science-actually-explained-3hgd</link>
      <guid>https://dev.to/jamesmurdza/the-halting-problem-in-computer-science-actually-explained-3hgd</guid>
      <description>&lt;p&gt;&lt;strong&gt;In the next five minutes you will learn—&lt;/strong&gt; &lt;em&gt;1) What is the halting problem and why it is important 2) Some examples of halting and non-halting programs 3) Alan Turing's formal proof&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Often, computers hang...&lt;br&gt;
Progress bars stop or go backwards...&lt;br&gt;
Or you get the dreaded spinning beach ball of death. ☠️&lt;/p&gt;

&lt;p&gt;Does this mean that some programmer just get sloppy somewhere, or is it an unavoidable fact of life?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1ij87k3yukh3xjmy2pr4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1ij87k3yukh3xjmy2pr4.png" alt="Progress bar loading at 90%" width="300" height="351"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Actually, according to computer science, this is just life!&lt;/p&gt;

&lt;p&gt;And that’s because fundamentally—for an arbitrary program—there’s no way to predict how long a program will take to run without running it.&lt;/p&gt;

&lt;p&gt;This was proven by the mathematician Alan Turing in 1936.&lt;/p&gt;

&lt;p&gt;Now, you're probably thinking, if I have a simple program like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;table&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;j&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
            &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;j&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Of course I can calculate how long it takes to run.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;(A iterations x B iterations = A x B print statements)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But that required &lt;em&gt;us&lt;/em&gt; reading the code of the program and visualizing the possible paths through the program.&lt;/p&gt;

&lt;p&gt;(This is called static analysis, by the way—analyzing a program without actually running it.)&lt;/p&gt;

&lt;p&gt;And as a program becomes more complex, this becomes increasingly painful to do. And actually, there's no &lt;strong&gt;general way&lt;/strong&gt; to do this for any program.&lt;/p&gt;

&lt;p&gt;This is where the halting problem comes in.&lt;/p&gt;

&lt;p&gt;Formulated by Turing, the problem asks:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Given a program and an input, can we determine if the program will eventually halt (finish running) or if it will run forever?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let’s look at one more slightly better example before trying to solve the halting problem:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;fibonacci&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
    &lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
    &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;fibonacci&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nf"&gt;fibonacci&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This program will halt if n is a non-negative integer. Otherwise, it will run forever!&lt;/p&gt;

&lt;p&gt;We figured this out because we are smart human beings, who can read the code and work backwards.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu05ae42z21axni906ej8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu05ae42z21axni906ej8.png" alt="Dafuq am I reading" width="443" height="249"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But now, look at Alan Turing's challenge—&lt;strong&gt;Can we write a computer program that will figure this out for us, regardless of the program?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Spoiler alert: No program can do this.&lt;/p&gt;

&lt;p&gt;And this is what he said: If it were possible, that means you should be able to make a program like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;will_halt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;program&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;blah&lt;/span&gt; &lt;span class="n"&gt;blah&lt;/span&gt; &lt;span class="n"&gt;blah&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;true&lt;/span&gt;
    &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Which can clearly never be written!&lt;/p&gt;

&lt;p&gt;To see why, we can write another mischievous program:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;tricky_program&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nf"&gt;will_halt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tricky_program&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;pass&lt;/span&gt;
    &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This program references the will_halt program to check what will_halt expects it to do, and does the opposite.&lt;/p&gt;

&lt;p&gt;Wait, the program passed to will_halt can also use will_halt itself? Isn’t that cheating?&lt;/p&gt;

&lt;p&gt;Well no—if the program will_halt can be written, then then there's no reason the same logic couldn’t be used within tricky_program. It's just code.&lt;/p&gt;

&lt;p&gt;While this may seem like a depressing outcome for software development everywhere, this is actually just the beginning of what makes computer programming a lot of fun. Just ask Alan Turing—he was having fun with this 40 years before the first personal computer was invented!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F05hxg2u3r4kacdnal11j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F05hxg2u3r4kacdnal11j.png" alt="I also like to write my own codes" width="300" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;P.S. Of course, in the year 2024, you certainly have one thought after reading this. "OK, so we can't write a program that solves the halting problem, but we can train an AI to do it!" Well, the answer is still technically &lt;strong&gt;no&lt;/strong&gt;, but that's a post for another day...&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Seven Sites to Find Free Low-Code App Templates</title>
      <dc:creator>James Murdza</dc:creator>
      <pubDate>Sun, 14 Jan 2024 21:33:28 +0000</pubDate>
      <link>https://dev.to/jamesmurdza/seven-sites-for-free-low-code-app-templates-4a1c</link>
      <guid>https://dev.to/jamesmurdza/seven-sites-for-free-low-code-app-templates-4a1c</guid>
      <description>&lt;p&gt;Starting with low-code or with a template can make your prototyping process faster, and take the risk out of launching your ideas. Why not try a low-code template? The hardest thing about using a template is finding the right one, and that's where this list can help:&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Bubble
&lt;/h2&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Marketplace Link:&lt;/strong&gt; &lt;a href="https://bubble.io/templates"&gt;Bubble Templates&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Description:&lt;/strong&gt; Bubble offers a vast marketplace of both free and paid templates, covering a wide range of categories, including games, marketplaces, and social networks. It's a go-to platform for quickly prototyping apps with low-code development.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2. Flutter Flow
&lt;/h2&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Marketplace Link:&lt;/strong&gt; &lt;a href="https://marketplace.flutterflow.io/"&gt;Flutter Flow Templates&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Description:&lt;/strong&gt; Flutter Flow specializes in mobile app development and provides templates for various apps, such as chat GPT clones and Spotify-like music streaming apps. It's a powerful tool for creating mobile apps effortlessly.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Adalo
&lt;/h2&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Marketplace Link:&lt;/strong&gt; &lt;a href="https://www.adalo.com/cloneables-tags/all-kits-templates"&gt;Adalo Templates&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Description:&lt;/strong&gt; Adalo offers UI component examples and some full-featured apps, including an app similar to Goodreads. It's a great choice for those looking to build apps with a focus on user interface and experience.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  4. Glide
&lt;/h2&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Marketplace Link:&lt;/strong&gt; &lt;a href="https://www.glideapps.com/templates"&gt;Glide Templates&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Description:&lt;/strong&gt; Glide is ideal for data-heavy applications like inventory management or trackers. It simplifies database app development and provides templates to get you started quickly.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5. Voice Flow
&lt;/h2&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Marketplace Link:&lt;/strong&gt; &lt;a href="https://www.voiceflow.com/templates-directory"&gt;Voice Flow Templates&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Description:&lt;/strong&gt; Voice Flow is a specialized platform for creating chatbots and integrates seamlessly with popular messaging apps like WhatsApp, Discord, and Slack. It's perfect for automating conversations and interactions.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  6. BuildShip
&lt;/h2&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Marketplace Link:&lt;/strong&gt; &lt;a href="https://buildship.com/templates"&gt;BuildShip Templates&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Description:&lt;/strong&gt; Build Ship is a low-code backend platform that offers templates for building fully-featured apps, including bots. It's a valuable resource for developers looking to streamline backend development.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  7. Share Tribe
&lt;/h2&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Marketplace Link:&lt;/strong&gt; &lt;a href="https://www.sharetribe.com/customers/gallery/"&gt;Share Tribe Examples&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Description:&lt;/strong&gt; Share Tribe allows users to create community-based websites for buying, selling, or renting. It provides a gallery of examples showcasing websites built with Share Tribe for inspiration, making it easy to kickstart community-driven projects.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  8. Softr
&lt;/h2&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Marketplace Link:&lt;/strong&gt; &lt;a href="https://www.softr.io/templates"&gt;Softr Templates&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Description:&lt;/strong&gt; Like Glide, Softr excels in managing data-heavy tasks like inventory and trackers, simplifying app development with its templates and user-friendly interface.&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>Five APIs for AI text-to-speech 🗣️</title>
      <dc:creator>James Murdza</dc:creator>
      <pubDate>Tue, 02 Jan 2024 18:02:03 +0000</pubDate>
      <link>https://dev.to/jamesmurdza/five-apis-for-ai-text-to-speech-49mo</link>
      <guid>https://dev.to/jamesmurdza/five-apis-for-ai-text-to-speech-49mo</guid>
      <description>&lt;p&gt;If you need to narrate text to audio, there are a number of great sounding services which provide APIs. Many have generous free tiers! See below for a comparison:&lt;/p&gt;

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

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Service &amp;amp; Quality&lt;/th&gt;
&lt;th&gt;Cost to Narrate The Sorcerer's Stone&lt;/th&gt;
&lt;th&gt;Cost to Narrate the Harry Potter Series&lt;/th&gt;
&lt;th&gt;Sample&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;OpenAI (Standard)&lt;/td&gt;
&lt;td&gt;$6.75&lt;/td&gt;
&lt;td&gt;$100.50&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OpenAI (HD)&lt;/td&gt;
&lt;td&gt;$13.50&lt;/td&gt;
&lt;td&gt;$201.00&lt;/td&gt;
&lt;td&gt;&lt;a href="https://cdn.openai.com/API/docs/audio/alloy.wav"&gt;Audio&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ElevenLabs (HD)&lt;/td&gt;
&lt;td&gt;$13.20&lt;/td&gt;
&lt;td&gt;$200.70&lt;/td&gt;
&lt;td&gt;&lt;a href="https://eleven-public-cdn.elevenlabs.io/audio-native/d65e433fd8a560cbba1b7dd26809dd48ea2b408c5b6c0a3e42e5b83c43957f5b/l6Ny6oxjkcyU0bEadlHi.mp3"&gt;Audio&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Google Cloud (Standard)&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;td&gt;$10.80&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Google Cloud (Neural)&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;td&gt;$91.20&lt;/td&gt;
&lt;td&gt;&lt;a href="https://cloud.google.com/static/text-to-speech/docs/audio/en_us_neural2_d.wav"&gt;Audio&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Google Cloud (Studio)&lt;/td&gt;
&lt;td&gt;$56.00&lt;/td&gt;
&lt;td&gt;$1,056.00&lt;/td&gt;
&lt;td&gt;&lt;a href="https://cloud.google.com/static/text-to-speech/docs/audio/en_us_studio_o_gatsby.wav"&gt;Audio&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Amazon Polly (Standard)&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;td&gt;$2.28&lt;/td&gt;
&lt;td&gt;&lt;a href="https://whyp.it/tracks/146916/polly-standard?token=Vy2CR"&gt;Audio&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Amazon Polly (Neural)&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;td&gt;$9.12&lt;/td&gt;
&lt;td&gt;&lt;a href="https://whyp.it/tracks/146915/polly-neural?token=Z4g9d"&gt;Audio&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Amazon Polly (Long-form)&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;td&gt;$62.00&lt;/td&gt;
&lt;td&gt;&lt;a href="https://whyp.it/tracks/146914/polly-long-form?token=Jp98b"&gt;Audio&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The Sorcerer's Stone is 450,000 characters and the Harry Potter series is 6,700,000 characters.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pricing plans per service
&lt;/h2&gt;

&lt;h3&gt;
  
  
  OpenAI
&lt;/h3&gt;

&lt;p&gt;Standard: $0.015 / 1K characters&lt;br&gt;
HD: $0.030 / 1K characters&lt;br&gt;
&lt;a href="https://openai.com/pricing"&gt;https://openai.com/pricing&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  ElevenLabs
&lt;/h3&gt;

&lt;p&gt;HD: $.030 / 1K characters (first 10,000 are free)&lt;br&gt;
Note: Pricing scales down to $.017 in higher tiers.&lt;br&gt;
&lt;a href="https://elevenlabs.io/pricing"&gt;https://elevenlabs.io/pricing&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Google Cloud
&lt;/h3&gt;

&lt;p&gt;Standard: $0.004 / 1K characters (first 4,000,000 are free)&lt;br&gt;
Neural: $0.016 / 1K characters (first 1,000,000 are free)&lt;br&gt;
Long-form: $0.16 / 1K characters (first 100,000 are free)&lt;br&gt;
&lt;a href="https://cloud.google.com/text-to-speech/pricing"&gt;https://cloud.google.com/text-to-speech/pricing&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Amazon Polly
&lt;/h3&gt;

&lt;p&gt;Standard: $0.0004 / 1K characters (first 5,000,000 are free)&lt;br&gt;
Neural: $0.0016 / 1K characters (first 1,000,000 are free)&lt;br&gt;
Long-form: $0.01 / 1K characters (first 500,000 are free)&lt;br&gt;
&lt;a href="https://aws.amazon.com/polly/pricing/"&gt;https://aws.amazon.com/polly/pricing/&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>The 20 most used React libraries</title>
      <dc:creator>James Murdza</dc:creator>
      <pubDate>Fri, 29 Dec 2023 07:40:49 +0000</pubDate>
      <link>https://dev.to/jamesmurdza/the-20-most-used-react-libraries-2m2l</link>
      <guid>https://dev.to/jamesmurdza/the-20-most-used-react-libraries-2m2l</guid>
      <description>&lt;p&gt;The libraries in this list cater to a wide array of needs from user interface design to data management and animations. If you're a front-end developer using React, you will run into these eventually, so might as well get familiar with them now!&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;react-router-dom&lt;/strong&gt;: Simplifies client-side routing for multi-page web apps. &lt;a href="https://reactrouter.com/"&gt;Learn more&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;axios&lt;/strong&gt;: The go-to choice for hassle-free HTTP requests and API calls. &lt;a href="https://axios-http.com/docs/intro"&gt;Learn more&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;react-redux&lt;/strong&gt;: A powerhouse for efficient state management and data flow control. &lt;a href="https://redux.js.org/"&gt;Learn more&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;react-bootstrap&lt;/strong&gt;: Speeds up UI development with pre-designed responsive components. &lt;a href="https://getbootstrap.com/"&gt;Learn more&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;styled-components&lt;/strong&gt;: Allows for maintainable styling with CSS-in-JS. &lt;a href="https://styled-components.com/"&gt;Learn more&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;@material-ui&lt;/strong&gt;: Offers Material Design-inspired UI components for modern aesthetics. &lt;a href="https://mui.com/"&gt;Learn more&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;moment&lt;/strong&gt;: Handles date and time manipulations with ease. &lt;a href="https://momentjs.com/"&gt;Learn more&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;react-icons&lt;/strong&gt;: Quickly integrate a variety of icons into your React app. &lt;a href="https://react-icons.github.io/react-icons/"&gt;Learn more&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;@emotion/react&lt;/strong&gt;: Elevates your styling game with CSS-in-JS capabilities. &lt;a href="https://emotion.sh/docs/introduction"&gt;Learn more&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;lodash&lt;/strong&gt;: Provides a wealth of utility functions for data manipulation. &lt;a href="https://lodash.com/docs/4.17.15"&gt;Learn more&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;classnames&lt;/strong&gt;: Makes dynamic CSS class application a breeze. &lt;a href="https://www.npmjs.com/package/classnames"&gt;Learn more&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;@fortawesome/react-fontawesome&lt;/strong&gt;: Access Font Awesome icons with customization options. &lt;a href="https://fontawesome.com/docs/web/use-with/react/"&gt;Learn more&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;firebase&lt;/strong&gt;: Simplifies serverless functionality integration into your app. &lt;a href="https://firebase.google.com/docs"&gt;Learn more&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;react-toastify&lt;/strong&gt;: Enhance user experience with customizable toast notifications. &lt;a href="https://github.com/fkhadra/react-toastify"&gt;Learn more&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;antd&lt;/strong&gt;: Empowers you with enterprise-level UI components and layouts. &lt;a href="https://ant.design/docs/react/introduce"&gt;Learn more&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;uuid&lt;/strong&gt;: Generates universally unique identifiers for various purposes. &lt;a href="https://www.npmjs.com/package/uuid"&gt;Learn more&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;date-fns&lt;/strong&gt;: Simplifies date and time operations with a robust library. &lt;a href="https://date-fns.org/docs/Getting-Started"&gt;Learn more&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;history&lt;/strong&gt;: Effortlessly manage session history in single-page apps. &lt;a href="https://www.npmjs.com/package/history"&gt;Learn more&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;framer-motion&lt;/strong&gt;: Add smooth animations and transitions to your React components. &lt;a href="https://www.framer.com/api/motion/"&gt;Learn more&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;react-select&lt;/strong&gt;: Create highly customizable and user-friendly select inputs in your React applications. &lt;a href="https://react-select.com/home"&gt;Learn more&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;(Sourced from a survey of over 600 popular repositories.)&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>frontend</category>
      <category>webdev</category>
    </item>
    <item>
      <title>SEO for websites with multiple languages 🇬🇧🇫🇷🇨🇳</title>
      <dc:creator>James Murdza</dc:creator>
      <pubDate>Wed, 27 Dec 2023 06:16:12 +0000</pubDate>
      <link>https://dev.to/jamesmurdza/seo-for-websites-with-multiple-languages-4ne2</link>
      <guid>https://dev.to/jamesmurdza/seo-for-websites-with-multiple-languages-4ne2</guid>
      <description>&lt;p&gt;If your website contains content that is available in multiple languages, you may want to let Google know.&lt;/p&gt;

&lt;p&gt;Let's say you have a page which is available in three languages: English, French and Mandarin Chinese.&lt;/p&gt;

&lt;p&gt;You would first look up the correct language codes for those languages (see below) and then, in your page &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt;, add these tags:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"alternate"&lt;/span&gt; &lt;span class="na"&gt;hreflang=&lt;/span&gt;&lt;span class="s"&gt;"en-US” href="&lt;/span&gt;&lt;span class="na"&gt;https:&lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="na"&gt;mywebsite.com&lt;/span&gt;&lt;span class="err"&gt;"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"alternate"&lt;/span&gt; &lt;span class="na"&gt;hreflang=&lt;/span&gt;&lt;span class="s"&gt;"fr” href="&lt;/span&gt;&lt;span class="na"&gt;https:&lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="na"&gt;mywebsite.com&lt;/span&gt;&lt;span class="err"&gt;/&lt;/span&gt;&lt;span class="na"&gt;fr&lt;/span&gt;&lt;span class="err"&gt;"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"alternate"&lt;/span&gt; &lt;span class="na"&gt;hreflang=&lt;/span&gt;&lt;span class="s"&gt;"zh-Hans” href="&lt;/span&gt;&lt;span class="na"&gt;https:&lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="na"&gt;mywebsite.com&lt;/span&gt;&lt;span class="err"&gt;/&lt;/span&gt;&lt;span class="na"&gt;cn&lt;/span&gt;&lt;span class="err"&gt;"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Language code formats
&lt;/h2&gt;

&lt;p&gt;But how do you know the right language codes to put in the hreflang attribute? According to &lt;a href="https://developers.google.com/search/docs/advanced/crawling/localized-versions#language-codes"&gt;Google's SEO docs&lt;/a&gt; there are three valid formats:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Language code. Example: &lt;code&gt;zh&lt;/code&gt; is Chinese&lt;/li&gt;
&lt;li&gt;Language with a region. Example: &lt;code&gt;zh-TW&lt;/code&gt; is Chinese as spoken in Taiwan&lt;/li&gt;
&lt;li&gt;Language and script codes. Example: &lt;code&gt;zh-Hant&lt;/code&gt; is Traditional Chinese&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The first option should do just fine for most cases!&lt;/p&gt;

&lt;h2&gt;
  
  
  Lists of language codes
&lt;/h2&gt;

&lt;p&gt;You can quickly find the language code you're looking for on Wikipedia.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes"&gt;List of language codes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements"&gt;List of region codes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://en.wikipedia.org/wiki/ISO_15924#List_of_codes"&gt;List of script codes&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's it!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>The minimalist guide to deploying a website in 2023 🧘</title>
      <dc:creator>James Murdza</dc:creator>
      <pubDate>Sun, 24 Dec 2023 20:19:54 +0000</pubDate>
      <link>https://dev.to/jamesmurdza/the-minimalist-guide-to-free-web-hosts-2023-f74</link>
      <guid>https://dev.to/jamesmurdza/the-minimalist-guide-to-free-web-hosts-2023-f74</guid>
      <description>&lt;p&gt;This short document gives suggestions for how to deploy websites in 2023 without any more expenses or work than is necessary. After getting accustomed to the right tools, it should be able to set up a fast and secure hosted website in about 30 minutes while only paying the cost of the domain name.&lt;/p&gt;

&lt;h2&gt;
  
  
  Domain names and DNS
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.cloudflare.com/"&gt;Cloudflare&lt;/a&gt; offers low/no markup domain name registration with a free DNS service. This will virtually always be your cheapest option for &lt;strong&gt;domain name renewals&lt;/strong&gt;. They don't list prices for all TLDs upfront, so use &lt;a href="https://github.com/rizdaprasetya/Raw-Domain-Extension-Price/blob/master/scrap-cloudflare-domain-pricing/cloudflare-domain-pricing-dump.csv"&gt;this list&lt;/a&gt; to get your best estimate.&lt;/p&gt;

&lt;p&gt;Notes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;If you want to save even more money, you can register your first year on a registrar (GoDaddy, Namecheap, etc.) when they have a sale and then &lt;a href="https://developers.cloudflare.com/registrar/get-started/transfer-domain-to-cloudflare/"&gt;transfer the domain to Cloudflare&lt;/a&gt;. The best possible price for any TLD can normally be found on &lt;a href="https://tld-list.com/"&gt;TLD List&lt;/a&gt;. This will only be cheaper than Cloudflare for the first year.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Another benefit to using Cloudflare is the free DNS service they provide. (For more info: "&lt;a href="https://webmasters.stackexchange.com/questions/88659/how-can-cloudflare-offer-a-free-cdn-with-unlimited-bandwidth"&gt;How can CloudFlare offer a free CDN with unlimited bandwidth?&lt;/a&gt;")&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Hosting
&lt;/h2&gt;

&lt;p&gt;There are a wide number of hosting services you can use which really depends on your requirements, mainly:&lt;br&gt;
1) Can you get by with a static site, or do you require server-side rendering?&lt;br&gt;
2) How much bandwidth will you use?&lt;br&gt;
3) How much storage space will you use?&lt;/p&gt;

&lt;p&gt;There are a variety of options you can choose for low-cost sites. Below are a few of the best:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If you just need a &lt;strong&gt;simple static website&lt;/strong&gt;, consider &lt;a href="https://www.netlify.com/"&gt;Netlify&lt;/a&gt;.

&lt;ul&gt;
&lt;li&gt;Free for unlimited sites&lt;/li&gt;
&lt;li&gt;Deploy via web interface, GitHub integration, or command-line tools&lt;/li&gt;
&lt;li&gt;100GB/month free bandwidth&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;If you use GitHub&lt;/strong&gt; and need to host a static website, consider &lt;a href="https://pages.github.com/"&gt;GitHub Pages&lt;/a&gt;.

&lt;ul&gt;
&lt;li&gt;Free for one site&lt;/li&gt;
&lt;li&gt;Stored on a GitHub public respository&lt;/li&gt;
&lt;li&gt;Deploy via web interface, or Git&lt;/li&gt;
&lt;li&gt;100GB/month free bandwidth&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;If you need to run a &lt;strong&gt;website with a server-side backend&lt;/strong&gt;, consider &lt;a href="https://vercel.com/"&gt;Vercel&lt;/a&gt;.

&lt;ul&gt;
&lt;li&gt;Free for unlimited sites&lt;/li&gt;
&lt;li&gt;Supports Node.js, Next.js&lt;/li&gt;
&lt;li&gt;100 GB-hours of serverless function usage (up to 10 seconds per execution)&lt;/li&gt;
&lt;li&gt;Deploy via GitHub integration, or command-line tools&lt;/li&gt;
&lt;li&gt;100GB/month free bandwidth&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All these options allow you to connect to custom domains and at least 1GB of storage. None of them require a credit card to get started. The &lt;strong&gt;easiest option for a static site is definitely Netlify&lt;/strong&gt;, which even has a drag-and-drop interface for uploading files. However I included GitHub Pages since the ubiquity of GitHub among programmers makes it a very convenient option.&lt;/p&gt;

&lt;p&gt;Note: None of these options allow you to access a server directly with SSH or FTP they way that you would with a a traditional web host. They are "serverless."&lt;/p&gt;

&lt;p&gt;Also, if you're using Cloudflare's free CDN service as mentioned above, the traffic that your host sees could greatly be decreased due to caching, effectively giving you &lt;strong&gt;up to ten times more traffic&lt;/strong&gt; while and staying within the free range.&lt;/p&gt;

&lt;h2&gt;
  
  
  Email
&lt;/h2&gt;

&lt;p&gt;If you need simple &lt;strong&gt;email forwarding&lt;/strong&gt; for your domain, you can use &lt;a href="https://improvmx.com/"&gt;ImprovMX&lt;/a&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Free for one domain&lt;/li&gt;
&lt;li&gt;Unlimited forwarding and addresses&lt;/li&gt;
&lt;li&gt;Attachments up to 10MB&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're looking for &lt;strong&gt;hosted email&lt;/strong&gt; for your domain, you can use &lt;a href="https://www.zoho.com/mail/"&gt;Zoho Mail&lt;/a&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Free for one domain&lt;/li&gt;
&lt;li&gt;Up to five email accounts with 5GB storage each&lt;/li&gt;
&lt;li&gt;Attachments up 25MB&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>dns</category>
      <category>domain</category>
      <category>hosting</category>
    </item>
    <item>
      <title>The only Docker cheatsheet you need 🐳</title>
      <dc:creator>James Murdza</dc:creator>
      <pubDate>Sun, 24 Dec 2023 20:14:55 +0000</pubDate>
      <link>https://dev.to/jamesmurdza/docker-cheatsheet-5e8f</link>
      <guid>https://dev.to/jamesmurdza/docker-cheatsheet-5e8f</guid>
      <description>&lt;p&gt;My reference of the most useful commands to know when you're building in Docker:&lt;/p&gt;

&lt;h2&gt;
  
  
  Build and run
&lt;/h2&gt;

&lt;p&gt;Build an image:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker build -t myimage .
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Build an image, deleting the old one:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker rmi myimage &amp;amp;&amp;amp; docker build -t myimage .
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Build an image, and print all the steps:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker build --progress=plain -t myimage .
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run container from image, with port forwarding:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run -p 80:80 myimage
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run container for debugging purposes, replacing the entrypoint with a shell:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run --rm -it --entrypoint bash myimage
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Inventory
&lt;/h2&gt;

&lt;p&gt;List all images:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;List all containers: (The -a flag is to show stopped containers as well)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker container ls -a
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;List all docker images and containers and file sizes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker system df -v
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Show the history of an image:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  Clean up
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;**Dangling images&lt;/em&gt;* are untagged and not needed by any tagged images.*&lt;br&gt;
&lt;em&gt;**Unused image&lt;/em&gt;* are not needed by any existing containers.*&lt;/p&gt;

&lt;p&gt;Delete stopped containers:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;Remove dangling images:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;Remove unused images:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker image prune -a
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Remove build cache:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



</description>
      <category>docker</category>
      <category>cheatsheet</category>
      <category>cli</category>
    </item>
  </channel>
</rss>
