<?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: Apaksh</title>
    <description>The latest articles on DEV Community by Apaksh (@apaksh).</description>
    <link>https://dev.to/apaksh</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%2F3828783%2F02f0e525-8863-420a-a059-39ec322852bb.png</url>
      <title>DEV Community: Apaksh</title>
      <link>https://dev.to/apaksh</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/apaksh"/>
    <language>en</language>
    <item>
      <title>Linux Command Line: The Complete Cheat Sheet</title>
      <dc:creator>Apaksh</dc:creator>
      <pubDate>Wed, 18 Mar 2026 06:45:43 +0000</pubDate>
      <link>https://dev.to/apaksh/linux-command-line-the-complete-cheat-sheet-pii</link>
      <guid>https://dev.to/apaksh/linux-command-line-the-complete-cheat-sheet-pii</guid>
      <description>&lt;p&gt;If you work in tech, you will use the Linux command line. It's not optional. Whether you're SSH-ing into a server, debugging a Docker container, or just trying to find that one log file buried three directories deep, these commands are the bedrock of your workflow. I've distilled 100+ essential commands into this single reference. Print it, tape it to your monitor, and watch your Stack Overflow searches drop by half.&lt;/p&gt;

&lt;h2&gt;
  
  
  Navigation &amp;amp; Directory Management
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;pwd&lt;/span&gt;                        &lt;span class="c"&gt;# Print working directory&lt;/span&gt;
&lt;span class="nb"&gt;cd&lt;/span&gt; ~                       &lt;span class="c"&gt;# Go to home directory&lt;/span&gt;
&lt;span class="nb"&gt;cd&lt;/span&gt; -                       &lt;span class="c"&gt;# Go to previous directory&lt;/span&gt;
&lt;span class="nb"&gt;cd&lt;/span&gt; ../..                   &lt;span class="c"&gt;# Go up two levels&lt;/span&gt;
&lt;span class="nb"&gt;ls&lt;/span&gt;                         &lt;span class="c"&gt;# List files&lt;/span&gt;
&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-la&lt;/span&gt;                     &lt;span class="c"&gt;# List all files (including hidden) with details&lt;/span&gt;
&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-lh&lt;/span&gt;                     &lt;span class="c"&gt;# Human-readable file sizes&lt;/span&gt;
&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-lt&lt;/span&gt;                     &lt;span class="c"&gt;# Sort by modification time (newest first)&lt;/span&gt;
tree                       &lt;span class="c"&gt;# Visual directory tree&lt;/span&gt;
tree &lt;span class="nt"&gt;-L&lt;/span&gt; 2                  &lt;span class="c"&gt;# Tree limited to 2 levels deep&lt;/span&gt;
&lt;span class="nb"&gt;pushd&lt;/span&gt; /var/log             &lt;span class="c"&gt;# Push directory onto stack &amp;amp;amp; cd into it&lt;/span&gt;
&lt;span class="nb"&gt;popd&lt;/span&gt;                       &lt;span class="c"&gt;# Pop directory off stack &amp;amp;amp; return&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  File &amp;amp; Directory Operations
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;touch &lt;/span&gt;file.txt             &lt;span class="c"&gt;# Create empty file / update timestamp&lt;/span&gt;
&lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; a/b/c             &lt;span class="c"&gt;# Create nested directories&lt;/span&gt;
&lt;span class="nb"&gt;cp &lt;/span&gt;file.txt backup.txt     &lt;span class="c"&gt;# Copy file&lt;/span&gt;
&lt;span class="nb"&gt;cp&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; &lt;span class="nb"&gt;dir&lt;/span&gt;/ newdir/         &lt;span class="c"&gt;# Copy directory recursively&lt;/span&gt;
&lt;span class="nb"&gt;mv &lt;/span&gt;file.txt /tmp/          &lt;span class="c"&gt;# Move file&lt;/span&gt;
&lt;span class="nb"&gt;mv &lt;/span&gt;old.txt new.txt         &lt;span class="c"&gt;# Rename file&lt;/span&gt;
&lt;span class="nb"&gt;rm &lt;/span&gt;file.txt                &lt;span class="c"&gt;# Delete file&lt;/span&gt;
&lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; &lt;span class="nb"&gt;dir&lt;/span&gt;/                &lt;span class="c"&gt;# Force-delete directory recursively&lt;/span&gt;
&lt;span class="nb"&gt;ln&lt;/span&gt; &lt;span class="nt"&gt;-s&lt;/span&gt; /path/to/file &lt;span class="nb"&gt;link&lt;/span&gt;   &lt;span class="c"&gt;# Create symbolic link&lt;/span&gt;
find &lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="nt"&gt;-name&lt;/span&gt; &lt;span class="s2"&gt;"*.log"&lt;/span&gt;       &lt;span class="c"&gt;# Find files by name&lt;/span&gt;
find &lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="nt"&gt;-mtime&lt;/span&gt; &lt;span class="nt"&gt;-7&lt;/span&gt;           &lt;span class="c"&gt;# Files modified in last 7 days&lt;/span&gt;
find &lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="nt"&gt;-size&lt;/span&gt; +100M         &lt;span class="c"&gt;# Files larger than 100MB&lt;/span&gt;
find &lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="nt"&gt;-name&lt;/span&gt; &lt;span class="s2"&gt;"*.tmp"&lt;/span&gt; &lt;span class="nt"&gt;-delete&lt;/span&gt;  &lt;span class="c"&gt;# Find and delete&lt;/span&gt;
locate filename            &lt;span class="c"&gt;# Fast file search (uses DB)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Viewing &amp;amp; Editing Files
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat &lt;/span&gt;file.txt               &lt;span class="c"&gt;# Print file to stdout&lt;/span&gt;
&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; file.txt            &lt;span class="c"&gt;# Print with line numbers&lt;/span&gt;
less file.txt              &lt;span class="c"&gt;# Paginate file (q to quit)&lt;/span&gt;
&lt;span class="nb"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; 20 file.txt        &lt;span class="c"&gt;# First 20 lines&lt;/span&gt;
&lt;span class="nb"&gt;tail&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; 50 file.txt        &lt;span class="c"&gt;# Last 50 lines&lt;/span&gt;
&lt;span class="nb"&gt;tail&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; /var/log/syslog    &lt;span class="c"&gt;# Follow file in real-time&lt;/span&gt;
&lt;span class="nb"&gt;wc&lt;/span&gt; &lt;span class="nt"&gt;-l&lt;/span&gt; file.txt             &lt;span class="c"&gt;# Count lines&lt;/span&gt;
diff &lt;span class="nt"&gt;-u&lt;/span&gt; file1 file2        &lt;span class="c"&gt;# Unified diff (patch-friendly)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Text Search &amp;amp; Processing
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# grep&lt;/span&gt;
&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="s2"&gt;"pattern"&lt;/span&gt; file.txt         &lt;span class="c"&gt;# Search for pattern&lt;/span&gt;
&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-i&lt;/span&gt; &lt;span class="s2"&gt;"pattern"&lt;/span&gt; file.txt      &lt;span class="c"&gt;# Case-insensitive&lt;/span&gt;
&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; &lt;span class="s2"&gt;"pattern"&lt;/span&gt; ./dir/        &lt;span class="c"&gt;# Recursive search&lt;/span&gt;
&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; &lt;span class="s2"&gt;"pattern"&lt;/span&gt; file.txt      &lt;span class="c"&gt;# Show line numbers&lt;/span&gt;
&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-v&lt;/span&gt; &lt;span class="s2"&gt;"pattern"&lt;/span&gt; file.txt      &lt;span class="c"&gt;# Invert match (exclude)&lt;/span&gt;
&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="s2"&gt;"pattern"&lt;/span&gt; file.txt      &lt;span class="c"&gt;# Count matching lines&lt;/span&gt;
&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-A&lt;/span&gt; 3 &lt;span class="s2"&gt;"pattern"&lt;/span&gt; file.txt    &lt;span class="c"&gt;# 3 lines after match&lt;/span&gt;
&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-E&lt;/span&gt; &lt;span class="s2"&gt;"pat1|pat2"&lt;/span&gt; file.txt    &lt;span class="c"&gt;# Extended regex (OR)&lt;/span&gt;

&lt;span class="c"&gt;# sed (Stream Editor)&lt;/span&gt;
&lt;span class="nb"&gt;sed&lt;/span&gt; &lt;span class="s1"&gt;'s/old/new/'&lt;/span&gt; file.txt       &lt;span class="c"&gt;# Replace first occurrence per line&lt;/span&gt;
&lt;span class="nb"&gt;sed&lt;/span&gt; &lt;span class="s1"&gt;'s/old/new/g'&lt;/span&gt; file.txt      &lt;span class="c"&gt;# Replace all occurrences&lt;/span&gt;
&lt;span class="nb"&gt;sed&lt;/span&gt; &lt;span class="nt"&gt;-i&lt;/span&gt; &lt;span class="s1"&gt;'s/old/new/g'&lt;/span&gt; file.txt   &lt;span class="c"&gt;# Edit file in-place&lt;/span&gt;
&lt;span class="nb"&gt;sed&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; &lt;span class="s1"&gt;'5,10p'&lt;/span&gt; file.txt         &lt;span class="c"&gt;# Print lines 5-10&lt;/span&gt;
&lt;span class="nb"&gt;sed&lt;/span&gt; &lt;span class="s1"&gt;'/pattern/d'&lt;/span&gt; file.txt       &lt;span class="c"&gt;# Delete lines matching pattern&lt;/span&gt;

&lt;span class="c"&gt;# awk&lt;/span&gt;
&lt;span class="nb"&gt;awk&lt;/span&gt; &lt;span class="s1"&gt;'{print $1}'&lt;/span&gt; file.txt       &lt;span class="c"&gt;# Print first column&lt;/span&gt;
&lt;span class="nb"&gt;awk&lt;/span&gt; &lt;span class="nt"&gt;-F&lt;/span&gt;: &lt;span class="s1"&gt;'{print $1}'&lt;/span&gt; /etc/passwd  &lt;span class="c"&gt;# Use : as delimiter&lt;/span&gt;
&lt;span class="nb"&gt;awk&lt;/span&gt; &lt;span class="s1"&gt;'{sum+=$1} END{print sum}'&lt;/span&gt;  &lt;span class="c"&gt;# Sum first column&lt;/span&gt;

