<?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>Forem: D</title>
    <description>The latest articles on Forem by D (@distalx).</description>
    <link>https://forem.com/distalx</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%2F18881%2F421921a2-ea2c-4989-90af-a95a41a91484.png</url>
      <title>Forem: D</title>
      <link>https://forem.com/distalx</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/distalx"/>
    <language>en</language>
    <item>
      <title>A Simple Cheat Sheet for JavaScript Developers Transitioning to Python</title>
      <dc:creator>D</dc:creator>
      <pubDate>Wed, 30 Jul 2025 16:08:23 +0000</pubDate>
      <link>https://forem.com/distalx/a-simple-cheat-sheet-for-javascript-developers-transitioning-to-python-ecj</link>
      <guid>https://forem.com/distalx/a-simple-cheat-sheet-for-javascript-developers-transitioning-to-python-ecj</guid>
      <description>&lt;p&gt;As a developer coming from a JavaScript background, I've found it challenging to adjust to Python's syntax and structure. The differences, especially the lack of curly braces and reliance on indentation, can be confusing.&lt;/p&gt;

&lt;p&gt;To make my transition smoother, I created this cheat sheet comparing common JavaScript and Python syntax. It serves as a quick reference to help navigate the key differences and similarities between the two languages. &lt;/p&gt;

&lt;p&gt;I hope this resource will make it easier for anyone else facing the same challenges in learning Python.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;strong&gt;Concept&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;JavaScript&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Python&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Variable Declaration&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;let x = 10;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;x = 10&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Data Types&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;String&lt;/code&gt;, &lt;code&gt;Number&lt;/code&gt;, &lt;code&gt;Boolean&lt;/code&gt;, &lt;code&gt;Object&lt;/code&gt;, &lt;code&gt;Array&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;str&lt;/code&gt;, &lt;code&gt;int&lt;/code&gt;, &lt;code&gt;float&lt;/code&gt;, &lt;code&gt;bool&lt;/code&gt;, &lt;code&gt;list&lt;/code&gt;, &lt;code&gt;dict&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Function Definition&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;function myFunc() {}&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;def my_func():&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Function Call&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;myFunc();&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;my_func()&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Conditional Statements&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;if (x &amp;gt; 10) {}&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;if x &amp;gt; 10:&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Loops&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;for (let i = 0; i &amp;lt; 5; i++) {}&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;for i in range(5):&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;While Loop&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;while (x &amp;lt; 10) {}&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;while x &amp;lt; 10:&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Array/List&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;let arr = [1, 2, 3];&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;arr = [1, 2, 3]&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Object/Dictionary&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;let obj = { key: 'value' };&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;obj = {'key': 'value'}&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Accessing Elements&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;arr[0]&lt;/code&gt;, &lt;code&gt;obj.key&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;arr[0]&lt;/code&gt;, &lt;code&gt;obj['key']&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;String Concatenation&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;let str = 'Hello ' + 'World';&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;str = 'Hello ' + 'World'&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Template Literals&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;`Hello ${name}`&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;f'Hello {name}'&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Comments&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;// This is a comment&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;# This is a comment&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Exception Handling&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;try { } catch (e) { }&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;try: ... except Exception as e:&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Importing Modules&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;import { myFunc } from './module';&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;from module import my_func&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Class Definition&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;class MyClass {}&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;class MyClass:&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Class Instantiation&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;let obj = new MyClass();&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;obj = MyClass()&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Arrow Functions&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;const myFunc = () =&amp;gt; {}&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;my_func = lambda: ...&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Boolean Logic&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt;, &lt;code&gt;||&lt;/code&gt;, &lt;code&gt;!&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;and&lt;/code&gt;, &lt;code&gt;or&lt;/code&gt;, &lt;code&gt;not&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h3&gt;
  
  
  Indentation vs. Curly Braces
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;JavaScript:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;greet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&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;name&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello, &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&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="s2"&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;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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello, World!&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="p"&gt;}&lt;/span&gt;
&lt;span class="nf"&gt;greet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Alice&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;p&gt;&lt;strong&gt;Python:&lt;/strong&gt;&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;greet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&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;name&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hello, &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;!&lt;/span&gt;&lt;span class="sh"&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="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hello, World!&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;greet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Alice&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Whitespace Sensitivity
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;JavaScript:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;if &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="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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;This is true.&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;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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;This is false.&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;&lt;strong&gt;Python:&lt;/strong&gt;&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;if&lt;/span&gt; &lt;span class="bp"&gt;True&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;This is true.&lt;/span&gt;&lt;span class="sh"&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="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;This is false.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In Python, if you accidentally use inconsistent indentation, you will get an &lt;code&gt;IndentationError&lt;/code&gt;:&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;if&lt;/span&gt; &lt;span class="bp"&gt;True&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;This is true.&lt;/span&gt;&lt;span class="sh"&gt;"&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;This will cause an error.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# Incorrect indentation
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Data Structures
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Javascript&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Array&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;fruits&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;apple&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;banana&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;cherry&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;

