<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Software &#8211; About Things | A Hans Scharler Blog</title>
	<atom:link href="https://nothans.com/category/software/feed" rel="self" type="application/rss+xml" />
	<link>https://nothans.com</link>
	<description>Life, Comedy, Games, Tech, Marketing, and Community</description>
	<lastBuildDate>Mon, 02 Mar 2026 00:14:23 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://i0.wp.com/nothans.com/wp-content/uploads/2023/02/cropped-settings.png?fit=32%2C32&#038;ssl=1</url>
	<title>Software &#8211; About Things | A Hans Scharler Blog</title>
	<link>https://nothans.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">114568856</site>	<item>
		<title>Claude Code and Agent Skills for Electron App Development: Your Desktop App Just Got a Cheat Code</title>
		<link>https://nothans.com/claude-code-and-agent-skills-for-electron-app-development-your-desktop-app-just-got-a-cheat-code</link>
					<comments>https://nothans.com/claude-code-and-agent-skills-for-electron-app-development-your-desktop-app-just-got-a-cheat-code#respond</comments>
		
		<dc:creator><![CDATA[Hans Scharler]]></dc:creator>
		<pubDate>Mon, 02 Mar 2026 00:14:19 +0000</pubDate>
				<category><![CDATA[AI]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Agent Skills]]></category>
		<category><![CDATA[Claude Code]]></category>
		<category><![CDATA[Compound Engineering]]></category>
		<category><![CDATA[ElectronJS]]></category>
		<guid isPermaLink="false">https://nothans.com/?p=5336</guid>

					<description><![CDATA[]]></description>
										<content:encoded><![CDATA[
<p>I&#8217;ve been thinking about <a href="https://nothans.com/compound-engineering-what-if-every-project-made-the-next-one-easier">Compound Engineering</a> a lot lately. This is the idea that every project should make the next one easier. And right now, there&#8217;s no better example of that than what&#8217;s happening with Claude Code, Agent Skills, and Electron app development.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img data-recalc-dims="1" fetchpriority="high" decoding="async" width="750" height="750" data-attachment-id="5338" data-permalink="https://nothans.com/claude-code-and-agent-skills-for-electron-app-development-your-desktop-app-just-got-a-cheat-code/image-95" data-orig-file="https://i0.wp.com/nothans.com/wp-content/uploads/2026/03/image-1.png?fit=1024%2C1024&amp;ssl=1" data-orig-size="1024,1024" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Agent Skills for Electron App Development" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/nothans.com/wp-content/uploads/2026/03/image-1.png?fit=750%2C750&amp;ssl=1" src="https://i0.wp.com/nothans.com/wp-content/uploads/2026/03/image-1.png?resize=750%2C750&#038;ssl=1" alt="" class="wp-image-5338" style="width:450px;height:auto" srcset="https://i0.wp.com/nothans.com/wp-content/uploads/2026/03/image-1.png?w=1024&amp;ssl=1 1024w, https://i0.wp.com/nothans.com/wp-content/uploads/2026/03/image-1.png?resize=300%2C300&amp;ssl=1 300w, https://i0.wp.com/nothans.com/wp-content/uploads/2026/03/image-1.png?resize=150%2C150&amp;ssl=1 150w, https://i0.wp.com/nothans.com/wp-content/uploads/2026/03/image-1.png?resize=768%2C768&amp;ssl=1 768w, https://i0.wp.com/nothans.com/wp-content/uploads/2026/03/image-1.png?resize=530%2C530&amp;ssl=1 530w, https://i0.wp.com/nothans.com/wp-content/uploads/2026/03/image-1.png?resize=750%2C750&amp;ssl=1 750w, https://i0.wp.com/nothans.com/wp-content/uploads/2026/03/image-1.png?resize=500%2C500&amp;ssl=1 500w" sizes="(max-width: 750px) 100vw, 750px" /></figure>
</div>


<p>Here&#8217;s the irony that got me started down this rabbit hole. Anthropic&#8217;s own Claude desktop app? It&#8217;s an Electron app. Boris Cherny from the Claude Code team <a href="https://news.ycombinator.com/item?id=47104973">confirmed it on Hacker News</a>. The framework that everyone loves to hate is still the pragmatic choice. That tension tells you something important about where we actually are with AI-assisted development.</p>


<h2 class="wp-block-heading" id="the-groundhog-day-problem-electron-edition">The Groundhog Day Problem (Electron Edition)</h2>


<p>Every Electron project starts the same way. You configure <code>BrowserWindow</code> with <code>contextIsolation: true</code> and <code>nodeIntegration: false</code>. You write a preload script with <code>contextBridge.exposeInMainWorld</code>. You set up IPC channels. You configure Content Security Policy headers. You wrestle with <code>electron-builder.yml</code>. You set up code signing. You do this from memory, or you copy-paste from your last project, or you spend an hour on Stack Overflow re-finding the patterns you already know.</p>



<p>I called this the Groundhog Day Problem in my Compound Engineering post. Sixty to eighty percent of what you do on a new project, you&#8217;ve already done before. And yet, every time, you start from scratch.</p>



<p>Agent Skills fix this. Not like templates — templates are dead things. Skills are living context that Claude Code loads on demand when it recognizes you&#8217;re doing Electron work.</p>


<h2 class="wp-block-heading" id="what-are-agent-skills-the-60second-version">What Are Agent Skills? (The 60-Second Version)</h2>


<p>If you haven&#8217;t been following the Agent Skills story, here&#8217;s the short version.</p>



<p>A skill is a folder with a <code>SKILL.md</code> file. It contains YAML frontmatter (name, description) and markdown instructions that Claude follows when the skill activates. Anthropic released Agent Skills as an <a href="https://agentskills.io">open standard</a> in December 2025, and it&#8217;s been adopted by over 26 platforms — not just Claude Code, but also OpenAI Codex, Gemini CLI, GitHub Copilot, Cursor, VS Code, and more.</p>



<p>The key design principle is progressive disclosure. Only the skill&#8217;s name and description load at startup — roughly 30 to 50 tokens per skill. The full <code>SKILL.md</code> loads only when triggered. Reference files and scripts load only when needed during execution. This means you can have dozens of skills installed without bloating your context window.</p>



<p>Think of it like an onboarding guide for a new team member — except the new team member is an AI agent that reads and follows instructions instantly.</p>


<h2 class="wp-block-heading" id="the-electron-skill-stack">The Electron Skill Stack</h2>


<p>Here&#8217;s where it gets practical. There&#8217;s already a growing ecosystem of skills and subagents specifically for Electron development. Let&#8217;s walk through the ones worth knowing about — and how to install each one.</p>


<h3 class="wp-block-heading" id="1-electronscaffold">1. electron-scaffold</h3>


<p><strong>What it does:</strong> Scaffolds production-ready Electron apps with security hardening baked in from the start. It handles the architecture decisions (Electron Forge vs. Vite vs. electron-builder), sets up proper IPC patterns with <code>contextBridge</code>, configures CSP headers, enables context isolation, sets up auto-updates, integrates native menus, and generates the full project structure with TypeScript support.</p>



<p><strong>Why it matters:</strong> This is the security-first scaffolding that most tutorials skip. It encodes the difference between a toy Electron app and one that&#8217;s ready for distribution.</p>



<p><strong>How to install:</strong></p>



<p>Using the Vercel skills CLI (works across Claude Code, Codex, Cursor, and others):</p>



<pre class="wp-block-code"><code>npx skills add chrisvoncsefalvay/claude-skills --skill electron-scaffold</code></pre>



<p>Or manually: download from the <a href="https://claude-plugins.dev/skills/@chrisvoncsefalvay/claude-skills/electron-scaffold">claude-plugins.dev listing</a>, extract the ZIP, and drop the folder into <code>~/.claude/skills/</code>.</p>



<p>For Claude.ai users, go to <a href="https://claude.ai/settings/capabilities">claude.ai/settings/capabilities</a>, find the Skills section, and upload the downloaded ZIP.</p>


<h3 class="wp-block-heading" id="2-electronpro-subagent">2. electron-pro (Subagent)</h3>


<p><strong>What it does:</strong> This isn&#8217;t a skill — it&#8217;s a full subagent. Think of it as a senior Electron developer persona with deep expertise in Electron 27+ and native OS integrations. It follows a phased approach: understanding your requirements, designing secure architecture, implementing with a full security checklist (context isolation, CSP, IPC validation, code signing), and packaging for multi-platform distribution.</p>



<p><strong>Why it matters:</strong> It&#8217;s the difference between asking Claude to &#8220;make an Electron app&#8221; and having a dedicated Electron specialist with a checklist that covers everything from memory budgets to auto-update rollback strategies.</p>



<p><strong>How to install:</strong></p>



<p>Download the subagent file directly from <a href="https://github.com/VoltAgent/awesome-claude-code-subagents/blob/main/categories/01-core-development/electron-pro.md">VoltAgent&#8217;s repository</a> and save it to your agents directory:</p>



<pre class="wp-block-code"><code>mkdir -p ~/.claude/agents
curl -o ~/.claude/agents/electron-pro.md \
  https:&#47;&#47;raw.githubusercontent.com/VoltAgent/awesome-claude-code-subagents/main/categories/01-core-development/electron-pro.md</code></pre>



<p>Or use the built-in agent installer in Claude Code by typing <code>/agents</code> and creating a new agent from the file.</p>


<h3 class="wp-block-heading" id="3-fullstack-electron-skill-partmeai">3. Full-Stack Electron Skill (partme-ai)</h3>


<p><strong>What it does:</strong> A comprehensive Electron reference skill organized to mirror the official Electron documentation structure. It covers everything: main process, renderer process, IPC communication, <code>BrowserWindow</code> management, menus, tray icons, native integrations, packaging with ASAR, electron-builder configuration, code signing, auto-updates, debugging, memory profiling, crash reporting, and security best practices including sandboxing and CSP.</p>



<p><strong>Why it matters:</strong> This is the one that turns Claude Code into something like having the entire Electron docs loaded as contextual intelligence. Instead of searching docs, Claude just <em>knows</em> the right patterns.</p>



<p><strong>How to install:</strong></p>



<p>Via the Vercel skills CLI:</p>



<pre class="wp-block-code"><code>npx skills add partme-ai/full-stack-skills --skill electron</code></pre>



<p>Via LobeHub:</p>



<pre class="wp-block-code"><code>mkdir -p ~/.claude/skills/partme-ai-full-stack-skills-electron &amp;&amp; \
curl -fsSL "https://market.lobehub.com/api/v1/skills/partme-ai-full-stack-skills-electron/download" \
  -o /tmp/electron-skill.zip &amp;&amp; \
unzip -o /tmp/electron-skill.zip \
  -d ~/.claude/skills/partme-ai-full-stack-skills-electron</code></pre>


<h3 class="wp-block-heading" id="4-electrons-own-claudemd">4. Electron&#8217;s Own CLAUDE.md</h3>


<p><strong>What it does:</strong> The Electron framework itself ships a <code>CLAUDE.md</code> in its repository. This teaches Claude Code the Electron project&#8217;s structure — where the C++ shell code lives, how TypeScript implementations map to API modules, how to work with the 159+ Chromium patches and 48+ Node.js patches, and the build workflow using <code>@electron/build-tools</code>. It even includes a dedicated &#8220;Electron Chromium Upgrade&#8221; skill for Chromium version bumps.</p>



<p><strong>Why it matters:</strong> This is a real-world example of a major open source project using <code>CLAUDE.md</code> to encode institutional knowledge. If you&#8217;re contributing to Electron itself, or if you want inspiration for structuring your own project&#8217;s <code>CLAUDE.md</code>, this is the gold standard.</p>



<p><strong>How to access:</strong> No installation needed — it&#8217;s in the <a href="https://github.com/electron/electron/blob/main/CLAUDE.md">Electron repo</a>. But the pattern is what matters. Your own Electron app should have a <code>CLAUDE.md</code> at the project root that teaches Claude Code about your specific architecture, IPC channel naming conventions, and build setup.</p>


<h3 class="wp-block-heading" id="5-electron-fsd-react-19">5. Electron FSD + React 19</h3>


<p><strong>What it does:</strong> A specialized skill for building Electron apps using Feature-Sliced Design architecture combined with React 19 patterns. It enforces a clean separation of concerns across the three-process model (Main, Preload, Renderer) while implementing strict FSD layer responsibilities. Covers modern React patterns like the <code>use()</code> hook and <code>useActionState</code>.</p>



<p><strong>Why it matters:</strong> If your Electron app is a React app (and let&#8217;s be honest, a lot of them are), this skill bridges the gap between &#8220;generic Electron best practices&#8221; and &#8220;how to actually structure a complex React-based desktop application.&#8221;</p>



<p><strong>How to install:</strong></p>



<p>Available on <a href="https://mcpmarket.com/tools/skills/electron-fsd-development">MCPMarket</a>. Download the skill ZIP and extract it:</p>



<pre class="wp-block-code"><code>mkdir -p ~/.claude/skills/electron-fsd-development
# Extract the downloaded ZIP into the directory above</code></pre>



<p>Or upload it directly as a skill in Claude.ai settings.</p>


<h2 class="wp-block-heading" id="building-your-own-electron-skills">Building Your Own Electron Skills</h2>


<p>The pre-built skills get you started, but the real compounding happens when you build your own. Here&#8217;s the thing — you already have the knowledge. It&#8217;s just locked in your head.</p>



<p>That IPC channel naming convention you use across every project? That&#8217;s a skill. Your <code>electron-builder.yml</code> that took you a weekend to get right? That&#8217;s a skill. The way you structure preload scripts for your team? Skill.</p>



<p>Here&#8217;s what a simple custom Electron skill looks like:</p>



<pre class="wp-block-code"><code>---
name: my-electron-conventions
description: Project conventions for Electron IPC channels,
  preload patterns, and build configuration. Use when creating
  new IPC handlers, preload scripts, or modifying build config.
---

<strong>#</strong><strong> Electron Project Conventions</strong>

<strong>##</strong><strong> IPC Channel Naming</strong>
- Use colon-separated namespaces: `app:get-version`, `file:open`
- Prefix with `dialog:` for user-facing dialogs
- Prefix with `store:` for persistent data operations

<strong>##</strong><strong> Preload Script Pattern</strong>
- One preload file per window type
- Always use `contextBridge.exposeInMainWorld`
- Never expose raw `ipcRenderer`

<strong>##</strong><strong> Build Configuration</strong>
- Target: DMG for macOS, NSIS for Windows, AppImage for Linux
- Always enable `hardenedRuntime` on macOS
- Auto-updater points to GitHub Releases</code></pre>



<p>Save that to <code>~/.claude/skills/my-electron-conventions/SKILL.md</code> and it&#8217;s active globally across all your projects. Or put it in your project&#8217;s <code>.claude/skills/</code> directory to scope it to one repo.</p>



<p>Since this follows the Agent Skills open standard, it also works in Codex, Cursor, Gemini CLI, and anywhere else that supports the spec.</p>


<h2 class="wp-block-heading" id="what-happens-when-you-actually-use-them">What Happens When You Actually Use Them</h2>


<p>Stephan Miller <a href="https://www.stephanmiller.com/electron-project-from-scratch-with-claude-code/">documented building an Electron writing app</a> from scratch with Claude Code — 16 hours and $80 in API costs. His biggest lesson? Planning saves time. He had to stop and refactor his <code>CLAUDE.md</code> because the project outgrew his initial architecture.</p>



<p>Skills encode that planning. They front-load the decisions so you don&#8217;t have to make them again. With the Electron skills loaded, Claude Code doesn&#8217;t just generate code — it generates <em>correct</em> code with context isolation enabled, CSP headers configured, proper IPC patterns, and a project structure that scales.</p>



<p>This is the compound engineering flywheel in action. Project 1, you build everything from scratch and learn the hard way. By project 3, your skills are doing the heavy lifting. By project 5, you describe what you want and the system drafts the first 70% with security baked in. You refine, you polish, you add the creative spark.</p>


<h2 class="wp-block-heading" id="the-meta-question-should-ai-kill-electron">The Meta Question: Should AI Kill Electron?</h2>


<p>Drew Breunig <a href="https://www.dbreunig.com/2026/02/21/why-is-claude-an-electron-app.html">wrote a post</a> asking why Anthropic doesn&#8217;t use Claude to build a native desktop app instead. If coding agents are so good, why not generate native apps for each platform from a spec and test suite?</p>



<p>The answer is pragmatic. Agents excel at the first 90% of development, but that last 10% — edge cases, real-world testing, ongoing support — is still hard. And with three different native apps, your bug surface area triples. Electron still makes sense for most teams.</p>



<p>But here&#8217;s what skills change about the equation: they make Electron <em>better</em>. The security hardening that would normally be forgotten? A skill remembers it. The IPC patterns that would normally be sloppy? A skill enforces them. The packaging configuration that would normally be a weekend of trial and error? A skill has it pre-encoded.</p>



<p>Agent Skills don&#8217;t make Electron obsolete. They make Electron apps that feel like they were built by a team that actually cares about security and native integration.</p>


<h2 class="wp-block-heading" id="start-the-flywheel">Start the Flywheel</h2>


<p>Here&#8217;s your homework. This week, install one of the Electron skills I listed above. Or better yet, write one. Take that <code>electron-builder.yml</code> you&#8217;ve tweaked fifty times. That preload script pattern you copy from project to project. That IPC naming convention that lives in your team&#8217;s heads.</p>



<p>Codify it. Make it a <code>SKILL.md</code>. Drop it in <code>~/.claude/skills/</code>. Watch what happens on the next project.</p>



<p>If you want to get started quickly, here are all the install commands in one place:</p>



<pre class="wp-block-code"><code># electron-scaffold (security-first scaffolding)
npx skills add chrisvoncsefalvay/claude-skills --skill electron-scaffold

# Full-Stack Electron reference (partme-ai)
npx skills add partme-ai/full-stack-skills --skill electron

# electron-pro subagent
mkdir -p ~/.claude/agents &amp;&amp; curl -o ~/.claude/agents/electron-pro.md \
  https:&#47;&#47;raw.githubusercontent.com/VoltAgent/awesome-claude-code-subagents/main/categories/01-core-development/electron-pro.md

# Your own custom skill
mkdir -p ~/.claude/skills/my-electron-conventions
# Then create SKILL.md with your conventions</code></pre>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://nothans.com/claude-code-and-agent-skills-for-electron-app-development-your-desktop-app-just-got-a-cheat-code/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">5336</post-id>	</item>
		<item>
		<title>Introducing Clause Code &#8212; The Christmas Themed Coding Agent That You&#8217;ve Been Waiting For</title>
		<link>https://nothans.com/introducing-clause-code</link>
					<comments>https://nothans.com/introducing-clause-code#respond</comments>
		
		<dc:creator><![CDATA[Hans Scharler]]></dc:creator>
		<pubDate>Thu, 06 Nov 2025 01:59:47 +0000</pubDate>
				<category><![CDATA[AI]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[cheerlights]]></category>
		<category><![CDATA[Christmas]]></category>
		<category><![CDATA[Claude Code]]></category>
		<guid isPermaLink="false">https://nothans.com/?p=5236</guid>

					<description><![CDATA[]]></description>
										<content:encoded><![CDATA[
<p>Part of riding the Generative AI wave is learning how to build my own tools. I have been using Claude Code since February, and it occurred to me that I have never built my own coding agent. Anthropic provides all of the pieces of the puzzle: APIs, SDKs, and Python Packages. And since I always try to be funny&#8230; I thought it would be funny to create Clause Code&#8230; see how funny I am? <em>See</em>!?</p>



<p>So, Clause Code is my attempt to learn the Anthropic SDK and add a little Christmas magic to coding.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><a href="https://github.com/nothans/clause-code"><img data-recalc-dims="1" decoding="async" width="750" height="794" data-attachment-id="5237" data-permalink="https://nothans.com/introducing-clause-code/image-70" data-orig-file="https://i0.wp.com/nothans.com/wp-content/uploads/2025/11/image-3.png?fit=765%2C810&amp;ssl=1" data-orig-size="765,810" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Clause Code Screenshot" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/nothans.com/wp-content/uploads/2025/11/image-3.png?fit=750%2C794&amp;ssl=1" src="https://i0.wp.com/nothans.com/wp-content/uploads/2025/11/image-3.png?resize=750%2C794&#038;ssl=1" alt="" class="wp-image-5237" style="width:765px;height:auto" srcset="https://i0.wp.com/nothans.com/wp-content/uploads/2025/11/image-3.png?w=765&amp;ssl=1 765w, https://i0.wp.com/nothans.com/wp-content/uploads/2025/11/image-3.png?resize=283%2C300&amp;ssl=1 283w, https://i0.wp.com/nothans.com/wp-content/uploads/2025/11/image-3.png?resize=750%2C794&amp;ssl=1 750w" sizes="(max-width: 750px) 100vw, 750px" /></a><figcaption class="wp-element-caption"><a href="https://github.com/nothans/clause-code">Clause Code</a></figcaption></figure>
</div>

<h2 class="wp-block-heading" id="why-dont-i-just-let-clause-code-tell-you-about-clause-code">Why don&#8217;t I just let <em>Clause Code</em> tell you about <em>Clause Code</em>?</h2>


<p>Clause Code transforms your coding workflow into a delightful holiday experience. Every interaction features festive ASCII art, and cheerful status messages like &#8220;Sleighing…&#8221; and &#8220;Jingling…&#8221; while Claude thinks. It&#8217;s like having Santa&#8217;s workshop right in your terminal!</p>



<p>Clause Code automatically detects when Claude generates code and extracts it into the right files. Just ask &#8220;Create a Flask app with authentication&#8221; and watch as it generates and writes app.py, auth.py, requirements.txt and more &#8211; all organized in your project folder. No more copy-pasting from chat windows!</p>



<p>Beautiful Syntax Highlighting Code is rendered with rich syntax highlighting using the Monokai theme, making every snippet easy to read and understand. Whether it&#8217;s Python, JavaScript, Rust, or any other language, your code looks gorgeous in the terminal. </p>


<h2 class="wp-block-heading" id="clause-code-modes">Clause Code Modes</h2>


<ul class="wp-block-list">
<li>Santa Mode <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f385.png" alt="🎅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> &#8211; Full festive experience with maximum holiday cheer (/santa)</li>



<li>Grinch Mode <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2699.png" alt="⚙" class="wp-smiley" style="height: 1em; max-height: 1em;" /> &#8211; Minimal, professional output when you need to focus (/grinch)</li>



<li>December Advent Calendar <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f381.png" alt="🎁" class="wp-smiley" style="height: 1em; max-height: 1em;" /> &#8211; Throughout December, use /advent to unlock daily coding challenges with a festive twist. It&#8217;s like an advent calendar for developers &#8211; a new challenge each day! </li>
</ul>



<p>I did learn a lot building this coding agent. For one, I learned how Anthropic is building these cool terminal apps. I totally missed that developers were making terminal apps. I discovered Textualize/rich (<a href="https://github.com/Textualize/rich">https://github.com/Textualize/rich</a>) and other techniques that make the terminal interactive. </p>


<h2 class="wp-block-heading" id="how-to-use-clause-code">How To Use Clause Code</h2>


<ul class="wp-block-list">
<li>Copy <a href="https://github.com/nothans/clause-code">Clause Code</a> to your machine, navigate to that folder, and set your Anthropic API Key</li>



<li>Run the app with <em>uv sync</em> and <em>uv run clause-code</em></li>



<li>Set a project folder with /project</li>



<li>Send in a prompt</li>
</ul>


<h2 class="wp-block-heading" id="demo-time">Demo Time</h2>


<p>Of course, I am going to make<a href="https://cheerlights.com"> CheerLights</a> project with my very own Clause Code coding agent.</p>



<p>Here&#8217;s my prompt:</p>



<pre class="wp-block-code"><code>build a web page that reads the cheerlights color from thingspeak and set its background to it. in the foreground show me falling snow using css.</code></pre>



<p>With a bit of Christmas magic, I will get a webpage that gives me just what I wanted this year for Christmas. Or, maybe have been naughty and using a quantized model at peak hours of the day <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f609.png" alt="😉" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img data-recalc-dims="1" decoding="async" width="662" height="705" data-attachment-id="5238" data-permalink="https://nothans.com/introducing-clause-code/image-71" data-orig-file="https://i0.wp.com/nothans.com/wp-content/uploads/2025/11/image-4.png?fit=662%2C705&amp;ssl=1" data-orig-size="662,705" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="image" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/nothans.com/wp-content/uploads/2025/11/image-4.png?fit=662%2C705&amp;ssl=1" src="https://i0.wp.com/nothans.com/wp-content/uploads/2025/11/image-4.png?resize=662%2C705&#038;ssl=1" alt="" class="wp-image-5238" srcset="https://i0.wp.com/nothans.com/wp-content/uploads/2025/11/image-4.png?w=662&amp;ssl=1 662w, https://i0.wp.com/nothans.com/wp-content/uploads/2025/11/image-4.png?resize=282%2C300&amp;ssl=1 282w" sizes="(max-width: 662px) 100vw, 662px" /><figcaption class="wp-element-caption">CheerLights Webpage Created by Clause Code</figcaption></figure>
</div>


<p>Check out the project on <a href="https://github.com/nothans/clause-code">GitHub</a>, feel free to make changes, learn something new, and share the joy. Make sure to use it during December and try out the Advent coding challenge feature!</p>



<figure class="wp-block-embed aligncenter is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" class="youtube-player" width="750" height="422" src="https://www.youtube.com/embed/0qrE0O0OaWo?version=3&#038;rel=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=en-US&#038;autohide=2&#038;wmode=transparent" allowfullscreen="true" style="border:0;" sandbox="allow-scripts allow-same-origin allow-popups allow-presentation allow-popups-to-escape-sandbox"></iframe>
</div><figcaption class="wp-element-caption"><a href="https://www.youtube.com/watch?v=0qrE0O0OaWo">Clause Code Building a CheerLights Web Page Video</a></figcaption></figure>



<p>A yule console.log() by the fire?</p>
]]></content:encoded>
					
					<wfw:commentRss>https://nothans.com/introducing-clause-code/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">5236</post-id>	</item>
		<item>
		<title>Empathic AI Prompting for Programmers: Treating Your AI as a Coding Buddy</title>
		<link>https://nothans.com/empathic-ai-prompting-for-programmers-treating-your-ai-as-a-coding-buddy</link>
					<comments>https://nothans.com/empathic-ai-prompting-for-programmers-treating-your-ai-as-a-coding-buddy#respond</comments>
		
		<dc:creator><![CDATA[Hans Scharler]]></dc:creator>
		<pubDate>Wed, 26 Mar 2025 19:54:00 +0000</pubDate>
				<category><![CDATA[AI]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[ChatGPT]]></category>
		<category><![CDATA[programming]]></category>
		<guid isPermaLink="false">https://nothans.com/?p=5089</guid>

					<description><![CDATA[]]></description>
										<content:encoded><![CDATA[
<p>I want to share something that I have that has helped me shift my viewpoint when I use AI tools to program. I am calling it empathic AI prompting. This is about treating your AI assistant (GitHub Copilot or AI models via Cursor or Windsurf) as a collaborator rather than a code vending machine. It&#8217;s a simple mindset shift that has made my interactions with AI both more productive and more enjoyable. I have also been using it to talk to colleagues and friends. I know people who have cut off ChatGPT based on their experience in January 2023. A lot has changed since then. Others tell me AI is bad at (insert whatever it may be)&#8230; I was telling them to think of it as AI is bad at that <em>right now</em>.</p>



<p>Empathic AI prompting is all about understanding and empathizing with your AI&#8217;s responses. Instead of getting frustrated when the AI gives a suboptimal answer, imagine <em>why</em> it might have produced that output. If you’ve ever done pair programming or mentored a junior developer, the idea is similar: when they make a mistake or an odd suggestion, you don’t just yell “wrong!” and walk away. You try to see what assumptions or misunderstandings led to that result, and then you guide them. With AI, you should do the same – treat it like a well-intentioned colleague who can email HR. </p>



<p>Why care? This mindset turns AI into a true coding partner and helps you understand more about programming. It might sound counterintuitive at first, but I am betting that this is what the future of programming looks like. It will be a required skill.</p>



<p>An article over at <a href="https://huggingface.co/blog/luigi12345/iterative-prompting#:~:text=Iterative%20prompting%20is%20more%20than,ready">HuggingFace</a> triggered me into this new way of thinking&#8230; Luigi says, “iterative prompting is a methodology for transforming AI into a coding partner&#8230; The key is to think of AI as a collaborator – guide it, refine its responses, and iterate until the desired results are achieved.” Another programmer, Steve Yegge from <a href="https://sourcegraph.com/blog/chat-oriented-programming-in-action#:~:text=With%20the%20advent%20of%20LLMs%2C,of%20the%20software%20creation%20lifecycle">Sourcegraph</a> even gave it a new name: <strong>CHOP (Chat-Oriented Programming)</strong> to describe this new style of coding “via iterative prompt refinement”.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="500" height="500" data-attachment-id="5091" data-permalink="https://nothans.com/empathic-ai-prompting-for-programmers-treating-your-ai-as-a-coding-buddy/image-7-21" data-orig-file="https://i0.wp.com/nothans.com/wp-content/uploads/2025/03/image-7.png?fit=500%2C500&amp;ssl=1" data-orig-size="500,500" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Ted Lasso meme for Empathic AI Prompting for Programmers:" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/nothans.com/wp-content/uploads/2025/03/image-7.png?fit=500%2C500&amp;ssl=1" src="https://i0.wp.com/nothans.com/wp-content/uploads/2025/03/image-7.png?resize=500%2C500&#038;ssl=1" alt="" class="wp-image-5091" srcset="https://i0.wp.com/nothans.com/wp-content/uploads/2025/03/image-7.png?w=500&amp;ssl=1 500w, https://i0.wp.com/nothans.com/wp-content/uploads/2025/03/image-7.png?resize=300%2C300&amp;ssl=1 300w, https://i0.wp.com/nothans.com/wp-content/uploads/2025/03/image-7.png?resize=150%2C150&amp;ssl=1 150w" sizes="auto, (max-width: 500px) 100vw, 500px" /></figure>
</div>


<p>Here are some of my tips to build this skill:</p>



<ul class="wp-block-list">
<li><strong>Be curious, not critical:</strong> If the AI’s output is off, ask yourself <em>why</em> it might have thought that was okay.</li>



<li><strong>Look for clues in the response:</strong> Often the wrong answer reveals how the AI interpreted your prompt. Maybe your question was ambiguous or missing detail.</li>



<li><strong>Refine and iterate:</strong> Using those insights, clarify your prompt or provide more context, then try again.</li>



<li><strong>Collaborate step-by-step:</strong> Just like you’d work through a problem with a human, iteratively build the solution with the AI, rather than expecting perfect results first try.</li>
</ul>



<p>This approach not only leads to better results, but also turns prompting into a learning experience. I often find that by analyzing an AI’s mistake, I understand the problem better myself! It’s a two-way street of learning.</p>



<p>Recently, I was working on a content-based recommendation feature for my blog. Whenever I publish a new blog post, I want to automatically recommend a few relevant forum posts from our developer community forums. Rather than writing the entire recommendation engine from scratch (with vectors, TF-IDF, and maybe cosine similarity), I decided to build this with Windsurf and its AI model&#8217;s help. Both the forum posts and blog posts are textua,l and a large language model might do a decent job of understanding which ones are related.</p>



<p>My first prompt to Claude Sonnet 3.5: <em>My new blog post is about building content-based recommenders in Python, and I have a list of forum post titles. The task:<strong> </strong>pick the top 3 forum threads that would be most relevant to someone reading my blog post.</em></p>


<h3 class="wp-block-heading" id="the-initial-prompt-and-a-surprise-in-the-output">The Initial Prompt (and a Surprise in the Output)</h3>


<p>Here&#8217;s the initial code and prompt I gave to the AI assistant (in a Python-like pseudo-code format for illustration):</p>



<pre class="wp-block-code"><code>blog_post = """\
Building a Content-Based Recommendation System in Python.
In this post, we explore how to recommend relevant content using textual similarity.
We use techniques like TF-IDF vectorization and cosine similarity to find related posts.
"""

forum_posts = &#91;
    "How to implement content-based recommender with TF-IDF",
    "Collaborative filtering vs content-based: pros and cons",
    "Python 3.9 release - new features and improvements",
    "Best laptop for programming in 2025",
    "Calculating cosine similarity for text matching in Python"
]

# Initial prompt to AI
prompt = f"""
Given the new blog post:\n\"\"\"\n{blog_post}\n\"\"\"\n
and the following forum post titles:\n- {forum_posts&#91;0]}\n- {forum_posts&#91;1]}\n- {forum_posts&#91;2]}\n- {forum_posts&#91;3]}\n- {forum_posts&#91;4]}\n
Please list the top 3 forum posts that are most relevant to the blog post's content.
"""
response = call_ai_model(prompt)  # Hypothetical function to get AI result
print(response)
</code></pre>



<p>When I ran this, the AI <em>did</em> return three forum posts, but the result made me raise an eyebrow:</p>



<pre class="wp-block-code"><code>1. **Python 3.9 release - new features and improvements** – (Talk about Python updates)
2. **Collaborative filtering vs content-based: pros and cons** – (Discussion comparing recommendation approaches)
3. **How to implement content-based recommender with TF-IDF** – (Guide on content-based recommendations)
</code></pre>



<p>At first glance, the AI’s answer isn’t horrible – it found two very relevant posts (the ones about recommender systems). But it also picked <strong>“Python 3.9 release – new features”</strong> as the top recommendation, which is clearly <em>off-topic</em>. A blog reader interested in content-based recommendations probably doesn’t care about the general Python 3.9 release notes. So what happened?</p>


<h4 class="wp-block-heading" id="empathic-analysis-of-the-ais-output">Empathic Analysis of the AI’s Output</h4>


<p>Instead of cursing my AI assistant for being “dumb,” I put on my Ted Lasso hat or maybe mustache. I asked myself: <em>Why might the AI have thought the Python 3.9 forum post was relevant?</em></p>



<p>After a moment, it clicked: the AI probably latched onto the keyword “Python” in both the blog and that forum title. My prompt didn’t stress <em>what</em> aspect of the content to match on, so the model might have defaulted to some simplistic notion of relevance, like overlapping keywords. The blog post text mentions “Python” (since the tutorial is in Python), and the forum post about Python 3.9 obviously mentions “Python” too – bingo, a naive content match! Meanwhile, the forum post about “Calculating cosine similarity for text matching” didn’t explicitly scream “recommender system” to the model, so it got ignored in favor of the more superficially similar Python thread.</p>



<p>In other words, the AI wasn’t <em>trying</em> to be obtuse; it was following my instructions as best it could. The mistake was actually <em>understandable given the prompt</em>. I realized I needed to clarify what “relevant” means in this context. This is the essence of empathic prompting: I learned something about how the AI interpreted my request, and now I can adjust my approach to guide it better.</p>


<h3 class="wp-block-heading" id="refining-the-prompt-for-a-better-result">Refining the Prompt for a Better Result</h3>


<p>I wrote a new prompt. I wanted to tell the AI to focus on topical relevance (i.e., content about recommendation systems), and to ignore posts that are only tangentially related (like generic Python news). I also decided to explicitly mention the technique <strong>cosine similarity</strong> to nudge it toward that forum post it ignored. Essentially, I gave the AI a bit more context and a gentle steer in the right direction.</p>



<p>Here&#8217;s the refined prompt and the code:</p>



<pre class="wp-block-code"><code># Refined prompt with more guidance
refined_prompt = f"""
We have a blog post about building a content-based recommendation system (using TF-IDF and cosine similarity in Python).
The blog post is about recommending relevant content based on text similarity.

Consider the following forum post titles:
- {forum_posts&#91;0]}
- {forum_posts&#91;1]}
- {forum_posts&#91;2]}
- {forum_posts&#91;3]}
- {forum_posts&#91;4]}

Now, **pick the top 3 forum posts that are most relevant to the blog post's topic (content-based recommendations)**.
Focus on posts about recommendation systems or text similarity (TF-IDF, cosine similarity), *not* general Python news or unrelated topics.
"""
response = call_ai_model(refined_prompt)
print(response)
</code></pre>



<p>And the AI’s new response:</p>



<pre class="wp-block-code"><code>1. **How to implement content-based recommender with TF-IDF** – A forum thread directly about content-based recommendation using TF-IDF, which is exactly the technique discussed in the blog.
2. **Collaborative filtering vs content-based: pros and cons** – A discussion comparing content-based methods with collaborative filtering, which complements the blog post's topic.
3. **Calculating cosine similarity for text matching in Python** – A thread about cosine similarity (a core part of content-based recommendations), very relevant to the blog post.
</code></pre>



<p>The irrelevant Python 3.9 post is gone, replaced by the cosine similarity thread that we actually want. Notice how I didn&#8217;t tell the AI explicitly which ones to choose; I simply guided it by clarifying what &#8220;relevant&#8221; really means here. The AI did the rest on its own once it understood my intentions better.</p>



<p>A little empathy went a long way: by imagining what the AI was thinking before and adjusting my wording, I got a much better result. In a way, it felt like I <strong>debugged my prompt</strong> by examining the AI&#8217;s &#8220;mistake&#8221; and then fixing the <em>cause</em> of that mistake.</p>


<h2 class="wp-block-heading" id="let-me-try-explaining-this-again">Let Me Try Explaining This Again</h2>


<ul class="wp-block-list">
<li><strong>Think of the AI as a teammate.</strong> It’s not a perfect genius that will always get everything right, nor is it a dumb tool to be dismissed when it errs. Like any human collaborator, it has its own way of “thinking” (albeit a very alien, statistical one!). Engage with it, guide it, and be patient when it needs a second try. As I reminded myself, <em>treat AI-generated code or answers as you would a human junior developer&#8217;s output.</em> You’d review it, figure out reasoning, and help improve it – do the same with the AI output.</li>



<li><strong>Use mistakes as insights.</strong> When the AI goes off track, don’t just reject the output – inspect it. Is there a pattern to the misunderstanding? Maybe <strong>your question was ambiguous</strong> or assumed knowledge the AI didn’t have. In our case, “relevant” was too vague without context. Often, an AI’s “mistake” is really a mirror held up to our prompt: it reflects how our request could be interpreted. This is incredibly useful for honing our own communication and problem decomposition skills.</li>



<li><strong>Iterate and refine.</strong> The first answer is rarely the final answer. Professional developers know that software design is an iterative process – turns out, prompt design is iterative too. You might start with a rough prompt, see what the AI does, then refine the prompt multiple times. This iterative loop is at the heart of chat-oriented programming (CHOP) and effective prompt engineering. It’s not cheating or a failure to redo the prompt; it’s part of the workflow. Each iteration is a chance to incorporate what you learned from the last output.</li>



<li><strong>Keep a casual, curious mindset.</strong> One thing I enjoy about working with an AI is that I can think out loud. If the AI says something weird, I can literally ask it “why did you do that?” or I can just introspect and adjust. Treating it like a game or puzzle is a bit of fun – “hmm, the AI misunderstood me, how can I say this differently?” Maintaining that curiosity (and even humor) makes the process less frustrating. Remember, the AI has a lot more patience than we do and doesn’t mind if you rephrase the question five times before you get it right</li>
</ul>



<p>Empathic prompting is a skill that takes time to develop. You have to consistently reset your expectations as models get better and IDEs improve, but it pays off.</p>



<p>Articles and Videos that you need to read/watch, or AI summarize:</p>



<ul class="wp-block-list">
<li><a href="https://medium.com/@rajanikethreddy/the-right-way-to-use-ai-for-coding-and-how-it-transformed-my-workflow-75eed29526f4">The Right Way to Use AI for Coding (And How It Transformed My Workflow)</a></li>



<li><a href="https://sourcegraph.com/blog/chat-oriented-programming-in-action#:~:text=With%20the%20advent%20of%20LLMs%2C,of%20the%20software%20creation%20lifecycle">Chat-oriented programming (CHOP) in action</a></li>



<li><a href="https://huggingface.co/blog/luigi12345/iterative-prompting#:~:text=Iterative%20prompting%20is%20more%20than,ready" data-type="link" data-id="https://huggingface.co/blog/luigi12345/iterative-prompting#:~:text=Iterative%20prompting%20is%20more%20than,ready">Mastering Iterative Prompting for Optimized AI Code Generation</a></li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>https://nothans.com/empathic-ai-prompting-for-programmers-treating-your-ai-as-a-coding-buddy/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">5089</post-id>	</item>
		<item>
		<title>[TIL] How to Use CSS Custom Properties (or CSS Variables)</title>
		<link>https://nothans.com/til-how-to-use-css-custom-properties-or-css-variables</link>
					<comments>https://nothans.com/til-how-to-use-css-custom-properties-or-css-variables#respond</comments>
		
		<dc:creator><![CDATA[Hans Scharler]]></dc:creator>
		<pubDate>Mon, 07 Oct 2024 16:54:31 +0000</pubDate>
				<category><![CDATA[AI]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Cursor]]></category>
		<category><![CDATA[web applications]]></category>
		<guid isPermaLink="false">https://nothans.com/?p=4825</guid>

					<description><![CDATA[]]></description>
										<content:encoded><![CDATA[
<p>I have been working on an <a href="https://github.com/nothans/if">interactive fiction web app</a> to explore storytelling with my son. I am always learning when building web apps&#8230; And, if I am not careful, I will stick to my old ways. In this latest work, I wanted to dark theme the Infinite IF app, which required many adjustments to my CSS stylesheets. There has to be a better way! I decided to stop and research what I was doing. I discovered CSS Custom Properties (also known as CSS variables)! I should have known about these from my work before, but I have been using Bootstrap or other frameworks that take care of many things behind the scenes. With my latest app work, I have been focused on using pure JavaScript and CSS.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><a href="https://github.com/nothans/if"><img data-recalc-dims="1" loading="lazy" decoding="async" width="629" height="501" data-attachment-id="4826" data-permalink="https://nothans.com/til-how-to-use-css-custom-properties-or-css-variables/image-3-24" data-orig-file="https://i0.wp.com/nothans.com/wp-content/uploads/2024/10/image-3.png?fit=629%2C501&amp;ssl=1" data-orig-size="629,501" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Infinite IF | Interactive Fiction App Powered by AI" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/nothans.com/wp-content/uploads/2024/10/image-3.png?fit=629%2C501&amp;ssl=1" src="https://i0.wp.com/nothans.com/wp-content/uploads/2024/10/image-3.png?resize=629%2C501&#038;ssl=1" alt="" class="wp-image-4826" srcset="https://i0.wp.com/nothans.com/wp-content/uploads/2024/10/image-3.png?w=629&amp;ssl=1 629w, https://i0.wp.com/nothans.com/wp-content/uploads/2024/10/image-3.png?resize=300%2C240&amp;ssl=1 300w, https://i0.wp.com/nothans.com/wp-content/uploads/2024/10/image-3.png?resize=80%2C64&amp;ssl=1 80w" sizes="auto, (max-width: 629px) 100vw, 629px" /></a><figcaption class="wp-element-caption">Dark Theme with CSS Variables for <a href="https://nothans.com/if/">Infinite IF | Interactive Fiction App</a></figcaption></figure>
</div>

<h2 class="wp-block-heading" id="how-to-use-css-custom-properties">How to Use CSS Custom Properties</h2>


<p>Using CSS variables starts with defining them. This is usually done within the <code>:root</code> pseudo-class, meaning the variables are available globally across your HTML document.</p>



<pre class="wp-block-code"><code>:root {
    --primary-color: #4CAF50;
    --secondary-color: #ff6347;
}</code></pre>



<p>Here, <code>--primary-color</code> and <code>--secondary-color</code> are custom properties holding color values that you can use throughout your CSS. Once defined, you can use these variables anywhere in your stylesheets by referencing them with the <code>var()</code> function.</p>



<pre class="wp-block-code"><code>body {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}</code></pre>



<p>If you are not catching it&#8230; Your style code only needs to reference the color variables, and you only have to change the color values in one place!</p>


<h2 class="wp-block-heading" id="what-are-all-of-the-css-variables-what-are-the-limitations">What are all of the CSS Variables? What are the limitations?</h2>


<p>CSS variables can hold almost any value you typically write directly into your CSS rules. This flexibility allows for powerful theming and reusability across your stylesheets. The primary limitation is that CSS variables cannot store CSS selectors or entire CSS rules; they are meant for values only.</p>


<h3 class="wp-block-heading" id="color-values">Color Values</h3>


<ul class="wp-block-list">
<li>Hexadecimal (e.g., <code>#ff6347</code>)</li>



<li>RGB (e.g., <code>rgb(255, 99, 71)</code>)</li>



<li>RGBA (e.g., <code>rgba(255, 99, 71, 0.5)</code>)</li>



<li>HSL (e.g., <code>hsl(9, 100%, 64%)</code>)</li>



<li>HSLA (e.g., <code>hsla(9, 100%, 64%, 0.5)</code>)</li>



<li>Named colors (e.g., <code>red</code>, <code>blue</code>)</li>
</ul>


<h3 class="wp-block-heading" id="dimension-values">Dimension Values</h3>


<ul class="wp-block-list">
<li>Length (e.g., <code>10px</code>, <code>2em</code>, <code>5vh</code>)</li>



<li>Percentage (e.g., <code>50%</code>)</li>



<li>Viewport-based lengths (e.g., <code>vh</code>, <code>vw</code>, <code>vmin</code>, <code>vmax</code>)</li>
</ul>


<h3 class="wp-block-heading" id="font-and-text-values">Font and Text Values</h3>


<ul class="wp-block-list">
<li>Font sizes (e.g., <code>16px</code>, <code>1.5rem</code>)</li>



<li>Font families (e.g., <code>"Times New Roman"</code>, <code>Arial</code>)</li>



<li>Text shadows (e.g., <code>1px 1px 2px black</code>)</li>



<li>Font weights (e.g., <code>bold</code>, <code>700</code>)</li>
</ul>


<h3 class="wp-block-heading" id="timing-values">Timing Values</h3>


<ul class="wp-block-list">
<li>Duration (e.g., <code>0.3s</code>, <code>200ms</code>)</li>



<li>Timing functions (e.g., <code>ease-in</code>, <code>linear</code>)</li>
</ul>


<h3 class="wp-block-heading" id="urls-and-image-values">URLs and Image Values</h3>


<ul class="wp-block-list">
<li>Image URLs (e.g., <code>url('path/to/image.jpg')</code>)</li>



<li>Gradients (e.g., <code>linear-gradient(to right, red, blue)</code>)</li>
</ul>


<h3 class="wp-block-heading" id="miscellaneous-and-custom-values">Miscellaneous and Custom Values</h3>


<ul class="wp-block-list">
<li>Border details (e.g., <code>1px solid black</code>)</li>



<li>Box shadows (e.g., <code>10px 10px 5px grey</code>)</li>



<li>Transformations (e.g., <code>rotate(45deg)</code>, <code>scale(1.2)</code>)</li>



<li>Transitions (e.g., <code>all 0.3s ease</code>)</li>



<li>Grid template areas (e.g., <code>'header header header'</code>)</li>



<li>Arbitrary numbers (e.g., <code>300</code>, <code>0.5</code>), often used in calculations or for defining custom scales</li>



<li>Custom values of any combination of strings or values (e.g., <code>--custom-shadow: 2px 2px 5px rgba(0,0,0,0.5);</code>)</li>
</ul>


<h2 class="wp-block-heading" id="when-to-use-css-custom-properties">When to Use CSS Custom Properties</h2>


<p><strong>Theming</strong>: CSS variables make theming a website incredibly straightforward. You can change your site&#8217;s theme by altering the values of your variables.</p>



<pre class="wp-block-code"><code>:root {
    --primary-color: #333;
    --background-color: #fff;
}

&#91;data-theme="dark"] {
    --primary-color: #ccc;
    --background-color: #222;
}

body {
    background-color: var(--background-color);
    color: var(--primary-color);
}</code></pre>



<p><strong>Responsive Design</strong>: You can use CSS variables to streamline responsive designs. For example, you can define font sizes that change with the viewport size.</p>



<pre class="wp-block-code"><code>:root {
    --base-font-size: 16px;
}

@media (max-width: 600px) {
    :root {
        --base-font-size: 14px;
    }
}

body {
    font-size: var(--base-font-size);
}</code></pre>


<h4 class="wp-block-heading" id="im-with-it">I&#8217;m &#8220;with it&#8221;.</h4>


<p>Discovering CSS variables has opened up a new dimension in CSS for me and is helping me keep up with the times.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="576" height="254" data-attachment-id="4829" data-permalink="https://nothans.com/til-how-to-use-css-custom-properties-or-css-variables/dr-evil-macarena-css-custom-properties" data-orig-file="https://i0.wp.com/nothans.com/wp-content/uploads/2024/10/dr-evil-macarena-css-custom-properties.gif?fit=576%2C254&amp;ssl=1" data-orig-size="576,254" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="dr-evil-macarena-css-custom-properties" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/nothans.com/wp-content/uploads/2024/10/dr-evil-macarena-css-custom-properties.gif?fit=576%2C254&amp;ssl=1" src="https://i0.wp.com/nothans.com/wp-content/uploads/2024/10/dr-evil-macarena-css-custom-properties.gif?resize=576%2C254&#038;ssl=1" alt="I'm &quot;with it&quot; - Dr. Evil Macarena GIF for CSS Custom Properties" class="wp-image-4829"/><figcaption class="wp-element-caption">I&#8217;m &#8220;with it&#8221; &#8211; Dr. Evil Macarena GIF for CSS Custom Properties</figcaption></figure>
</div>


<p><em>Please share what you learn as you learn it. We are in this together.</em></p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="750" height="581" data-attachment-id="4832" data-permalink="https://nothans.com/til-how-to-use-css-custom-properties-or-css-variables/image-5-21" data-orig-file="https://i0.wp.com/nothans.com/wp-content/uploads/2024/10/image-5.png?fit=1017%2C788&amp;ssl=1" data-orig-size="1017,788" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="image-5" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/nothans.com/wp-content/uploads/2024/10/image-5.png?fit=750%2C581&amp;ssl=1" src="https://i0.wp.com/nothans.com/wp-content/uploads/2024/10/image-5.png?resize=750%2C581&#038;ssl=1" alt="" class="wp-image-4832" srcset="https://i0.wp.com/nothans.com/wp-content/uploads/2024/10/image-5.png?w=1017&amp;ssl=1 1017w, https://i0.wp.com/nothans.com/wp-content/uploads/2024/10/image-5.png?resize=300%2C232&amp;ssl=1 300w, https://i0.wp.com/nothans.com/wp-content/uploads/2024/10/image-5.png?resize=768%2C595&amp;ssl=1 768w, https://i0.wp.com/nothans.com/wp-content/uploads/2024/10/image-5.png?resize=750%2C581&amp;ssl=1 750w" sizes="auto, (max-width: 750px) 100vw, 750px" /><figcaption class="wp-element-caption">Cursor and Infinite IF Using CSS Custom Properties</figcaption></figure>
</div>]]></content:encoded>
					
					<wfw:commentRss>https://nothans.com/til-how-to-use-css-custom-properties-or-css-variables/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4825</post-id>	</item>
		<item>
		<title>[TIL] How to Use Live Server in Visual Studio Code</title>
		<link>https://nothans.com/til-how-to-use-live-server-in-visual-studio-code</link>
					<comments>https://nothans.com/til-how-to-use-live-server-in-visual-studio-code#respond</comments>
		
		<dc:creator><![CDATA[Hans Scharler]]></dc:creator>
		<pubDate>Tue, 01 Oct 2024 16:31:05 +0000</pubDate>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Cursor]]></category>
		<category><![CDATA[Visual Studio Code]]></category>
		<guid isPermaLink="false">https://nothans.com/?p=4816</guid>

					<description><![CDATA[]]></description>
										<content:encoded><![CDATA[
<p>Geroge and I <a href="https://github.com/nothans/shoot">have been working</a> on a modern retro arcade game in HTML, CSS, and JavaScript called, &#8220;Shoot&#8221;. We made a bunch of edits within Visual Studio Code and Cursor and then opened the HTML in Chrome to see the changes. Lots of changes and refreshes of the page. But, when we changed the audio to use the Web Audio API, the app stopped playing sounds when it ran directly from an HTML file. I researched the error messages and found that sounds via the Web Audio API need to be served from a web server to get around CORS issues with local files. In researching options, I learned about the <a href="https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer">Live Server</a> extension for Visual Studio Code.</p>



<p><strong>Live Server</strong> is a Visual Studio Code extension that allows developers to run a local development server directly from the editor. It provides a quick and easy way to preview HTML, CSS, and JavaScript files in the browser with live-reloading capabilities. When you change your code, the browser automatically updates without needing to refresh manually. This makes it ideal for fast development and debugging. It also works well with single-page applications and supports multiple file types. With just a right-click on an HTML file and selecting &#8220;Open with Live Server,&#8221; you can immediately launch a server and start developing.</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" class="youtube-player" width="750" height="422" src="https://www.youtube.com/embed/Hh6-DXx9RAs?version=3&#038;rel=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=en-US&#038;autohide=2&#038;wmode=transparent" allowfullscreen="true" style="border:0;" sandbox="allow-scripts allow-same-origin allow-popups allow-presentation allow-popups-to-escape-sandbox"></iframe>
</div><figcaption class="wp-element-caption">Live Server Extension Installation and Demo Video</figcaption></figure>


<h2 class="wp-block-heading" id="live-server-extension-in-visual-studio-code-stepbystep">Live Server Extension in Visual Studio Code Step-by-Step</h2>

<h3 class="wp-block-heading" id="step-1-install-the-live-server-extension">Step 1: Install the Live Server Extension</h3>


<ol class="wp-block-list">
<li>Open <strong>Visual Studio Code</strong>.</li>



<li>Go to the <strong>Extensions</strong> view by clicking the Extensions icon on the left sidebar (or press <code>Ctrl+Shift+X</code>).</li>



<li>In the search bar, type &#8220;Live Server.&#8221;</li>



<li>Click on the <strong>Live Server</strong> extension (by Ritwick Dey) and then click the <strong>Install</strong> button.</li>
</ol>


<h3 class="wp-block-heading" id="step-2-open-your-html-file">Step 2: Open Your HTML File</h3>


<ol class="wp-block-list">
<li>After installing the Live Server extension, open the HTML file you want to run.</li>



<li>Right-click on the HTML file in the editor or in the file explorer.</li>
</ol>


<h3 class="wp-block-heading" id="step-3-start-live-server">Step 3: Start Live Server</h3>


<ol class="wp-block-list">
<li>Choose the option <strong>Open with Live Server</strong> from the right-click context menu. This will start a local development server and open your HTML file in your default web browser.</li>



<li>The server will automatically update whenever you make changes to the HTML, CSS, or JavaScript files, making debugging easier.</li>
</ol>


<h3 class="wp-block-heading" id="step-4-debugging-html-with-developer-tools">Step 4: Debugging HTML with Developer Tools</h3>


<ol class="wp-block-list">
<li>Once the HTML file is running in the browser, open the browser’s developer tools (press <code>F12</code> or <code>Ctrl+Shift+I</code> in most browsers).</li>



<li>Use the <strong>Elements</strong>, <strong>Console</strong>, and <strong>Network</strong> tabs to debug your HTML, CSS, and JavaScript in real-time.</li>
</ol>


<h3 class="wp-block-heading" id="step-5-additional-debugging-options-for-javascript">Step 5: Additional Debugging Options for JavaScript</h3>


<p>If you need to debug JavaScript in VS Code, you can also attach a debugger. Here&#8217;s how:</p>



<ol class="wp-block-list">
<li><strong>Install the Debugger for Chrome/Edge Extension (Optional)</strong>:
<ul class="wp-block-list">
<li>Install the <strong>Debugger for Chrome</strong> or <strong>Debugger for Edge</strong> extension from the VS Code extensions marketplace.</li>



<li>This allows you to attach a VS Code debugger to the browser session for step-through debugging.</li>
</ul>
</li>



<li><strong>Set Up a Launch Configuration</strong>:
<ul class="wp-block-list">
<li>Go to the <strong>Run and Debug</strong> view (on the left sidebar or press <code>Ctrl+Shift+D</code>).</li>



<li>Click on <strong>create a launch.json file</strong>.</li>



<li>Select <strong>Chrome</strong> (or Edge) as the environment.</li>



<li>A <code>launch.json</code> configuration file will be created, which allows you to configure your debugging session.</li>



<li>Set up the URL to point to the Live Server URL (e.g., <code>http://127.0.0.1:5500/index.html</code>).</li>
</ul>
</li>
</ol>
]]></content:encoded>
					
					<wfw:commentRss>https://nothans.com/til-how-to-use-live-server-in-visual-studio-code/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4816</post-id>	</item>
		<item>
		<title>Ode to Perl and Larry Wall</title>
		<link>https://nothans.com/ode-to-perl-and-larry-wall</link>
					<comments>https://nothans.com/ode-to-perl-and-larry-wall#respond</comments>
		
		<dc:creator><![CDATA[Hans Scharler]]></dc:creator>
		<pubDate>Thu, 19 Sep 2024 22:07:52 +0000</pubDate>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Perl]]></category>
		<guid isPermaLink="false">https://nothans.com/?p=4804</guid>

					<description><![CDATA[]]></description>
										<content:encoded><![CDATA[
<p>I woke up this morning nostalgic about Perl, the programming language. I used to write hundreds of lines of Perl code every day. It paved the way to a career, a livelihood, and a family. I miss the community and the online user groups. Those who used Perl know what I am talking about. I decided to wear my Pittsburgh Perl Workshop polo shirt today.</p>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img data-recalc-dims="1" loading="lazy" decoding="async" width="713" height="1024" data-attachment-id="4809" data-permalink="https://nothans.com/ode-to-perl-and-larry-wall/image-16-8" data-orig-file="https://i0.wp.com/nothans.com/wp-content/uploads/2024/09/image-16.png?fit=1333%2C1915&amp;ssl=1" data-orig-size="1333,1915" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Hans Scharler in a Pittsburgh Perl Workshop polo shirt" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/nothans.com/wp-content/uploads/2024/09/image-16.png?fit=713%2C1024&amp;ssl=1" src="https://i0.wp.com/nothans.com/wp-content/uploads/2024/09/image-16.png?resize=713%2C1024&#038;ssl=1" alt="" class="wp-image-4809" style="width:425px;height:auto" srcset="https://i0.wp.com/nothans.com/wp-content/uploads/2024/09/image-16.png?resize=713%2C1024&amp;ssl=1 713w, https://i0.wp.com/nothans.com/wp-content/uploads/2024/09/image-16.png?resize=209%2C300&amp;ssl=1 209w, https://i0.wp.com/nothans.com/wp-content/uploads/2024/09/image-16.png?resize=768%2C1103&amp;ssl=1 768w, https://i0.wp.com/nothans.com/wp-content/uploads/2024/09/image-16.png?resize=1069%2C1536&amp;ssl=1 1069w, https://i0.wp.com/nothans.com/wp-content/uploads/2024/09/image-16.png?resize=750%2C1077&amp;ssl=1 750w, https://i0.wp.com/nothans.com/wp-content/uploads/2024/09/image-16.png?resize=1320%2C1896&amp;ssl=1 1320w, https://i0.wp.com/nothans.com/wp-content/uploads/2024/09/image-16.png?w=1333&amp;ssl=1 1333w" sizes="auto, (max-width: 713px) 100vw, 713px" /><figcaption class="wp-element-caption">Pittsburgh Perl Workshop polo</figcaption></figure>
</div>


<p>The whole day has been filled with emotions about a programming language and memories of spectacular coffee at PPW, learning from others, and getting the chance to meet Larry Wall. I miss my dear friend Robert Blackwell, who kept me connected to the community and encouraged me to give back.</p>



<p>I wrote a post about <a href="https://nothans.com/how-i-learned-to-program" data-type="post" data-id="2180">how I learned to program</a> and detailed my interactions with Perl, but it can&#8217;t be understated how impactful Perl was on my life. It made the web accessible and my dreams obtainable.</p>



<p>So, channeling my emotions, I decided to write a poem. It would be the thing Larry would do. WWLWD is what I like to say. Larry would say that there is more than one way to do things. Here&#8217;s my poem about Perl and Larry Wall written in Perl. This was the first Perl that I have written in six years. Oh, how I love the Perl language.</p>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img data-recalc-dims="1" loading="lazy" decoding="async" width="733" height="1024" data-attachment-id="4808" data-permalink="https://nothans.com/ode-to-perl-and-larry-wall/image-15-8" data-orig-file="https://i0.wp.com/nothans.com/wp-content/uploads/2024/09/image-15.png?fit=804%2C1123&amp;ssl=1" data-orig-size="804,1123" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="image-15" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/nothans.com/wp-content/uploads/2024/09/image-15.png?fit=733%2C1024&amp;ssl=1" src="https://i0.wp.com/nothans.com/wp-content/uploads/2024/09/image-15.png?resize=733%2C1024&#038;ssl=1" alt="" class="wp-image-4808" style="width:733px;height:auto" srcset="https://i0.wp.com/nothans.com/wp-content/uploads/2024/09/image-15.png?resize=733%2C1024&amp;ssl=1 733w, https://i0.wp.com/nothans.com/wp-content/uploads/2024/09/image-15.png?resize=215%2C300&amp;ssl=1 215w, https://i0.wp.com/nothans.com/wp-content/uploads/2024/09/image-15.png?resize=768%2C1073&amp;ssl=1 768w, https://i0.wp.com/nothans.com/wp-content/uploads/2024/09/image-15.png?resize=750%2C1048&amp;ssl=1 750w, https://i0.wp.com/nothans.com/wp-content/uploads/2024/09/image-15.png?w=804&amp;ssl=1 804w" sizes="auto, (max-width: 733px) 100vw, 733px" /><figcaption class="wp-element-caption">A Perl Poem written in Perl by Hans Scharler</figcaption></figure>
</div>


<p>Thank you, Perl.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://nothans.com/ode-to-perl-and-larry-wall/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4804</post-id>	</item>
		<item>
		<title>From GitHub Repo to Book: MATLAB with Python by Yann Debray</title>
		<link>https://nothans.com/matlab-with-python-book-by-yann-debray</link>
					<comments>https://nothans.com/matlab-with-python-book-by-yann-debray#respond</comments>
		
		<dc:creator><![CDATA[Hans Scharler]]></dc:creator>
		<pubDate>Wed, 22 Nov 2023 22:49:26 +0000</pubDate>
				<category><![CDATA[AI]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[matlab]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[TensorFlow]]></category>
		<guid isPermaLink="false">https://nothans.com/?p=4315</guid>

					<description><![CDATA[]]></description>
										<content:encoded><![CDATA[
<p>My friend and colleague, Yann Debray, has published a book called &#8220;<a href="https://amzn.to/3GaNlon">MATLAB with Python</a>&#8220;. Yann&#8217;s book presents a unique perspective on integrating MATLAB and Python in scientific computing, challenging the common &#8220;MATLAB vs. Python&#8221; mindset. Aimed at engineers and scientists, the book begins with an introduction that includes a brief history of scientific computing, insights about the author, and a comparison between open-source and commercial software. It sets the stage for a comprehensive guide on how MATLAB and Python can work together, emphasizing their complementary strengths.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><a href="https://amzn.to/3GaNlon"><img data-recalc-dims="1" loading="lazy" decoding="async" width="742" height="986" data-attachment-id="4316" data-permalink="https://nothans.com/matlab-with-python-book-by-yann-debray/image-11-9" data-orig-file="https://i0.wp.com/nothans.com/wp-content/uploads/2023/11/image-11.png?fit=742%2C986&amp;ssl=1" data-orig-size="742,986" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="MATLAB with Python by Yann Debray" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/nothans.com/wp-content/uploads/2023/11/image-11.png?fit=742%2C986&amp;ssl=1" src="https://i0.wp.com/nothans.com/wp-content/uploads/2023/11/image-11.png?resize=742%2C986&#038;ssl=1" alt="" class="wp-image-4316" srcset="https://i0.wp.com/nothans.com/wp-content/uploads/2023/11/image-11.png?w=742&amp;ssl=1 742w, https://i0.wp.com/nothans.com/wp-content/uploads/2023/11/image-11.png?resize=226%2C300&amp;ssl=1 226w" sizes="auto, (max-width: 742px) 100vw, 742px" /></a><figcaption class="wp-element-caption"><a href="https://amzn.to/3GaNlon">MATLAB with Python</a> by Yann Debray</figcaption></figure>
</div>


<p>The core of the book is structured around practical applications that show you how and why you would want to use MATLAB and Python, and Python with MATLAB. Executing Python code inside of MATLAB, calling Python community packages, and debugging Python code that MATLAB calls are examples of advanced topics that Yann covers and gives you a sense of how easy it is to extract the value from both platforms. The book also explores the use of Python AI libraries from MATLAB, highlighting applications with Scikit-learn and TensorFlow. Conversely, it guides readers on using the MATLAB Engine API for Python, showcasing how MATLAB&#8217;s powerful tools can facilitate AI development. In a recent update to the GitHub repo that backs the book, Yann offers resources on accessing Python packages in <a href="https://matlab.mathworks.com">MATLAB Online</a>.</p>



<p>I found the book practical and easy to follow. My favorite part is that the book itself is open-source. The full prose and source code are stored on a living GitHub repo that Yann has been keeping up to date as things change with MATLAB and Python. Since it is on GitHub, he can link the book to MATLAB Online, where anyone can follow along and try the examples. I specifically like the Call TensorFlow from MATLAB example in the Call Python AI Libraries from MATLAB chapter.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img data-recalc-dims="1" loading="lazy" decoding="async" width="701" height="746" data-attachment-id="4317" data-permalink="https://nothans.com/matlab-with-python-book-by-yann-debray/image-12-7" data-orig-file="https://i0.wp.com/nothans.com/wp-content/uploads/2023/11/image-12.png?fit=701%2C746&amp;ssl=1" data-orig-size="701,746" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="image-12" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/nothans.com/wp-content/uploads/2023/11/image-12.png?fit=701%2C746&amp;ssl=1" src="https://i0.wp.com/nothans.com/wp-content/uploads/2023/11/image-12.png?resize=701%2C746&#038;ssl=1" alt="" class="wp-image-4317" style="width:701px;height:auto" srcset="https://i0.wp.com/nothans.com/wp-content/uploads/2023/11/image-12.png?w=701&amp;ssl=1 701w, https://i0.wp.com/nothans.com/wp-content/uploads/2023/11/image-12.png?resize=282%2C300&amp;ssl=1 282w" sizes="auto, (max-width: 701px) 100vw, 701px" /><figcaption class="wp-element-caption">Call TensorFlow from MATLAB</figcaption></figure>
</div>


<p>If you are into scientific computing and want to go to the next level, I recommend that you check out the book. You can get into it right now by reading and using the examples on the GitHub repo or getting a physical copy from Amazon so that you can enjoy it at your leisure. Maybe read it with some turkey and cranberry sauce.</p>


<h2 class="wp-block-heading" id="bonus-video">Bonus Video</h2>


<p>If you want to hear and see Yann talk about Python and MATLAB in a video, you are in luck. Yann was a guest on the <a href="https://www.youtube.com/@matlabcoders5446">MATLAB Coders</a> YouTube channel and got into how to effectively use Python and MATLAB together. I like to think that this presentation was the beginning of Yann&#8217;s dream to write a book.</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" class="youtube-player" width="750" height="422" src="https://www.youtube.com/embed/1hD_M7NawvY?version=3&#038;rel=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=en-US&#038;autohide=2&#038;wmode=transparent" allowfullscreen="true" style="border:0;" sandbox="allow-scripts allow-same-origin allow-popups allow-presentation allow-popups-to-escape-sandbox"></iframe>
</div><figcaption class="wp-element-caption">Call Python from MATLAB tutorial</figcaption></figure>
]]></content:encoded>
					
					<wfw:commentRss>https://nothans.com/matlab-with-python-book-by-yann-debray/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4315</post-id>	</item>
		<item>
		<title>New Laptop? Use Windows Subsystem for Linux for Full Stack Development.</title>
		<link>https://nothans.com/new-laptop-use-windows-subsystem-for-linux-for-full-stack-development</link>
					<comments>https://nothans.com/new-laptop-use-windows-subsystem-for-linux-for-full-stack-development#comments</comments>
		
		<dc:creator><![CDATA[Hans Scharler]]></dc:creator>
		<pubDate>Mon, 17 Apr 2023 16:10:15 +0000</pubDate>
				<category><![CDATA[AI]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Next.js]]></category>
		<category><![CDATA[Node.js]]></category>
		<category><![CDATA[React]]></category>
		<category><![CDATA[web applications]]></category>
		<guid isPermaLink="false">https://nothans.com/?p=3740</guid>

					<description><![CDATA[]]></description>
										<content:encoded><![CDATA[
<p>My normal reaction is to dual boot my new Windows laptops and or install Ubuntu on a virtual machine for full-stack web development. Full stack means you must write the front end (the user interface) and the back end of an app (database, API integration, and other services). I wanted to build a new app using Next.js, React, Firebase, and Tailwind. New AI projects are requiring lots of new tools to be installed and ready on your system. Before I installed Ubuntu, I did some research and came across WSL—The Windows Subsystem for Linux. </p>



<p>Windows Subsystem for Linux (WSL) lets developers install a Linux distribution and use Linux applications, utilities, and Bash command-line tools directly on Windows, unmodified, without the overhead of a traditional virtual machine or dual-boot setup.</p>



<p>My goal was to build a Next.js app and deploy it to Vercel. I wanted my system to be able to run a Node.js server and be able to develop my app in Visual Studio Code without jumping around. I collected my notes since it was my first time and I probably will want to get my environment set up on another machine. I hope this helps you out.</p>


<h2 class="wp-block-heading" id="use-windows-powershell-to-install-wsl-2">Use Windows PowerShell to Install WSL 2</h2>


<p>Open PowerShell as administrator</p>



<ul class="wp-block-list">
<li>Type this to install WSL</li>
</ul>



<pre class="wp-block-code"><code>wsl --install</code></pre>



<ul class="wp-block-list">
<li>Check the version to confirm the installation of WSL. You are looking for version 2.</li>
</ul>



<pre class="wp-block-code"><code>wsl -l -v</code></pre>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="384" height="159" data-attachment-id="3743" data-permalink="https://nothans.com/new-laptop-use-windows-subsystem-for-linux-for-full-stack-development/image-2-8" data-orig-file="https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-2.png?fit=384%2C159&amp;ssl=1" data-orig-size="384,159" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="image-2" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-2.png?fit=384%2C159&amp;ssl=1" src="https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-2.png?resize=384%2C159&#038;ssl=1" alt="" class="wp-image-3743" srcset="https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-2.png?w=384&amp;ssl=1 384w, https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-2.png?resize=300%2C124&amp;ssl=1 300w" sizes="auto, (max-width: 384px) 100vw, 384px" /><figcaption class="wp-element-caption">WSL Version Check</figcaption></figure>
</div>


<ul class="wp-block-list">
<li>Exit PowerShell by typing exit</li>
</ul>


<h2 class="wp-block-heading" id="install-windows-terminal">Install Windows Terminal</h2>


<p>Windows updated the terminal and have provided a great way to interface with your system and subsystems. Go to the Windows Store and install the upgraded <a rel="noreferrer noopener" href="https://apps.microsoft.com/store/detail/windows-terminal/9N0DX20HK701?hl=en-us&amp;gl=us&amp;rtc=1" target="_blank">Windows Terminal</a>.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="750" height="246" data-attachment-id="3744" data-permalink="https://nothans.com/new-laptop-use-windows-subsystem-for-linux-for-full-stack-development/image-3-8" data-orig-file="https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-3.png?fit=972%2C319&amp;ssl=1" data-orig-size="972,319" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="image-3" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-3.png?fit=750%2C246&amp;ssl=1" src="https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-3.png?resize=750%2C246&#038;ssl=1" alt="" class="wp-image-3744" srcset="https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-3.png?w=972&amp;ssl=1 972w, https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-3.png?resize=300%2C98&amp;ssl=1 300w, https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-3.png?resize=768%2C252&amp;ssl=1 768w, https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-3.png?resize=750%2C246&amp;ssl=1 750w" sizes="auto, (max-width: 750px) 100vw, 750px" /><figcaption class="wp-element-caption">New Windows Terminal</figcaption></figure>
</div>

<h2 class="wp-block-heading" id="update-wsl">Update WSL</h2>


<ul class="wp-block-list">
<li>Open WSL by typing <em>wsl </em>in Windows Terminal</li>



<li>Update Ubuntu: <em>sudo apt update &amp;&amp; sudo apt upgrade</em></li>



<li>Install cURL: <em>sudo apt-get install curl</em></li>



<li>Exit wsl, close Terminal, reopen terminal, get back into WSL</li>
</ul>


<h2 class="wp-block-heading" id="install-nodejs-and-a-package-manager">Install Node.js and a Package Manager</h2>


<ul class="wp-block-list">
<li>Install Node.js LTS: nvm install &#8211;lts</li>



<li>Install latest Node,js: nvm install node</li>



<li>Verify installation: nvm ls</li>



<li>Install Visual Studio Code WSL on your Windows machine</li>



<li>Install <em>Node Extension Pack</em></li>



<li>Install JavaScript Debugger extension</li>
</ul>



<p>Back to WSL:</p>



<ul class="wp-block-list">
<li>Verify Installation: <em>command -v nvm</em></li>
</ul>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="750" height="308" data-attachment-id="3745" data-permalink="https://nothans.com/new-laptop-use-windows-subsystem-for-linux-for-full-stack-development/image-4-8" data-orig-file="https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-4.png?fit=877%2C360&amp;ssl=1" data-orig-size="877,360" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="image-4" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-4.png?fit=750%2C308&amp;ssl=1" src="https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-4.png?resize=750%2C308&#038;ssl=1" alt="" class="wp-image-3745" srcset="https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-4.png?w=877&amp;ssl=1 877w, https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-4.png?resize=300%2C123&amp;ssl=1 300w, https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-4.png?resize=768%2C315&amp;ssl=1 768w, https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-4.png?resize=750%2C308&amp;ssl=1 750w" sizes="auto, (max-width: 750px) 100vw, 750px" /><figcaption class="wp-element-caption">Installation Verification on Windows Terminal</figcaption></figure>
</div>

<h2 class="wp-block-heading" id="create-your-first-nextjs-web-application">Create Your First Next.js Web Application</h2>


<ul class="wp-block-list">
<li>cd ~</li>



<li>mkdir NextProjects</li>



<li>cd NextProjects</li>



<li>npx create-next-app my-next-app</li>
</ul>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img data-recalc-dims="1" loading="lazy" decoding="async" width="750" height="289" data-attachment-id="3746" data-permalink="https://nothans.com/new-laptop-use-windows-subsystem-for-linux-for-full-stack-development/image-5-7" data-orig-file="https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-5.png?fit=1193%2C459&amp;ssl=1" data-orig-size="1193,459" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="image-5" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-5.png?fit=750%2C289&amp;ssl=1" src="https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-5.png?resize=750%2C289&#038;ssl=1" alt="" class="wp-image-3746" srcset="https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-5.png?resize=1024%2C394&amp;ssl=1 1024w, https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-5.png?resize=300%2C115&amp;ssl=1 300w, https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-5.png?resize=768%2C295&amp;ssl=1 768w, https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-5.png?resize=750%2C289&amp;ssl=1 750w, https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-5.png?w=1193&amp;ssl=1 1193w" sizes="auto, (max-width: 750px) 100vw, 750px" /><figcaption class="wp-element-caption">Next.js Installation</figcaption></figure>
</div>

<h2 class="wp-block-heading" id="open-visual-studio-code-from-windows-terminal">Open Visual Studio Code from Windows Terminal</h2>


<pre class="wp-block-code"><code>code .</code></pre>



<figure class="wp-block-image size-large"><img data-recalc-dims="1" loading="lazy" decoding="async" width="750" height="447" data-attachment-id="3751" data-permalink="https://nothans.com/new-laptop-use-windows-subsystem-for-linux-for-full-stack-development/image-9-4" data-orig-file="https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-9.png?fit=1174%2C699&amp;ssl=1" data-orig-size="1174,699" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="image-9" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-9.png?fit=750%2C447&amp;ssl=1" src="https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-9.png?resize=750%2C447&#038;ssl=1" alt="" class="wp-image-3751" srcset="https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-9.png?resize=1024%2C610&amp;ssl=1 1024w, https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-9.png?resize=300%2C179&amp;ssl=1 300w, https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-9.png?resize=768%2C457&amp;ssl=1 768w, https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-9.png?resize=750%2C447&amp;ssl=1 750w, https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-9.png?w=1174&amp;ssl=1 1174w" sizes="auto, (max-width: 750px) 100vw, 750px" /><figcaption class="wp-element-caption">Visual Studio Code with Next.js App</figcaption></figure>



<p>You can now use the terminal tab that&#8217;s built into VS Code. To run your app, type &#8220;npm run dev&#8221; and go to &#8220;localhost:3000&#8221; in Microsft Edge. &#8220;run dev&#8221; lets you work on your app and have it running a development instance with hot-reloading, file watching and task re-running. It really speeds up the iterative process.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img data-recalc-dims="1" loading="lazy" decoding="async" data-attachment-id="3749" data-permalink="https://nothans.com/new-laptop-use-windows-subsystem-for-linux-for-full-stack-development/image-8-5" data-orig-file="https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-8.png?fit=819%2C627&amp;ssl=1" data-orig-size="819,627" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Next.js Web App Screenshot" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-8.png?fit=750%2C574&amp;ssl=1" src="https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-8.png?resize=750%2C574&#038;ssl=1" alt="" class="wp-image-3749" width="750" height="574" srcset="https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-8.png?w=819&amp;ssl=1 819w, https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-8.png?resize=300%2C230&amp;ssl=1 300w, https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-8.png?resize=768%2C588&amp;ssl=1 768w, https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-8.png?resize=750%2C574&amp;ssl=1 750w" sizes="auto, (max-width: 750px) 100vw, 750px" /><figcaption class="wp-element-caption">My First Next.js Web App Running from localhost</figcaption></figure>
</div>


<p><em>If you want to opt out of Next.js telemetry, type &#8220;npx next telemetry disable&#8221; in the VS Code Terminal.</em></p>


<h2 class="wp-block-heading" id="install-react-developer-tools">Install React Developer Tools</h2>


<p>Install <a href="https://react.dev/learn/react-developer-tools">React Developer Tools</a> on the Microsoft Edge Browser so you can get detailed React feedback about your errors and connect the web development experience more tightly to Visual Studio Code.</p>



<p>To open Windows Explorer to manage your files:</p>



<pre class="wp-block-code"><code>explorer.exe .</code></pre>



<p><em>Don&#8217;t forget that dot ^</em></p>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img data-recalc-dims="1" loading="lazy" decoding="async" data-attachment-id="3753" data-permalink="https://nothans.com/new-laptop-use-windows-subsystem-for-linux-for-full-stack-development/image-10-3" data-orig-file="https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-10.png?fit=818%2C164&amp;ssl=1" data-orig-size="818,164" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="image-10" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-10.png?fit=750%2C150&amp;ssl=1" src="https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-10.png?resize=750%2C150&#038;ssl=1" alt="" class="wp-image-3753" width="750" height="150" srcset="https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-10.png?w=818&amp;ssl=1 818w, https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-10.png?resize=300%2C60&amp;ssl=1 300w, https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-10.png?resize=768%2C154&amp;ssl=1 768w, https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-10.png?resize=750%2C150&amp;ssl=1 750w" sizes="auto, (max-width: 750px) 100vw, 750px" /><figcaption class="wp-element-caption">The Command &#8220;explorer.exe .&#8221;</figcaption></figure>
</div>


<p>This is a quite nice trick. You can manage the files on your WSL subsystem. This works how you want it to work. You can move files back and forth.</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img data-recalc-dims="1" loading="lazy" decoding="async" width="750" height="459" data-attachment-id="3754" data-permalink="https://nothans.com/new-laptop-use-windows-subsystem-for-linux-for-full-stack-development/image-11-3" data-orig-file="https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-11.png?fit=1164%2C713&amp;ssl=1" data-orig-size="1164,713" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="image-11" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-11.png?fit=750%2C459&amp;ssl=1" src="https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-11.png?resize=750%2C459&#038;ssl=1" alt="" class="wp-image-3754" srcset="https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-11.png?resize=1024%2C627&amp;ssl=1 1024w, https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-11.png?resize=300%2C184&amp;ssl=1 300w, https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-11.png?resize=768%2C470&amp;ssl=1 768w, https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-11.png?resize=750%2C459&amp;ssl=1 750w, https://i0.wp.com/nothans.com/wp-content/uploads/2023/04/image-11.png?w=1164&amp;ssl=1 1164w" sizes="auto, (max-width: 750px) 100vw, 750px" /><figcaption class="wp-element-caption">The output of the &#8220;explorer.exe .&#8221; Command</figcaption></figure>
</div>


<p><em>Profit.</em></p>


<h2 class="wp-block-heading" id="resources">Resources</h2>


<p>I found a few resources useful as I learned how to get my laptop and development environment set up. Let me know if you find any useful resources out in the wild.</p>



<ul class="wp-block-list">
<li>WSL Tutorial: <a rel="noreferrer noopener" href="https://learn.microsoft.com/en-us/windows/wsl/install" target="_blank">https://learn.microsoft.com/en-us/windows/wsl/install</a></li>



<li>Node.js Installation Tutorial for WSL: <a rel="noreferrer noopener" href="https://learn.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-wsl" target="_blank">https://learn.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-wsl</a></li>



<li>Next.js Installation Tutorial for WSL: <a rel="noreferrer noopener" href="https://learn.microsoft.com/en-us/windows/dev-environment/javascript/nextjs-on-wsl" target="_blank">https://learn.microsoft.com/en-us/windows/dev-environment/javascript/nextjs-on-wsl</a></li>



<li>Windows Terminal: <a rel="noreferrer noopener" href="https://apps.microsoft.com/store/detail/windows-terminal/9N0DX20HK701?hl=en-us&amp;gl=us&amp;rtc=1" target="_blank">https://apps.microsoft.com/store/detail/windows-terminal/9N0DX20HK701?hl=en-us&amp;gl=us&amp;rtc=1</a></li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>https://nothans.com/new-laptop-use-windows-subsystem-for-linux-for-full-stack-development/feed</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3740</post-id>	</item>
		<item>
		<title>The Final Programming Language is Language</title>
		<link>https://nothans.com/the-final-programming-language-is-language</link>
					<comments>https://nothans.com/the-final-programming-language-is-language#respond</comments>
		
		<dc:creator><![CDATA[Hans Scharler]]></dc:creator>
		<pubDate>Thu, 09 Mar 2023 16:10:26 +0000</pubDate>
				<category><![CDATA[AI]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[ChatGPT]]></category>
		<category><![CDATA[Prompt Engineering]]></category>
		<guid isPermaLink="false">https://nothans.com/?p=3687</guid>

					<description><![CDATA[]]></description>
										<content:encoded><![CDATA[
<p>My first programming class was in C. The class started with two weeks of pseudocode. We wrote out descriptions of what the code does. Our professor was trying to get us to think through software versus the semantic expression of a particular programming language. We were writing English statements that eventually turned into sections of C code. In a giant twist of fate, our course was teaching C so that we could build a matrix solver. Now, I work at MathWorks, creators of the most advanced matrix solver, MATLAB which literally stands for <span style="text-decoration: underline;">mat</span>rix <span style="text-decoration: underline;">lab</span>oratory.</p>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img data-recalc-dims="1" loading="lazy" decoding="async" data-attachment-id="3693" data-permalink="https://nothans.com/the-final-programming-language-is-language/image-3-7" data-orig-file="https://i0.wp.com/nothans.com/wp-content/uploads/2023/03/image-3.png?fit=1027%2C1369&amp;ssl=1" data-orig-size="1027,1369" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Hans Scharler holding a C programming book" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/nothans.com/wp-content/uploads/2023/03/image-3.png?fit=750%2C1000&amp;ssl=1" src="https://i0.wp.com/nothans.com/wp-content/uploads/2023/03/image-3.png?resize=474%2C632&#038;ssl=1" alt="" class="wp-image-3693" width="474" height="632" srcset="https://i0.wp.com/nothans.com/wp-content/uploads/2023/03/image-3.png?resize=768%2C1024&amp;ssl=1 768w, https://i0.wp.com/nothans.com/wp-content/uploads/2023/03/image-3.png?resize=225%2C300&amp;ssl=1 225w, https://i0.wp.com/nothans.com/wp-content/uploads/2023/03/image-3.png?resize=750%2C1000&amp;ssl=1 750w, https://i0.wp.com/nothans.com/wp-content/uploads/2023/03/image-3.png?w=1027&amp;ssl=1 1027w" sizes="auto, (max-width: 474px) 100vw, 474px" /><figcaption class="wp-element-caption">Hans Scharler holding <em>The C Programming Language Book</em></figcaption></figure>
</div>

<h2 class="wp-block-heading" id="what-is-pseudocode">What is pseudocode?</h2>


<p>Pseudocode is a high-level, informal description of a computer program or algorithm that uses natural language and simple syntax to outline the logic of the program or algorithm. It is not a programming language, but rather a way of expressing a program or algorithm in a way that is easy for humans to understand. Pseudocode is often used as a tool for planning and designing programs before they are implemented in a specific programming language. It is also used in teaching and documentation to explain the steps of a program or algorithm in a way that is accessible to readers who may not have programming experience or who are not familiar with a particular programming language. Pseudocode typically includes common programming constructs such as loops, conditional statements, and functions, but does not include specific syntax or code examples.</p>


<h2 class="wp-block-heading" id="going-full-circle">Going Full Circle</h2>


<p>In my <a href="https://nothans.com/how-i-learned-to-program" data-type="post" data-id="2180">long history with programming</a>, I wasn&#8217;t always thinking about pseudocode. Programming quickly devolves into the syntax and language specific quirks, but I do realize I was learning how to think through how I solve problems with code. Software engineers and developers have developed their own processes to breakdown complex applications to a series of sections. In the era of large language models and code generation, this is now what I refer to as prompting. Pseudocode is now prompting a LLM or codex to generate specific code responses. Does AI make a programmer obsolete? I argue that AI will unilaterally benefit humans who understand how to breakdown complexity and build up complexity. Humans who leverage AI will become a different specie of humans.</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>&#8220;Language is the final programming language.&#8221;</p>
<cite>Hans Scharler</cite></blockquote>



<p>Tools like ChatGPT effortlessly spit out code based on prompts. If you are better at prompting, you are better at writing code. Prompting is just a series words in a language, but not a programming language. Anyone can now write HTML with the English language. Are you going to ignore this super power or are you going to leverage it?</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="750" height="574" data-attachment-id="3694" data-permalink="https://nothans.com/the-final-programming-language-is-language/image-4-7" data-orig-file="https://i0.wp.com/nothans.com/wp-content/uploads/2023/03/image-4.png?fit=982%2C752&amp;ssl=1" data-orig-size="982,752" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="image-4" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/nothans.com/wp-content/uploads/2023/03/image-4.png?fit=750%2C574&amp;ssl=1" src="https://i0.wp.com/nothans.com/wp-content/uploads/2023/03/image-4.png?resize=750%2C574&#038;ssl=1" alt="" class="wp-image-3694" srcset="https://i0.wp.com/nothans.com/wp-content/uploads/2023/03/image-4.png?w=982&amp;ssl=1 982w, https://i0.wp.com/nothans.com/wp-content/uploads/2023/03/image-4.png?resize=300%2C230&amp;ssl=1 300w, https://i0.wp.com/nothans.com/wp-content/uploads/2023/03/image-4.png?resize=768%2C588&amp;ssl=1 768w, https://i0.wp.com/nothans.com/wp-content/uploads/2023/03/image-4.png?resize=750%2C574&amp;ssl=1 750w" sizes="auto, (max-width: 750px) 100vw, 750px" /><figcaption class="wp-element-caption">ChatGPT Prompt: Create a table of made up fantasy city names in HTML where one column is the city name and other column is a population size</figcaption></figure>
</div>

<h2 class="wp-block-heading" id="pseudocode-is-now-prompt-engineering">Pseudocode is Now Prompt Engineering</h2>


<p>Pseudocode and prompt engineering are both techniques used in software development to help with designing and planning the structure and logic of a program or algorithm.</p>



<p>Pseudocode is a high-level description of a program or algorithm that is written in natural language and simple syntax. It allows developers to outline the steps and structure of a program without getting bogged down in the specifics of a particular programming language. Pseudocode can be used to plan out the logic of a program before writing any actual code.</p>



<p>Prompt engineering, on the other hand, is a technique used in natural language processing and machine learning to create high-quality prompts that guide the language model towards producing desired outputs. It involves designing and refining the prompts used to generate text, which can be used to train and fine-tune language models.</p>


<h2 class="wp-block-heading" id="tips-for-getting-better-at-prompting-for-programming">Tips for Getting Better at Prompting for Programming</h2>


<p>I have some advice if you want to start thinking like a software engineer and start learning how to prompt a language model like ChatGPT.</p>



<ol class="wp-block-list">
<li><strong>Break down the problem</strong>: The first step in prompt engineering is to break down the problem you want to solve into smaller, more manageable pieces. This requires you to think critically about the problem and identify the key factors that will influence the outcome.</li>



<li><strong>Identify the key inputs and outputs:</strong> Once you have broken down the problem, identify the key inputs and outputs of the system. This will help you design effective prompts that guide the model towards producing the desired outputs.</li>



<li><strong>Use clear and concise language: </strong>Just like in software development, clear and concise language is essential when using prompt engineering. Use language that is easy to understand and avoids ambiguity or confusion.</li>



<li><strong>Test and iterate: </strong>Prompt engineering is an iterative process, just like software development. Test your prompts and make adjustments based on the results you get. Continuously refine and improve your prompts to achieve the best possible outcomes.</li>



<li><strong>Consider edge cases: </strong>As a software engineer, you are familiar with the importance of edge cases in testing and development. When using prompt engineering, consider the edge cases that may impact the accuracy and performance of your model.</li>
</ol>



<p>By thinking like a software engineer, you can effectively leverage prompt engineering to create high-quality prompts that guide natural language processing and machine learning models towards producing the desired outputs.</p>



<p><strong>What do you think? Join our <a rel="noreferrer noopener" href="/discord" target="_blank">community</a>. Let&#8217;s discuss.</strong></p>
]]></content:encoded>
					
					<wfw:commentRss>https://nothans.com/the-final-programming-language-is-language/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3687</post-id>	</item>
		<item>
		<title>How To Build A Thriving Open Source Community</title>
		<link>https://nothans.com/how-to-build-a-thriving-open-source-community</link>
					<comments>https://nothans.com/how-to-build-a-thriving-open-source-community#respond</comments>
		
		<dc:creator><![CDATA[Hans Scharler]]></dc:creator>
		<pubDate>Mon, 26 Jul 2021 19:27:42 +0000</pubDate>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Talks]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Bevy]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[DevRel]]></category>
		<category><![CDATA[open source]]></category>
		<guid isPermaLink="false">https://nothans.com/?p=2311</guid>

					<description><![CDATA[]]></description>
										<content:encoded><![CDATA[
<p>Are you interested in Developer Relations (DevRel), open source software, and online communities? Well, check out Bevy&#8217;s virtual conference event: <a rel="noreferrer noopener" href="https://events.bevy.com/events/details/bevy-events-devrel-open-source-presents-how-to-build-a-thriving-open-source-community/" target="_blank">How To Build A Thriving Open Source Community</a>.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://events.bevy.com/events/details/bevy-events-devrel-open-source-presents-how-to-build-a-thriving-open-source-community/"><img data-recalc-dims="1" loading="lazy" decoding="async" width="584" height="410" data-attachment-id="2312" data-permalink="https://nothans.com/how-to-build-a-thriving-open-source-community/bevy_open_source_event" data-orig-file="https://i0.wp.com/nothans.com/wp-content/uploads/2021/07/bevy_open_source_event.jpg?fit=584%2C410&amp;ssl=1" data-orig-size="584,410" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Hans Scharler&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1627311763&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Bevy Open Source Event" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/nothans.com/wp-content/uploads/2021/07/bevy_open_source_event.jpg?fit=584%2C410&amp;ssl=1" src="https://i0.wp.com/nothans.com/wp-content/uploads/2021/07/bevy_open_source_event.jpg?resize=584%2C410&#038;ssl=1" alt="" class="wp-image-2312" srcset="https://i0.wp.com/nothans.com/wp-content/uploads/2021/07/bevy_open_source_event.jpg?w=584&amp;ssl=1 584w, https://i0.wp.com/nothans.com/wp-content/uploads/2021/07/bevy_open_source_event.jpg?resize=300%2C211&amp;ssl=1 300w" sizes="auto, (max-width: 584px) 100vw, 584px" /></a><figcaption><a href="https://events.bevy.com/events/details/bevy-events-devrel-open-source-presents-how-to-build-a-thriving-open-source-community/" target="_blank" rel="noreferrer noopener">How To Build A Thriving Open Source</a> Community Virtual Conference Event</figcaption></figure></div>



<p>I am honored to be on the panel along with Jana Boruta / HashiCorp and Xavier Portilla Edo / Voiceflow.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://events.bevy.com/events/details/bevy-events-devrel-open-source-presents-how-to-build-a-thriving-open-source-community/"><img data-recalc-dims="1" loading="lazy" decoding="async" width="750" height="313" data-attachment-id="2314" data-permalink="https://nothans.com/how-to-build-a-thriving-open-source-community/bevy_open_source_event_panel" data-orig-file="https://i0.wp.com/nothans.com/wp-content/uploads/2021/07/bevy_open_source_event_panel.jpg?fit=1051%2C439&amp;ssl=1" data-orig-size="1051,439" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Hans Scharler&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1627312873&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="bevy_open_source_event_panel" data-image-description="" data-image-caption="" data-large-file="https://i0.wp.com/nothans.com/wp-content/uploads/2021/07/bevy_open_source_event_panel.jpg?fit=750%2C313&amp;ssl=1" src="https://i0.wp.com/nothans.com/wp-content/uploads/2021/07/bevy_open_source_event_panel.jpg?resize=750%2C313&#038;ssl=1" alt="" class="wp-image-2314" srcset="https://i0.wp.com/nothans.com/wp-content/uploads/2021/07/bevy_open_source_event_panel.jpg?resize=1024%2C428&amp;ssl=1 1024w, https://i0.wp.com/nothans.com/wp-content/uploads/2021/07/bevy_open_source_event_panel.jpg?resize=300%2C125&amp;ssl=1 300w, https://i0.wp.com/nothans.com/wp-content/uploads/2021/07/bevy_open_source_event_panel.jpg?resize=768%2C321&amp;ssl=1 768w, https://i0.wp.com/nothans.com/wp-content/uploads/2021/07/bevy_open_source_event_panel.jpg?w=1051&amp;ssl=1 1051w" sizes="auto, (max-width: 750px) 100vw, 750px" /></a><figcaption>How To Build A Thriving Open Source Community panel</figcaption></figure></div>



<p>&#8220;As people seek new opportunities to meet and collaborate with like-minded developers locally and globally, community-led open source events are becoming more important than ever. The impact of today’s leading Open Source programs are driven by the grassroots, passionate community organizers.&#8221;</p>



<p>Some questions that we will tackle:</p>



<ul class="wp-block-list"><li>What makes a strong open source community?&nbsp;</li><li>How can we create authentic experiences?&nbsp;</li><li>How are leading Open Source professionals measuring the success of their programs?&nbsp;</li><li>As the world shifts into hybrid and in-person experiences, what does the future of open source community events look like?</li></ul>



<p>Join us <a href="https://events.bevy.com/events/details/bevy-events-devrel-open-source-presents-how-to-build-a-thriving-open-source-community/" target="_blank" rel="noreferrer noopener">Thursday, July 29 at 9:00 AM (PDT)</a> for an expert panel where we&#8217;ll discuss these topics, share wins and challenges, and connect with other Open Source community leaders across the world.</p>



<p><a rel="noreferrer noopener" href="https://events.bevy.com/events/details/bevy-events-devrel-open-source-presents-how-to-build-a-thriving-open-source-community/" target="_blank">Register at Bevy</a>. I am looking forward to answering your questions.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://nothans.com/how-to-build-a-thriving-open-source-community/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2311</post-id>	</item>
	</channel>
</rss>