&lt;span class="c"&gt;# Other text tools&lt;/span&gt;
&lt;span class="nb"&gt;cut&lt;/span&gt; &lt;span class="nt"&gt;-d&lt;/span&gt;: &lt;span class="nt"&gt;-f1&lt;/span&gt; /etc/passwd         &lt;span class="c"&gt;# Cut first field using : delimiter&lt;/span&gt;
&lt;span class="nb"&gt;sort &lt;/span&gt;file.txt                   &lt;span class="c"&gt;# Sort alphabetically&lt;/span&gt;
&lt;span class="nb"&gt;sort&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; numbers.txt             &lt;span class="c"&gt;# Sort numerically&lt;/span&gt;
&lt;span class="nb"&gt;sort&lt;/span&gt; &lt;span class="nt"&gt;-u&lt;/span&gt; file.txt                &lt;span class="c"&gt;# Sort and remove duplicates&lt;/span&gt;
&lt;span class="nb"&gt;uniq&lt;/span&gt; &lt;span class="nt"&gt;-c&lt;/span&gt; file.txt                &lt;span class="c"&gt;# Count duplicate lines&lt;/span&gt;
&lt;span class="nb"&gt;tr&lt;/span&gt; &lt;span class="s1"&gt;'a-z'&lt;/span&gt; &lt;span class="s1"&gt;'A-Z'&lt;/span&gt; &amp;amp;lt&lt;span class="p"&gt;;&lt;/span&gt; file.txt      &lt;span class="c"&gt;# Translate lowercase to uppercase&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  File Permissions &amp;amp; Ownership
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;chmod &lt;/span&gt;755 file             &lt;span class="c"&gt;# rwxr-xr-x&lt;/span&gt;
&lt;span class="nb"&gt;chmod &lt;/span&gt;644 file             &lt;span class="c"&gt;# rw-r--r--&lt;/span&gt;
&lt;span class="nb"&gt;chmod&lt;/span&gt; +x script.sh         &lt;span class="c"&gt;# Add execute permission&lt;/span&gt;
&lt;span class="nb"&gt;chmod&lt;/span&gt; &lt;span class="nt"&gt;-R&lt;/span&gt; 755 &lt;span class="nb"&gt;dir&lt;/span&gt;/          &lt;span class="c"&gt;# Apply recursively&lt;/span&gt;
&lt;span class="nb"&gt;chown &lt;/span&gt;user:group file      &lt;span class="c"&gt;# Change owner and group&lt;/span&gt;
&lt;span class="nb"&gt;chown&lt;/span&gt; &lt;span class="nt"&gt;-R&lt;/span&gt; user:group &lt;span class="nb"&gt;dir&lt;/span&gt;/   &lt;span class="c"&gt;# Recursive ownership change&lt;/span&gt;
&lt;span class="nb"&gt;umask &lt;/span&gt;022                  &lt;span class="c"&gt;# Default mask (files 644, dirs 755)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Permission Reference
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;7&lt;/code&gt; (rwx) -- Read + Write + Execute&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;6&lt;/code&gt; (rw-) -- Read + Write&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;5&lt;/code&gt; (r-x) -- Read + Execute&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;4&lt;/code&gt; (r--) -- Read only&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;0&lt;/code&gt; (---) -- No permissions&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Process Management
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ps aux                     &lt;span class="c"&gt;# All running processes&lt;/span&gt;
ps aux | &lt;span class="nb"&gt;grep &lt;/span&gt;nginx        &lt;span class="c"&gt;# Find process by name&lt;/span&gt;
pgrep nginx                &lt;span class="c"&gt;# Get PID by process name&lt;/span&gt;
top                        &lt;span class="c"&gt;# Interactive process viewer&lt;/span&gt;
htop                       &lt;span class="c"&gt;# Better interactive viewer&lt;/span&gt;
&lt;span class="nb"&gt;kill &lt;/span&gt;PID                   &lt;span class="c"&gt;# Send SIGTERM (graceful stop)&lt;/span&gt;
&lt;span class="nb"&gt;kill&lt;/span&gt; &lt;span class="nt"&gt;-9&lt;/span&gt; PID                &lt;span class="c"&gt;# Send SIGKILL (force stop)&lt;/span&gt;
killall nginx              &lt;span class="c"&gt;# Kill all processes named nginx&lt;/span&gt;
&lt;span class="nb"&gt;bg&lt;/span&gt;                         &lt;span class="c"&gt;# Resume job in background&lt;/span&gt;
&lt;span class="nb"&gt;fg&lt;/span&gt;                         &lt;span class="c"&gt;# Bring background job to foreground&lt;/span&gt;
&lt;span class="nb"&gt;jobs&lt;/span&gt;                       &lt;span class="c"&gt;# List background jobs&lt;/span&gt;
&lt;span class="nb"&gt;nohup command&lt;/span&gt; &amp;amp;amp&lt;span class="p"&gt;;&lt;/span&gt;            &lt;span class="c"&gt;# Run immune to hangups&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Signal Reference
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;SIGTERM (15)&lt;/strong&gt; -- Graceful shutdown&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SIGKILL (9)&lt;/strong&gt; -- Force kill (can't catch)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SIGHUP (1)&lt;/strong&gt; -- Reload config&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SIGINT (2)&lt;/strong&gt; -- Ctrl+C&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Disk &amp;amp; Filesystem
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;df&lt;/span&gt; &lt;span class="nt"&gt;-h&lt;/span&gt;                      &lt;span class="c"&gt;# Disk space usage (human-readable)&lt;/span&gt;
&lt;span class="nb"&gt;du&lt;/span&gt; &lt;span class="nt"&gt;-sh&lt;/span&gt; &lt;span class="nb"&gt;dir&lt;/span&gt;/                &lt;span class="c"&gt;# Size of directory&lt;/span&gt;
&lt;span class="nb"&gt;du&lt;/span&gt; &lt;span class="nt"&gt;-sh&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt; | &lt;span class="nb"&gt;sort&lt;/span&gt; &lt;span class="nt"&gt;-h&lt;/span&gt;         &lt;span class="c"&gt;# All items sorted by size&lt;/span&gt;
lsblk                      &lt;span class="c"&gt;# List block devices as tree&lt;/span&gt;
mount                      &lt;span class="c"&gt;# Show all mounted filesystems&lt;/span&gt;
&lt;span class="nb"&gt;stat &lt;/span&gt;file.txt              &lt;span class="c"&gt;# Detailed file metadata&lt;/span&gt;
file mystery.bin           &lt;span class="c"&gt;# Identify file type&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Networking
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Connectivity&lt;/span&gt;
ping &lt;span class="nt"&gt;-c&lt;/span&gt; 4 google.com       &lt;span class="c"&gt;# Ping exactly 4 times&lt;/span&gt;
traceroute google.com      &lt;span class="c"&gt;# Trace network path&lt;/span&gt;
curl https://example.com   &lt;span class="c"&gt;# Fetch URL content&lt;/span&gt;
curl &lt;span class="nt"&gt;-I&lt;/span&gt; https://example.com  &lt;span class="c"&gt;# Fetch headers only&lt;/span&gt;
curl &lt;span class="nt"&gt;-o&lt;/span&gt; file.zip URL       &lt;span class="c"&gt;# Download to file&lt;/span&gt;
wget URL                   &lt;span class="c"&gt;# Download file&lt;/span&gt;

&lt;span class="c"&gt;# Network info&lt;/span&gt;
ip addr                    &lt;span class="c"&gt;# Show IP addresses (modern)&lt;/span&gt;
ip route                   &lt;span class="c"&gt;# Show routing table&lt;/span&gt;
ss &lt;span class="nt"&gt;-tuln&lt;/span&gt;                   &lt;span class="c"&gt;# Show listening ports (modern)&lt;/span&gt;
ss &lt;span class="nt"&gt;-tulnp&lt;/span&gt;                  &lt;span class="c"&gt;# Include process names&lt;/span&gt;

&lt;span class="c"&gt;# DNS&lt;/span&gt;
nslookup domain.com        &lt;span class="c"&gt;# DNS lookup&lt;/span&gt;
dig domain.com             &lt;span class="c"&gt;# Detailed DNS lookup&lt;/span&gt;

&lt;span class="c"&gt;# SSH &amp;amp;amp; Remote&lt;/span&gt;
ssh user@host              &lt;span class="c"&gt;# Connect to host&lt;/span&gt;
ssh &lt;span class="nt"&gt;-p&lt;/span&gt; 2222 user@host      &lt;span class="c"&gt;# Connect on custom port&lt;/span&gt;
scp file.txt user@host:/path  &lt;span class="c"&gt;# Copy file to remote&lt;/span&gt;
rsync &lt;span class="nt"&gt;-avz&lt;/span&gt; src/ user@host:dst/  &lt;span class="c"&gt;# Sync files (fast, resumable)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Users &amp;amp; Groups
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;whoami&lt;/span&gt;                     &lt;span class="c"&gt;# Current username&lt;/span&gt;
&lt;span class="nb"&gt;id&lt;/span&gt;                         &lt;span class="c"&gt;# User ID, group ID, groups&lt;/span&gt;
useradd &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="nt"&gt;-s&lt;/span&gt; /bin/bash username   &lt;span class="c"&gt;# Create user with home dir&lt;/span&gt;
usermod &lt;span class="nt"&gt;-aG&lt;/span&gt; docker username        &lt;span class="c"&gt;# Add user to group&lt;/span&gt;
passwd username                    &lt;span class="c"&gt;# Change user password&lt;/span&gt;
groupadd developers        &lt;span class="c"&gt;# Create group&lt;/span&gt;
&lt;span class="nb"&gt;sudo command&lt;/span&gt;               &lt;span class="c"&gt;# Run as root&lt;/span&gt;
&lt;span class="nb"&gt;sudo&lt;/span&gt; &lt;span class="nt"&gt;-i&lt;/span&gt;                    &lt;span class="c"&gt;# Interactive root shell&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Package Management
&lt;/h2&gt;

&lt;h3&gt;
  
  
  apt (Debian/Ubuntu)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;apt update                 &lt;span class="c"&gt;# Refresh package index&lt;/span&gt;
apt upgrade                &lt;span class="c"&gt;# Upgrade all packages&lt;/span&gt;
apt &lt;span class="nb"&gt;install &lt;/span&gt;nginx          &lt;span class="c"&gt;# Install package&lt;/span&gt;
apt remove nginx           &lt;span class="c"&gt;# Remove package&lt;/span&gt;
apt search keyword         &lt;span class="c"&gt;# Search for package&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  yum / dnf (RHEL/CentOS/Fedora)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dnf update                 &lt;span class="c"&gt;# Update all packages&lt;/span&gt;
dnf &lt;span class="nb"&gt;install &lt;/span&gt;nginx          &lt;span class="c"&gt;# Install package&lt;/span&gt;
dnf remove nginx           &lt;span class="c"&gt;# Remove package&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Compression &amp;amp; Archives
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;tar&lt;/span&gt; &lt;span class="nt"&gt;-czvf&lt;/span&gt; archive.tar.gz &lt;span class="nb"&gt;dir&lt;/span&gt;/     &lt;span class="c"&gt;# Create gzip-compressed tar&lt;/span&gt;
&lt;span class="nb"&gt;tar&lt;/span&gt; &lt;span class="nt"&gt;-xzvf&lt;/span&gt; archive.tar.gz          &lt;span class="c"&gt;# Extract gzip tar&lt;/span&gt;
&lt;span class="nb"&gt;tar&lt;/span&gt; &lt;span class="nt"&gt;-tf&lt;/span&gt; archive.tar               &lt;span class="c"&gt;# List contents without extracting&lt;/span&gt;
&lt;span class="nb"&gt;tar&lt;/span&gt; &lt;span class="nt"&gt;-xzvf&lt;/span&gt; archive.tar.gz &lt;span class="nt"&gt;-C&lt;/span&gt; /tmp/ &lt;span class="c"&gt;# Extract to specific directory&lt;/span&gt;
zip &lt;span class="nt"&gt;-r&lt;/span&gt; archive.zip &lt;span class="nb"&gt;dir&lt;/span&gt;/           &lt;span class="c"&gt;# Zip directory&lt;/span&gt;
unzip archive.zip                 &lt;span class="c"&gt;# Extract zip&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Redirection &amp;amp; Pipes
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;command&lt;/span&gt; &amp;amp;gt&lt;span class="p"&gt;;&lt;/span&gt; file.txt         &lt;span class="c"&gt;# Redirect stdout (overwrite)&lt;/span&gt;
&lt;span class="nb"&gt;command&lt;/span&gt; &amp;amp;gt&lt;span class="p"&gt;;&lt;/span&gt;&amp;amp;gt&lt;span class="p"&gt;;&lt;/span&gt; file.txt        &lt;span class="c"&gt;# Redirect stdout (append)&lt;/span&gt;
&lt;span class="nb"&gt;command &lt;/span&gt;2&amp;amp;gt&lt;span class="p"&gt;;&lt;/span&gt; error.log       &lt;span class="c"&gt;# Redirect stderr&lt;/span&gt;
&lt;span class="nb"&gt;command &lt;/span&gt;2&amp;amp;gt&lt;span class="p"&gt;;&lt;/span&gt;&amp;amp;amp&lt;span class="p"&gt;;&lt;/span&gt;1               &lt;span class="c"&gt;# Merge stderr into stdout&lt;/span&gt;
&lt;span class="nb"&gt;command&lt;/span&gt; &amp;amp;amp&lt;span class="p"&gt;;&lt;/span&gt;&amp;amp;gt&lt;span class="p"&gt;;&lt;/span&gt; file.txt        &lt;span class="c"&gt;# Redirect both stdout + stderr&lt;/span&gt;
command1 | command2        &lt;span class="c"&gt;# Pipe stdout to next command&lt;/span&gt;
&lt;span class="nb"&gt;tee &lt;/span&gt;file.txt               &lt;span class="c"&gt;# Write to file AND stdout&lt;/span&gt;

&lt;span class="c"&gt;# Useful pipe combos&lt;/span&gt;
ps aux | &lt;span class="nb"&gt;grep &lt;/span&gt;nginx | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-v&lt;/span&gt; &lt;span class="nb"&gt;grep
&lt;/span&gt;find &lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="nt"&gt;-name&lt;/span&gt; &lt;span class="s2"&gt;"*.log"&lt;/span&gt; | xargs &lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Scheduling &amp;amp; Automation (Cron)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;crontab &lt;span class="nt"&gt;-e&lt;/span&gt;                 &lt;span class="c"&gt;# Edit crontab&lt;/span&gt;
crontab &lt;span class="nt"&gt;-l&lt;/span&gt;                 &lt;span class="c"&gt;# List crontab&lt;/span&gt;

&lt;span class="c"&gt;# Cron syntax: minute hour day month weekday command&lt;/span&gt;
0 2 &lt;span class="k"&gt;*&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt;    /backup.sh         &lt;span class="c"&gt;# Daily at 2:00 AM&lt;/span&gt;
&lt;span class="k"&gt;*&lt;/span&gt;/15 &lt;span class="k"&gt;*&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt; /check.sh          &lt;span class="c"&gt;# Every 15 minutes&lt;/span&gt;
0 9 &lt;span class="k"&gt;*&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt; 1-5  /standup.sh        &lt;span class="c"&gt;# Weekdays at 9 AM&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Terminal Shortcuts
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Ctrl+C&lt;/strong&gt; -- Kill current process&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ctrl+Z&lt;/strong&gt; -- Suspend current process&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ctrl+D&lt;/strong&gt; -- Exit shell / EOF&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ctrl+L&lt;/strong&gt; -- Clear screen&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ctrl+R&lt;/strong&gt; -- Search command history (reverse)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;!!&lt;/strong&gt; -- Repeat last command&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;sudo !!&lt;/strong&gt; -- Re-run last command with sudo&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  SSH Key Management
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh-keygen &lt;span class="nt"&gt;-t&lt;/span&gt; ed25519 &lt;span class="nt"&gt;-C&lt;/span&gt; &lt;span class="s2"&gt;"email@example.com"&lt;/span&gt;   &lt;span class="c"&gt;# Generate key (recommended)&lt;/span&gt;
ssh-copy-id user@host                           &lt;span class="c"&gt;# Copy public key to remote&lt;/span&gt;
&lt;span class="nb"&gt;eval&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;ssh-agent &lt;span class="nt"&gt;-s&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;                          &lt;span class="c"&gt;# Start agent&lt;/span&gt;
ssh-add ~/.ssh/id_ed25519                       &lt;span class="c"&gt;# Add key to agent&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  System Services (systemd)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;systemctl start nginx      &lt;span class="c"&gt;# Start service&lt;/span&gt;
systemctl stop nginx       &lt;span class="c"&gt;# Stop service&lt;/span&gt;
systemctl restart nginx    &lt;span class="c"&gt;# Restart service&lt;/span&gt;
systemctl &lt;span class="nb"&gt;enable &lt;/span&gt;nginx     &lt;span class="c"&gt;# Start on boot&lt;/span&gt;
systemctl status nginx     &lt;span class="c"&gt;# Show service status&lt;/span&gt;
journalctl &lt;span class="nt"&gt;-u&lt;/span&gt; nginx &lt;span class="nt"&gt;-f&lt;/span&gt;     &lt;span class="c"&gt;# Follow service logs&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Common Gotchas
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;rm -rf&lt;/code&gt; has no recycle bin&lt;/strong&gt; -- it's permanent. Always double-check before running.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;&amp;amp;gt;&lt;/code&gt; overwrites, &lt;code&gt;&amp;amp;gt;&amp;amp;gt;&lt;/code&gt; appends&lt;/strong&gt; -- easy to lose data with the wrong one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spaces in filenames need quoting&lt;/strong&gt; -- &lt;code&gt;rm -rf My Documents&lt;/code&gt; removes "My" AND "Documents".&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;chmod -R 777&lt;/code&gt; is almost always wrong&lt;/strong&gt; -- massive security risk.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;kill -9&lt;/code&gt; should be a last resort&lt;/strong&gt; -- data may not be flushed. Try &lt;code&gt;kill -15&lt;/code&gt; (SIGTERM) first.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Pro Tips
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;sudo !!&lt;/code&gt; -- Run last command as sudo&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;touch file{1..5}.txt&lt;/code&gt; -- Create multiple files at once&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cmd1 &amp;amp;amp;&amp;amp;amp; cmd2&lt;/code&gt; -- Run cmd2 only if cmd1 succeeds&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;python3 -m http.server 8080&lt;/code&gt; -- Quick HTTP server in current directory&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;watch -n 2 df -h&lt;/code&gt; -- Watch a command run every 2 seconds&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;If you found this useful, share it with a colleague who needs it. Subscribe for more developer resources every week.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Want the full resource?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://apaksh.gumroad.com/l/ahdlr" rel="noopener noreferrer"&gt;Linux CLI Cheat Sheet — $6.99 on Gumroad&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Get the complete, downloadable version. Perfect for bookmarking, printing, or sharing with your team.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://apaksh.gumroad.com/l/ahdlr" rel="noopener noreferrer"&gt;Get it now on Gumroad →&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;If you found this useful, drop a ❤️ and follow for more developer resources every week.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>beginners</category>
      <category>devops</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>SQL Mastery: The Essential Cheat Sheet for Data Professionals</title>
      <dc:creator>Apaksh</dc:creator>
      <pubDate>Wed, 18 Mar 2026 06:45:36 +0000</pubDate>
      <link>https://dev.to/apaksh/sql-mastery-the-essential-cheat-sheet-for-data-professionals-34i4</link>
      <guid>https://dev.to/apaksh/sql-mastery-the-essential-cheat-sheet-for-data-professionals-34i4</guid>
      <description>&lt;p&gt;Whether you're a backend developer, a data analyst, or someone who just needs to pull data from a database without breaking things, SQL is one of those skills that pays dividends every single day. The problem is that the syntax varies across PostgreSQL, MySQL, and SQL Server just enough to trip you up constantly. This cheat sheet covers all three, so you can stop second-guessing your queries.&lt;/p&gt;

&lt;h2&gt;
  
  
  Data Types
&lt;/h2&gt;

&lt;p&gt;Key types across PostgreSQL, MySQL, and SQL Server:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Integer:&lt;/strong&gt; &lt;code&gt;INT&lt;/code&gt;, &lt;code&gt;BIGINT&lt;/code&gt;, &lt;code&gt;SMALLINT&lt;/code&gt; (all)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Decimal:&lt;/strong&gt; &lt;code&gt;NUMERIC(p,s)&lt;/code&gt; / &lt;code&gt;DECIMAL(p,s)&lt;/code&gt; (all)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;String (variable):&lt;/strong&gt; &lt;code&gt;VARCHAR(n)&lt;/code&gt; (all)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Large text:&lt;/strong&gt; &lt;code&gt;TEXT&lt;/code&gt; (PG/MySQL), &lt;code&gt;VARCHAR(MAX)&lt;/code&gt; (SQL Server)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Boolean:&lt;/strong&gt; &lt;code&gt;BOOLEAN&lt;/code&gt; (PG), &lt;code&gt;TINYINT(1)&lt;/code&gt; (MySQL), &lt;code&gt;BIT&lt;/code&gt; (SQL Server)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Datetime:&lt;/strong&gt; &lt;code&gt;TIMESTAMP&lt;/code&gt; (PG), &lt;code&gt;DATETIME&lt;/code&gt; (MySQL/SQL Server)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;UUID:&lt;/strong&gt; &lt;code&gt;UUID&lt;/code&gt; (PG), &lt;code&gt;CHAR(36)&lt;/code&gt; (MySQL), &lt;code&gt;UNIQUEIDENTIFIER&lt;/code&gt; (SQL Server)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;JSON:&lt;/strong&gt; &lt;code&gt;JSON&lt;/code&gt;/&lt;code&gt;JSONB&lt;/code&gt; (PG), &lt;code&gt;JSON&lt;/code&gt; (MySQL), &lt;code&gt;NVARCHAR(MAX)&lt;/code&gt; (SQL Server)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  DDL -- Define Structure
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Create Table
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;id&lt;/span&gt;          &lt;span class="nb"&gt;SERIAL&lt;/span&gt; &lt;span class="k"&gt;PRIMARY&lt;/span&gt; &lt;span class="k"&gt;KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;        &lt;span class="c1"&gt;-- auto-increment (PostgreSQL)&lt;/span&gt;
    &lt;span class="n"&gt;username&lt;/span&gt;    &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="k"&gt;NULL&lt;/span&gt; &lt;span class="k"&gt;UNIQUE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;email&lt;/span&gt;       &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;255&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="k"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;age&lt;/span&gt;         &lt;span class="nb"&gt;INT&lt;/span&gt;          &lt;span class="k"&gt;CHECK&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;age&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;gt&lt;/span&gt;&lt;span class="p"&gt;;&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;role&lt;/span&gt;        &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="k"&gt;DEFAULT&lt;/span&gt; &lt;span class="s1"&gt;'user'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;created_at&lt;/span&gt;  &lt;span class="nb"&gt;TIMESTAMP&lt;/span&gt;    &lt;span class="k"&gt;DEFAULT&lt;/span&gt; &lt;span class="k"&gt;CURRENT_TIMESTAMP&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Alter Table
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;ALTER&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="k"&gt;ADD&lt;/span&gt; &lt;span class="k"&gt;COLUMN&lt;/span&gt; &lt;span class="n"&gt;phone&lt;/span&gt; &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;ALTER&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="k"&gt;DROP&lt;/span&gt; &lt;span class="k"&gt;COLUMN&lt;/span&gt; &lt;span class="n"&gt;phone&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;ALTER&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="k"&gt;RENAME&lt;/span&gt; &lt;span class="k"&gt;COLUMN&lt;/span&gt; &lt;span class="n"&gt;username&lt;/span&gt; &lt;span class="k"&gt;TO&lt;/span&gt; &lt;span class="n"&gt;user_name&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;   &lt;span class="c1"&gt;-- PG&lt;/span&gt;
&lt;span class="k"&gt;ALTER&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="k"&gt;ALTER&lt;/span&gt; &lt;span class="k"&gt;COLUMN&lt;/span&gt; &lt;span class="n"&gt;age&lt;/span&gt; &lt;span class="k"&gt;TYPE&lt;/span&gt; &lt;span class="nb"&gt;BIGINT&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;          &lt;span class="c1"&gt;-- PG&lt;/span&gt;
&lt;span class="k"&gt;ALTER&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="k"&gt;MODIFY&lt;/span&gt; &lt;span class="k"&gt;COLUMN&lt;/span&gt; &lt;span class="n"&gt;age&lt;/span&gt; &lt;span class="nb"&gt;BIGINT&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;              &lt;span class="c1"&gt;-- MySQL&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Drop / Truncate
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;DROP&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;IF&lt;/span&gt; &lt;span class="k"&gt;EXISTS&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;TRUNCATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;               &lt;span class="c1"&gt;-- Delete all rows, keep structure (fast)&lt;/span&gt;
&lt;span class="k"&gt;TRUNCATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="k"&gt;RESTART&lt;/span&gt; &lt;span class="k"&gt;IDENTITY&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  &lt;span class="c1"&gt;-- Reset auto-increment (PG)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  DML -- Manipulate Data
&lt;/h2&gt;

&lt;h3&gt;
  
  
  INSERT
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="c1"&gt;-- Single row&lt;/span&gt;
&lt;span class="k"&gt;INSERT&lt;/span&gt; &lt;span class="k"&gt;INTO&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;age&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;VALUES&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'alice'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'alice@example.com'&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="c1"&gt;-- Multiple rows&lt;/span&gt;
&lt;span class="k"&gt;INSERT&lt;/span&gt; &lt;span class="k"&gt;INTO&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;age&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;VALUES&lt;/span&gt;
    &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'bob'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;   &lt;span class="s1"&gt;'bob@example.com'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;   &lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'carol'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'carol@example.com'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;28&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;-- Upsert (PostgreSQL)&lt;/span&gt;
&lt;span class="k"&gt;INSERT&lt;/span&gt; &lt;span class="k"&gt;INTO&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;VALUES&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="s1"&gt;'alice'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'alice@new.com'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;CONFLICT&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;DO&lt;/span&gt; &lt;span class="k"&gt;UPDATE&lt;/span&gt; &lt;span class="k"&gt;SET&lt;/span&gt; &lt;span class="n"&gt;email&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;EXCLUDED&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  UPDATE
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;UPDATE&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="k"&gt;SET&lt;/span&gt; &lt;span class="n"&gt;email&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'new@example.com'&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;id&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;UPDATE&lt;/span&gt; &lt;span class="n"&gt;products&lt;/span&gt; &lt;span class="k"&gt;SET&lt;/span&gt; &lt;span class="n"&gt;price&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;price&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="mi"&gt;10&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;category&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'electronics'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;-- Update from another table (PostgreSQL)&lt;/span&gt;
&lt;span class="k"&gt;UPDATE&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt; &lt;span class="k"&gt;SET&lt;/span&gt; &lt;span class="n"&gt;email&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;email&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;contacts&lt;/span&gt; &lt;span class="k"&gt;c&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;user_id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  DELETE
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;DELETE&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;id&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;DELETE&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;age&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;lt&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="mi"&gt;18&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;-- PostgreSQL: DELETE FROM users WHERE id = 1 RETURNING *;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Querying Data
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;email&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="k"&gt;DISTINCT&lt;/span&gt; &lt;span class="n"&gt;country&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;username&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;email&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;contact&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;-- ORDER BY&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;created_at&lt;/span&gt; &lt;span class="k"&gt;DESC&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;age&lt;/span&gt; &lt;span class="k"&gt;DESC&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;username&lt;/span&gt; &lt;span class="k"&gt;ASC&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;-- LIMIT / OFFSET (Pagination)&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="k"&gt;LIMIT&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;               &lt;span class="c1"&gt;-- PG/MySQL&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="k"&gt;LIMIT&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="k"&gt;OFFSET&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;     &lt;span class="c1"&gt;-- Rows 21-30&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;TOP&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;                 &lt;span class="c1"&gt;-- SQL Server&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Filtering &amp;amp; Conditions
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;age&lt;/span&gt; &lt;span class="k"&gt;BETWEEN&lt;/span&gt; &lt;span class="mi"&gt;18&lt;/span&gt; &lt;span class="k"&gt;AND&lt;/span&gt; &lt;span class="mi"&gt;65&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="k"&gt;IN&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Alice'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Bob'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;email&lt;/span&gt; &lt;span class="k"&gt;IS&lt;/span&gt; &lt;span class="k"&gt;NULL&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;username&lt;/span&gt; &lt;span class="k"&gt;LIKE&lt;/span&gt; &lt;span class="s1"&gt;'a%'&lt;/span&gt;           &lt;span class="c1"&gt;-- Starts with 'a'&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;username&lt;/span&gt; &lt;span class="k"&gt;LIKE&lt;/span&gt; &lt;span class="s1"&gt;'%smith'&lt;/span&gt;       &lt;span class="c1"&gt;-- Ends with 'smith'&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;username&lt;/span&gt; &lt;span class="k"&gt;ILIKE&lt;/span&gt; &lt;span class="s1"&gt;'%JOHN%'&lt;/span&gt;      &lt;span class="c1"&gt;-- Case-insensitive (PostgreSQL)&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;age&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;gt&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="mi"&gt;18&lt;/span&gt; &lt;span class="k"&gt;AND&lt;/span&gt; &lt;span class="k"&gt;role&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'admin'&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;age&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;gt&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt; &lt;span class="k"&gt;OR&lt;/span&gt; &lt;span class="k"&gt;role&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'vip'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Joins
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="c1"&gt;-- INNER JOIN -- only matching rows&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;total&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt; &lt;span class="k"&gt;INNER&lt;/span&gt; &lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;user_id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;-- LEFT JOIN -- all left rows + matching right (NULL if no match)&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;total&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt; &lt;span class="k"&gt;LEFT&lt;/span&gt; &lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;user_id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;-- Anti-Join: Users with NO orders&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt;
&lt;span class="k"&gt;LEFT&lt;/span&gt; &lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;user_id&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;user_id&lt;/span&gt; &lt;span class="k"&gt;IS&lt;/span&gt; &lt;span class="k"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;-- SELF JOIN&lt;/span&gt;
&lt;span class="k"&gt;SELECT&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;username&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;employee&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;username&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;manager&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="k"&gt;ON&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;manager_id&lt;/span&gt; &lt;span class="o"&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;id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;-- Multi-Table Join&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;order_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;product&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt;
&lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;user_id&lt;/span&gt;
&lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;order_items&lt;/span&gt; &lt;span class="n"&gt;oi&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;oi&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;order_id&lt;/span&gt;
&lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;products&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;oi&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;product_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Aggregates &amp;amp; Grouping
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="k"&gt;COUNT&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="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="k"&gt;COUNT&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;DISTINCT&lt;/span&gt; &lt;span class="n"&gt;country&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="k"&gt;SUM&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;total&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="k"&gt;AVG&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;total&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="k"&gt;MIN&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;total&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="k"&gt;MAX&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;total&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;-- GROUP BY&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;user_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;COUNT&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="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;order_count&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt; &lt;span class="k"&gt;GROUP&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;user_id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;-- HAVING (filter on aggregates)&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;user_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;COUNT&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="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;cnt&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt; &lt;span class="k"&gt;GROUP&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;user_id&lt;/span&gt;
&lt;span class="k"&gt;HAVING&lt;/span&gt; &lt;span class="k"&gt;COUNT&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="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;gt&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Subqueries &amp;amp; CTEs
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="c1"&gt;-- Subquery in WHERE&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;products&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;price&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;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;SELECT&lt;/span&gt; &lt;span class="k"&gt;AVG&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;price&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;products&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;-- EXISTS (often faster than IN)&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="k"&gt;EXISTS&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;user_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;-- CTE (Common Table Expression)&lt;/span&gt;
&lt;span class="k"&gt;WITH&lt;/span&gt; &lt;span class="n"&gt;active_users&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;last_login&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;gt&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;NOW&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;INTERVAL&lt;/span&gt; &lt;span class="s1"&gt;'30 days'&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;active_users&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="k"&gt;role&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'admin'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;-- Recursive CTE (org chart / tree)&lt;/span&gt;
&lt;span class="k"&gt;WITH&lt;/span&gt; &lt;span class="k"&gt;RECURSIVE&lt;/span&gt; &lt;span class="n"&gt;subordinates&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;manager_id&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
    &lt;span class="k"&gt;UNION&lt;/span&gt; &lt;span class="k"&gt;ALL&lt;/span&gt;
    &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&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;span class="n"&gt;username&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;span class="n"&gt;manager_id&lt;/span&gt;
    &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt; &lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;subordinates&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;manager_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;subordinates&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Window Functions
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="c1"&gt;-- ROW_NUMBER&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;salary&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;ROW_NUMBER&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="n"&gt;OVER&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;PARTITION&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;department&lt;/span&gt; &lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;salary&lt;/span&gt; &lt;span class="k"&gt;DESC&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;rn&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;-- RANK / DENSE_RANK&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;salary&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;RANK&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="n"&gt;OVER&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;salary&lt;/span&gt; &lt;span class="k"&gt;DESC&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;rnk&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;DENSE_RANK&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="n"&gt;OVER&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;salary&lt;/span&gt; &lt;span class="k"&gt;DESC&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;drnk&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;-- LAG / LEAD&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;salary&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;month&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;LAG&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;salary&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;OVER&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;PARTITION&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;username&lt;/span&gt; &lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="k"&gt;month&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;prev_salary&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;salary_history&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;-- Running total&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="nb"&gt;date&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;SUM&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;OVER&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="nb"&gt;date&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;running_total&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;transactions&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;-- Top N per group&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;dept&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;salary&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;ROW_NUMBER&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="n"&gt;OVER&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;PARTITION&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;dept&lt;/span&gt; &lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;salary&lt;/span&gt; &lt;span class="k"&gt;DESC&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;rn&lt;/span&gt;
    &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;ranked&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;rn&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;lt&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Indexes
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;INDEX&lt;/span&gt; &lt;span class="n"&gt;idx_users_email&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;UNIQUE&lt;/span&gt; &lt;span class="k"&gt;INDEX&lt;/span&gt; &lt;span class="n"&gt;idx_users_username&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;INDEX&lt;/span&gt; &lt;span class="n"&gt;idx_orders_user_date&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;created_at&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;-- Partial index (PostgreSQL)&lt;/span&gt;
&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;INDEX&lt;/span&gt; &lt;span class="n"&gt;idx_active_users&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;active&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;EXPLAIN&lt;/span&gt; &lt;span class="k"&gt;ANALYZE&lt;/span&gt; &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;email&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'a@b.com'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Index Guidelines
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Primary keys are auto-indexed&lt;/li&gt;
&lt;li&gt;Always index foreign keys&lt;/li&gt;
&lt;li&gt;Index WHERE clause and ORDER BY columns&lt;/li&gt;
&lt;li&gt;Index JOIN columns on both sides&lt;/li&gt;
&lt;li&gt;Skip indexes on low-cardinality columns (boolean, status)&lt;/li&gt;
&lt;li&gt;Avoid heavy indexing on frequently updated columns&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Transactions
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;BEGIN&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;UPDATE&lt;/span&gt; &lt;span class="n"&gt;accounts&lt;/span&gt; &lt;span class="k"&gt;SET&lt;/span&gt; &lt;span class="n"&gt;balance&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;balance&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;500&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;id&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;UPDATE&lt;/span&gt; &lt;span class="n"&gt;accounts&lt;/span&gt; &lt;span class="k"&gt;SET&lt;/span&gt; &lt;span class="n"&gt;balance&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;balance&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;500&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;id&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;span class="k"&gt;COMMIT&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;-- Savepoints&lt;/span&gt;
&lt;span class="k"&gt;BEGIN&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;INSERT&lt;/span&gt; &lt;span class="k"&gt;INTO&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;total&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;VALUES&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;100&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;SAVEPOINT&lt;/span&gt; &lt;span class="n"&gt;sp1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;INSERT&lt;/span&gt; &lt;span class="k"&gt;INTO&lt;/span&gt; &lt;span class="n"&gt;order_items&lt;/span&gt; &lt;span class="k"&gt;VALUES&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;5&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="k"&gt;ROLLBACK&lt;/span&gt; &lt;span class="k"&gt;TO&lt;/span&gt; &lt;span class="n"&gt;SAVEPOINT&lt;/span&gt; &lt;span class="n"&gt;sp1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;INSERT&lt;/span&gt; &lt;span class="k"&gt;INTO&lt;/span&gt; &lt;span class="n"&gt;order_items&lt;/span&gt; &lt;span class="k"&gt;VALUES&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;5&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="k"&gt;COMMIT&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Views
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;VIEW&lt;/span&gt; &lt;span class="n"&gt;active_user_orders&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;total&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt; &lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;user_id&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;active&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;-- Materialized view (PostgreSQL)&lt;/span&gt;
&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="n"&gt;MATERIALIZED&lt;/span&gt; &lt;span class="k"&gt;VIEW&lt;/span&gt; &lt;span class="n"&gt;sales_summary&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;category&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;SUM&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;total&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;revenue&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt; &lt;span class="k"&gt;GROUP&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;category&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;REFRESH&lt;/span&gt; &lt;span class="n"&gt;MATERIALIZED&lt;/span&gt; &lt;span class="k"&gt;VIEW&lt;/span&gt; &lt;span class="n"&gt;CONCURRENTLY&lt;/span&gt; &lt;span class="n"&gt;sales_summary&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Performance Tips
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Use &lt;code&gt;EXPLAIN ANALYZE&lt;/code&gt; to understand query plans&lt;/li&gt;
&lt;li&gt;Avoid &lt;code&gt;SELECT *&lt;/code&gt; in production -- specify columns&lt;/li&gt;
&lt;li&gt;Use CTEs over correlated subqueries for readability and performance&lt;/li&gt;
&lt;li&gt;Index your JOIN and WHERE columns&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;EXISTS&lt;/code&gt; instead of &lt;code&gt;IN&lt;/code&gt; for large subqueries&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;LIMIT&lt;/code&gt; for pagination, but consider keyset pagination for large offsets&lt;/li&gt;
&lt;li&gt;Use parameterized queries -- never concatenate user input into SQL&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;If you found this useful, share it with a colleague who needs it. Subscribe for more developer resources every week.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Want the full resource?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://apaksh.gumroad.com/l/pdqnfy" rel="noopener noreferrer"&gt;SQL Cheat Sheet — $6.99 on Gumroad&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Get the complete, downloadable version. Perfect for bookmarking, printing, or sharing with your team.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://apaksh.gumroad.com/l/pdqnfy" rel="noopener noreferrer"&gt;Get it now on Gumroad →&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;If you found this useful, drop a ❤️ and follow for more developer resources every week.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>sql</category>
      <category>database</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Docker Demystified: The Only Cheat Sheet You Need</title>
      <dc:creator>Apaksh</dc:creator>
      <pubDate>Wed, 18 Mar 2026 06:40:18 +0000</pubDate>
      <link>https://dev.to/apaksh/docker-demystified-the-only-cheat-sheet-you-need-22aj</link>
      <guid>https://dev.to/apaksh/docker-demystified-the-only-cheat-sheet-you-need-22aj</guid>
      <description>&lt;p&gt;Docker is one of those tools that's simple in concept and maddeningly complex in practice. You understand containers, you've pulled an image, and then suddenly you're debugging a networking issue between three services at 11pm and you can't remember if it's &lt;code&gt;docker compose down -v&lt;/code&gt; or &lt;code&gt;docker compose down --volumes&lt;/code&gt;. This cheat sheet is my antidote to that. Pin it, bookmark it, and stop wasting time on Docker documentation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Container Lifecycle
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="c"&gt;# Create &amp;amp;amp; Start&lt;/span&gt;
docker run &amp;amp;lt;image&amp;amp;gt;                          # Pull + create + start
docker run -it &amp;amp;lt;image&amp;amp;gt; bash                 &lt;span class="c"&gt;# Interactive with TTY&lt;/span&gt;
docker run -d &amp;amp;lt;image&amp;amp;gt;                       # Detached (background)
docker run --name myapp &amp;amp;lt;image&amp;amp;gt;             # Named container
docker run --rm &amp;amp;lt;image&amp;amp;gt;                     # Auto-remove on exit
docker run -p 8080:80 &amp;amp;lt;image&amp;amp;gt;              # Map host:container port
docker run -e ENV_VAR=value &amp;amp;lt;image&amp;amp;gt;        # Set environment variable
docker run --env-file .env &amp;amp;lt;image&amp;amp;gt;         # Load env from file
docker run -v /host/path:/container/path &amp;amp;lt;image&amp;amp;gt;  # Bind mount
docker run --memory="512m" --cpus="1.5" &amp;amp;lt;image&amp;amp;gt;   # Resource limits

&lt;span class="c"&gt;# Start / Stop / Restart&lt;/span&gt;
docker start &amp;amp;lt;container&amp;amp;gt;                   # Start stopped container
docker stop &amp;amp;lt;container&amp;amp;gt;                    # Graceful stop (SIGTERM)
docker kill &amp;amp;lt;container&amp;amp;gt;                    # Force stop (SIGKILL)
docker restart &amp;amp;lt;container&amp;amp;gt;

# Remove
docker rm &amp;amp;lt;container&amp;amp;gt;                      # Remove stopped container
docker rm -f &amp;amp;lt;container&amp;amp;gt;                   # Force remove running container
docker container prune                     &lt;span class="c"&gt;# Remove all stopped containers&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Container Inspection &amp;amp; Monitoring
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;docker ps                                  &lt;span class="c"&gt;# List running containers&lt;/span&gt;
docker ps -a                               &lt;span class="c"&gt;# List ALL containers&lt;/span&gt;
docker logs &amp;amp;lt;container&amp;amp;gt;                    # View logs
docker logs -f &amp;amp;lt;container&amp;amp;gt;                 # Follow/tail logs
docker logs --tail 100 &amp;amp;lt;container&amp;amp;gt;         # Last 100 lines
docker inspect &amp;amp;lt;container&amp;amp;gt;                 # Full JSON metadata
docker stats                               &lt;span class="c"&gt;# Live CPU/mem/net usage&lt;/span&gt;
docker top &amp;amp;lt;container&amp;amp;gt;                     # Running processes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Exec &amp;amp; Interaction
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;docker exec -it &amp;amp;lt;container&amp;amp;gt; bash           &lt;span class="c"&gt;# Shell into running container&lt;/span&gt;
docker exec -it &amp;amp;lt;container&amp;amp;gt; sh             &lt;span class="c"&gt;# Use sh if bash unavailable&lt;/span&gt;
docker exec &amp;amp;lt;container&amp;amp;gt; ls /app            &lt;span class="c"&gt;# Run single command&lt;/span&gt;
docker cp &amp;amp;lt;container&amp;amp;gt;:/path/file ./local   &lt;span class="c"&gt;# Copy FROM container&lt;/span&gt;
docker cp ./local &amp;amp;lt;container&amp;amp;gt;:/path/file   &lt;span class="c"&gt;# Copy TO container&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Image Management
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;docker images                              &lt;span class="c"&gt;# List local images&lt;/span&gt;
docker pull nginx:1.25                     &lt;span class="c"&gt;# Pull specific tag&lt;/span&gt;
docker build -t myapp:1.0 .               # Build from Dockerfile
docker build --no-cache -t myapp .        # Build without cache
docker build --build-arg KEY=value .      # Pass build arguments
docker tag myapp:1.0 myrepo/myapp:1.0    &lt;span class="c"&gt;# Tag image&lt;/span&gt;
docker rmi &amp;amp;lt;image&amp;amp;gt;                         # Remove image
docker image prune -a                      &lt;span class="c"&gt;# Remove ALL unused images&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Dockerfile Reference
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="s"&gt; node:20-alpine&lt;/span&gt;
&lt;span class="k"&gt;WORKDIR&lt;/span&gt;&lt;span class="s"&gt; /app&lt;/span&gt;
&lt;span class="k"&gt;LABEL&lt;/span&gt;&lt;span class="s"&gt; maintainer="you@example.com"&lt;/span&gt;
&lt;span class="k"&gt;ARG&lt;/span&gt;&lt;span class="s"&gt; NODE_ENV=production&lt;/span&gt;
&lt;span class="k"&gt;ENV&lt;/span&gt;&lt;span class="s"&gt; PORT=3000 NODE_ENV=production&lt;/span&gt;

&lt;span class="c"&gt;# Copy package.json FIRST for cache efficiency&lt;/span&gt;
&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="s"&gt; package*.json ./&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;npm ci &lt;span class="nt"&gt;--only&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;production
&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="s"&gt; . .&lt;/span&gt;

&lt;span class="k"&gt;VOLUME&lt;/span&gt;&lt;span class="s"&gt; ["/app/data"]&lt;/span&gt;
&lt;span class="k"&gt;EXPOSE&lt;/span&gt;&lt;span class="s"&gt; 3000&lt;/span&gt;

&lt;span class="k"&gt;HEALTHCHECK&lt;/span&gt;&lt;span class="s"&gt; --interval=30s --timeout=3s --retries=3 \&lt;/span&gt;
  CMD curl -f http://localhost:3000/health || exit 1

&lt;span class="k"&gt;USER&lt;/span&gt;&lt;span class="s"&gt; node&lt;/span&gt;
&lt;span class="k"&gt;CMD&lt;/span&gt;&lt;span class="s"&gt; ["node", "server.js"]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  CMD vs ENTRYPOINT
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;CMD&lt;/strong&gt; -- Default command/args, overridable with &lt;code&gt;docker run &amp;amp;lt;image&amp;amp;gt; &amp;amp;lt;cmd&amp;amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ENTRYPOINT&lt;/strong&gt; -- Fixed executable, only overridable with &lt;code&gt;--entrypoint&lt;/code&gt; flag&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Combined&lt;/strong&gt; -- ENTRYPOINT receives CMD as default arguments&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Multi-Stage Builds
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="c"&gt;# Stage 1: Builder&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;node:20&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;AS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;builder&lt;/span&gt;
&lt;span class="k"&gt;WORKDIR&lt;/span&gt;&lt;span class="s"&gt; /app&lt;/span&gt;
&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="s"&gt; package*.json ./&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;npm ci
&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="s"&gt; . .&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;npm run build

&lt;span class="c"&gt;# Stage 2: Production (only copies what's needed)&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;node:20-alpine&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;AS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;production&lt;/span&gt;
&lt;span class="k"&gt;WORKDIR&lt;/span&gt;&lt;span class="s"&gt; /app&lt;/span&gt;
&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="s"&gt; --from=builder /app/dist ./dist&lt;/span&gt;
&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="s"&gt; --from=builder /app/node_modules ./node_modules&lt;/span&gt;
&lt;span class="k"&gt;USER&lt;/span&gt;&lt;span class="s"&gt; node&lt;/span&gt;
&lt;span class="k"&gt;CMD&lt;/span&gt;&lt;span class="s"&gt; ["node", "dist/server.js"]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Networking
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;docker network ls                          &lt;span class="c"&gt;# List all networks&lt;/span&gt;
docker network create mynet               &lt;span class="c"&gt;# Bridge network (default)&lt;/span&gt;
docker network connect mynet &amp;amp;lt;container&amp;amp;gt;   # Add container to network
docker run --network mynet &amp;amp;lt;image&amp;amp;gt;         # Start on specific network
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Network Drivers
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;bridge&lt;/strong&gt; -- Default, single host. Containers talk by name on custom bridge.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;host&lt;/strong&gt; -- Max performance, no isolation. Uses host network.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;none&lt;/strong&gt; -- Complete isolation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;overlay&lt;/strong&gt; -- Multi-host (Swarm). Cross-host communication.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Gotcha:&lt;/strong&gt; On the &lt;em&gt;default&lt;/em&gt; bridge network, containers can't resolve each other by name. Create a &lt;strong&gt;custom bridge network&lt;/strong&gt; to get automatic DNS resolution.&lt;/p&gt;

&lt;h2&gt;
  
  
  Volumes &amp;amp; Storage
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;docker volume create mydata               &lt;span class="c"&gt;# Create named volume&lt;/span&gt;
docker volume ls                           &lt;span class="c"&gt;# List volumes&lt;/span&gt;
docker run -v mydata:/app/data &amp;amp;lt;image&amp;amp;gt;    # Named volume
docker run -v /host/path:/app/data &amp;amp;lt;image&amp;amp;gt;# Bind mount
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Volume Types
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Named Volume&lt;/strong&gt; (&lt;code&gt;-v name:/path&lt;/code&gt;) -- Docker-managed, best for persistent app data&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bind Mount&lt;/strong&gt; (&lt;code&gt;-v /host:/container&lt;/code&gt;) -- Host OS managed, best for development&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Anonymous&lt;/strong&gt; (&lt;code&gt;-v /path&lt;/code&gt;) -- Docker-managed, best for temporary data&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;tmpfs&lt;/strong&gt; (&lt;code&gt;--tmpfs /path&lt;/code&gt;) -- Memory-based, best for sensitive data&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Docker Compose
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="c"&gt;# docker-compose.yml key sections:&lt;/span&gt;
&lt;span class="c"&gt;# services, volumes, networks&lt;/span&gt;

docker compose up                          &lt;span class="c"&gt;# Start all services&lt;/span&gt;
docker compose up -d                       &lt;span class="c"&gt;# Detached mode&lt;/span&gt;
docker compose up --build                  &lt;span class="c"&gt;# Rebuild images first&lt;/span&gt;
docker compose down                        &lt;span class="c"&gt;# Stop &amp;amp;amp; remove containers&lt;/span&gt;
docker compose down -v                     &lt;span class="c"&gt;# Also remove volumes&lt;/span&gt;
docker compose logs -f app                 &lt;span class="c"&gt;# Follow specific service&lt;/span&gt;
docker compose exec app bash               &lt;span class="c"&gt;# Shell into service&lt;/span&gt;
docker compose run app npm test            &lt;span class="c"&gt;# Run one-off command&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Cleanup &amp;amp; Maintenance
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;docker system prune                        &lt;span class="c"&gt;# Remove all unused objects&lt;/span&gt;
docker system prune -a --volumes           &lt;span class="c"&gt;# Nuclear option (data loss!)&lt;/span&gt;
docker system df                           &lt;span class="c"&gt;# Show Docker disk usage&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Security Best Practices
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Use specific tags -- never just "latest" in production&lt;/li&gt;
&lt;li&gt;Run as non-root user&lt;/li&gt;
&lt;li&gt;Minimize image layers and attack surface&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;.dockerignore&lt;/code&gt; to avoid leaking secrets&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;COPY&lt;/code&gt; over &lt;code&gt;ADD&lt;/code&gt; unless you need URL fetching or auto-extraction&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;npm ci&lt;/code&gt; not &lt;code&gt;npm install&lt;/code&gt; in Dockerfiles&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Common Gotchas
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;EXPOSE&lt;/code&gt; doesn't publish ports.&lt;/strong&gt; It's documentation only. Use &lt;code&gt;-p&lt;/code&gt; to actually publish.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;docker stop&lt;/code&gt; sends SIGTERM, then SIGKILL after 10s.&lt;/strong&gt; Make sure your app handles SIGTERM gracefully.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Volumes aren't removed with &lt;code&gt;docker compose down&lt;/code&gt;.&lt;/strong&gt; You need &lt;code&gt;-v&lt;/code&gt; flag.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;latest&lt;/code&gt; tag isn't always the latest.&lt;/strong&gt; It's just a tag -- pin versions in production.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build context is sent to Docker daemon.&lt;/strong&gt; A large project directory = slow builds. Use &lt;code&gt;.dockerignore&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Each &lt;code&gt;RUN&lt;/code&gt; creates a new layer.&lt;/strong&gt; Chain commands with &lt;code&gt;&amp;amp;amp;&amp;amp;amp;&lt;/code&gt; to reduce image size.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;If you found this useful, share it with a colleague who needs it. Subscribe for more developer resources every week.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Want the full resource?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://apaksh.gumroad.com/l/irjqej" rel="noopener noreferrer"&gt;Docker Cheat Sheet — $6.99 on Gumroad&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Get the complete, downloadable version. Perfect for bookmarking, printing, or sharing with your team.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://apaksh.gumroad.com/l/irjqej" rel="noopener noreferrer"&gt;Get it now on Gumroad →&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;If you found this useful, drop a ❤️ and follow for more developer resources every week.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>docker</category>
      <category>devops</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Git Commands You Need to Know (The Complete Cheat Sheet)</title>
      <dc:creator>Apaksh</dc:creator>
      <pubDate>Wed, 18 Mar 2026 06:40:12 +0000</pubDate>
      <link>https://dev.to/apaksh/git-commands-you-need-to-know-the-complete-cheat-sheet-55kf</link>
      <guid>https://dev.to/apaksh/git-commands-you-need-to-know-the-complete-cheat-sheet-55kf</guid>
      <description>&lt;p&gt;I've been using Git for over a decade, and I still look up commands. Not because I'm forgetful -- because Git has a massive surface area and you only use 20% of it daily. The other 80% comes up when you're untangling a messy rebase at midnight or trying to find which commit introduced a bug. This is the cheat sheet I keep open in a terminal tab at all times.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Setup &amp;amp; Configuration
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git config &lt;span class="nt"&gt;--global&lt;/span&gt; user.name &lt;span class="s2"&gt;"Your Name"&lt;/span&gt;
git config &lt;span class="nt"&gt;--global&lt;/span&gt; user.email &lt;span class="s2"&gt;"you@example.com"&lt;/span&gt;
git config &lt;span class="nt"&gt;--global&lt;/span&gt; core.editor &lt;span class="s2"&gt;"code --wait"&lt;/span&gt;
git config &lt;span class="nt"&gt;--global&lt;/span&gt; init.defaultBranch main
git config &lt;span class="nt"&gt;--global&lt;/span&gt; alias.st status
git config &lt;span class="nt"&gt;--global&lt;/span&gt; alias.lg &lt;span class="s2"&gt;"log --oneline --graph --decorate"&lt;/span&gt;
git config &lt;span class="nt"&gt;--list&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Config Levels
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;System&lt;/strong&gt; (&lt;code&gt;--system&lt;/code&gt;) -- &lt;code&gt;/etc/gitconfig&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Global/user&lt;/strong&gt; (&lt;code&gt;--global&lt;/code&gt;) -- &lt;code&gt;~/.gitconfig&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local/repo&lt;/strong&gt; (&lt;code&gt;--local&lt;/code&gt;) -- &lt;code&gt;.git/config&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2. Creating &amp;amp; Cloning Repos
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git init                          &lt;span class="c"&gt;# Init repo in current directory&lt;/span&gt;
git clone &amp;amp;lt&lt;span class="p"&gt;;&lt;/span&gt;url&amp;amp;gt&lt;span class="p"&gt;;&lt;/span&gt;                   &lt;span class="c"&gt;# Clone repo&lt;/span&gt;
git clone &lt;span class="nt"&gt;--depth&lt;/span&gt; 1 &amp;amp;lt&lt;span class="p"&gt;;&lt;/span&gt;url&amp;amp;gt&lt;span class="p"&gt;;&lt;/span&gt;         &lt;span class="c"&gt;# Shallow clone (latest commit only)&lt;/span&gt;
git clone &lt;span class="nt"&gt;-b&lt;/span&gt; dev &amp;amp;lt&lt;span class="p"&gt;;&lt;/span&gt;url&amp;amp;gt&lt;span class="p"&gt;;&lt;/span&gt;            &lt;span class="c"&gt;# Clone specific branch&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. The Basics -- Snapshot Workflow
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git status                        &lt;span class="c"&gt;# Show working tree status&lt;/span&gt;
git add &amp;amp;lt&lt;span class="p"&gt;;&lt;/span&gt;file&amp;amp;gt&lt;span class="p"&gt;;&lt;/span&gt;                    &lt;span class="c"&gt;# Stage a file&lt;/span&gt;
git add &lt;span class="nb"&gt;.&lt;/span&gt;                         &lt;span class="c"&gt;# Stage all changes&lt;/span&gt;
git add &lt;span class="nt"&gt;-p&lt;/span&gt;                        &lt;span class="c"&gt;# Stage changes interactively (hunks)&lt;/span&gt;
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"message"&lt;/span&gt;           &lt;span class="c"&gt;# Commit staged changes&lt;/span&gt;
git commit &lt;span class="nt"&gt;--amend&lt;/span&gt;                &lt;span class="c"&gt;# Modify last commit&lt;/span&gt;
git diff                          &lt;span class="c"&gt;# Unstaged changes vs last commit&lt;/span&gt;
git diff &lt;span class="nt"&gt;--staged&lt;/span&gt;                 &lt;span class="c"&gt;# Staged changes vs last commit&lt;/span&gt;
git diff branch1..branch2         &lt;span class="c"&gt;# Diff between two branches&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4. Viewing History
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git log &lt;span class="nt"&gt;--oneline&lt;/span&gt; &lt;span class="nt"&gt;--graph&lt;/span&gt;         &lt;span class="c"&gt;# Branch graph view&lt;/span&gt;
git log &lt;span class="nt"&gt;--author&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"Alice"&lt;/span&gt;          &lt;span class="c"&gt;# Filter by author&lt;/span&gt;
git log &lt;span class="nt"&gt;--since&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"2024-01-01"&lt;/span&gt;      &lt;span class="c"&gt;# Filter by date&lt;/span&gt;
git log &lt;span class="nt"&gt;--grep&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"fix"&lt;/span&gt;              &lt;span class="c"&gt;# Search commit messages&lt;/span&gt;
git log &lt;span class="nt"&gt;-S&lt;/span&gt; &lt;span class="s2"&gt;"function_name"&lt;/span&gt;        &lt;span class="c"&gt;# Search changes in code (pickaxe)&lt;/span&gt;
git show &amp;amp;lt&lt;span class="p"&gt;;&lt;/span&gt;commit&amp;amp;gt&lt;span class="p"&gt;;&lt;/span&gt;                 &lt;span class="c"&gt;# Show commit details&lt;/span&gt;
git blame &amp;amp;lt&lt;span class="p"&gt;;&lt;/span&gt;file&amp;amp;gt&lt;span class="p"&gt;;&lt;/span&gt;                  &lt;span class="c"&gt;# Show who changed each line&lt;/span&gt;
git blame &lt;span class="nt"&gt;-L&lt;/span&gt; 10,20 &amp;amp;lt&lt;span class="p"&gt;;&lt;/span&gt;file&amp;amp;gt&lt;span class="p"&gt;;&lt;/span&gt;         &lt;span class="c"&gt;# Blame specific lines&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git branch                        &lt;span class="c"&gt;# List local branches&lt;/span&gt;
git branch &lt;span class="nt"&gt;-a&lt;/span&gt;                     &lt;span class="c"&gt;# List all branches&lt;/span&gt;
git switch &lt;span class="nt"&gt;-c&lt;/span&gt; dev                 &lt;span class="c"&gt;# Create + switch (modern syntax)&lt;/span&gt;
git switch dev                    &lt;span class="c"&gt;# Switch to branch&lt;/span&gt;
git branch &lt;span class="nt"&gt;-m&lt;/span&gt; old-name new-name   &lt;span class="c"&gt;# Rename branch&lt;/span&gt;
git branch &lt;span class="nt"&gt;-d&lt;/span&gt; dev                 &lt;span class="c"&gt;# Delete branch (safe)&lt;/span&gt;
git branch &lt;span class="nt"&gt;-D&lt;/span&gt; dev                 &lt;span class="c"&gt;# Force delete branch&lt;/span&gt;
git branch &lt;span class="nt"&gt;--merged&lt;/span&gt;               &lt;span class="c"&gt;# Branches merged into current&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Branch Naming Conventions
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;feature/user-auth&lt;/code&gt; -- New features&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;fix/login-crash&lt;/code&gt; -- Bug fixes&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;hotfix/null-pointer&lt;/code&gt; -- Urgent prod fix&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;chore/update-deps&lt;/code&gt; -- Maintenance&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;release/v2.1.0&lt;/code&gt; -- Release prep&lt;/li&gt;
&lt;/ul&gt;

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



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git merge dev                     &lt;span class="c"&gt;# Merge dev into current branch&lt;/span&gt;
git merge &lt;span class="nt"&gt;--no-ff&lt;/span&gt; dev             &lt;span class="c"&gt;# Always create merge commit&lt;/span&gt;
git merge &lt;span class="nt"&gt;--squash&lt;/span&gt; dev            &lt;span class="c"&gt;# Squash all commits into one&lt;/span&gt;
git merge &lt;span class="nt"&gt;--abort&lt;/span&gt;                 &lt;span class="c"&gt;# Abort an in-progress merge&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git rebase main                   &lt;span class="c"&gt;# Rebase current branch onto main&lt;/span&gt;
git rebase &lt;span class="nt"&gt;--abort&lt;/span&gt;                &lt;span class="c"&gt;# Abort rebase&lt;/span&gt;
git rebase &lt;span class="nt"&gt;--continue&lt;/span&gt;             &lt;span class="c"&gt;# Continue after resolving conflict&lt;/span&gt;
git rebase &lt;span class="nt"&gt;-i&lt;/span&gt; HEAD~3              &lt;span class="c"&gt;# Interactive rebase: rewrite last 3 commits&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Interactive Rebase Commands
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;pick&lt;/code&gt; (p) -- Keep commit as-is&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;reword&lt;/code&gt; (r) -- Keep commit, edit message&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;squash&lt;/code&gt; (s) -- Combine with previous commit&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;fixup&lt;/code&gt; (f) -- Like squash, discard message&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;drop&lt;/code&gt; (d) -- Delete the commit&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  8. Remote Operations
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git remote &lt;span class="nt"&gt;-v&lt;/span&gt;                     &lt;span class="c"&gt;# List remotes with URLs&lt;/span&gt;
git fetch &lt;span class="nt"&gt;--prune&lt;/span&gt;                 &lt;span class="c"&gt;# Fetch + remove stale remote branches&lt;/span&gt;
git pull &lt;span class="nt"&gt;--rebase&lt;/span&gt;                 &lt;span class="c"&gt;# Fetch + rebase&lt;/span&gt;
git push &lt;span class="nt"&gt;-u&lt;/span&gt; origin main           &lt;span class="c"&gt;# Push + set upstream tracking&lt;/span&gt;
git push &lt;span class="nt"&gt;--force-with-lease&lt;/span&gt;       &lt;span class="c"&gt;# Safe force push&lt;/span&gt;
git push origin &lt;span class="nt"&gt;--delete&lt;/span&gt; dev      &lt;span class="c"&gt;# Delete remote branch&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Prefer &lt;code&gt;--force-with-lease&lt;/code&gt; over &lt;code&gt;--force&lt;/code&gt;&lt;/strong&gt; -- it fails if someone else pushed since your last fetch.&lt;/p&gt;

&lt;h2&gt;
  
  
  9. Stashing
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git stash                         &lt;span class="c"&gt;# Stash current changes&lt;/span&gt;
git stash push &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"WIP: login"&lt;/span&gt;    &lt;span class="c"&gt;# Stash with a name&lt;/span&gt;
git stash &lt;span class="nt"&gt;-u&lt;/span&gt;                      &lt;span class="c"&gt;# Include untracked files&lt;/span&gt;
git stash list                    &lt;span class="c"&gt;# List all stashes&lt;/span&gt;
git stash pop                     &lt;span class="c"&gt;# Apply latest stash + drop it&lt;/span&gt;
git stash apply stash@&lt;span class="o"&gt;{&lt;/span&gt;2&lt;span class="o"&gt;}&lt;/span&gt;         &lt;span class="c"&gt;# Apply specific stash (keep it)&lt;/span&gt;
git stash drop stash@&lt;span class="o"&gt;{&lt;/span&gt;0&lt;span class="o"&gt;}&lt;/span&gt;          &lt;span class="c"&gt;# Delete specific stash&lt;/span&gt;
git stash branch feature stash@&lt;span class="o"&gt;{&lt;/span&gt;0&lt;span class="o"&gt;}&lt;/span&gt; &lt;span class="c"&gt;# Create branch from stash&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  10. Undoing Things
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Undo Working Directory Changes&lt;/span&gt;
git restore &amp;amp;lt&lt;span class="p"&gt;;&lt;/span&gt;file&amp;amp;gt&lt;span class="p"&gt;;&lt;/span&gt;                &lt;span class="c"&gt;# Discard changes (modern)&lt;/span&gt;
git clean &lt;span class="nt"&gt;-fd&lt;/span&gt;                     &lt;span class="c"&gt;# Remove untracked files + dirs&lt;/span&gt;

&lt;span class="c"&gt;# Undo Staging&lt;/span&gt;
git restore &lt;span class="nt"&gt;--staged&lt;/span&gt; &amp;amp;lt&lt;span class="p"&gt;;&lt;/span&gt;file&amp;amp;gt&lt;span class="p"&gt;;&lt;/span&gt;       &lt;span class="c"&gt;# Unstage (modern syntax)&lt;/span&gt;

&lt;span class="c"&gt;# Undo Commits&lt;/span&gt;
git revert &amp;amp;lt&lt;span class="p"&gt;;&lt;/span&gt;commit&amp;amp;gt&lt;span class="p"&gt;;&lt;/span&gt;               &lt;span class="c"&gt;# New commit that undoes a commit (safe)&lt;/span&gt;
git reset &lt;span class="nt"&gt;--soft&lt;/span&gt; HEAD~1           &lt;span class="c"&gt;# Undo commit, keep changes staged&lt;/span&gt;
git reset &lt;span class="nt"&gt;--mixed&lt;/span&gt; HEAD~1          &lt;span class="c"&gt;# Undo commit, keep changes unstaged&lt;/span&gt;
git reset &lt;span class="nt"&gt;--hard&lt;/span&gt; HEAD~1           &lt;span class="c"&gt;# Undo commit, DISCARD changes&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Reset Modes Comparison
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;--soft&lt;/strong&gt; -- HEAD moved, staging unchanged, working dir unchanged&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;--mixed&lt;/strong&gt; -- HEAD moved, staging cleared, working dir unchanged&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;--hard&lt;/strong&gt; -- HEAD moved, staging cleared, working dir cleared (dangerous)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  11. Cherry-Picking &amp;amp; Tags
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git cherry-pick &amp;amp;lt&lt;span class="p"&gt;;&lt;/span&gt;commit&amp;amp;gt&lt;span class="p"&gt;;&lt;/span&gt;          &lt;span class="c"&gt;# Apply a specific commit&lt;/span&gt;
git tag &lt;span class="nt"&gt;-a&lt;/span&gt; v1.0.0 &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Release"&lt;/span&gt;    &lt;span class="c"&gt;# Create annotated tag&lt;/span&gt;
git push origin &lt;span class="nt"&gt;--tags&lt;/span&gt;            &lt;span class="c"&gt;# Push all tags&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  12. Working with History -- Advanced
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Find which commit introduced a bug&lt;/span&gt;
git bisect start
git bisect bad                    &lt;span class="c"&gt;# Current commit is broken&lt;/span&gt;
git bisect good v1.2.0            &lt;span class="c"&gt;# This version was fine&lt;/span&gt;
git bisect reset                  &lt;span class="c"&gt;# End bisect session&lt;/span&gt;

&lt;span class="c"&gt;# Find a lost commit&lt;/span&gt;
git reflog                        &lt;span class="c"&gt;# Log of ALL HEAD movements&lt;/span&gt;
git branch recovered &amp;amp;lt&lt;span class="p"&gt;;&lt;/span&gt;lost-hash&amp;amp;gt&lt;span class="p"&gt;;&lt;/span&gt;  &lt;span class="c"&gt;# Save it as a branch&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Common Workflows
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Feature Branch Workflow
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git switch main &amp;amp;amp&lt;span class="p"&gt;;&lt;/span&gt;&amp;amp;amp&lt;span class="p"&gt;;&lt;/span&gt; git pull
git switch &lt;span class="nt"&gt;-c&lt;/span&gt; feature/my-feature
&lt;span class="c"&gt;# ... do work ...&lt;/span&gt;
git add &lt;span class="nt"&gt;-p&lt;/span&gt; &amp;amp;amp&lt;span class="p"&gt;;&lt;/span&gt;&amp;amp;amp&lt;span class="p"&gt;;&lt;/span&gt; git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"feat: add X"&lt;/span&gt;
git push &lt;span class="nt"&gt;-u&lt;/span&gt; origin feature/my-feature
&lt;span class="c"&gt;# Open Pull Request -&amp;amp;gt; merge -&amp;amp;gt; delete branch&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Hotfix Workflow
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git switch main &amp;amp;amp&lt;span class="p"&gt;;&lt;/span&gt;&amp;amp;amp&lt;span class="p"&gt;;&lt;/span&gt; git pull
git switch &lt;span class="nt"&gt;-c&lt;/span&gt; hotfix/critical-bug
git commit &lt;span class="nt"&gt;-am&lt;/span&gt; &lt;span class="s2"&gt;"fix: resolve null pointer"&lt;/span&gt;
git switch main
git merge &lt;span class="nt"&gt;--no-ff&lt;/span&gt; hotfix/critical-bug
git tag &lt;span class="nt"&gt;-a&lt;/span&gt; v1.0.1 &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Hotfix release"&lt;/span&gt;
git push &amp;amp;amp&lt;span class="p"&gt;;&lt;/span&gt;&amp;amp;amp&lt;span class="p"&gt;;&lt;/span&gt; git push &lt;span class="nt"&gt;--tags&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Pro Tips
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;git reset --hard&lt;/code&gt; is permanent&lt;/strong&gt; -- changes in working directory are gone. Use &lt;code&gt;git stash&lt;/code&gt; to be safe.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Never rebase shared/public branches&lt;/strong&gt; -- it rewrites history and causes chaos for teammates.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;git add -p&lt;/code&gt; is your best friend&lt;/strong&gt; -- review exactly what you're committing, hunk by hunk.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;git reflog&lt;/code&gt; is your safety net&lt;/strong&gt; -- almost anything can be recovered within 90 days.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;If you found this useful, share it with a colleague who needs it. Subscribe for more developer resources every week.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Want the full resource?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://apaksh.gumroad.com/l/ejtat" rel="noopener noreferrer"&gt;Git Cheat Sheet — $6.99 on Gumroad&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Get the complete, downloadable version. Perfect for bookmarking, printing, or sharing with your team.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://apaksh.gumroad.com/l/ejtat" rel="noopener noreferrer"&gt;Get it now on Gumroad →&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;If you found this useful, drop a ❤️ and follow for more developer resources every week.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>git</category>
      <category>beginners</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>The Python Cheat Sheet You'll Actually Use</title>
      <dc:creator>Apaksh</dc:creator>
      <pubDate>Wed, 18 Mar 2026 06:34:54 +0000</pubDate>
      <link>https://dev.to/apaksh/the-python-cheat-sheet-youll-actually-use-4976</link>
      <guid>https://dev.to/apaksh/the-python-cheat-sheet-youll-actually-use-4976</guid>
      <description>&lt;p&gt;We all do it. We've written Python for years, and we still Google "python string format" or "how to sort a dictionary" at least once a week. No shame in it -- but what if you had everything in one place? This is the Python cheat sheet I keep pinned next to my monitor. It covers Python 3.10+ and includes the stuff you actually use, not the obscure corner cases you'll never need.&lt;/p&gt;

&lt;h2&gt;
  
  
  Data Types &amp;amp; Variables
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Core Types
&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;        &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;42&lt;/span&gt;
&lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;float&lt;/span&gt;      &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;3.14&lt;/span&gt;
&lt;span class="n"&gt;z&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;complex&lt;/span&gt;    &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mf"&gt;3j&lt;/span&gt;
&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&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="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;bool&lt;/span&gt;       &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;          &lt;span class="c1"&gt;# True / False
&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt;       &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt;

&lt;span class="c1"&gt;# Type Checking &amp;amp;amp; Conversion
&lt;/span&gt;&lt;span class="nf"&gt;type&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;                        &lt;span class="c1"&gt;# &amp;amp;lt;class 'int'&amp;amp;gt;
&lt;/span&gt;&lt;span class="nf"&gt;isinstance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;             &lt;span class="c1"&gt;# True
&lt;/span&gt;&lt;span class="nf"&gt;isinstance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;float&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;    &lt;span class="c1"&gt;# True -- checks multiple
&lt;/span&gt;&lt;span class="nf"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;42&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="nf"&gt;float&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;3.14&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;       &lt;span class="c1"&gt;# parse from string
&lt;/span&gt;&lt;span class="nf"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;42&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="nf"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;               &lt;span class="c1"&gt;# 0 -&amp;amp;gt; False, anything else -&amp;amp;gt; True
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Type Quick Reference
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;int&lt;/code&gt; -- Immutable, not ordered&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;float&lt;/code&gt; -- Immutable, not ordered&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;str&lt;/code&gt; -- Immutable, ordered, allows duplicates&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;list&lt;/code&gt; -- Mutable, ordered, allows duplicates&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;tuple&lt;/code&gt; -- Immutable, ordered, allows duplicates&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;set&lt;/code&gt; -- Mutable, unordered, no duplicates&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;dict&lt;/code&gt; -- Mutable, ordered (insertion order since 3.7), keys unique&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;bytes&lt;/code&gt; -- Immutable, ordered, allows duplicates&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Strings
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;s&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, World!&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

&lt;span class="c1"&gt;# Slicing  [start:stop:step]
&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;        &lt;span class="c1"&gt;# 'H'
&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;[&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="c1"&gt;# '!'
&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;      &lt;span class="c1"&gt;# 'Hello'
&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;[::&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="c1"&gt;# '!dlroW ,olleH'  -- reverse
&lt;/span&gt;
&lt;span class="c1"&gt;# Common Methods
&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;upper&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;           &lt;span class="c1"&gt;# 'HELLO, WORLD!'
&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;lower&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;           &lt;span class="c1"&gt;# 'hello, world!'
&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;           &lt;span class="c1"&gt;# strips whitespace
&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;o&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;0&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# 'Hell0, W0rld!'
&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&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="c1"&gt;# ['Hello', 'World!']
&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;startswith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;He&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# True
&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;World&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;     &lt;span class="c1"&gt;# 7  (-1 if not found)
&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;count&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;l&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;        &lt;span class="c1"&gt;# 3
&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="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;a&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;b&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;c&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;  &lt;span class="c1"&gt;# 'a, b, c'
&lt;/span&gt;
&lt;span class="c1"&gt;# f-Strings (use these -- fast &amp;amp;amp; readable)
&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;price&lt;/span&gt; &lt;span class="o"&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="mf"&gt;1.5&lt;/span&gt;
&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="si"&gt;!r}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;             &lt;span class="c1"&gt;# "'Apple'"  (repr)
&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;price&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;          &lt;span class="c1"&gt;# '1.50'
&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1000000&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;          &lt;span class="c1"&gt;# '1,000,000'
&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mf"&gt;0.85&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;           &lt;span class="c1"&gt;# '85.0%'
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Lists
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;lst&lt;/span&gt; &lt;span class="o"&gt;=&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;4&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;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;9&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;6&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="c1"&gt;# Mutation
&lt;/span&gt;&lt;span class="n"&gt;lst&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;            &lt;span class="c1"&gt;# add to end
&lt;/span&gt;&lt;span class="n"&gt;lst&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;extend&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;       &lt;span class="c1"&gt;# add multiple
&lt;/span&gt;&lt;span class="n"&gt;lst&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;insert&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;         &lt;span class="c1"&gt;# insert at index
&lt;/span&gt;&lt;span class="n"&gt;lst&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;remove&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="c1"&gt;# removes FIRST occurrence
&lt;/span&gt;&lt;span class="n"&gt;lst&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;pop&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;                &lt;span class="c1"&gt;# remove &amp;amp;amp; return last
&lt;/span&gt;&lt;span class="n"&gt;lst&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;pop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;               &lt;span class="c1"&gt;# remove &amp;amp;amp; return at index
&lt;/span&gt;
&lt;span class="c1"&gt;# Sorting
&lt;/span&gt;&lt;span class="n"&gt;lst&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sort&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;                          &lt;span class="c1"&gt;# in-place ascending
&lt;/span&gt;&lt;span class="n"&gt;lst&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sort&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;reverse&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;              &lt;span class="c1"&gt;# in-place descending
&lt;/span&gt;&lt;span class="nf"&gt;sorted&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;lst&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;                         &lt;span class="c1"&gt;# returns NEW list
&lt;/span&gt;
&lt;span class="c1"&gt;# Unpacking
&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="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;rest&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;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;   &lt;span class="c1"&gt;# a=1, b=2, rest=[3,4,5]
&lt;/span&gt;
&lt;span class="c1"&gt;# zip / enumerate
&lt;/span&gt;&lt;span class="k"&gt;for&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;v&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;enumerate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;lst&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;start&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="bp"&gt;...&lt;/span&gt;
&lt;span class="k"&gt;for&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="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;zip&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;list1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;list2&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="bp"&gt;...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Dictionaries
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;d&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;Ada&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;36&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;d&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="c1"&gt;# 'Ada'  (KeyError if missing)
&lt;/span&gt;&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&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="c1"&gt;# 'Ada'  (None if missing)
&lt;/span&gt;&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;x&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;default&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;       &lt;span class="c1"&gt;# 'default'
&lt;/span&gt;&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;city&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;London&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;         &lt;span class="c1"&gt;# add/update
&lt;/span&gt;&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;pop&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="bp"&gt;None&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;           &lt;span class="c1"&gt;# remove &amp;amp;amp; return (safe)
&lt;/span&gt;
&lt;span class="c1"&gt;# Merging (Python 3.9+)
&lt;/span&gt;&lt;span class="n"&gt;merged&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;d1&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;d2&lt;/span&gt;             &lt;span class="c1"&gt;# new merged dict
&lt;/span&gt;&lt;span class="n"&gt;d1&lt;/span&gt; &lt;span class="o"&gt;|=&lt;/span&gt; &lt;span class="n"&gt;d2&lt;/span&gt;                     &lt;span class="c1"&gt;# update d1 in-place
&lt;/span&gt;
&lt;span class="c1"&gt;# defaultdict
&lt;/span&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;collections&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;defaultdict&lt;/span&gt;
&lt;span class="n"&gt;dd&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;defaultdict&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;list&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;dd&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;a&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;append&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="c1"&gt;# no KeyError
&lt;/span&gt;
&lt;span class="c1"&gt;# Counter
&lt;/span&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;collections&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Counter&lt;/span&gt;
&lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Counter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;mississippi&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="c1"&gt;# Counter({'s':4,'i':4,'p':2,'m':1})
&lt;/span&gt;
&lt;span class="c1"&gt;# Dict comprehension
&lt;/span&gt;&lt;span class="n"&gt;squares&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;x&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;6&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Sets
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;s&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;4&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="o"&gt;=&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;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt;    &lt;span class="c1"&gt;# union          {1,2,3,4,5,6}
&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;amp&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt;    &lt;span class="c1"&gt;# intersection   {3,4}
&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt;    &lt;span class="c1"&gt;# difference     {1,2}
&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="o"&gt;^&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt;    &lt;span class="c1"&gt;# symmetric diff {1,2,5,6}
&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;   &lt;span class="c1"&gt;# True  (O(1) avg)
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Comprehensions
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# List Comprehension
&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;x&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;10&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;
&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;x&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;20&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;x&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;2&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="c1"&gt;# Nested
&lt;/span&gt;&lt;span class="n"&gt;matrix&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;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;]]&lt;/span&gt;
&lt;span class="n"&gt;flat&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;matrix&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;  &lt;span class="c1"&gt;# [1,2,3,4,5,6]
&lt;/span&gt;
&lt;span class="c1"&gt;# Dict Comprehension
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;v&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;v&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;zip&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;abc&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&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="c1"&gt;# Generator Expression (lazy -- memory efficient)
&lt;/span&gt;&lt;span class="n"&gt;total&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;sum&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;x&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;1000000&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;  &lt;span class="c1"&gt;# no list created!
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Control Flow
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# match / case (Python 3.10+)
&lt;/span&gt;&lt;span class="n"&gt;match&lt;/span&gt; &lt;span class="n"&gt;command&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;case&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;quit&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="nf"&gt;quit&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="n"&gt;case&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;go&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;move&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="nf"&gt;move&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="n"&gt;case&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;action&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;action&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;target&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="p"&gt;}:&lt;/span&gt;
        &lt;span class="nf"&gt;do&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;action&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;case&lt;/span&gt; &lt;span class="n"&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;unknown&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# for / else  (else runs if loop didn't break)
&lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;item&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;lst&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;condition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;break&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;no break occurred&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;h2&gt;
  
  
  Functions
&lt;/h2&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="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;greeting&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&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="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;gt&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;greeting&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;, &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;!&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

&lt;span class="c1"&gt;# *args and **kwargs
&lt;/span&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;func&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="n"&gt;kwargs&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;args&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;    &lt;span class="c1"&gt;# tuple
&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;kwargs&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# dict
&lt;/span&gt;
&lt;span class="c1"&gt;# Keyword-only args (after *)
&lt;/span&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;host&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="n"&gt;port&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;80&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ssl&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="bp"&gt;...&lt;/span&gt;

&lt;span class="c1"&gt;# Lambda
&lt;/span&gt;&lt;span class="n"&gt;square&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;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;
&lt;span class="nf"&gt;sorted&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;key&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;d&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;d&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Decorators
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;functools&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;my_decorator&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;func&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="nd"&gt;@functools.wraps&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;func&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;wrapper&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="n"&gt;kwargs&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;before&lt;/span&gt;&lt;span class="sh"&gt;"&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;func&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="n"&gt;kwargs&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;after&lt;/span&gt;&lt;span class="sh"&gt;"&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;result&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;wrapper&lt;/span&gt;

&lt;span class="nd"&gt;@my_decorator&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;say_hi&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;hi&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Common Built-in Decorators
&lt;/span&gt;&lt;span class="nd"&gt;@staticmethod&lt;/span&gt;          &lt;span class="c1"&gt;# no self/cls
&lt;/span&gt;&lt;span class="nd"&gt;@classmethod&lt;/span&gt;           &lt;span class="c1"&gt;# cls instead of self
&lt;/span&gt;&lt;span class="nd"&gt;@property&lt;/span&gt;              &lt;span class="c1"&gt;# getter
&lt;/span&gt;&lt;span class="nd"&gt;@functools.lru_cache&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;maxsize&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;128&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="c1"&gt;# memoization
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Generators &amp;amp; Iterators
&lt;/h2&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;countdown&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;while&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;gt&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;yield&lt;/span&gt; &lt;span class="n"&gt;n&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="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;countdown&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="c1"&gt;# 3, 2, 1
&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;x&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# itertools (extremely useful)
&lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;itertools&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;it&lt;/span&gt;
&lt;span class="n"&gt;it&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;chain&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;4&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;     &lt;span class="c1"&gt;# 1,2,3,4
&lt;/span&gt;&lt;span class="n"&gt;it&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;islice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;gen&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;         &lt;span class="c1"&gt;# first 5 items
&lt;/span&gt;&lt;span class="n"&gt;it&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;product&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;AB&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;repeat&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;span class="c1"&gt;# AA AB BA BB
&lt;/span&gt;&lt;span class="n"&gt;it&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;permutations&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ABC&lt;/span&gt;&lt;span class="sh"&gt;"&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="c1"&gt;# all 2-perms
&lt;/span&gt;&lt;span class="n"&gt;it&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;combinations&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ABC&lt;/span&gt;&lt;span class="sh"&gt;"&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="c1"&gt;# all 2-combos
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Classes &amp;amp; OOP
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Dataclass (Python 3.7+) -- auto __init__, __repr__, __eq__
&lt;/span&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;dataclasses&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;dataclass&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;field&lt;/span&gt;