&lt;span class="c1"&gt;// Object&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;person&lt;/span&gt; &lt;span class="o"&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;Alice&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;isStudent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="c1"&gt;// Set&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;uniqueNumbers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Set&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="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&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="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;&lt;strong&gt;Python&lt;/strong&gt;&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="c1"&gt;# List
&lt;/span&gt;&lt;span class="n"&gt;fruits&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;apple&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;banana&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;cherry&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="c1"&gt;# Dictionary
&lt;/span&gt;&lt;span class="n"&gt;person&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;name&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Alice&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;age&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;is_student&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;False&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;# Set
&lt;/span&gt;&lt;span class="n"&gt;unique_numbers&lt;/span&gt; &lt;span class="o"&gt;=&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="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&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="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Function Definitions
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;JavaScript&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Function Declaration&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&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;a&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Arrow Function&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;multiply&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Python&lt;/strong&gt;&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="c1"&gt;# Function Definition
&lt;/span&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;add&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;return&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="o"&gt;---&lt;/span&gt;
&lt;span class="o"&gt;---&lt;/span&gt;
&lt;span class="c1"&gt;# Lambda Function
&lt;/span&gt;&lt;span class="n"&gt;multiply&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;lambda&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="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Error Handling
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;JavaScript&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;try&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;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;riskyFunction&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &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;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;An error occurred:&lt;/span&gt;&lt;span class="dl"&gt;"&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;&lt;strong&gt;Python&lt;/strong&gt;&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;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;risky_function&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="nb"&gt;Exception&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;e&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;An error occurred:&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Modules and Packages
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;JavaScript&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Importing a module in Node.js&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;fs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;fs&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Using ES6 module syntax&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;readFile&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;fs&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;p&gt;&lt;strong&gt;Python&lt;/strong&gt;&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="c1"&gt;# Importing a module
&lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;math&lt;/span&gt;

&lt;span class="c1"&gt;# Using a specific function from a module
&lt;/span&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;math&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;sqrt&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Type System
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;JavaScript&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Dynamically typed&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;42&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// number&lt;/span&gt;
&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// string&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Python&lt;/strong&gt;&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="c1"&gt;# Dynamically typed
&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;42&lt;/span&gt;  &lt;span class="c1"&gt;# int
&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hello&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;  &lt;span class="c1"&gt;# str
&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you have any suggestions or additional comparisons that could improve this cheat sheet, please feel free to share your thoughts in the comments.&lt;/p&gt;

&lt;p&gt;Thank you for reading! &lt;/p&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Apple's Foundation Models Framework: A Closer Look</title>
      <dc:creator>D</dc:creator>
      <pubDate>Tue, 10 Jun 2025 02:43:39 +0000</pubDate>
      <link>https://forem.com/distalx/apples-foundation-models-framework-a-closer-look-jf2</link>
      <guid>https://forem.com/distalx/apples-foundation-models-framework-a-closer-look-jf2</guid>
      <description>&lt;p&gt;Apple just introduced some powerful new capabilities for developers that let you bring advanced AI features directly into your apps. You might have heard terms like "AI agents" floating around, but let's break down what Apple's new Foundation Models framework means for you, simply and practically.&lt;/p&gt;

&lt;p&gt;At its heart, this framework gives your apps access to a large language model (LLM) that runs directly on your users' devices. This is a big deal for a few reasons:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Privacy First:&lt;/strong&gt; All the data stays on the device. Your users' information remains private, which is a huge win for trust and security.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Works Offline:&lt;/strong&gt; No internet? No problem! Since the model is on-device, your smart features can work anywhere.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;No Extra App Size:&lt;/strong&gt; It's built into the operating system, so your app won't get bigger.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Let's look at some of the cool things this framework enables:&lt;/p&gt;

&lt;h3&gt;
  
  
  Getting Structured Answers (Guided Generation)
&lt;/h3&gt;

&lt;p&gt;Normally, when you ask an LLM something, you get back plain text. If you want specific information (like a list of events or details about a place), it's tough to get it consistently formatted. You often end up trying to "trick" the model into giving you JSON or writing messy code to pick out what you need.&lt;/p&gt;

&lt;p&gt;Apple's &lt;strong&gt;Guided Generation&lt;/strong&gt; solves this. You can define a Swift data structure (like a &lt;code&gt;struct&lt;/code&gt; for a &lt;code&gt;Trip&lt;/code&gt; or an &lt;code&gt;Event&lt;/code&gt;), and the model will &lt;em&gt;guarantee&lt;/em&gt; it generates an instance of that structure. This means you get reliable, ready to use data every single time, making it much easier to integrate AI output into your app's design.&lt;/p&gt;

&lt;h3&gt;
  
  
  Smoother Streaming (Snapshots)
&lt;/h3&gt;

&lt;p&gt;When an AI generates a long response, it often comes out piece by piece. Developers usually get tiny chunks of text (called "deltas") and have to stitch them together. If that text is supposed to form a complex structure, it gets even harder to show users partial results as they come in.&lt;/p&gt;

&lt;p&gt;Instead of raw text chunks, Apple's framework streams &lt;strong&gt;snapshots&lt;/strong&gt;. Imagine you're building a &lt;code&gt;Trip&lt;/code&gt; struct. As the model thinks, it sends you partial &lt;code&gt;Trip&lt;/code&gt; objects – maybe first the &lt;code&gt;title&lt;/code&gt;, then the &lt;code&gt;destination&lt;/code&gt;, then the &lt;code&gt;activities&lt;/code&gt; start to fill in. This makes showing live, structured AI responses in your UI much smoother and simpler.&lt;/p&gt;

&lt;h3&gt;
  
  
  Giving Your App "Skills" (Tool Calling)
&lt;/h3&gt;

&lt;p&gt;This is where things get really interesting. &lt;strong&gt;Tool Calling&lt;/strong&gt; allows the AI model to &lt;em&gt;use functions you've written&lt;/em&gt; in your app.&lt;/p&gt;

&lt;p&gt;Think of it like this: If a user asks your travel app, "What's the weather like in Tokyo?", the LLM itself doesn't "know" the weather. But with tool calling, you can define a "weather tool" (a simple function) that can fetch this information. The LLM understands when it needs this information, "calls" your weather tool, gets the answer, and then uses that answer to give the user a complete, accurate response.&lt;/p&gt;

&lt;p&gt;This means your app's AI can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Access real-time data:&lt;/strong&gt; Like weather, map data, or any other info your app has.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Perform actions:&lt;/strong&gt; Potentially book a trip, send a message, or update a calendar entry (if you define tools for those actions).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reduce "hallucinations":&lt;/strong&gt; By pulling real data, the AI is less likely to make things up.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Remembering the Conversation (Stateful Sessions)
&lt;/h3&gt;