&lt;span class="nd"&gt;@dataclass&lt;/span&gt;
&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Point&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;float&lt;/span&gt;
    &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;float&lt;/span&gt;
    &lt;span class="n"&gt;z&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;float&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.0&lt;/span&gt;
    &lt;span class="n"&gt;tags&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;list&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;field&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;default_factory&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;list&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nd"&gt;@dataclass&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;frozen&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="c1"&gt;# immutable + hashable
&lt;/span&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;int&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="nb"&gt;int&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Exceptions
&lt;/h2&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="mi"&gt;10&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
&lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="nb"&gt;ZeroDivisionError&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="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Error: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;except &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;TypeError&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;ValueError&lt;/span&gt;&lt;span class="p"&gt;)&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="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Type/Value error: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="si"&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;no exception!&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;finally&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;always runs&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Custom Exceptions
&lt;/span&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;AppError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Exception&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;None&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nf"&gt;super&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;code&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;code&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  File I/O
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Reading
&lt;/span&gt;&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;file.txt&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;r&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;encoding&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;utf-8&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;content&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="c1"&gt;# Writing
&lt;/span&gt;&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;out.txt&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;w&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;encoding&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;utf-8&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;write&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="se"&gt;\n&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# pathlib (prefer over os.path)
&lt;/span&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;pathlib&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Path&lt;/span&gt;
&lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;data/file.txt&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exists&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;          &lt;span class="c1"&gt;# True/False
&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read_text&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;       &lt;span class="c1"&gt;# read entire file
&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;write_text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;hi&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# write entire file
&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;sub&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;x.py&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;  &lt;span class="c1"&gt;# join paths with /
&lt;/span&gt;&lt;span class="nf"&gt;list&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;parent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;glob&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;*.txt&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;     &lt;span class="c1"&gt;# glob
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Context Managers
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;contextlib&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;contextmanager&lt;/span&gt;