&lt;p&gt;For an AI to have a natural back and forth, it needs to remember what was said before. Apple's framework uses &lt;strong&gt;Stateful Sessions&lt;/strong&gt; to do this. Every interaction within a session is remembered, so the model understands context. If you ask it to "write another one" after it just wrote a haiku, it knows you mean another haiku.&lt;/p&gt;

&lt;p&gt;This session also lets you give the AI "instructions" (like "act as a friendly travel agent") that guide its overall behavior, separate from the user's direct questions. This helps keep the AI on track and makes it safer.&lt;/p&gt;

&lt;h3&gt;
  
  
  Getting Started
&lt;/h3&gt;

&lt;p&gt;Apple has made it easy to experiment with these features right in &lt;strong&gt;Xcode Playgrounds&lt;/strong&gt;. You can quickly test prompts and see how the AI responds without having to build and run your entire app. For a comprehensive overview and to see these features in action, check out Apple's official WWDC25 session, "Meet Foundation Models" at &lt;a href="https://developer.apple.com/videos/play/wwdc2025/286/" rel="noopener noreferrer"&gt;https://developer.apple.com/videos/play/wwdc2025/286/&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This new framework opens up a world of possibilities for building more intelligent, responsive, and private apps. It's about empowering your app with smart features, all running seamlessly on your users' devices. Dive in and see what you can build!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>swift</category>
      <category>llm</category>
      <category>wwdc25</category>
    </item>
    <item>
      <title>Week 2 - of Learning AI</title>
      <dc:creator>D</dc:creator>
      <pubDate>Sun, 08 Jun 2025 03:33:23 +0000</pubDate>
      <link>https://forem.com/distalx/week-2-of-learning-ai-jn0</link>
      <guid>https://forem.com/distalx/week-2-of-learning-ai-jn0</guid>
      <description>&lt;p&gt;&lt;strong&gt;A quick note:&lt;/strong&gt; I've been posting daily updates on my AI agent learning journey, but finding enough time for daily posts is tricky. So, I'm switching to a weekly format! This will be my fourth post in the series, and I'll keep documenting my progress here.&lt;/p&gt;

&lt;p&gt;This week, I continued my dive into AI agents with some insightful resources: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;How to Build an Agent by Ampcode:&lt;/strong&gt; This article was really simple to understand and did a fantastic job of introducing agents and explaining how to use Large Language Models (LLMs). It even walked me through building a basic coding agent, which helped me truly grasp what agents are. I highly recommend it if you're just starting out. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://ampcode.com/how-to-build-an-agent" rel="noopener noreferrer"&gt;https://ampcode.com/how-to-build-an-agent&lt;/a&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Agents At Work 4: The Future of Coding with Thorsten Ball:&lt;/strong&gt; This YouTube episode featured Jordi Montes and Thorsten Ball discussing AI agents in software development. Thorsten is known for his work in Go, and it was interesting to hear their thoughts on the evolving landscape of agents. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=J1-W9O3n7j8" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=J1-W9O3n7j8&lt;/a&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;My AI Skeptic Friends Are All Nuts by Fly.io:&lt;/strong&gt; This blog post gave me mixed feelings. It definitely offered a different perspective on the AI space.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://fly.io/blog/youre-all-nuts/" rel="noopener noreferrer"&gt;https://fly.io/blog/youre-all-nuts/&lt;/a&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Claude Prompt Engineering Course (Google Sheet):&lt;/strong&gt; This course, presented as a Google Sheet, is designed to help you engineer optimal prompts in Claude. It really helped improve my understanding of prompting techniques. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://docs.google.com/spreadsheets/d/19jzLgRruG9kjUQNKtCg1ZjdD6l6weA6qRXG5zLIAhC8/edit?gid=869808629#gid=869808629" rel="noopener noreferrer"&gt;https://docs.google.com/spreadsheets/d/19jzLgRruG9kjUQNKtCg1ZjdD6l6weA6qRXG5zLIAhC8/edit?gid=869808629#gid=869808629&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Overall, I've made some decent progress in understanding AI agents this week! I'll keep documenting this journey.&lt;/p&gt;

&lt;p&gt;If you're also exploring AI, comment below - what resources have you found most helpful? &lt;/p&gt;

&lt;p&gt;Let's learn together.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>learning</category>
    </item>
    <item>
      <title>Day 2 of diving deep into AI Agents!</title>
      <dc:creator>D</dc:creator>
      <pubDate>Thu, 29 May 2025 04:56:44 +0000</pubDate>
      <link>https://forem.com/distalx/day-2-of-diving-deep-into-ai-agents-3e7m</link>
      <guid>https://forem.com/distalx/day-2-of-diving-deep-into-ai-agents-3e7m</guid>
      <description>&lt;p&gt;Just finished the Google whitepaper, and it has a very detailed and solid breakdown of AI agents.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My takeaways&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prompt Engineering Techniques:&lt;/strong&gt;  ReAct, CoT (Chain of Thought), and ToT (Tree of Thoughts) are ways to guide the agent's reasoning.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tool Types:&lt;/strong&gt; Extensions, functions, and data stores – the building blocks for agents to interact with the world. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Targeted Learning:&lt;/strong&gt; In-context learning (one-shot/few-shot - quick but can be hit or miss), retrieval-based (more complex but flexible), and fine-tuning (more effort upfront for better results).&lt;/p&gt;

&lt;p&gt;Out of the OpenAI guide, the Anthropic blog, and this Google paper, I'd say the whitepaper gave the most detailed overview so far.&lt;/p&gt;

&lt;p&gt;Still eager to find a cool project to build to put this knowledge into practice!&lt;/p&gt;

&lt;p&gt;If you're also exploring AI Agents, what resources have you found most helpful? &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Links:&lt;/strong&gt;&lt;br&gt;
OpenAI's guide:&lt;br&gt;
&lt;a href="https://cdn.openai.com/business-guides-and-resources/a-practical-guide-to-building-agents.pdf" rel="noopener noreferrer"&gt;https://cdn.openai.com/business-guides-and-resources/a-practical-guide-to-building-agents.pdf&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Google's whitepaper on AI Agents:&lt;br&gt;
&lt;a href="https://ia800601.us.archive.org/15/items/google-ai-agents-whitepaper/Newwhitepaper_Agents.pdf" rel="noopener noreferrer"&gt;https://ia800601.us.archive.org/15/items/google-ai-agents-whitepaper/Newwhitepaper_Agents.pdf&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Building effective agents&lt;br&gt;
&lt;a href="https://www.anthropic.com/engineering/building-effective-agents" rel="noopener noreferrer"&gt;https://www.anthropic.com/engineering/building-effective-agents&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks for being a part of my learning journey.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>aigents</category>
      <category>learning</category>
    </item>
    <item>
      <title>Day 1 of AI Agent Learning!</title>
      <dc:creator>D</dc:creator>
      <pubDate>Tue, 27 May 2025 18:20:05 +0000</pubDate>
      <link>https://forem.com/distalx/day-1-of-ai-agent-learning-5bh1</link>
      <guid>https://forem.com/distalx/day-1-of-ai-agent-learning-5bh1</guid>
      <description>&lt;p&gt;Just finished building a weather agent using OpenAI's guide. It was pretty straightforward, which is encouraging! I also spent some time reading the first part (14 pages) of Google's whitepaper on AI Agents. It's a lot of theory, but starting to sink in.&lt;/p&gt;

&lt;p&gt;Still on the lookout for cool ideas for what to build next as I continue learning about AI Agents. Following along and excited to see where this goes!&lt;/p&gt;

&lt;p&gt;If you're also learning about AI Agents, comment below. Let's learn together.&lt;/p&gt;

&lt;p&gt;Any advice or resources from those who've already learned this? Please share!&lt;/p&gt;

&lt;p&gt;I'll do my best to keep these updates coming, but life happens!&lt;/p&gt;