&lt;span class="nd"&gt;@contextmanager&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;timer&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;
    &lt;span class="n"&gt;start&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;perf_counter&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;yield&lt;/span&gt;
    &lt;span class="k"&gt;finally&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="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Elapsed: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;perf_counter&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;start&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;s&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nf"&gt;timer&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="nf"&gt;heavy_computation&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Dates &amp;amp; Times
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;date&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;timedelta&lt;/span&gt;

&lt;span class="n"&gt;now&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;now&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;today&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;date&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;today&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="c1"&gt;# Formatting / Parsing
&lt;/span&gt;&lt;span class="n"&gt;dt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;strftime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;%Y-%m-%d %H:%M:%S&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;datetime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;strptime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;2024-01-15&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;%Y-%m-%d&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Arithmetic
&lt;/span&gt;&lt;span class="n"&gt;tomorrow&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;today&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nf"&gt;timedelta&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;days&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="n"&gt;delta&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;dt2&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;dt1&lt;/span&gt;
&lt;span class="n"&gt;delta&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;total_seconds&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Testing
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# pytest (preferred)
&lt;/span&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;test_add&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="nf"&gt;add&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="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;

&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;pytest&lt;/span&gt;

&lt;span class="nd"&gt;@pytest.fixture&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;sample_data&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="k"&gt;return&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="nd"&gt;@pytest.mark.parametrize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;a,b,expected&lt;/span&gt;&lt;span class="sh"&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="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="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="p"&gt;(&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="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;test_add_parametrized&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="n"&gt;expected&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;assert&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="n"&gt;expected&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;If you found this useful, share it with a colleague who needs it. Subscribe for more developer resources every week.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Want the full resource?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://apaksh.gumroad.com/l/dgqirk" rel="noopener noreferrer"&gt;Python Cheat Sheet — $6.99 on Gumroad&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Get the complete, downloadable version. Perfect for bookmarking, printing, or sharing with your team.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://apaksh.gumroad.com/l/dgqirk" rel="noopener noreferrer"&gt;Get it now on Gumroad →&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;If you found this useful, drop a ❤️ and follow for more developer resources every week.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>beginners</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>AWS Security Hardening: The Checklist Your Cloud Needs</title>
      <dc:creator>Apaksh</dc:creator>
      <pubDate>Wed, 18 Mar 2026 06:34:48 +0000</pubDate>
      <link>https://dev.to/apaksh/aws-security-hardening-the-checklist-your-cloud-needs-4d99</link>
      <guid>https://dev.to/apaksh/aws-security-hardening-the-checklist-your-cloud-needs-4d99</guid>
      <description>&lt;p&gt;If you're running anything in AWS, this one is for you. I've seen too many teams learn about AWS security the hard way -- a surprise bill from crypto-mining on a compromised instance, or worse, a data breach that makes the news. The good news? Most AWS security issues are preventable with a systematic approach. Here's the checklist your cloud needs.&lt;/p&gt;

&lt;p&gt;This covers identity management, network security, data protection, monitoring, and compliance. Follow it to systematically eliminate common vulnerabilities, implement the principle of least privilege, and establish continuous security monitoring.&lt;/p&gt;

&lt;h2&gt;
  
  
  Phase 1: Identity &amp;amp; Access Management (IAM)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Root Account Protection
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Disable root account access keys completely&lt;/strong&gt; -- Root keys provide unrestricted AWS account access; if compromised, attacker controls everything (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enable MFA (Multi-Factor Authentication) on root account&lt;/strong&gt; -- Prevents unauthorized access even if password is compromised (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use hardware MFA device for root account (not virtual)&lt;/strong&gt; -- Hardware tokens cannot be compromised via malware or phishing (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Remove all root account access keys&lt;/strong&gt; -- Reduces blast radius; root keys have no permission boundaries&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Store root account password in secure offline location&lt;/strong&gt; -- Root access should only be needed for rare account-level changes&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  IAM User &amp;amp; Role Strategy
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Adopt "roles not users" architecture wherever possible&lt;/strong&gt; -- Roles use temporary credentials; users with long-term keys are high-risk targets (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement least privilege principle for all permissions&lt;/strong&gt; -- Users with excessive permissions become high-value targets; limits blast radius (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use IAM policy conditions to restrict by IP/time/device&lt;/strong&gt; -- Adds second layer of defense; prevents access from suspicious locations&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enable MFA for all human users (not just root)&lt;/strong&gt; -- Protects individual user accounts from compromise&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use temporary credentials from STS for cross-account access&lt;/strong&gt; -- Temporary credentials automatically expire; cannot be reused if leaked&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement service control policies (SCPs) as guardrails&lt;/strong&gt; -- Prevents entire categories of dangerous actions across organizational units&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use temporary credentials with session duration limits&lt;/strong&gt; -- Reduces window of exposure if credentials are compromised&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Credential Management
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Rotate IAM access keys every 90 days (automated preferred)&lt;/strong&gt; -- Limits damage window if old credentials are leaked (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enable credential report generation and review quarterly&lt;/strong&gt; -- Identifies unused/old credentials that should be removed (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Disable unused IAM users and keys immediately&lt;/strong&gt; -- Orphaned accounts are forgotten about and become security holes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use AWS Secrets Manager or Parameter Store for sensitive data&lt;/strong&gt; -- Never hardcode credentials in code or configuration files&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement automatic access key rotation for service accounts&lt;/strong&gt; -- Reduces manual effort and human error in credential management&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Require strong password policy (14+ chars, complexity)&lt;/strong&gt; -- Makes brute-force attacks computationally expensive&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Cross-Account &amp;amp; External Access
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Use IAM roles for cross-account access instead of keys&lt;/strong&gt; -- Prevents credential sprawl; temporary credentials are safer (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Document and audit all trust relationships&lt;/strong&gt; -- Rogue trust relationships allow unauthorized access&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use external ID for cross-account role assumption&lt;/strong&gt; -- Prevents unauthorized parties from assuming your role&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement sts:AssumeRole time limits&lt;/strong&gt; -- Expired sessions cannot be reused&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Phase 2: Network Security
&lt;/h2&gt;

&lt;h3&gt;
  
  
  VPC &amp;amp; Subnet Architecture
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Use private subnets for databases and application servers&lt;/strong&gt; -- Prevents direct internet exposure; forces traffic through security layers (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement public/private/database subnet tiers&lt;/strong&gt; -- Network segmentation limits lateral movement if one tier is compromised (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use VPC Flow Logs to monitor all network traffic&lt;/strong&gt; -- Detects unauthorized connections; required for incident investigation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enable VPC Flow Logs to CloudWatch and S3&lt;/strong&gt; -- Provides both real-time alerts and long-term audit trail&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use VPC endpoints for AWS service access (S3, DynamoDB, etc.)&lt;/strong&gt; -- Keeps traffic off internet; prevents data exfiltration over public internet&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement service-to-service communication via service mesh&lt;/strong&gt; -- Enforces mutual TLS authentication between microservices&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Security Groups &amp;amp; NACLs
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Remove any security group rules allowing 0.0.0.0/0 from internet&lt;/strong&gt; -- Exposes services to entire internet; makes systems attack targets (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Restrict database security group to application servers only&lt;/strong&gt; -- Prevents direct database access from internet attackers (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use NACL egress rules to block unexpected outbound traffic&lt;/strong&gt; -- Prevents data exfiltration; detects compromised instances trying to call home&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Document and version control all security group rules&lt;/strong&gt; -- Prevents undocumented/legacy rules; enables audit trail&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement security group chaining (restrict to specific SGs)&lt;/strong&gt; -- More secure than CIDR ranges; auto-scales with environment&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use Security Group Manager tools to prevent rule drift&lt;/strong&gt; -- Catches accidental overly-permissive rules before deployment&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Network Access Control
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Disable default VPC or isolate it&lt;/strong&gt; -- Default VPC has overly permissive default security groups (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use WAF (Web Application Firewall) for public web apps&lt;/strong&gt; -- Blocks common web attacks (SQL injection, XSS, DDoS)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement IP whitelisting for administrative tools&lt;/strong&gt; -- Prevents brute-force attacks on bastion hosts/management interfaces&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use AWS Shield Standard (auto-enabled) and Shield Advanced&lt;/strong&gt; -- Protects against DDoS attacks; critical for public-facing apps&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement network segmentation using private link&lt;/strong&gt; -- Adds zero-trust network access control&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Phase 3: Data Protection &amp;amp; Encryption
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Encryption in Transit
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Enable TLS/HTTPS for all public-facing applications&lt;/strong&gt; -- Prevents eavesdropping on user data; required for compliance (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use HTTPS for all communication between AWS services&lt;/strong&gt; -- Protects against man-in-the-middle attacks within AWS (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use TLS 1.2 minimum (TLS 1.3 preferred)&lt;/strong&gt; -- Older TLS versions have known vulnerabilities&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Disable unencrypted protocols (HTTP, Telnet, FTP)&lt;/strong&gt; -- These protocols send credentials in plaintext&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use certificate pinning for critical APIs&lt;/strong&gt; -- Prevents man-in-the-middle even if certificate authority is compromised&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement mutual TLS (mTLS) between services&lt;/strong&gt; -- Both client and server verify each other's identity&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Encryption at Rest
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Enable default encryption for all S3 buckets&lt;/strong&gt; -- Prevents unencrypted sensitive data storage (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use AWS KMS keys (not S3-managed encryption)&lt;/strong&gt; -- KMS provides key rotation, access auditing, and compliance controls (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enable EBS encryption for all volumes&lt;/strong&gt; -- Protects against data theft if storage is physically accessed (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enable RDS encryption at rest (all engines)&lt;/strong&gt; -- Protects database from theft; required for most compliance standards&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enable DynamoDB encryption at rest&lt;/strong&gt; -- Protects NoSQL data; KMS provides key management&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use customer-managed KMS keys instead of AWS-managed&lt;/strong&gt; -- Gives you control over key rotation and access policies&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement key rotation policy (annual minimum)&lt;/strong&gt; -- Limits damage window if master key is compromised&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Key Management
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Restrict KMS key access with key policies&lt;/strong&gt; -- Prevents unauthorized decryption of encrypted data (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enable CloudTrail logging of KMS operations&lt;/strong&gt; -- Detects unauthorized decryption attempts; required for compliance (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use separate KMS keys for different purposes&lt;/strong&gt; -- Limits blast radius if one key is compromised&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement key policy separation of duties&lt;/strong&gt; -- Requires multiple approvals to decrypt sensitive data&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement KMS key alias naming for clarity&lt;/strong&gt; -- Makes audits easier; prevents use of wrong key&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Secrets Management
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Use AWS Secrets Manager for database passwords&lt;/strong&gt; -- Prevents hardcoded credentials in application code (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enable automatic secret rotation&lt;/strong&gt; -- Limits damage if a secret is compromised&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement secret replication for disaster recovery&lt;/strong&gt; -- Ensures applications can still authenticate after regional failure&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use resource-based policies for secret access&lt;/strong&gt; -- Prevents unauthorized applications from reading secrets&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Phase 4: Storage Security
&lt;/h2&gt;

&lt;h3&gt;
  
  
  S3 Bucket Hardening
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Block all public access at bucket level&lt;/strong&gt; -- Prevents accidental public exposure; easiest way to leak data (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enable versioning on sensitive buckets&lt;/strong&gt; -- Allows recovery from ransomware/accidental deletion (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enable MFA Delete on critical buckets&lt;/strong&gt; -- Prevents even admins from deleting bucket contents without MFA (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use bucket policies to enforce HTTPS only&lt;/strong&gt; -- Prevents unencrypted data transmission (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enable S3 Object Lock (WORM) for compliance archives&lt;/strong&gt; -- Prevents modification of audit logs and compliance records&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use S3 Access Logging to track all bucket access&lt;/strong&gt; -- Detects unauthorized access attempts; required for compliance&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement bucket lifecycle policies&lt;/strong&gt; -- Automatically deletes old data; reduces exposure window&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  S3 Access Control
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Use IAM policies instead of bucket ACLs&lt;/strong&gt; -- IAM policies are more flexible and easier to audit (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Disable S3 "Authenticated Users" group access&lt;/strong&gt; -- Prevents any authenticated AWS user from accessing bucket (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use presigned URLs with expiration for temporary access&lt;/strong&gt; -- Limits exposure window; prevents indefinite access&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use cross-account S3 access with assumed roles&lt;/strong&gt; -- Temporary credentials are more secure than long-term keys&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Phase 5: Compute Security
&lt;/h2&gt;

&lt;h3&gt;
  
  
  EC2 Instance Hardening
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Enforce IMDSv2 only&lt;/strong&gt; -- Prevents SSRF attacks from reading instance credentials (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use Systems Manager Session Manager instead of SSH/RDP&lt;/strong&gt; -- No open ports to internet; audit trail; no key management (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Remove default SSH/RDP security group rules&lt;/strong&gt; -- Prevents brute-force attacks on bastion hosts (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enable detailed monitoring and CloudWatch Agent&lt;/strong&gt; -- Detects anomalous behavior; enables performance baselines&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use Systems Manager Patch Manager for OS updates&lt;/strong&gt; -- Automates patching; reduces manual effort and human error&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement launch templates with security defaults&lt;/strong&gt; -- Ensures all new instances follow security standards&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Container Security (ECS/EKS)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Use container image scanning for vulnerabilities&lt;/strong&gt; -- Detects known CVEs before deployment (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement admission controllers (OPA/Gatekeeper for K8s)&lt;/strong&gt; -- Prevents deployment of non-compliant images (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use private ECR repositories with IAM access control&lt;/strong&gt; -- Prevents pulling of unauthorized images&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sign container images and verify signatures&lt;/strong&gt; -- Prevents tampering; ensures image provenance&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use pod security policies / security standards (Kubernetes)&lt;/strong&gt; -- Prevents privilege escalation inside containers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement network policies to restrict pod-to-pod traffic&lt;/strong&gt; -- Prevents lateral movement if one pod is compromised&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Lambda Security
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Use IAM execution role with minimal permissions&lt;/strong&gt; -- Prevents lateral movement if function is compromised (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Store secrets in Secrets Manager, not environment variables&lt;/strong&gt; -- Environment variables are visible in CloudWatch logs (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enable VPC for Lambda (if accessing private resources)&lt;/strong&gt; -- Keeps function within security perimeter&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement Lambda concurrency limits&lt;/strong&gt; -- Prevents runaway costs from DDoS or malicious invocations&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Phase 6: Database Security
&lt;/h2&gt;

&lt;h3&gt;
  
  
  RDS Hardening
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Place RDS instances in private subnets&lt;/strong&gt; -- Prevents direct internet access; forces traffic through app layer (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use AWS Secrets Manager for database credentials&lt;/strong&gt; -- Prevents hardcoded passwords; enables automatic rotation (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enable automated backups with appropriate retention&lt;/strong&gt; -- Ensures recovery from data loss or corruption (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enable encryption at rest for all RDS instances&lt;/strong&gt; -- Protects data from physical access threats&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enable audit logging&lt;/strong&gt; -- Tracks who accessed what data and when&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The bottom line:&lt;/strong&gt; AWS security isn't a one-time setup. It's a continuous process. Work through this checklist methodically, then schedule quarterly reviews to catch drift. The cost of prevention is always less than the cost of a breach.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If you found this useful, share it with a colleague who needs it. Subscribe for more developer resources every week.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Want the full resource?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://apaksh.gumroad.com/l/rdrudw" rel="noopener noreferrer"&gt;AWS Security Hardening Checklist — $5.99 on Gumroad&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Get the complete, downloadable version. Perfect for bookmarking, printing, or sharing with your team.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://apaksh.gumroad.com/l/rdrudw" rel="noopener noreferrer"&gt;Get it now on Gumroad →&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;If you found this useful, drop a ❤️ and follow for more developer resources every week.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>security</category>
      <category>devops</category>
      <category>cloud</category>
    </item>
    <item>
      <title>The Weekend SEO Audit: A Complete Checklist</title>
      <dc:creator>Apaksh</dc:creator>
      <pubDate>Tue, 17 Mar 2026 10:08:44 +0000</pubDate>
      <link>https://dev.to/apaksh/the-weekend-seo-audit-a-complete-checklist-2l9j</link>
      <guid>https://dev.to/apaksh/the-weekend-seo-audit-a-complete-checklist-2l9j</guid>
      <description>&lt;p&gt;Here's the thing about SEO: most people know they should audit their site, but nobody actually does it because it feels overwhelming. So this weekend, block off a few hours and work through this checklist. You'll be shocked at how many quick wins are hiding in plain sight -- broken links, missing meta descriptions, pages accidentally set to noindex. Each one is costing you traffic right now.&lt;/p&gt;

&lt;p&gt;This checklist covers crawlability, indexation, on-page optimization, technical performance, content quality, link profiles, and user experience factors that directly impact search rankings and organic traffic.&lt;/p&gt;

&lt;h2&gt;
  
  
  Technical Foundation &amp;amp; Crawlability (Critical Priority)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Verify robots.txt file exists and is accessible&lt;/strong&gt; -- Blocks crawlers from wasting time on non-essential pages; affects crawl budget efficiency&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check robots.txt doesn't block important pages&lt;/strong&gt; -- Accidentally blocked content won't rank regardless of quality&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audit XML sitemap(s) exist and are valid&lt;/strong&gt; -- Helps Google discover and prioritize all important pages&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Confirm sitemap is submitted in Google Search Console&lt;/strong&gt; -- Direct notification to Google about your content&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Validate sitemap URL count matches actual indexed pages&lt;/strong&gt; -- Large discrepancies indicate crawlability or indexation issues&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test for duplicate sitemaps or outdated references&lt;/strong&gt; -- Confuses crawlers and wastes resources&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify crawl budget isn't wasted on parameters&lt;/strong&gt; -- Pagination, UTM codes, and session IDs bloat crawl budget&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check for redirect chains (more than 2 hops)&lt;/strong&gt; -- Wastes crawl budget and dilutes authority flow&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audit permanent (301) vs temporary (302) redirects&lt;/strong&gt; -- Wrong redirect type prevents proper authority consolidation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Confirm all redirects point to live, indexable pages&lt;/strong&gt; -- Chains redirecting to 404s waste SEO value&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Disable or test crawl restrictions in robots meta tags&lt;/strong&gt; -- Noindex tags on the wrong pages hide valuable content&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify site uses HTTPS throughout&lt;/strong&gt; -- Insecure sites face ranking penalties and trust issues&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check SSL certificate validity and expiration date&lt;/strong&gt; -- Expired certs break trust signals and crawlability&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Indexation &amp;amp; Visibility (Critical Priority)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Compare Google Search Console indexed pages vs submitted URLs&lt;/strong&gt; -- Large gaps indicate indexation problems&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check for "excluded" pages in Google Search Console&lt;/strong&gt; -- Some exclusions are mistakes that harm visibility&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Review "coverage" issues in Google Search Console&lt;/strong&gt; -- Errors, warnings, and valid pages need separate analysis&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audit pages with "noindex" that should be indexed&lt;/strong&gt; -- Common mistake that kills SEO performance&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify soft 404s are actually returning proper status codes&lt;/strong&gt; -- Soft 404s waste crawl budget on non-existent content&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check for canonicalization issues&lt;/strong&gt; -- Duplicate content pointing to wrong canonical damages rankings&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test mobile-first indexing readiness&lt;/strong&gt; -- Google now indexes mobile version first; mobile issues = ranking issues&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify core web vitals in Search Console&lt;/strong&gt; -- Poor vitals now directly impact rankings&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check for hreflang implementation (if multilingual)&lt;/strong&gt; -- Wrong hreflang causes wrong language versions to rank&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  On-Page Optimization (Critical Priority)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Audit meta titles: 50-60 characters, keyword-focused, unique per page&lt;/strong&gt; -- Titles are the primary ranking factor users see; missing keywords = lost rankings&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Review meta descriptions: 150-160 characters, compelling, unique&lt;/strong&gt; -- Good descriptions boost click-through rate; critical for organic traffic volume&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check H1 tags: one per page, contains primary keyword&lt;/strong&gt; -- H1 signals page topic to search engines; missing/wrong H1 confuses crawlers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audit H2-H6 hierarchy: logical structure, keyword variations&lt;/strong&gt; -- Proper structure helps both crawlers and readability&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify keyword placement in first 100 words&lt;/strong&gt; -- Early keyword appearance strengthens relevance signals&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audit keyword density: natural inclusion without stuffing&lt;/strong&gt; -- Keyword stuffing triggers spam filters and looks unprofessional&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check for target keyword variations throughout content&lt;/strong&gt; -- Variations help capture related searches and improve topical authority&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify internal linking: 3-5 relevant links per page minimum&lt;/strong&gt; -- Each internal link passes authority and helps crawlers discover content&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audit anchor text: descriptive and keyword-relevant&lt;/strong&gt; -- Generic anchor text ("click here") wastes linking opportunity&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check for orphaned pages&lt;/strong&gt; -- Pages with no internal links won't rank; they're invisible to crawlers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify content length: minimum 300 words, ideally 1000+ for competitive keywords&lt;/strong&gt; -- Thin content rarely outranks comprehensive guides&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audit for thin or duplicate content&lt;/strong&gt; -- Duplicates hurt rankings; thin content provides no value to search engines&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check for broken or outdated information&lt;/strong&gt; -- False information harms user trust and freshness signals&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Technical Performance &amp;amp; Core Web Vitals (Important Priority)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Test Largest Contentful Paint (LCP): target &amp;lt;2.5 seconds&lt;/strong&gt; -- Slow page loads reduce rankings and cause visitor abandonment&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audit First Input Delay (FID)/Interaction to Next Paint (INP): &amp;lt;100ms&lt;/strong&gt; -- Poor responsiveness frustrates users and impacts rankings&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check Cumulative Layout Shift (CLS): &amp;lt;0.1&lt;/strong&gt; -- Unexpected layout shifts hurt user experience and rankings&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run PageSpeed Insights analysis&lt;/strong&gt; -- Identifies specific performance bottlenecks&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audit image optimization: proper format, compression, lazy loading&lt;/strong&gt; -- Unoptimized images are the #1 cause of slow pages&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check for render-blocking resources&lt;/strong&gt; -- JavaScript/CSS loaded incorrectly blocks content from displaying&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify server response time (Time to First Byte): &amp;lt;600ms&lt;/strong&gt; -- Slow servers directly impact Core Web Vitals&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test minification of CSS, JavaScript, and HTML&lt;/strong&gt; -- Bloated code increases load times&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check browser caching settings&lt;/strong&gt; -- Proper caching prevents repeat visitors from slow loads&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audit CDN implementation&lt;/strong&gt; -- Global distribution improves speed for international visitors&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Content Quality &amp;amp; Topical Authority (Important Priority)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Assess content freshness: update old articles with current data&lt;/strong&gt; -- Fresh content gets ranking boosts; stale content drops&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audit for E-E-A-T signals: Expertise, Experience, Authoritativeness, Trustworthiness&lt;/strong&gt; -- Google's ranking system heavily weights E-E-A-T&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check author bio/credentials visible&lt;/strong&gt; -- Establishes expertise and builds trust&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify primary keyword difficulty vs current rankings&lt;/strong&gt; -- Targeting keywords you can't realistically rank for wastes resources&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audit topic clusters and pillar pages&lt;/strong&gt; -- Siloed content strategy improves topical authority and rankings&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check for semantic keyword coverage&lt;/strong&gt; -- Related terms help Google understand full topic scope&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Review competitor content: identify gaps in your strategy&lt;/strong&gt; -- Content gaps compared to top competitors mean missed ranking opportunities&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify user intent match for each page&lt;/strong&gt; -- Content misaligned with search intent won't convert or rank&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check for proper content formatting&lt;/strong&gt; -- Bullet points, numbered lists, and white space improve scannability and rankings&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audit multimedia: images, videos, infographics present&lt;/strong&gt; -- Rich media improves engagement and rankings&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Link Profile &amp;amp; Authority (Important Priority)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Audit backlink profile in SEO tool&lt;/strong&gt; -- Your domain authority depends entirely on quality backlinks&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Identify and analyze toxic backlinks&lt;/strong&gt; -- Spammy links can trigger manual penalties&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check for unnatural link patterns&lt;/strong&gt; -- Sudden link spikes or all links from one domain trigger warnings&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify internal link distribution&lt;/strong&gt; -- Homepage, pillar pages, money pages get most links; strategic linking amplifies authority where it matters&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audit for follow vs nofollow ratio&lt;/strong&gt; -- Too many nofollow links waste authority potential&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check for brand mentions without links&lt;/strong&gt; -- Unlinked mentions can be converted to valuable backlinks&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Review referring domain diversity&lt;/strong&gt; -- Links from diverse, authoritative sources carry more weight&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify no suspicious link exchanges or paid links&lt;/strong&gt; -- Violates Google guidelines and can cause penalties&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check for competitor backlink sources&lt;/strong&gt; -- Find easy-win link opportunities they're exploiting&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audit broken internal links pointing to 404s&lt;/strong&gt; -- These waste authority and harm crawlability&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  User Experience &amp;amp; Engagement (Important Priority)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Test mobile responsiveness and layout&lt;/strong&gt; -- Mobile users now represent majority of traffic; mobile issues kill rankings&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify mobile viewport meta tag present&lt;/strong&gt; -- Missing viewport makes mobile sites unreadable&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check for intrusive interstitials or pop-ups&lt;/strong&gt; -- Overly aggressive pop-ups trigger ranking penalties&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audit readability: font size, line spacing, contrast&lt;/strong&gt; -- Poor readability increases bounce rate and hurts rankings&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test form usability and mobile compatibility&lt;/strong&gt; -- Broken forms on mobile lose conversions and hurt user signals&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify footer links are useful, not just SEO manipulation&lt;/strong&gt; -- Footer link spam triggers penalties&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check for auto-playing audio/video&lt;/strong&gt; -- Annoys users and damages UX signals&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audit navigation structure: easy to find important pages&lt;/strong&gt; -- Confusing navigation increases bounce rate&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify breadcrumb implementation&lt;/strong&gt; -- Helps users navigate and improves crawlability&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check for excessive ads above the fold&lt;/strong&gt; -- Ad-heavy pages face ranking penalties&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Structured Data &amp;amp; Rich Snippets (Important Priority)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Verify Schema.org markup is implemented&lt;/strong&gt; -- Helps Google understand content context and enable rich snippets&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audit for errors in structured data&lt;/strong&gt; -- Broken markup provides no benefit; wrong markup can cause penalties&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test rich snippet eligibility for content type&lt;/strong&gt; -- Not all content types support rich snippets; choose relevant ones&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check for Organization schema on homepage&lt;/strong&gt; -- Establishes business credibility and information&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify Product schema with accurate pricing/availability&lt;/strong&gt; -- E-commerce sites need accurate product data&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check for Article schema on blog posts&lt;/strong&gt; -- Enables article previews in search results&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audit LocalBusiness schema (if applicable)&lt;/strong&gt; -- Critical for local SEO visibility&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify FAQ schema markup (if applicable)&lt;/strong&gt; -- Enables FAQ snippets in results&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test structured data markup with Google's Rich Results Test&lt;/strong&gt; -- Validates implementation before deployment&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Quick Wins to Implement Immediately
&lt;/h2&gt;

&lt;p&gt;Based on typical audit findings, these changes deliver the fastest results:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fix all critical Core Web Vitals issues&lt;/strong&gt; -- Guaranteed ranking boost&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Update thin content pages to 1000+ words with better structure&lt;/strong&gt; -- Competes better for rankings&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Improve internal linking to money pages&lt;/strong&gt; -- Concentrates authority where it matters&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fix broken 404s and redirect chains&lt;/strong&gt; -- Recovers wasted authority&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Optimize meta titles and descriptions&lt;/strong&gt; -- Immediate CTR improvements&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement missing schema markup&lt;/strong&gt; -- Enables rich results opportunities&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This checklist should take 20-40 hours depending on site size. Use SEO tools like Semrush, Ahrefs, Screaming Frog, and Google Search Console to automate many checks. Prioritize &lt;strong&gt;Critical&lt;/strong&gt; items first -- they directly prevent rankings. &lt;strong&gt;Important&lt;/strong&gt; items significantly boost performance. Recheck quarterly for new issues.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If you found this useful, share it with a colleague who needs it. Subscribe for more developer resources every week.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Want the full resource?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://apaksh.gumroad.com/l/jxmkc" rel="noopener noreferrer"&gt;SEO Audit Checklist — $5.99 on Gumroad&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Get the complete, downloadable version. Perfect for bookmarking, printing, or sharing with your team.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://apaksh.gumroad.com/l/jxmkc" rel="noopener noreferrer"&gt;Get it now on Gumroad →&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;If you found this useful, drop a ❤️ and follow for more developer resources every week.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>seo</category>
      <category>webdev</category>
      <category>marketing</category>
      <category>beginners</category>
    </item>
    <item>
      <title>The Code Review Checklist Every Engineering Team Needs</title>
      <dc:creator>Apaksh</dc:creator>
      <pubDate>Tue, 17 Mar 2026 10:08:38 +0000</pubDate>
      <link>https://dev.to/apaksh/the-code-review-checklist-every-engineering-team-needs-283d</link>
      <guid>https://dev.to/apaksh/the-code-review-checklist-every-engineering-team-needs-283d</guid>
      <description>&lt;p&gt;Let me be blunt: most code reviews are theatre. Someone glances at the diff, clicks "Approve," and moves on. Then three weeks later, the team is debugging a production incident that would have been caught by a five-minute checklist. I've been on both sides of that failure, and this is the checklist I built to make sure it never happens again.&lt;/p&gt;

&lt;p&gt;This covers functionality, security, performance, maintainability, and documentation -- 10 phases of review that catch critical issues before they reach production. Whether you're reviewing a pull request or establishing code review standards across your team, this guide ensures nothing falls through the cracks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Phase 1: Initial Assessment &amp;amp; Scope
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Review PR/MR title and description&lt;/strong&gt; -- Unclear descriptions lead to misaligned reviews and wasted time (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify branch name follows team conventions&lt;/strong&gt; -- Consistent naming prevents confusion and aids searchability&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check that PR is linked to relevant issues/tickets&lt;/strong&gt; -- Traceability is essential for project tracking and accountability&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Confirm scope is reasonable for single PR&lt;/strong&gt; -- Large PRs are harder to review, delay merges, and increase bug risk&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify no unrelated changes are included&lt;/strong&gt; -- Scope creep makes it impossible to trace issues to specific changes (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check that code is based on current main/master&lt;/strong&gt; -- Stale branches risk merge conflicts and outdated dependencies&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Identify any files that shouldn't be changed&lt;/strong&gt; -- Accidental changes to config, lock files, or binaries cause production issues (CRITICAL)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Phase 2: Functionality &amp;amp; Logic
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Understand the intended functionality&lt;/strong&gt; -- You can't review code you don't understand; ask questions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify logic implements the requirements correctly&lt;/strong&gt; -- The code may work but not do what was actually requested (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check for edge cases and boundary conditions&lt;/strong&gt; -- Off-by-one errors, null checks, and empty collections cause production incidents (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Look for infinite loops or recursion issues&lt;/strong&gt; -- Stack overflow and hung processes take down systems (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify error handling for all operations&lt;/strong&gt; -- Unhandled exceptions crash applications; check try/catch blocks (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Confirm exception types are specific, not generic&lt;/strong&gt; -- Catching Exception or BaseException masks real problems&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check for missing null/empty checks&lt;/strong&gt; -- NullPointerException is the most common production bug (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify return values are used or intentionally ignored&lt;/strong&gt; -- Ignoring return values often indicates logic errors&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Look for TODO, FIXME, or XXX comments&lt;/strong&gt; -- These indicate incomplete work that shouldn't be merged (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify control flow is clear and not unnecessarily complex&lt;/strong&gt; -- Complex logic is hard to test, debug, and maintain&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check that loops terminate correctly&lt;/strong&gt; -- Infinite loops with no exit conditions halt systems (CRITICAL)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Phase 3: Security Vulnerabilities
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Scan for hardcoded credentials or secrets&lt;/strong&gt; -- Exposed secrets lead to unauthorized access and data breaches (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check for SQL injection vulnerabilities&lt;/strong&gt; -- Always use parameterized queries; string concatenation is dangerous (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify no direct user input is executed&lt;/strong&gt; -- Code injection (command, code, template) is catastrophic (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check authentication and authorization logic&lt;/strong&gt; -- Broken access control is in OWASP top 10 (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Look for sensitive data in logs or error messages&lt;/strong&gt; -- PII, tokens, and passwords in logs are security breaches (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify cryptographic operations use approved algorithms&lt;/strong&gt; -- Custom or deprecated crypto is vulnerable to attacks (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check for proper use of HTTPS/TLS&lt;/strong&gt; -- Unencrypted transmission exposes sensitive data&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify input validation and sanitization&lt;/strong&gt; -- All external input can be malicious; validate everything (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check for XXE (XML External Entity) vulnerabilities&lt;/strong&gt; -- XML parsing without safeguards allows file access attacks&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Look for CSRF protection on state-changing operations&lt;/strong&gt; -- Unprotected forms allow cross-site attacks&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify no debugging code left in production paths&lt;/strong&gt; -- Debug code exposes internals and creates backdoors (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check permissions on temporary files or directories&lt;/strong&gt; -- World-readable temp files leak sensitive data&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Phase 4: Performance &amp;amp; Scalability
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Check for N+1 query problems&lt;/strong&gt; -- Queries in loops cause exponential database load (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify database queries are indexed appropriately&lt;/strong&gt; -- Full table scans cause performance degradation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Look for unnecessary data fetches or loops&lt;/strong&gt; -- Loading more data than needed wastes memory and bandwidth&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check for missing caching opportunities&lt;/strong&gt; -- Redundant computation drains resources&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify no blocking operations in async/event code&lt;/strong&gt; -- Blocking calls in async code freeze the event loop (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check algorithm complexity (O(n), O(n^2), etc.)&lt;/strong&gt; -- Quadratic algorithms fail at scale&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Look for memory leaks (event listeners, references)&lt;/strong&gt; -- Unreleased resources eventually cause out-of-memory errors (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify large collections aren't held longer than needed&lt;/strong&gt; -- Retained data structures cause garbage collection pauses&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check for unnecessary regex operations&lt;/strong&gt; -- Complex regex against large strings is CPU-intensive&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Phase 5: Code Quality &amp;amp; Maintainability
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Verify code follows team style guide&lt;/strong&gt; -- Consistency aids readability; inconsistent code confuses reviewers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check variable and function names are clear&lt;/strong&gt; -- Unclear names require comments; comments can drift from code&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Confirm functions have single responsibility&lt;/strong&gt; -- Functions doing multiple things are hard to test and debug&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify function/method length is reasonable&lt;/strong&gt; -- Functions &amp;gt;50 lines are hard to understand and test&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check for code duplication (DRY principle)&lt;/strong&gt; -- Duplicated code causes inconsistent bugs and high maintenance cost&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Look for magic numbers or strings&lt;/strong&gt; -- Named constants explain intent better than numbers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify comments explain WHY, not WHAT&lt;/strong&gt; -- Code shows what it does; comments should explain business logic&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check for dead or unreachable code&lt;/strong&gt; -- Dead code confuses maintainers and creates false test coverage&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify imports are used&lt;/strong&gt; -- Unused imports clutter code and slow compilation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Look for overly complex conditional logic&lt;/strong&gt; -- Nested ifs should be refactored into guard clauses or helper functions&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Phase 6: Testing &amp;amp; Test Coverage
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Verify new code has unit tests&lt;/strong&gt; -- Untested code breaks unexpectedly in production (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check test names clearly describe what they test&lt;/strong&gt; -- Good test names are documentation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Confirm tests cover happy path&lt;/strong&gt; -- Obvious cases must work correctly&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify edge cases and error conditions are tested&lt;/strong&gt; -- Bugs hide in boundary conditions (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Look for brittle tests (overly specific mocks)&lt;/strong&gt; -- Tests that break with minor refactors waste time&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check that tests are deterministic&lt;/strong&gt; -- Flaky tests undermine confidence in the entire test suite (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify no test data relies on external systems&lt;/strong&gt; -- Tests dependent on APIs or databases are slow and unreliable&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Confirm mocks/stubs are appropriate&lt;/strong&gt; -- Over-mocking tests the mock, not the code&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check test readability (Arrange/Act/Assert)&lt;/strong&gt; -- Hard to understand tests don't catch regressions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify code coverage hasn't decreased&lt;/strong&gt; -- Coverage gaps accumulate over time&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Phase 7: Dependencies &amp;amp; Compatibility
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Check for new or updated dependencies&lt;/strong&gt; -- Vulnerable dependencies are security risks (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify dependency versions are locked appropriately&lt;/strong&gt; -- Version mismatches cause "works on my machine" bugs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Look for deprecated API usage&lt;/strong&gt; -- Deprecated code breaks in future versions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Confirm no breaking changes to public APIs&lt;/strong&gt; -- Breaking changes require major version bumps (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check backward compatibility if needed&lt;/strong&gt; -- Incompatible changes break downstream consumers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify node/Python/runtime versions are compatible&lt;/strong&gt; -- Version mismatches cause cryptic failures in production&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Phase 8: Documentation &amp;amp; Communication
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Verify code changes are documented&lt;/strong&gt; -- Undocumented changes confuse future maintainers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check README or docs are updated if needed&lt;/strong&gt; -- Docs that don't match code cause wasted debugging time&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Confirm API changes have proper documentation&lt;/strong&gt; -- Consumers need to know how to use new/changed APIs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Look for clear commit messages&lt;/strong&gt; -- Good commit messages aid debugging via git blame&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify no sensitive information in comments&lt;/strong&gt; -- Code comments are visible to everyone with repo access (CRITICAL)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Phase 9: Deployment &amp;amp; Operations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Check if migrations or schema changes are included&lt;/strong&gt; -- Database changes need rollback plans (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify configuration changes are documented&lt;/strong&gt; -- Ops teams need to know about new env variables&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Look for any breaking changes to APIs/endpoints&lt;/strong&gt; -- Breaking changes need coordinated deployments (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Confirm feature flags are used for risky changes&lt;/strong&gt; -- Flags allow safe rollback if issues arise&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check if monitoring/logging was added&lt;/strong&gt; -- New features should be observable in production&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify no hardcoded environment-specific values&lt;/strong&gt; -- Hardcoded config paths/URLs break across environments (CRITICAL)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Phase 10: Final Sign-Off
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;All blocking issues have been addressed&lt;/strong&gt; -- Don't approve with open critical comments (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Confirm you would support this code in production&lt;/strong&gt; -- If you wouldn't debug it at 3am, don't approve it&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Request changes, request review, or approve&lt;/strong&gt; -- Use platform features correctly; unclear status blocks merges (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add specific comments if requesting changes&lt;/strong&gt; -- Vague feedback frustrates developers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Acknowledge good code with praise&lt;/strong&gt; -- Recognition motivates quality contributions&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Review Speed Tips
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;5 min review&lt;/strong&gt; -- Focus on Phase 1 + CRITICAL items&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;15 min review&lt;/strong&gt; -- All CRITICAL items + sample of IMPORTANT items&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;30+ min review&lt;/strong&gt; -- Complete checklist for high-risk areas (auth, payments, data access)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Anti-Patterns to Avoid
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Approving without actually running/testing the code&lt;/li&gt;
&lt;li&gt;Requesting changes on style only when logic is more important&lt;/li&gt;
&lt;li&gt;Letting PRs sit for weeks without review&lt;/li&gt;
&lt;li&gt;Rubber-stamping changes from senior developers&lt;/li&gt;
&lt;li&gt;Reviews longer than 30 minutes (sign of too-large PR)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pro Tip:&lt;/strong&gt; Use this checklist as your team's standard. Consistency compounds -- after 2-3 weeks, these reviews become faster and catch more issues because everyone knows what's coming.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If you found this useful, share it with a colleague who needs it. Subscribe for more developer resources every week.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Want the full resource?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://apaksh.gumroad.com/l/efcxp" rel="noopener noreferrer"&gt;Code Review Checklist — $5.99 on Gumroad&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Get the complete, downloadable version. Perfect for bookmarking, printing, or sharing with your team.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://apaksh.gumroad.com/l/efcxp" rel="noopener noreferrer"&gt;Get it now on Gumroad →&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;If you found this useful, drop a ❤️ and follow for more developer resources every week.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>codereview</category>
      <category>programming</category>
      <category>bestpractices</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>The Freelance Project Kickoff Checklist That Prevents Disasters</title>
      <dc:creator>Apaksh</dc:creator>
      <pubDate>Tue, 17 Mar 2026 10:03:20 +0000</pubDate>
      <link>https://dev.to/apaksh/the-freelance-project-kickoff-checklist-that-prevents-disasters-862</link>
      <guid>https://dev.to/apaksh/the-freelance-project-kickoff-checklist-that-prevents-disasters-862</guid>
      <description>&lt;p&gt;Every freelancer has a horror story. The client who ghosted on payment. The project that ballooned to triple the original scope. The "quick fix" that turned into three months of unpaid revisions. I've been there, and I built this checklist so you never have to be. Run through it before you start &lt;em&gt;any&lt;/em&gt; project, and you'll dodge the disasters that sink freelance businesses.&lt;/p&gt;

&lt;p&gt;This comprehensive checklist covers client management, scope definition, timeline establishment, financial arrangements, and legal protections. Systematically address each element before work begins, and you'll set the foundation for a professional, profitable engagement.&lt;/p&gt;

&lt;h2&gt;
  
  
  Client &amp;amp; Project Definition
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Initial Agreement Phase
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Schedule comprehensive discovery call&lt;/strong&gt; -- Prevents misalignment on expectations; clarify project vision before committing (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Document all client requirements in writing&lt;/strong&gt; -- Protects both parties; creates legal trail of agreed scope (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Identify decision-maker and primary contact&lt;/strong&gt; -- Streamlines communication; prevents mixed messaging from multiple stakeholders (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Confirm project goals and success metrics&lt;/strong&gt; -- You can't deliver success without knowing what it looks like&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Establish client communication preferences&lt;/strong&gt; -- Sets tone for responsiveness; prevents frustration over slow replies&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ask about previous vendor experiences (positive &amp;amp; negative)&lt;/strong&gt; -- Insights into client expectations; learn what to avoid&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Clarify decision-making process and approval authority&lt;/strong&gt; -- Prevents delays from unexpected approval chains&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Scope &amp;amp; Deliverables
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Scope Documentation Phase
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Create detailed written project scope&lt;/strong&gt; -- Foundation of entire engagement; referenced when disputes arise (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Define all deliverables with specific formats &amp;amp; specifications&lt;/strong&gt; -- Prevents "I expected something different" conflicts (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;List what's explicitly OUT of scope&lt;/strong&gt; -- Prevents scope creep; client knows exactly what they're not getting (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Get scope approval signature (email counts)&lt;/strong&gt; -- Legal protection; proves client agreed to boundaries (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Define revision limits &amp;amp; change request process&lt;/strong&gt; -- Prevents unlimited revisions that eat profits&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Establish process for scope modifications&lt;/strong&gt; -- Creates paper trail for change orders and additional fees&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Document technical requirements/constraints&lt;/strong&gt; -- Prevents technical surprises mid-project&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Identify any dependencies on client materials/information&lt;/strong&gt; -- Sets expectations on client responsibility; prevents timeline delays&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Confirm brand guidelines, templates, or style references&lt;/strong&gt; -- Reduces back-and-forth on design/voice expectations&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Timeline &amp;amp; Milestones
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Schedule Development Phase
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Set realistic project deadline&lt;/strong&gt; -- Protects your capacity; prevents burnout from overcommitment (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Break project into measurable milestones&lt;/strong&gt; -- Creates checkpoints; identifies delays early&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Assign dates to each milestone with buffer time&lt;/strong&gt; -- Buffers account for unexpected delays; keeps you credible&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Define deliverable due dates for client materials&lt;/strong&gt; -- Your timeline depends on their input; prevents blame shifting&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Schedule review/feedback deadline for each phase&lt;/strong&gt; -- Prevents indefinite feedback loops&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Confirm client availability (vacations, blackout dates)&lt;/strong&gt; -- Avoids timeline conflicts due to client unavailability&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Create project timeline document and share with client&lt;/strong&gt; -- Visual reference; reduces "when will it be done?" questions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build in contingency time (typically 15-20% of timeline)&lt;/strong&gt; -- Absorbs unexpected issues without deadline collapse&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Establish communication frequency for status updates&lt;/strong&gt; -- Sets expectations; prevents "radio silence" complaints&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Financial Arrangements
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Payment &amp;amp; Budget Phase
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Calculate total project cost with hourly/flat rate&lt;/strong&gt; -- Determines project profitability; influences resource allocation (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Document payment terms in writing&lt;/strong&gt; -- Prevents payment disputes; legal reference point (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Specify payment schedule (deposit, milestones, final)&lt;/strong&gt; -- Protects cash flow; standard practice is 50% upfront (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Set deposit amount (25-50% recommended)&lt;/strong&gt; -- Secures commitment; covers initial costs (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Define invoice due date (net 15/30)&lt;/strong&gt; -- Clarifies payment expectations; standard for professional services&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Confirm payment method &amp;amp; account details&lt;/strong&gt; -- Prevents payment delays due to incorrect banking info&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Establish late payment policy &amp;amp; penalties&lt;/strong&gt; -- Incentivizes on-time payment; protects cash flow&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Document hourly rate (if applicable) for additional work&lt;/strong&gt; -- Creates pricing reference for change orders&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Create formal invoice template with your business details&lt;/strong&gt; -- Professional appearance; includes legal business identification&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Clarify currency (if international client)&lt;/strong&gt; -- Prevents currency conversion disputes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Confirm no payment contingent on client's payment from their client&lt;/strong&gt; -- You're not their debt collector; protects your cash flow&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Legal &amp;amp; Contracts
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Agreement &amp;amp; Protection Phase
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Have written contract signed by both parties&lt;/strong&gt; -- Only legal protection if dispute arises; proves terms agreed upon (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Include intellectual property (IP) ownership clause&lt;/strong&gt; -- Clarifies who owns final deliverables; prevents IP disputes (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Specify confidentiality requirements&lt;/strong&gt; -- Protects both parties; standard business practice&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Include limitation of liability clause&lt;/strong&gt; -- Protects you from disproportionate damages claims&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Define termination clauses &amp;amp; exit fees&lt;/strong&gt; -- Protects income if client cancels early; establishes fair process&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Clarify warranty/support period post-delivery&lt;/strong&gt; -- Prevents indefinite support obligations; defines what's included&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Include force majeure clause&lt;/strong&gt; -- Protects you from liability during unforeseen circumstances&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Get contract reviewed by lawyer (if high-value)&lt;/strong&gt; -- Professional review catches liability gaps; protects significant contracts&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Resource &amp;amp; Team Setup
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Operational Readiness Phase
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Allocate dedicated time blocks to this project&lt;/strong&gt; -- Prevents over-scheduling; ensures quality work&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Identify tools/software needed for deliverables&lt;/strong&gt; -- Ensures you have required access before project starts&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Obtain any software licenses or accounts needed&lt;/strong&gt; -- Prevents workflow interruptions; budget costs accordingly&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Identify if subcontractors/team members are needed&lt;/strong&gt; -- Plans resource needs; prevents delivery delays&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Confirm subcontractor availability &amp;amp; rates&lt;/strong&gt; -- Affects project profitability; ensures coverage&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Create project workspace (folder structure, shared docs)&lt;/strong&gt; -- Organizes files; streamlines collaboration&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Set up time tracking system (if hourly project)&lt;/strong&gt; -- Accurate billing; provides data for future estimates&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Client Handoff &amp;amp; Onboarding
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Launch Readiness Phase
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Send project kickoff email summarizing all agreements&lt;/strong&gt; -- Confirms mutual understanding; creates written record&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Provide client with your availability/contact information&lt;/strong&gt; -- Sets communication expectations; reduces confusion&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Share project timeline document with key dates&lt;/strong&gt; -- Visual reference; reduces ongoing "when will it be done?" questions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Request all initial materials/assets from client&lt;/strong&gt; -- Can't start without foundational materials; establishes their responsibility (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Provide checklist of what you need from client&lt;/strong&gt; -- Clarifies their deliverables; prevents delays waiting for info&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Establish feedback submission process&lt;/strong&gt; -- Streamlines revision requests; prevents scattered feedback&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Create shared project management system access&lt;/strong&gt; -- Transparency; reduces status update requests&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Schedule first milestone review meeting&lt;/strong&gt; -- Alignment checkpoint; catches issues early&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Risk Mitigation &amp;amp; Documentation
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Identify potential project risks&lt;/strong&gt; -- Proactive planning prevents crisis management&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Create contingency plan for high-risk items&lt;/strong&gt; -- Demonstrates professionalism; shows you've thought it through&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Document any assumptions you're making&lt;/strong&gt; -- Prevents disputes over "I thought you meant..." scenarios&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Get client sign-off on project assumptions in writing&lt;/strong&gt; -- Legal protection if assumptions prove wrong&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Back up contract &amp;amp; scope documents in secure location&lt;/strong&gt; -- Protects against loss of critical agreements&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Quality &amp;amp; Expectations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Define quality standards &amp;amp; acceptance criteria&lt;/strong&gt; -- Prevents disputes over what constitutes "finished"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Confirm number of revision rounds included&lt;/strong&gt; -- Prevents unlimited revisions that destroy profitability (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Establish process for revision requests beyond included rounds&lt;/strong&gt; -- Additional revisions = additional fees; protects your time&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Clarify what happens if client is unhappy with final deliverable&lt;/strong&gt; -- Prevents disputes over "I expected something different"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Define final approval process&lt;/strong&gt; -- Clarifies when work is actually "done"&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Quick Reference: Critical Items
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Must complete before starting any work:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Signed contract with scope &amp;amp; payment terms&lt;/li&gt;
&lt;li&gt;Clear deliverables definition (what's in/out)&lt;/li&gt;
&lt;li&gt;Payment received (at least deposit)&lt;/li&gt;
&lt;li&gt;All client materials received&lt;/li&gt;
&lt;li&gt;Timeline and milestones documented&lt;/li&gt;
&lt;li&gt;Revision limits &amp;amp; change process defined&lt;/li&gt;
&lt;li&gt;Contact &amp;amp; communication preferences confirmed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;This checklist prevents the top 3 freelance disasters:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Scope creep&lt;/strong&gt; (via clear scope + revision limits)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Missed deadlines&lt;/strong&gt; (via timeline + milestones + buffers)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Payment disputes&lt;/strong&gt; (via contract + payment schedule + deposit)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pro Tip:&lt;/strong&gt; Save this checklist as a template. Use it for every project. Adapt items for your specific service type. The consistency will dramatically reduce your project friction over time.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If you found this useful, share it with a colleague who needs it. Subscribe for more developer resources every week.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Want the full resource?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://apaksh.gumroad.com/l/oaffn" rel="noopener noreferrer"&gt;Freelance Kickoff Checklist — $5.99 on Gumroad&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Get the complete, downloadable version. Perfect for bookmarking, printing, or sharing with your team.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://apaksh.gumroad.com/l/oaffn" rel="noopener noreferrer"&gt;Get it now on Gumroad →&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;If you found this useful, drop a ❤️ and follow for more developer resources every week.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>freelancing</category>
      <category>career</category>
      <category>productivity</category>
      <category>beginners</category>
    </item>
    <item>
      <title>The SaaS Launch Checklist That Actually Works</title>
      <dc:creator>Apaksh</dc:creator>
      <pubDate>Tue, 17 Mar 2026 10:03:14 +0000</pubDate>
      <link>https://dev.to/apaksh/the-saas-launch-checklist-that-actually-works-1hd7</link>
      <guid>https://dev.to/apaksh/the-saas-launch-checklist-that-actually-works-1hd7</guid>
      <description>&lt;p&gt;I've helped launch over a dozen SaaS products, and the ones that went smoothly all had one thing in common: a checklist. Not a vague "get things ready" list, but a phase-by-phase, nothing-falls-through-the-cracks checklist. Today, I'm sharing the exact one I use. Bookmark this, print it, and thank me later.&lt;/p&gt;

&lt;p&gt;This checklist covers &lt;strong&gt;65 critical tasks&lt;/strong&gt; across pre-launch, launch, and post-launch phases. It's designed to prevent the costly mistakes that sink launches: poor positioning, inadequate infrastructure, weak marketing, and customer support gaps.&lt;/p&gt;

&lt;h2&gt;
  
  
  Phase 1: Pre-Launch Preparation (8-12 Weeks Before)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Product &amp;amp; Feature Readiness
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Finalize core feature set&lt;/strong&gt; -- Define MVP scope clearly; cut scope creep (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Conduct internal QA testing&lt;/strong&gt; -- Test all critical user flows end-to-end (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Set up staging environment&lt;/strong&gt; -- Mirror production for realistic testing (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Document all features&lt;/strong&gt; -- Create internal knowledge base for support team&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test payment processing&lt;/strong&gt; -- Verify transactions work across all payment methods (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify API stability&lt;/strong&gt; -- Load test to 2x expected launch day traffic (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test integrations&lt;/strong&gt; -- Confirm all third-party integrations work reliably&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Set up error monitoring&lt;/strong&gt; -- Deploy Sentry/Datadog before launch day (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Create account recovery flows&lt;/strong&gt; -- Document password reset, account deletion, support escalation&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Compliance &amp;amp; Legal
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Complete SOC 2 compliance&lt;/strong&gt; -- Or outline timeline to compliance (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Finalize Terms of Service&lt;/strong&gt; -- Legal review completed (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Create Privacy Policy&lt;/strong&gt; -- GDPR/CCPA compliant (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Document data security practices&lt;/strong&gt; -- Customers will ask&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Review insurance needs&lt;/strong&gt; -- E&amp;amp;O, cyber liability coverage confirmed&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Establish refund/cancellation policy&lt;/strong&gt; -- Clear, fair terms in writing (CRITICAL)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Infrastructure &amp;amp; Security
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Set up production database backups&lt;/strong&gt; -- Automated daily backups + testing (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Configure CDN&lt;/strong&gt; -- For fast global content delivery&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement DDoS protection&lt;/strong&gt; -- CloudFlare or similar&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Set up SSL/TLS certificates&lt;/strong&gt; -- All traffic encrypted (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test disaster recovery&lt;/strong&gt; -- Can you restore from backups? (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Configure uptime monitoring&lt;/strong&gt; -- StatusPage or equivalent (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lock down API authentication&lt;/strong&gt; -- Rate limiting, token expiration configured (CRITICAL)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Marketing Foundation
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Develop messaging framework&lt;/strong&gt; -- Core value prop, positioning, differentiation clear (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Create sales one-sheet&lt;/strong&gt; -- 1-page overview for sales calls&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build landing page&lt;/strong&gt; -- Conversion-optimized, includes pricing and CTA (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prepare email templates&lt;/strong&gt; -- Welcome series, onboarding, feature announcements&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Design product screenshots&lt;/strong&gt; -- Show key features, use cases&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Create demo video&lt;/strong&gt; -- 2-3 minute walkthrough&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Plan PR strategy&lt;/strong&gt; -- Media list, talking points, embargo dates&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prepare launch announcement&lt;/strong&gt; -- Blog post, social, email copy drafted (CRITICAL)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Phase 2: Launch Preparation (4-8 Weeks Before)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Sales &amp;amp; Support Setup
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Build support knowledge base&lt;/strong&gt; -- FAQ, common issues, troubleshooting guides (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Set up support channels&lt;/strong&gt; -- Email, chat, support ticket system (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Create onboarding sequence&lt;/strong&gt; -- In-app guidance, email follow-ups&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Train support team&lt;/strong&gt; -- Everyone knows product deeply (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Set response time SLAs&lt;/strong&gt; -- Document expectations&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Create sales collateral&lt;/strong&gt; -- Case studies, ROI calculator if applicable&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Plan customer success team structure&lt;/strong&gt; -- Who owns which customers?&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Website &amp;amp; Digital Presence
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Launch company website&lt;/strong&gt; -- Professional, branded, mobile-responsive (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Set up blog&lt;/strong&gt; -- Ready to publish launch content&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Create social media accounts&lt;/strong&gt; -- LinkedIn, Twitter, relevant platforms&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify email deliverability&lt;/strong&gt; -- SPF, DKIM, DMARC configured (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Set up analytics&lt;/strong&gt; -- Google Analytics, product analytics tool (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Create status page&lt;/strong&gt; -- Public uptime/incident communication&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify domain DNS&lt;/strong&gt; -- All records correct (CRITICAL)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Launch Operations
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Create launch timeline&lt;/strong&gt; -- Hour-by-hour plan for launch day (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Designate launch commander&lt;/strong&gt; -- One person managing day-of (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Brief all teams&lt;/strong&gt; -- Marketing, sales, support, engineering on timing (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prepare launch monitoring setup&lt;/strong&gt; -- Real-time dashboards visible to team (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Plan communication channels&lt;/strong&gt; -- Slack channel, war room, escalation path (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Create rollback plan&lt;/strong&gt; -- Steps to revert if critical issues occur (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Notify key partners&lt;/strong&gt; -- Integration partners aware of launch timing&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Phase 3: Launch Week
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Pre-Launch Day (48-24 Hours)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Final QA pass&lt;/strong&gt; -- Test happy path + edge cases one more time (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify all monitoring is live&lt;/strong&gt; -- Uptime, errors, performance dashboards active (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Load test production&lt;/strong&gt; -- Simulate expected traffic surge (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Confirm DNS propagation&lt;/strong&gt; -- All regions resolve correctly (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Brief team on schedule&lt;/strong&gt; -- Everyone knows exact timing (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prepare communication templates&lt;/strong&gt; -- Status updates, error messages pre-written&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Schedule social posts&lt;/strong&gt; -- Queue launch announcements&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Notify user list&lt;/strong&gt; -- Email beta users/early access group&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Launch Day Execution
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Monitor error rates&lt;/strong&gt; -- Check every 15 minutes first 2 hours (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monitor database performance&lt;/strong&gt; -- Connections, query times, locks (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check payment processing&lt;/strong&gt; -- Verify transactions processing successfully (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Publish launch announcement&lt;/strong&gt; -- Blog post, emails, social (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Activate marketing campaigns&lt;/strong&gt; -- Paid ads, email sequences launch&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monitor support channels&lt;/strong&gt; -- Immediate response to critical issues (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Track sign-up funnel&lt;/strong&gt; -- Conversion metrics visible&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monitor customer feedback&lt;/strong&gt; -- Twitter, reviews, support tickets&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Post-Launch Week
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Daily standup with leadership&lt;/strong&gt; -- Review metrics, issues, responses (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Weekly customer outreach&lt;/strong&gt; -- Personal emails/calls to early customers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rapid response to bugs&lt;/strong&gt; -- Fix and deploy critical issues within hours (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Document lessons learned&lt;/strong&gt; -- What worked, what didn't&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Plan first feature release&lt;/strong&gt; -- Based on early feedback&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Phase 4: Post-Launch (First 30 Days)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Customer Success
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Personal onboarding for key accounts&lt;/strong&gt; -- Ensure they succeed (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gather customer feedback&lt;/strong&gt; -- Calls, surveys, usage data analysis (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monitor churn early warning signs&lt;/strong&gt; -- Low engagement = at-risk customers (CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Celebrate customer wins publicly&lt;/strong&gt; -- Social proof reinforcement&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Operations &amp;amp; Learning
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Publish launch retrospective&lt;/strong&gt; -- Internal lessons documented&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Optimize onboarding flow&lt;/strong&gt; -- Based on actual user behavior&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Review and refine pricing&lt;/strong&gt; -- Watch for price sensitivity signals&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Plan roadmap sprints&lt;/strong&gt; -- Prioritize based on customer feedback&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Success Metrics to Track
&lt;/h2&gt;

&lt;p&gt;Monitor these throughout your launch:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Uptime/availability&lt;/strong&gt; (target: 99.9%)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sign-up conversion rate&lt;/strong&gt; (baseline: 2-5%)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Critical bug reports&lt;/strong&gt; (target: 0 within 48 hours)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Payment success rate&lt;/strong&gt; (target: 99%+)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Support response time&lt;/strong&gt; (target: &amp;lt;2 hours)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Early customer satisfaction&lt;/strong&gt; (NPS target: 40+)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Use this checklist to systematically de-risk your launch.&lt;/strong&gt; Missing items in Phases 1-2 often lead to crisis management on launch day. The earlier you complete these tasks, the smoother your launch will be.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If you found this useful, share it with a colleague who needs it. Subscribe for more developer resources every week.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Want the full resource?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://apaksh.gumroad.com/l/oibmi" rel="noopener noreferrer"&gt;SaaS Launch Checklist — $5.99 on Gumroad&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Get the complete, downloadable version. Perfect for bookmarking, printing, or sharing with your team.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://apaksh.gumroad.com/l/oibmi" rel="noopener noreferrer"&gt;Get it now on Gumroad →&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;If you found this useful, drop a ❤️ and follow for more developer resources every week.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>saas</category>
      <category>startup</category>
      <category>productivity</category>
      <category>beginners</category>
    </item>
    <item>
      <title>How to Build a Side Income as a Developer Without Burning Out</title>
      <dc:creator>Apaksh</dc:creator>
      <pubDate>Tue, 17 Mar 2026 09:49:15 +0000</pubDate>
      <link>https://dev.to/apaksh/how-to-build-a-side-income-as-a-developer-without-burning-out-1id6</link>
      <guid>https://dev.to/apaksh/how-to-build-a-side-income-as-a-developer-without-burning-out-1id6</guid>
      <description>&lt;p&gt;Most developers who try to build side income fail — not because they lack skills, but because they treat their side projects like a second full-time job. The difference between burning out after three months and building something sustainable comes down to a handful of architectural decisions about how you spend your time and energy.&lt;/p&gt;

&lt;p&gt;This isn't another "just freelance on Upwork" article. We're going to break down concrete income streams that leverage your existing technical skills, with realistic time estimates and strategies to keep your primary job performance intact while building something on the side.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Developers Are Uniquely Positioned (But Also Uniquely Vulnerable)
&lt;/h2&gt;

&lt;p&gt;You already own a highly monetizable skill set. The problem is that you're also wired to over-engineer things. A designer might ship a template in a weekend. A developer will spend three weekends building a custom storefront, a CLI tool to manage it, a deployment pipeline, and a Slack bot to notify them of sales — and never actually sell anything.&lt;/p&gt;

&lt;p&gt;The first rule of side income without burnout: &lt;strong&gt;your side project is a product business, not an engineering exercise.&lt;/strong&gt; Resist the urge to build infrastructure. Embrace boring, proven tools. Ship fast, then optimize.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Four Income Categories Worth Your Time
&lt;/h2&gt;

&lt;p&gt;Before writing a single line of code, understand which category you're targeting:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Category&lt;/th&gt;
&lt;th&gt;Startup Time&lt;/th&gt;
&lt;th&gt;Earning Ceiling&lt;/th&gt;
&lt;th&gt;Burnout Risk&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Freelancing&lt;/td&gt;
&lt;td&gt;Low&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Digital Products&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Low&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Content (Writing/Video)&lt;/td&gt;
&lt;td&gt;Low&lt;/td&gt;
&lt;td&gt;Medium-High&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SaaS / Micro-SaaS&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Very High&lt;/td&gt;
&lt;td&gt;Very High&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For most developers, &lt;strong&gt;digital products and content&lt;/strong&gt; hit the sweet spot of reasonable startup time and sustainable ongoing effort. Freelancing pays well but trades time directly for money — you're just creating a second job. Full SaaS without a team is a burnout factory.&lt;/p&gt;




&lt;h2&gt;
  
  
  Strategy 1: Sell What You Already Know — Digital Products
&lt;/h2&gt;

&lt;p&gt;The fastest path to passive income for a developer is packaging existing knowledge into something people can buy without your ongoing involvement.&lt;/p&gt;

&lt;h3&gt;
  
  
  What to Build
&lt;/h3&gt;

&lt;p&gt;Think about problems you've solved in the last six months at work:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A Bash/Python script that saved your team hours?&lt;/li&gt;
&lt;li&gt;A boilerplate setup you keep copy-pasting across projects?&lt;/li&gt;
&lt;li&gt;A configuration pattern for a tool people always misconfigure?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are products. Real ones. People pay for exactly this.&lt;/p&gt;

&lt;h3&gt;
  
  
  Practical Example: Selling a Developer Template
&lt;/h3&gt;

&lt;p&gt;Here's a realistic scenario: you've built a production-ready Next.js + Prisma + Auth.js starter template that you use on every contract. Instead of letting it sit in a private repo, you productize it.&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="c"&gt;# Your project structure becomes a sellable asset&lt;/span&gt;
nextjs-saas-starter/
├── src/
│   ├── app/
│   │   ├── &lt;span class="o"&gt;(&lt;/span&gt;auth&lt;span class="o"&gt;)&lt;/span&gt;/
│   │   │   ├── login/page.tsx
│   │   │   └── register/page.tsx
│   │   ├── &lt;span class="o"&gt;(&lt;/span&gt;dashboard&lt;span class="o"&gt;)&lt;/span&gt;/
│   │   │   └── dashboard/page.tsx
│   │   └── api/
│   │       └── auth/[...nextauth]/route.ts
├── prisma/
│   └── schema.prisma
├── .env.example          &lt;span class="c"&gt;# ← Critical: document every env var&lt;/span&gt;
├── SETUP.md              &lt;span class="c"&gt;# ← This is half the value&lt;/span&gt;
└── package.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;SETUP.md&lt;/code&gt; is where most developers underinvest. Write it like you're explaining to someone who will never ask you a follow-up question — because with a digital product, they can't.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where to sell it:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://gumroad.com" rel="noopener noreferrer"&gt;Gumroad&lt;/a&gt; — zero upfront cost, 10% fee, instant setup&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://lemonsqueezy.com" rel="noopener noreferrer"&gt;Lemon Squeezy&lt;/a&gt; — built for developers, handles EU VAT&lt;/li&gt;
&lt;li&gt;Your own site via Stripe — more setup, more control, no transaction fees beyond Stripe's&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A well-documented boilerplate that solves a real problem can sell for $49–$149. If it solves an expensive problem (Stripe integration, multi-tenancy, role-based access), charge more. Ten sales a month at $79 is $790 — real money for something you already built.&lt;/p&gt;




&lt;h2&gt;
  
  
  Strategy 2: Technical Writing That Pays
&lt;/h2&gt;

&lt;p&gt;Technical writing is wildly underrated as a developer income stream. You're already explaining code to colleagues. The only difference is getting paid for it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Publications That Pay Developers Per Article
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Smashing Magazine&lt;/strong&gt;: $200–$350/article&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CSS-Tricks&lt;/strong&gt; (now part of DigitalOcean): $250+&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LogRocket Blog&lt;/strong&gt;: ~$350/post&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Honeybadger&lt;/strong&gt;: $500/post&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Twilio&lt;/strong&gt;: $500/post&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Auth0 by Okta&lt;/strong&gt;: Varies, but competitive&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One article per month at $350 average adds $4,200 to your annual income with roughly 8–12 hours of work. That's $30–$45/hour for writing about things you're already doing.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Anti-Burnout Writing System
&lt;/h3&gt;

&lt;p&gt;The biggest mistake: trying to write long-form articles from scratch. Instead, build a capture-first system:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## My Weekly Dev Log (takes 10 minutes/day)&lt;/span&gt;

&lt;span class="gu"&gt;### Monday&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Problem: Couldn't get Redis pub/sub working with Next.js App Router server actions
&lt;span class="p"&gt;-&lt;/span&gt; Solution: Used a singleton pattern to prevent multiple connections in dev mode
&lt;span class="p"&gt;-&lt;/span&gt; Code snippet: [paste here]
&lt;span class="p"&gt;-&lt;/span&gt; Time to solve: 2.5 hours

&lt;span class="gu"&gt;### Thursday  &lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Problem: TypeScript not narrowing union types inside .filter()
&lt;span class="p"&gt;-&lt;/span&gt; Solution: Type predicate function
&lt;span class="p"&gt;-&lt;/span&gt; Code snippet: [paste here]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every entry in this log is the seed of a paid article. You solved a real problem. Others will face the same problem. Document the solution with context and sell it to a publication.&lt;/p&gt;

&lt;p&gt;This approach means you're never staring at a blank page. You're just expanding notes that already exist.&lt;/p&gt;




&lt;h2&gt;
  
  
  Strategy 3: Micro-SaaS (The Right Way)
&lt;/h2&gt;

&lt;p&gt;Most "build a SaaS" advice will burn you out because it assumes you're building the next Stripe. Micro-SaaS means solving a narrow, specific problem for a small audience who will happily pay $9–$49/month.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Constraint That Saves You
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Rule: If it takes more than 20 hours to build a working version, you're building the wrong thing.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Practical micro-SaaS ideas that fit this constraint:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A tool that monitors your client's Google Search Console and sends a Slack alert when a page's ranking drops more than 5 positions&lt;/li&gt;
&lt;li&gt;An API that extracts structured data from a specific type of document your industry uses&lt;/li&gt;
&lt;li&gt;A webhook relay that translates one service's payload format to another's&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here's a minimal architecture that keeps complexity low:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// The entire backend for a simple monitoring SaaS&lt;/span&gt;
&lt;span class="c1"&gt;// Built on Next.js API routes — no separate backend needed&lt;/span&gt;

&lt;span class="c1"&gt;// pages/api/check-rankings.ts (runs via cron)&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&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;handler&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&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;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;x-cron-secret&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;CRON_SECRET&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;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;401&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="na"&gt;error&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Unauthorized&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;users&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;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;findMany&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;where&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;isActive&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="na"&gt;include&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;monitoredPages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="k"&gt;for &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;user&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;users&lt;/span&gt;&lt;span class="p"&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;results&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;checkRankings&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;monitoredPages&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;drops&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;results&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;r&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;positionDelta&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;5&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;drops&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;sendSlackAlert&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;slackWebhookUrl&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;drops&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="nx"&gt;res&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="na"&gt;processed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;users&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&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;Stack that keeps overhead minimal:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Next.js&lt;/strong&gt; on Vercel — free tier handles early traffic&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PlanetScale or Supabase&lt;/strong&gt; — generous free tiers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lemon Squeezy&lt;/strong&gt; for billing — handles subscriptions without your own webhook infrastructure&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resend or Postmark&lt;/strong&gt; for transactional email&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You're not building infrastructure here. You're solving a problem, fast.&lt;/p&gt;

&lt;h3&gt;
  
  
  The 20-Customer Goal
&lt;/h3&gt;

&lt;p&gt;Don't aim for 1,000 customers in year one. Aim for 20 paying customers at $19/month. That's $380 MRR — meaningful money that validates the idea. Getting to 20 customers teaches you more about what to build next than six months of solo development ever will.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Burnout Prevention Framework
&lt;/h2&gt;

&lt;p&gt;All of the above becomes irrelevant if you destroy yourself trying to do it. Here's the operational system that keeps side projects sustainable.&lt;/p&gt;

&lt;h3&gt;
  
  
  Time-Box Ruthlessly
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Monday     - Day job (no side work)
Tuesday    - Day job (no side work)
Wednesday  - 1 hour: write dev log entries, capture problems
Thursday   - Day job (no side work)
Friday     - Day job (no side work)
Saturday   - 2-3 hours: focused side project work (ONE task only)
Sunday     - Rest or optional 1-hour writing/drafting
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A maximum of 3–4 hours per week is enough to build sustainable side income if you're consistent. More than this and you're borrowing energy from next month's you.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Single Priority Rule
&lt;/h3&gt;

&lt;p&gt;Every week, your side project has &lt;strong&gt;exactly one priority&lt;/strong&gt;. Not three. Not a backlog. One.&lt;/p&gt;

&lt;p&gt;Write it down on Sunday night:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;This week's priority: Draft the LogRocket article about the Redis singleton fix.

NOT this week:
- Redesign the landing page
- Add a new feature to the template
- Set up analytics
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Undone items don't create guilt. They go into a backlog you review monthly. This is the single most important cognitive habit for preventing burnout — unfinished tasks create mental overhead whether you're working on them or not.&lt;/p&gt;

&lt;h3&gt;
  
  
  Recognize the Warning Signs Early
&lt;/h3&gt;

&lt;p&gt;You're heading for burnout when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You feel resentful opening your side project repo&lt;/li&gt;
&lt;li&gt;Your day job quality is slipping&lt;/li&gt;
&lt;li&gt;You haven't shipped anything in three weeks&lt;/li&gt;
&lt;li&gt;Your side project feels like an obligation, not an option&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The fix is taking a scheduled two-week break, not pushing through. Treat it like deploying a patch: acknowledge the issue, apply the fix, monitor recovery.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Compounding Effect Nobody Talks About
&lt;/h2&gt;

&lt;p&gt;Here's what makes this worth doing beyond the immediate income: each of these strategies compounds over time in ways your salary never will.&lt;/p&gt;

&lt;p&gt;A template you built in 2024 can sell in 2027. An article you wrote in January builds SEO that drives traffic in December. Ten micro-SaaS customers in month three become the testimonials that get you to forty in month eight.&lt;/p&gt;

&lt;p&gt;Your salary resets every two weeks. Side income assets accumulate.&lt;/p&gt;




&lt;h2&gt;
  
  
  Start Here, Not Everywhere
&lt;/h2&gt;

&lt;p&gt;If you're starting from zero, do exactly this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Week 1&lt;/strong&gt;: Start a dev log. Just that. Ten minutes a day.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Week 2&lt;/strong&gt;: Pick one problem from your dev log. Write a detailed blog post about solving it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Week 3&lt;/strong&gt;: Submit that post to one paying publication (LogRocket or Honeybadger are developer-friendly and responsive).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Month 2&lt;/strong&gt;: Take your most reusable project — the one you've rebuilt three times — and list it on Gumroad for $49.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That's it. No SaaS, no complicated infrastructure, no quitting your job required. Two income streams, both building assets, both achievable in under five hours per week.&lt;/p&gt;

&lt;p&gt;The developers who build lasting side income don't outwork everyone else. They outlast everyone else by refusing to make their side project feel like work.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;The bottom line&lt;/strong&gt;: Build systems, not schedules. Create assets, not freelance dependencies. Ship something imperfect this month rather than something perfect never. Your existing skills are already worth money to someone — your only job is to package and distribute that value without wrecking yourself in the process.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Tags: &lt;code&gt;productivity&lt;/code&gt;, &lt;code&gt;career&lt;/code&gt;, &lt;code&gt;javascript&lt;/code&gt;, &lt;code&gt;webdevelopment&lt;/code&gt;, &lt;code&gt;programming&lt;/code&gt;&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Want the full resource?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://apaksh.gumroad.com/l/ogpvb" rel="noopener noreferrer"&gt;Freelance Income &amp;amp; Expense Tracker — $19.99 on Gumroad&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Get the complete, downloadable version. Perfect for bookmarking, printing, or sharing with your team.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://apaksh.gumroad.com/l/ogpvb" rel="noopener noreferrer"&gt;Get it now on Gumroad →&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;If you found this useful, drop a ❤️ and follow for more developer resources every week.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>career</category>
      <category>freelancing</category>
      <category>money</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Top 10 VS Code Extensions Every Developer Needs in 2026</title>
      <dc:creator>Apaksh</dc:creator>
      <pubDate>Tue, 17 Mar 2026 09:49:09 +0000</pubDate>
      <link>https://dev.to/apaksh/top-10-vs-code-extensions-every-developer-needs-in-2026-54pn</link>
      <guid>https://dev.to/apaksh/top-10-vs-code-extensions-every-developer-needs-in-2026-54pn</guid>
      <description>&lt;p&gt;Your code editor is only as powerful as the tools you arm it with — and most developers are leaving serious productivity on the table. After thousands of hours of real-world usage, code reviews, and developer surveys, these 10 VS Code extensions have earned their place in every professional's toolkit.&lt;/p&gt;

&lt;p&gt;Whether you're a seasoned backend architect or a frontend developer just hitting your stride, this list will transform the way you write, debug, and ship code. Let's get into it.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Extensions Still Matter in 2026
&lt;/h2&gt;

&lt;p&gt;VS Code's built-in features have grown enormously, but the extension ecosystem is what keeps it miles ahead of the competition. The right extensions eliminate context-switching, catch bugs before runtime, and automate the soul-crushing repetitive tasks that drain your focus. The wrong ones slow your editor to a crawl.&lt;/p&gt;

&lt;p&gt;This list is curated for &lt;strong&gt;speed, stability, and daily impact&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. 🤖 GitHub Copilot
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The AI pair programmer that actually ships.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;GitHub Copilot has matured from a party trick into a legitimate productivity multiplier. In 2026, it now supports multi-file context, voice prompts, and deeply integrated PR suggestions. It's not replacing you — it's handling the boilerplate so you can focus on the architecture.&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;// Type a comment, Copilot writes the function&lt;/span&gt;
&lt;span class="c1"&gt;// Calculate compound interest over n years&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;compoundInterest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;principal&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;rate&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;years&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;principal&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;pow&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;rate&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;years&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;✅ Pros:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dramatically reduces boilerplate writing time&lt;/li&gt;
&lt;li&gt;Learns your codebase patterns over time&lt;/li&gt;
&lt;li&gt;Supports 20+ languages natively&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;❌ Cons:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Paid subscription ($10–$19/month)&lt;/li&gt;
&lt;li&gt;Occasionally suggests outdated patterns&lt;/li&gt;
&lt;li&gt;Can make junior devs skip learning fundamentals&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;🎯 Best For:&lt;/strong&gt; Any developer writing repetitive logic, API integrations, or unit tests at scale.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. 🔍 ESLint
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Catch bugs before they catch you.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;ESLint remains the undisputed king of JavaScript/TypeScript linting. It enforces code quality rules across your entire team, highlights problems inline, and integrates with your CI/CD pipeline. No more arguing about code style in pull requests — ESLint settles it automatically.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;.eslintrc.json&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"extends"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"eslint:recommended"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"plugin:@typescript-eslint/recommended"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"rules"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"no-unused-vars"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"prefer-const"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"warn"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;✅ Pros:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Highly configurable rule sets&lt;/li&gt;
&lt;li&gt;Supports auto-fix on save&lt;/li&gt;
&lt;li&gt;Massive plugin ecosystem (React, Vue, Airbnb style, etc.)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;❌ Cons:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Initial configuration can be time-consuming&lt;/li&gt;
&lt;li&gt;Conflicting rules between plugins can be frustrating&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;🎯 Best For:&lt;/strong&gt; Any JavaScript or TypeScript project with more than one contributor.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. 🎨 Prettier – Code Formatter
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Stop arguing about semicolons. Forever.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Prettier is an opinionated code formatter that enforces a consistent style across your entire codebase with zero debate. Pair it with ESLint and you have an unstoppable quality gate that runs silently in the background.&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;// Before Prettier&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;user&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="s1"&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;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;admin&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// After Prettier (on save)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;user&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;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;admin&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;✅ Pros:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Works across HTML, CSS, JS, TS, JSON, Markdown, and more&lt;/li&gt;
&lt;li&gt;Format on save means you never think about it&lt;/li&gt;
&lt;li&gt;Eliminates all style-related PR comments&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;❌ Cons:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Opinionated" means limited customization&lt;/li&gt;
&lt;li&gt;Can conflict with ESLint if not configured together properly&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;🎯 Best For:&lt;/strong&gt; Teams who want to enforce consistent style without ongoing human intervention.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. 🐙 GitLens
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Git superpowers, directly in your editor.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;GitLens transforms VS Code's built-in Git support into something extraordinary. See who wrote every single line of code, when, and why — without leaving your editor. The blame annotations alone will change how you approach debugging.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;✅ Pros:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Inline &lt;code&gt;git blame&lt;/code&gt; on every line&lt;/li&gt;
&lt;li&gt;Visual commit history and branch comparisons&lt;/li&gt;
&lt;li&gt;File history timeline view&lt;/li&gt;
&lt;li&gt;Worktree and stash management&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;❌ Cons:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Feature-heavy UI can feel overwhelming at first&lt;/li&gt;
&lt;li&gt;Some advanced features are behind GitLens Pro paywall&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;🎯 Best For:&lt;/strong&gt; Developers working in large codebases or collaborative teams who need deep Git context quickly.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. 🌈 Tailwind CSS IntelliSense
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Autocomplete for every Tailwind class you've ever forgotten.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you're building with Tailwind CSS in 2026, this extension is non-negotiable. It provides intelligent autocomplete, hover previews of the actual CSS output, and instant linting for invalid class names.&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="c"&gt;&amp;lt;!-- Type "bg-" and get a full color palette preview instantly --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"bg-indigo-500 hover:bg-indigo-700 text-white font-bold py-2 px-4 rounded"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  Button
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;✅ Pros:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Class autocomplete with color swatches&lt;/li&gt;
&lt;li&gt;Hover to see the raw CSS being applied&lt;/li&gt;
&lt;li&gt;Works with component frameworks (React, Vue, Svelte)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;❌ Cons:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Only useful if you're using Tailwind CSS&lt;/li&gt;
&lt;li&gt;Occasionally slow on very large projects&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;🎯 Best For:&lt;/strong&gt; Frontend developers and designers working with Tailwind CSS daily.&lt;/p&gt;




&lt;h2&gt;
  
  
  6. 🐳 Docker
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Manage your containers without touching the terminal.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The official Docker extension brings container management directly into VS Code's sidebar. Spin up, stop, inspect, and debug containers visually. It's especially powerful when combined with Dev Containers for fully reproducible development environments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;✅ Pros:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Visual management of images, containers, networks, and volumes&lt;/li&gt;
&lt;li&gt;One-click container logs and terminal access&lt;/li&gt;
&lt;li&gt;Seamless Dev Containers integration&lt;/li&gt;
&lt;li&gt;Docker Compose file support and syntax highlighting&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;❌ Cons:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Requires Docker Desktop to be installed and running&lt;/li&gt;
&lt;li&gt;Heavy resource usage if managing many containers simultaneously&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;🎯 Best For:&lt;/strong&gt; Backend developers, DevOps engineers, and anyone running microservice architectures.&lt;/p&gt;




&lt;h2&gt;
  
  
  7. ⚡ Thunder Client
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Postman inside VS Code. Enough said.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Thunder Client is a lightweight REST API client that lives inside your editor. Test your APIs without switching windows, save request collections, and even write automated tests — all without leaving VS Code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Thunder&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Client&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;environment&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;variables&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"BASE_URL"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://api.yourapp.com/v2"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"AUTH_TOKEN"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"{{dynamic_token}}"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;✅ Pros:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Clean, minimal UI with zero bloat&lt;/li&gt;
&lt;li&gt;Environment variables and collection support&lt;/li&gt;
&lt;li&gt;Built-in test scripting (status codes, response body assertions)&lt;/li&gt;
&lt;li&gt;No account required for core features&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;❌ Cons:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Less powerful than Postman for complex workflows&lt;/li&gt;
&lt;li&gt;Team collaboration features require a paid plan&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;🎯 Best For:&lt;/strong&gt; Full-stack and backend developers who want fast API testing without context-switching.&lt;/p&gt;




&lt;h2&gt;
  
  
  8. 🔐 DotENV
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Finally, readable environment files.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Simple but essential. DotENV adds syntax highlighting to &lt;code&gt;.env&lt;/code&gt; files, making it dramatically easier to read and manage your environment variables. It's the kind of extension you install once and never think about again — until you work without it.&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="c"&gt;# Without DotENV: everything is the same color, chaos ensues&lt;/span&gt;
&lt;span class="nv"&gt;DATABASE_URL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;postgresql://localhost:5432/mydb
&lt;span class="nv"&gt;API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;sk-1234567890abcdef
&lt;span class="nv"&gt;NODE_ENV&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;production
&lt;span class="nv"&gt;DEBUG&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;✅ Pros:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Instant syntax highlighting for &lt;code&gt;.env&lt;/code&gt; files&lt;/li&gt;
&lt;li&gt;Lightweight with zero performance impact&lt;/li&gt;
&lt;li&gt;Supports &lt;code&gt;.env.local&lt;/code&gt;, &lt;code&gt;.env.production&lt;/code&gt;, and custom variants&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;❌ Cons:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Does exactly one thing (though it does it perfectly)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;🎯 Best For:&lt;/strong&gt; Every developer who touches environment variables — which is every developer.&lt;/p&gt;




&lt;h2&gt;
  
  
  9. 📦 Import Cost
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Know the price of every package you import.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Import Cost displays the real size of every imported package inline in your editor. That innocent-looking &lt;code&gt;import _ from 'lodash'&lt;/code&gt; is actually 70kb of JavaScript. This extension makes bundle bloat visible before it becomes a production problem.&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;import&lt;/span&gt; &lt;span class="nx"&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;lodash&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;           &lt;span class="c1"&gt;// 70.7KB (gzipped: 24.9KB) ⚠️&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;debounce&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;lodash&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="c1"&gt;// 15.3KB (gzipped: 5.2KB) ✅&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;debounce&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;lodash/debounce&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="c1"&gt;// 1.8KB (gzipped: 0.7KB) 🚀&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;✅ Pros:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Instant visual feedback on bundle size impact&lt;/li&gt;
&lt;li&gt;Encourages better tree-shaking habits&lt;/li&gt;
&lt;li&gt;Catches bundle bloat before code review&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;❌ Cons:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Occasionally shows inaccurate sizes for complex re-exports&lt;/li&gt;
&lt;li&gt;Can add visual noise in files with many imports&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;🎯 Best For:&lt;/strong&gt; Frontend developers building performance-critical web applications.&lt;/p&gt;




&lt;h2&gt;
  
  
  10. 🧪 Vitest / Jest Runner
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Run individual tests with a single click.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Stop running your entire test suite to check one function. This extension adds inline &lt;code&gt;Run&lt;/code&gt; and &lt;code&gt;Debug&lt;/code&gt; buttons above every test, lets you see pass/fail status directly in the editor, and integrates with both Jest and the increasingly popular Vitest.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Green checkmark appears inline when tests pass ✅&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;compoundInterest&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="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;it&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;calculates correctly over 10 years&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="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  &lt;span class="c1"&gt;// ▶ Run | 🐛 Debug&lt;/span&gt;
    &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;compoundInterest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="nf"&gt;toBeCloseTo&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;1628.89&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;p&gt;&lt;strong&gt;✅ Pros:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Run or debug individual tests without terminal commands&lt;/li&gt;
&lt;li&gt;Real-time pass/fail indicators next to each test&lt;/li&gt;
&lt;li&gt;Works with Jest, Vitest, and Mocha&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;❌ Cons:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Configuration can be finicky with custom Jest/Vitest setups&lt;/li&gt;
&lt;li&gt;Debugging requires proper source map configuration&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;🎯 Best For:&lt;/strong&gt; Any developer practicing TDD or working on projects with large test suites.&lt;/p&gt;




&lt;h2&gt;
  
  
  Quick Reference Table
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Extension&lt;/th&gt;
&lt;th&gt;Category&lt;/th&gt;
&lt;th&gt;Free?&lt;/th&gt;
&lt;th&gt;Must-Have Rating&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;GitHub Copilot&lt;/td&gt;
&lt;td&gt;AI Assistant&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;⭐⭐⭐⭐⭐&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ESLint&lt;/td&gt;
&lt;td&gt;Code Quality&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;⭐⭐⭐⭐⭐&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Prettier&lt;/td&gt;
&lt;td&gt;Formatting&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;⭐⭐⭐⭐⭐&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GitLens&lt;/td&gt;
&lt;td&gt;Git Tools&lt;/td&gt;
&lt;td&gt;Freemium&lt;/td&gt;
&lt;td&gt;⭐⭐⭐⭐⭐&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tailwind IntelliSense&lt;/td&gt;
&lt;td&gt;CSS Tools&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;⭐⭐⭐⭐&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Docker&lt;/td&gt;
&lt;td&gt;DevOps&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;⭐⭐⭐⭐&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Thunder Client&lt;/td&gt;
&lt;td&gt;API Testing&lt;/td&gt;
&lt;td&gt;Freemium&lt;/td&gt;
&lt;td&gt;⭐⭐⭐⭐&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DotENV&lt;/td&gt;
&lt;td&gt;Utilities&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;⭐⭐⭐⭐&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Import Cost&lt;/td&gt;
&lt;td&gt;Performance&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;⭐⭐⭐⭐&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Vitest/Jest Runner&lt;/td&gt;
&lt;td&gt;Testing&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;⭐⭐⭐⭐⭐&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  The Bottom Line
&lt;/h2&gt;

&lt;p&gt;The best VS Code setup isn't the one with the most extensions — it's the one where every extension earns its place every single day. Start with the free, universal ones: &lt;strong&gt;ESLint, Prettier, GitLens, and DotENV&lt;/strong&gt;. Add the role-specific tools that match your stack. Then layer in Copilot when you're ready to multiply your output.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Your action item:&lt;/strong&gt; Install three extensions from this list right now. Not all ten — just three. Get comfortable with them, make them habitual, then come back for more.&lt;/p&gt;

&lt;p&gt;Your future self (the one shipping features faster and writing fewer bugs) will thank you.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Have a VS Code extension that deserves a spot on this list? Drop it in the comments.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;code&gt;#VSCode&lt;/code&gt; &lt;code&gt;#WebDevelopment&lt;/code&gt; &lt;code&gt;#DeveloperTools&lt;/code&gt; &lt;code&gt;#Productivity&lt;/code&gt; &lt;code&gt;#JavaScript&lt;/code&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Want the full resource?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://apaksh.gumroad.com/l/ljqzj" rel="noopener noreferrer"&gt;ProductivityPrompts — 60 AI Prompts — $9.99 on Gumroad&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Get the complete, downloadable version. Perfect for bookmarking, printing, or sharing with your team.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://apaksh.gumroad.com/l/ljqzj" rel="noopener noreferrer"&gt;Get it now on Gumroad →&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;If you found this useful, drop a ❤️ and follow for more developer resources every week.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>vscode</category>
      <category>productivity</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