&lt;p&gt;Links:&lt;br&gt;
OpenAI's guide:&lt;br&gt;
&lt;a href="https://cdn.openai.com/business-guides-and-resources/a-practical-guide-to-building-agents.pdf" rel="noopener noreferrer"&gt;https://cdn.openai.com/business-guides-and-resources/a-practical-guide-to-building-agents.pdf&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Google's whitepaper on AI Agents:&lt;br&gt;
&lt;a href="https://ia800601.us.archive.org/15/items/google-ai-agents-whitepaper/Newwhitepaper_Agents.pdf" rel="noopener noreferrer"&gt;https://ia800601.us.archive.org/15/items/google-ai-agents-whitepaper/Newwhitepaper_Agents.pdf&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>learninublic</category>
      <category>aiagents</category>
    </item>
    <item>
      <title>My AI Agent Learning Kickoff : Day 0</title>
      <dc:creator>D</dc:creator>
      <pubDate>Mon, 26 May 2025 01:33:08 +0000</pubDate>
      <link>https://forem.com/distalx/my-ai-agent-learning-kickoff-day-0-1a2i</link>
      <guid>https://forem.com/distalx/my-ai-agent-learning-kickoff-day-0-1a2i</guid>
      <description>&lt;p&gt;Hello AI enthusiasts! 👋&lt;/p&gt;

&lt;p&gt;Just starting to learn about AI Agents.My approach will be to lean heavily on openly available resources, which I'll share as I discover them.&lt;/p&gt;

&lt;p&gt;This weekend was dedicated to absorbing knowledge from OpenAI's &lt;a href="https://cdn.openai.com/business-guides-and-resources/a-practical-guide-to-building-agents.pdf" rel="noopener noreferrer"&gt;A Practical Guide to Building Agents&lt;/a&gt; and Anthropic's insightful blog post &lt;a href="https://www.anthropic.com/engineering/building-effective-agents" rel="noopener noreferrer"&gt;Building Effective Agents&lt;/a&gt;. The visual representation in Anthropic's piece was particularly helpful in grasping the end-to-end process.&lt;/p&gt;

&lt;p&gt;One initial thought that keeps popping into my head, perhaps influenced by my background, is how the asynchronous nature of agent operations seems to align really well with Node.js's event-driven model and its built-in EventEmitter. Could this be a key runtime for agent development?&lt;/p&gt;

&lt;p&gt;I'll investigate this further as I progress.&lt;/p&gt;

&lt;p&gt;If you're also learning about AI Agents, comment below. Let's learn together.&lt;/p&gt;

&lt;p&gt;Any advice or resources from those who've already learned this? Please share!&lt;/p&gt;

&lt;p&gt;I'll do my best to keep these updates coming, but life happens! &lt;/p&gt;

&lt;p&gt;Thanks for being a part of my learning journey.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>learninginpublic</category>
      <category>aiagents</category>
    </item>
    <item>
      <title>Should you disclose your AI usage during interviews? Or keep it a secret?</title>
      <dc:creator>D</dc:creator>
      <pubDate>Thu, 15 May 2025 00:57:35 +0000</pubDate>
      <link>https://forem.com/distalx/should-you-disclose-your-ai-usage-during-interviews-or-keep-it-a-secret-3lij</link>
      <guid>https://forem.com/distalx/should-you-disclose-your-ai-usage-during-interviews-or-keep-it-a-secret-3lij</guid>
      <description>&lt;p&gt;Okay, that's a nuanced one! Gotta think strategically about this. Let's break it down.&lt;/p&gt;

&lt;p&gt;Lean towards saying it, but frame it right.&lt;/p&gt;

&lt;p&gt;Don't just drop, "Oh yeah, I use AI". That's lazy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You frame it like this:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As a programmer, my goal is to deliver maximum impact and solve problems as efficiently as possible. I use AI tools not to replace my skills or thinking, but to amplify them. &lt;/p&gt;

&lt;p&gt;For example, I use AI for boilerplate code generation, identifying potential bugs faster, or exploring different architectural patterns quickly. This allows me to free up mental energy and time to focus on the complex challenges with more creativity. It makes me faster, more thorough, and more effective.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;See the difference?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You're not saying "AI does the work for me." &lt;/p&gt;

&lt;p&gt;You're saying "I am a pragmatic programmer who understands how to use the best tools available to be significantly more productive and focus on the harder problems."&lt;/p&gt;

&lt;p&gt;Now, yeah, there's a risk you hit an interviewer who is completely anti-AI or doesn't get it. But honestly? &lt;br&gt;
As a programmer, do you really want to work at a place that doesn't understand leveraging modern tools for efficiency anyway? Think of it as a filter.&lt;/p&gt;

&lt;p&gt;Show them you're not just good at coding; you're good at engineering &lt;strong&gt;SOLUTIONS&lt;/strong&gt; efficiently in the current landscape. &lt;/p&gt;

&lt;p&gt;So, don't keep it a secret out of fear. Be transparent, but be strategic in how you communicate the value and the leverage you gain from it.&lt;/p&gt;

</description>
      <category>careeradvice</category>
      <category>interviewtips</category>
      <category>ai</category>
    </item>
    <item>
      <title>Are AI Agents Simply LLM Wrappers?</title>
      <dc:creator>D</dc:creator>
      <pubDate>Sun, 04 May 2025 21:29:08 +0000</pubDate>
      <link>https://forem.com/distalx/are-ai-agents-simply-llm-wrappers-43lh</link>
      <guid>https://forem.com/distalx/are-ai-agents-simply-llm-wrappers-43lh</guid>
      <description>&lt;p&gt;Many AI Agents use Large Language Models (LLMs) for language.&lt;/p&gt;

&lt;p&gt;But agents often do more:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Planning:&lt;/strong&gt; They figure out how to do things step by step.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Memory:&lt;/strong&gt; They remember what they've done.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tool Use:&lt;/strong&gt; They use other programs and tools.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Interaction:&lt;/strong&gt; Some can see and act in the real world.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So, while LLMs are a key part, calling an AI Agent just an LLM wrapper misses the other important pieces that make them work.&lt;/p&gt;

</description>
      <category>aiagents</category>
      <category>llms</category>
      <category>autonomousagents</category>
      <category>ai</category>
    </item>
    <item>
      <title>Is Modern Web Dev Too Complex for Newcomers?</title>
      <dc:creator>D</dc:creator>
      <pubDate>Sat, 29 Mar 2025 00:28:43 +0000</pubDate>
      <link>https://forem.com/distalx/is-modern-web-dev-too-complex-for-newcomers-5aon</link>
      <guid>https://forem.com/distalx/is-modern-web-dev-too-complex-for-newcomers-5aon</guid>
      <description>&lt;p&gt;Came across a great tweet today highlighting the complexity of building web apps in 2025:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1905051558783418370-209" src="https://platform.twitter.com/embed/Tweet.html?id=1905051558783418370"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1905051558783418370-209');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1905051558783418370&amp;amp;theme=dark"
  }



&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It made me wonder how many aspiring developers feel this way? Navigating the sheer number of tools and services can be overwhelming. For those just starting their web development journey, the initial learning curve can feel incredibly steep.&lt;/p&gt;

&lt;p&gt;Speaking of tackling complexity, have you ever explored MeteorJS? Back in the day (and still!), it aimed to provide a more integrated, "batteries included" experience, addressing many of the challenges outlined in the tweet quite well.&lt;/p&gt;

&lt;p&gt;Curious about how MeteorJS handled things mentioned in the tweet? Here's a checklist of how MeteorJS tackled these challenges:&lt;/p&gt;

&lt;p&gt;💻&lt;strong&gt;Frontend / Backend:&lt;/strong&gt; Offers a reactive frontend (originally &lt;a href="https://www.blazejs.org/" rel="noopener noreferrer"&gt;Blaze&lt;/a&gt;, later integrated with React, Vue, and Solid) tightly coupled with a Node.js backend.&lt;/p&gt;

&lt;p&gt;☁️ &lt;strong&gt;Hosting:&lt;/strong&gt; There is a paid service, &lt;a href="https://galaxy.meteor.com/" rel="noopener noreferrer"&gt;Galaxy&lt;/a&gt;, which allows you to deploy your Meteor app with a single command. Meteor apps can also be easily self-hosted using tools like &lt;a href="https://github.com/zodern/meteor-up" rel="noopener noreferrer"&gt;Meteor Up&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;🗄️ &lt;strong&gt;Database:&lt;/strong&gt; Comes with built-in support for &lt;a href="https://www.mongodb.com/" rel="noopener noreferrer"&gt;MongoDB&lt;/a&gt; and a reactive data layer that automatically pushes database changes to the frontend. Also, Meteor conveniently embeds MongoDB in its local development environment. This means you don't need to install or configure MongoDB separately to start building and experimenting with MeteorJS projects.&lt;/p&gt;

&lt;p&gt;🔑 &lt;strong&gt;Authentication:&lt;/strong&gt; Provided by official packages for handling user accounts, including password-based authentication and social logins.&lt;/p&gt;

&lt;p&gt;📁 &lt;strong&gt;Blob Storage:&lt;/strong&gt; While there are no official packages, There is a well-established packages &lt;a href="https://github.com/VeliovGroup/Meteor-Files" rel="noopener noreferrer"&gt;meteor-files&lt;/a&gt; by Veliov Group. Which lets you pload files to AWS, GridFS, DropBox or Google Drive. &lt;/p&gt;

&lt;p&gt;✉️&lt;strong&gt;Email:&lt;/strong&gt; Supported by an official package for sending emails directly via SMTP.&lt;/p&gt;

&lt;p&gt;⚙️&lt;strong&gt;Background Jobs:&lt;/strong&gt; Meteor supports packages from the npm ecosystem. You can use your favorite npm packages for this, such as &lt;code&gt;agenda.js&lt;/code&gt; or &lt;code&gt;bull&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;🔍&lt;strong&gt;Monitoring:&lt;/strong&gt; If you use Galaxy hosting, monitoring is provided out of the box. If you are self-hosting, services like (Monti APM)[&lt;a href="https://montiapm.com/" rel="noopener noreferrer"&gt;https://montiapm.com/&lt;/a&gt;] is available.&lt;/p&gt;

&lt;p&gt;🤫&lt;strong&gt;Secrets (Configuration Management):&lt;/strong&gt; It provides a built-in mechanism (&lt;code&gt;Meteor.settings&lt;/code&gt;) for managing deployment-specific configuration, including sensitive information.&lt;/p&gt;

&lt;p&gt;Meteor has a vibrant and helpful community! You can find an official community &lt;a href="https://forums.meteor.com/" rel="noopener noreferrer"&gt;forum&lt;/a&gt; and a community-run &lt;a href="https://discord.gg/hZkTCaVjmT" rel="noopener noreferrer"&gt;Discord server&lt;/a&gt; where many developers discuss the framework and help each other out. Feel free to chime in there with your experiences or questions. &lt;/p&gt;

&lt;p&gt;Alternatively, you can also post your questions or thoughts as a comment below this post!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If you are just starting your web development journey and feeling overwhelmed by the sheer number of choices, give &lt;a href="https://www.meteor.com/" rel="noopener noreferrer"&gt;MeteorJS&lt;/a&gt; a try! Its integrated approach can provide a smoother and more focused learning experience.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Many thanks to &lt;a href="https://dev.to/harryadel"&gt;Harry&lt;/a&gt; for the detailed feedback.&lt;/p&gt;

</description>
      <category>meteor</category>
      <category>reactiveprogramming</category>
      <category>webdev</category>
      <category>batteriesincluded</category>
    </item>
  </channel>
</rss>
