<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[ExpertMinds - Medium]]></title>
        <description><![CDATA[ExpertMinds is a collaborative tech publication by experienced developers shares expert insights on .NET, AI/ML, data engineering, system design, and Cloud native Architecture. We share practical insights, hands-on tutorials, and real-world solutions - Medium]]></description>
        <link>https://medium.com/expertminds?source=rss----03b5985a10e7---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>ExpertMinds - Medium</title>
            <link>https://medium.com/expertminds?source=rss----03b5985a10e7---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 08:49:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/expertminds" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Extending Claude Code: MCP, Hooks, Plugins, and Notes- Part 5]]></title>
            <link>https://medium.com/expertminds/extending-claude-code-mcp-hooks-plugins-and-notes-part-5-7a73c4a6efdb?source=rss----03b5985a10e7---4</link>
            <guid isPermaLink="false">https://medium.com/p/7a73c4a6efdb</guid>
            <category><![CDATA[anthropic-claude]]></category>
            <category><![CDATA[claude-ai]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[anthropic-claude-code]]></category>
            <dc:creator><![CDATA[Amit Naik]]></dc:creator>
            <pubDate>Sat, 27 Jun 2026 03:22:39 GMT</pubDate>
            <atom:updated>2026-06-27T03:22:39.134Z</atom:updated>
            <content:encoded><![CDATA[<p>Claude Code out of the box is already powerful. These four features turn it into a development environment that fits exactly how your team works.</p><p>The previous articles in this series covered the core disciplines: getting set up correctly, managing context and memory, writing specs, using Plan Mode, building custom commands. With those foundations in place, you have a structured workflow that produces AI-assisted code you can trust.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FoLctUddVk3hVQgO6pGzTQ.png" /></figure><p>This final article covers the layer above that — the extension layer. MCP, Hooks, Plugins, and Notes are the features that let you connect Claude Code to the rest of your development environment, automate behavior around Claude’s actions, add specialized capabilities, and keep a running record of what you have learned. Together they close the gap between “a powerful AI coding tool” and “a development environment that fits your team’s specific context.”</p><h3>Part 1: MCP — Model Context Protocol</h3><h4>What it is</h4><p>MCP (Model Context Protocol) is an open standard for connecting AI models to external tools and data sources. In Claude Code, MCP servers give Claude access to systems beyond its built-in capabilities — your databases, your APIs, your internal tools, your documentation, your deployment infrastructure.</p><p>Think of MCP as a plugin system for what Claude can <em>do</em>, not just what it <em>knows</em>. Without MCP, Claude Code can read and write files, run shell commands, and search your codebase. With MCP, it can also query your live database, create tickets in Jira, pull metrics from Datadog, fetch documentation from Confluence, or interact with any system that has an MCP server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/852/1*tfCWXQKT6704TCE6seRSqQ.png" /></figure><h4>How MCP works</h4><p>An MCP server is a small process that exposes a set of tools over a standard protocol. Claude Code connects to these servers at startup and discovers what tools are available. When Claude needs to use a tool — say, to run a database query — it calls the MCP tool, the server executes the operation in the connected system, and the result comes back into Claude’s context.</p><p>The architecture is clean: Claude Code sits in the middle, your MCP servers sit at the edges, each one connected to a specific external system. Claude does not get direct access to your systems — it goes through the MCP server, which controls exactly what Claude can and cannot do.</p><h4>Setting up MCP servers</h4><p>MCP servers are configured in your Claude Code settings file. A basic configuration looks like this:</p><pre>{<br>  &quot;mcpServers&quot;: {<br>    &quot;postgres&quot;: {<br>      &quot;command&quot;: &quot;npx&quot;,<br>      &quot;args&quot;: [&quot;-y&quot;, &quot;@modelcontextprotocol/server-postgres&quot;],<br>      &quot;env&quot;: {<br>        &quot;DATABASE_URL&quot;: &quot;postgresql://user:pass@localhost/mydb&quot;<br>      }<br>    },<br>    &quot;github&quot;: {<br>      &quot;command&quot;: &quot;npx&quot;,<br>      &quot;args&quot;: [&quot;-y&quot;, &quot;@modelcontextprotocol/server-github&quot;],<br>      &quot;env&quot;: {<br>        &quot;GITHUB_TOKEN&quot;: &quot;your-token-here&quot;<br>      }<br>    }<br>  }<br>}</pre><p>Once configured, Claude Code starts these servers alongside the main session. The tools they expose become available immediately — you can use them in prompts without any special syntax.</p><h4>What you can do with MCP</h4><p><strong>Database access.</strong> With a PostgreSQL or MySQL MCP server, Claude can query your actual data. This transforms debugging: instead of describing a data problem, you can show it.</p><pre>The user report says that orders placed between Jan 10-15 are missing <br>their shipping confirmation emails. Can you query the orders table <br>and look for a pattern in that date range?</pre><p>Claude queries the database, gets real results, and can reason about the actual data instead of guessing.</p><p><strong>GitHub integration.</strong> A GitHub MCP server lets Claude create branches, open pull requests, read issue descriptions, and post comments. Your development workflow becomes part of the conversation.</p><pre>We just finished the notification feature. Create a PR from the <br>feature/notifications branch to main with a summary of what changed.</pre><p><strong>Internal documentation.</strong> An MCP server connected to your Confluence or Notion workspace means Claude can read your runbooks, architecture docs, and decision logs directly — without you copying and pasting.</p><p><strong>Observability tools.</strong> Connect to Datadog, Grafana, or Sentry. When debugging a production issue, Claude can look at the actual metrics and error logs, not a description of them.</p><h4>The right mental model for MCP</h4><p>MCP extends what Claude Code can <em>do</em>, not what it <em>knows</em>. It does not make Claude smarter — it gives Claude access to more of your actual world. A Claude Code session with the right MCP servers connected is qualitatively different from one without: it can ground its reasoning in real data, take actions in real systems, and produce outputs that go directly into your workflow.</p><p>Start with one or two MCP servers for the tools your team uses most. Add more as you identify workflows that would benefit from tighter integration.</p><h3>Part 2: Hooks — Automating Around Claude’s Actions</h3><h4>What hooks are</h4><p>Hooks are scripts that run automatically at specific points in the Claude Code lifecycle. They let you attach behavior to Claude’s actions without modifying Claude Code itself — run a linter every time Claude writes a file, post a notification when a session ends, log all tool calls for auditing, enforce a policy before a shell command executes.</p><p>Hooks are the mechanism that turns Claude Code from a tool you use into a workflow that runs consistently, regardless of who is using it or how carefully they remember to do things.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/1*wedAqADeR1epCbN6cKI2Ug.png" /></figure><h4>The hook lifecycle</h4><p>Claude Code fires hooks at four points:</p><p><strong>PreToolUse</strong> — runs before Claude executes any tool (file write, shell command, etc.). Use this to validate, audit, or block actions before they happen.</p><p><strong>PostToolUse</strong> — runs immediately after a tool executes. Use this to react to what Claude just did — run tests after a file is written, update a log after a command runs.</p><p><strong>Notification</strong> — runs when Claude Code sends a notification (task complete, waiting for input, error occurred). Use this to route notifications to Slack, send an email, or trigger a downstream process.</p><p><strong>Stop</strong> — runs when a Claude Code session ends. Use this for cleanup, final logging, or reporting.</p><h4>Configuring hooks</h4><p>Hooks are configured in .claude/hooks/ in your project root. Each hook is a shell script that Claude Code calls with relevant context as environment variables.</p><pre>your-project/<br>├── .claude/<br>│   └── hooks/<br>│       ├── pre-tool-use.sh<br>│       ├── post-tool-use.sh<br>│       └── stop.sh</pre><p>A simple post-tool-use.sh that runs your linter after any file write:</p><pre>#!/bin/bash<br>if [ &quot;$CLAUDE_TOOL_NAME&quot; != &quot;write_file&quot; ]; then<br>  exit 0<br>fi<br><br>FILE=&quot;$CLAUDE_TOOL_INPUT_PATH&quot;<br>EXTENSION=&quot;${FILE##*.}&quot;<br>if [[ &quot;$EXTENSION&quot; == &quot;ts&quot; || &quot;$EXTENSION&quot; == &quot;tsx&quot; || &quot;$EXTENSION&quot; == &quot;js&quot; ]]; then<br>  echo &quot;Running ESLint on $FILE...&quot;<br>  npx eslint &quot;$FILE&quot; --fix<br>fi</pre><p>This hook fires every time Claude writes a file, checks whether it is a TypeScript or JavaScript file, and runs ESLint with auto-fix. Every file Claude writes is clean before you even see it.</p><h4>Practical hook patterns</h4><p><strong>Blocking dangerous commands:</strong></p><pre>#!/bin/bash<br># pre-tool-use.sh — block DROP TABLE without confirmation<br>if [ &quot;$CLAUDE_TOOL_NAME&quot; != &quot;bash&quot; ]; then<br>  exit 0<br>fi<br><br>if echo &quot;$CLAUDE_TOOL_INPUT_COMMAND&quot; | grep -qi &quot;DROP TABLE&quot;; then<br>  echo &quot;ERROR: DROP TABLE detected. Confirm this is intentional.&quot; &gt;&amp;2<br>  exit 1  # Non-zero exit blocks the tool<br>fi</pre><p>A non-zero exit from a PreToolUse hook blocks Claude Code from executing the tool. This is your enforcement mechanism — use it for anything that should never run without explicit human confirmation.</p><p><strong>Slack notification on session end:</strong></p><pre>#!/bin/bash<br># stop.sh<br>curl -s -X POST &quot;$SLACK_WEBHOOK_URL&quot; \<br>  -H &#39;Content-type: application/json&#39; \<br>  -d &quot;{\&quot;text\&quot;: \&quot;Claude Code session complete: $CLAUDE_SESSION_SUMMARY\&quot;}&quot;</pre><p><strong>Automatic test run after implementation:</strong></p><pre>#!/bin/bash<br># post-tool-use.sh<br>if [ &quot;$CLAUDE_TOOL_NAME&quot; != &quot;write_file&quot; ]; then exit 0; fi<br><br>FILE=&quot;$CLAUDE_TOOL_INPUT_PATH&quot;<br>if [[ &quot;$FILE&quot; == */src/* ]]; then<br>  npm test -- --testPathPattern=&quot;${FILE%.*}&quot;<br>fi</pre><h4>The power of hooks for teams</h4><p>Hooks are particularly valuable in team settings because they encode workflow requirements into the project itself. When a new developer joins and starts using Claude Code, the hooks run automatically. They do not have to remember to run the linter or the pre-deploy checklist. The project enforces its own standards.</p><h3>Part 3: Plugins</h3><h4>What plugins are</h4><p>Plugins are installable extensions that add new capabilities to Claude Code. Where MCP servers connect Claude Code to external systems, and hooks automate behavior around Claude’s actions, plugins extend Claude Code’s own functionality — adding new tools, new interfaces, new workflows within Claude Code itself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/1*JnJ2tYT6piP2COveUHpBFw.png" /></figure><p><strong>Language and framework plugins</strong> give Claude Code deeper understanding of a specific framework’s conventions. A Next.js plugin teaches Claude Code the file structure and data fetching patterns that Next.js expects, making generated code more idiomatic from the first prompt.</p><p><strong>Testing plugins</strong> integrate your test runner more tightly — running relevant tests automatically, parsing failure output into structured context, generating test cases from existing code.</p><p><strong>Documentation plugins</strong> generate or update documentation as part of the implementation workflow — keeping JSDoc, API docs, or README in sync with code as Claude writes it.</p><p><strong>Security scanning plugins</strong> run static analysis on generated code, flagging security issues before they reach a commit.</p><h4>Installing plugins</h4><pre>claude plugin install @claude/nextjs<br>claude plugin install @claude/vitest<br>claude plugin install @acme/internal-standards</pre><p>Once installed, a plugin’s capabilities are available in every session.</p><h4>Building your own plugins</h4><p>The Claude Code plugin API is open, which means you can build plugins for your team’s specific needs. Internal plugins are particularly valuable for organizations with proprietary frameworks, unique workflow requirements, or internal tools that no public plugin covers.</p><p>An internal plugin might:</p><ul><li>Teach Claude Code your company’s internal component library and its usage patterns</li><li>Integrate Claude Code with your internal deployment system</li><li>Enforce your organization’s security or compliance requirements</li><li>Connect Claude Code to a proprietary data source that has no public MCP server</li></ul><p>Think of an internal plugin as institutional knowledge that travels with Claude Code everywhere it goes — the kind of thing that otherwise lives only in a senior developer’s head and disappears when they leave.</p><h3>Part 4: Claude Code Notes</h3><h4>What Notes are</h4><p>Claude Code Notes is the session journal — a persistent, searchable record of your Claude Code sessions. Every session can be logged: what you built, what decisions you made, what you learned, what failed and why.</p><p>Notes are not just a log. They are a growing knowledge base that compounds in value as you use Claude Code more. The patterns you discover, the gotchas you hit, the solutions you found — all of it accumulates into a record you can search, reference, and build on.</p><h4>What to capture in Notes</h4><p>Not everything needs to go in Notes. The things worth capturing:</p><p><strong>Architectural decisions.</strong> When you make a non-obvious technical choice, write down the why.</p><pre>Decided to use SWR instead of React Query for data fetching.<br>Reason: existing codebase already has SWR in one place; <br>introducing a second library for the same purpose would be fragmentation.<br>Revisit if caching requirements become more complex.</pre><p><strong>Effective prompts.</strong> When you find a prompt pattern that works particularly well for your project, save it. It is reusable knowledge.</p><pre>Best way to get Plan Mode to surface architecture risks:<br>&quot;Think through this as if you were reviewing it in a code review <br>two months after shipping. What would the reviewer flag?&quot;</pre><p><strong>Project-specific gotchas.</strong> Things that are not obvious from the codebase but will catch you or a new developer off guard.</p><pre>Watch out: the payment service has a rate limit of 10 req/sec per merchant.<br>Batch operations must include throttling. Claude Code tends to forget this<br>unless reminded explicitly at the start of each payment-related session.</pre><p><strong>Session summaries.</strong> For long or complex sessions, a brief note on what was accomplished, what was deferred, and what the next steps are.</p><h4>Notes vs CLAUDE.md — the distinction</h4><p>CLAUDE.md is for things Claude should know at the start of every session — persistent, always-relevant project context that Claude reads automatically.</p><p>Notes are for things <em>you</em> need to remember to use Claude well — your own reasoning, your session history, your accumulated learnings. They are searchable and available to you, but they are not automatically injected into Claude’s context.</p><p>The practical rule: if it is something Claude needs to work correctly, it belongs in CLAUDE.md. If it is something you need to remember to work with Claude effectively, it belongs in Notes.</p><p>Over time, your Notes become a personal playbook for working with Claude Code in your specific project — the difference between a developer who compounds their AI-assisted productivity each week and one who rediscovers the same lessons repeatedly.</p><h3>The Complete Extension Stack</h3><p>With all four layers in place, Claude Code integrates into your development environment rather than sitting beside it:</p><p>MCP connects it to your live systems — database, GitHub, observability tools — so it works with real data instead of descriptions of data.</p><p>Hooks automate the workflows around Claude’s actions — linters, policies, notifications — so quality and consistency become properties of the project, not of any individual developer’s discipline.</p><p>Plugins add capabilities built for your specific context — your framework, your testing setup, your internal standards — so Claude Code generates idiomatic code from the first prompt.</p><p>Notes accumulate your experience into a searchable record — so what you learn in session 50 is still accessible and actionable in session 500.</p><h3>Closing the Series</h3><p>This article completes a five-part journey through Claude Code:</p><ul><li><strong>Article 1</strong> made the case for structure over vibes — why discipline around AI coding tools matters.</li><li><strong>Article 2</strong> covered the foundation: setup, slash commands, making changes, and image context.</li><li><strong>Article 3</strong> covered the memory architecture: context window, CLAUDE.md, Skills, and SubAgents.</li><li><strong>Article 4</strong> covered structured development: spec-driven development, Plan Mode, and custom commands.</li><li><strong>This article</strong> covered the extension layer: MCP, Hooks, Plugins, and Notes.</li></ul><p>The through-line is the same idea the series opened with: the AI has not changed. What changes is the structure around it. The developers who get the most from Claude Code are not the ones with the most creative prompts — they are the ones who invest in a disciplined, structured workflow that produces code they understand and can maintain.</p><p>That investment pays back every day.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a73c4a6efdb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/expertminds/extending-claude-code-mcp-hooks-plugins-and-notes-part-5-7a73c4a6efdb">Extending Claude Code: MCP, Hooks, Plugins, and Notes- Part 5</a> was originally published in <a href="https://medium.com/expertminds">ExpertMinds</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Structured Development with Claude Code: Specs, Plan Mode, and Custom Commands - Part 4]]></title>
            <link>https://medium.com/expertminds/structured-development-with-claude-code-specs-plan-mode-and-custom-commands-part-4-d950563ca7c9?source=rss----03b5985a10e7---4</link>
            <guid isPermaLink="false">https://medium.com/p/d950563ca7c9</guid>
            <category><![CDATA[claude-ai]]></category>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[anthropic-claude]]></category>
            <category><![CDATA[anthropic-claude-code]]></category>
            <dc:creator><![CDATA[Amit Naik]]></dc:creator>
            <pubDate>Sat, 27 Jun 2026 03:21:24 GMT</pubDate>
            <atom:updated>2026-06-27T03:21:25.498Z</atom:updated>
            <content:encoded><![CDATA[<p>Three practices that separate developers who ship maintainable AI-assisted code from those who spend their weekends untangling it.</p><p>There is a pattern in how developers grow with Claude Code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zb759ESQkCYDplyxoPvpgg.png" /></figure><p>In the first week, they are amazed by how much it can do. In the second week, they start noticing that the code drifts — features that felt solid start contradicting each other, and sessions feel increasingly like damage control. By the third week, some developers decide AI coding tools are not ready. Others figure out that the issue was never the AI — it was the absence of structure around it.</p><p>This article covers three practices that provide that structure: spec-driven development, Plan Mode and Ultraplan Mode, and custom slash commands. Each one solves a distinct problem. Together they form the disciplined middle layer between your project’s persistent context (CLAUDE.md and Skills) and its actual output (the code).</p><h3>Part 1: Spec-Driven Development</h3><h4>What it is</h4><p>Spec-driven development means writing a specification before writing any code. Not a full product requirements document — a focused, working document that defines what you are building, why, and how success is measured. Claude Code uses this spec as a north star for every decision it makes during implementation.</p><p>The spec is not a formality. It is the single source of truth that prevents the most common failure mode in AI-assisted development: drift.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*m2vJcpSzF5jT7MhIOjsRgw.png" /></figure><h4>Why drift happens without a spec</h4><p>When you build without a spec, the requirements live in your head and in the chat history. Claude remembers what it was told recently, but “recently” shrinks fast as the conversation grows. Decisions made at the start of a session become invisible by the middle. When you ask for a new feature three sessions later, Claude has no anchor — it builds something that is locally coherent but globally inconsistent with what came before.</p><p>A spec fixes this. It is always present, always consistent, always authoritative.</p><h4>What a good spec looks like</h4><p>A spec for Claude Code does not need to be long. It needs to be precise. A good spec answers five questions:</p><p><strong>1. What are we building?</strong><br>One paragraph, plain language. What is the feature? Who uses it? What problem does it solve?</p><p><strong>2. What are the inputs and outputs?</strong><br>For an API endpoint: what does the request body look like? What does the response return? What are the types?<br>For a UI component: what data does it receive? What does it render? What events does it emit?</p><p><strong>3. What are the acceptance criteria?</strong><br>A numbered list of “done” conditions. Not test cases — human-readable statements of what success looks like.</p><p><strong>4. What are the constraints?</strong><br>Anything the implementation must or must not do. Libraries to use or avoid, performance requirements, security considerations, things that are explicitly out of scope.</p><p><strong>5. What are the edge cases?</strong><br>The things that will break naive implementations. Empty states, invalid inputs, concurrent access, error conditions. Write these out before you build, not after the first bug report.</p><p>Here is a realistic example for a user notification feature:</p><pre># Spec: User notification system<br><br>## What we&#39;re building<br>A system that allows the application to send in-app notifications to users.<br>Notifications appear in a badge on the navbar and in a dropdown list.<br>Users can mark notifications as read individually or all at once.<br><br>## Inputs and outputs<br>- Notification record: { id, user_id, type, title, body, read_at, created_at }<br>- GET /api/notifications → list of unread notifications for authenticated user<br>- PATCH /api/notifications/:id/read → mark one notification as read<br>- PATCH /api/notifications/read-all → mark all as read<br><br>## Acceptance criteria<br>1. Users see a count of unread notifications in the navbar<br>2. Clicking the badge opens a dropdown showing the 10 most recent notifications<br>3. Notifications show title, a truncated body, and relative time<br>4. Marking one as read removes it from the unread count immediately<br>5. &quot;Mark all as read&quot; clears the badge and updates all records<br>6. Notifications persist across sessions (stored in DB, not localStorage)<br><br>## Constraints<br>- No external push notification service — in-app only for now<br>- Notifications are created by the backend only — no user-generated notifications<br>- Use the existing Drizzle ORM schema patterns (see /db/schema.ts)<br>- Frontend uses SWR for data fetching — consistent with the rest of the app<br><br>## Edge cases<br>- User with zero notifications: empty state with copy &quot;You&#39;re all caught up&quot;<br>- Notification body longer than 80 chars: truncate with ellipsis<br>- Network error when marking as read: optimistic update with rollback<br>- User opens dropdown while another tab marks a notification read: stale state acceptable, refresh on next focus</pre><h3>How to use the spec with Claude Code</h3><p>Once the spec is written, you use it as persistent context throughout the feature’s lifecycle:</p><p>@spec-notifications.md</p><pre><br>Let&#39;s start building the notification system. <br>Begin with the database schema. Follow the constraints section exactly.</pre><p>The spec is not just for the first prompt. Reference it when you are verifying that an implementation matches the requirements. Reference it when something unexpected comes up and you need to decide whether it is in scope. Reference it when you come back to the feature a week later and need to orient yourself.</p><p>A spec that lives alongside the code in your repository is more useful than one that lives in a chat window. Commit it. When requirements change, update it and commit again. The spec becomes part of your project’s version history — a record of what you decided to build and when.</p><h3>Spec-driven development and CLAUDE.md</h3><p>CLAUDE.md carries project-wide context that applies to every session. Specs carry feature-specific context for a defined body of work. They complement each other: CLAUDE.md tells Claude about your conventions and architecture; the spec tells Claude what you are building right now. Use both.</p><h3>Part 2: Plan Mode and Ultraplan Mode</h3><h4>The core idea</h4><p>Plan Mode is Claude Code’s way of separating thinking from doing. Instead of jumping straight to implementation when you describe a task, Claude Code thinks through the approach, identifies what needs to happen, surfaces risks, and presents a plan — all before writing a single line of code.</p><p>You review the plan. You refine it. You agree on it. Then you say build it.</p><p>This separation — plan first, implement second — is the single most impactful habit change available to Claude Code users.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*-7YP3XrTbZKfENTJSMPF5Q.png" /></figure><h4>Why implementation without planning fails</h4><p>When you ask Claude Code to implement something complex without a plan, it makes dozens of small architectural decisions silently. What file structure to use. What to name things. How to handle errors. Where to put shared logic. Each decision is locally reasonable, but without an agreed-on architecture, they accumulate into a codebase that is harder to navigate than it needs to be.</p><p>The plan surfaces these decisions before they are baked into code. A decision on a whiteboard is easy to change. A decision in code is work.</p><h4>How to use Plan Mode</h4><p>Invoking Plan Mode is a matter of how you phrase your prompt. The key is explicitly telling Claude not to write code yet:</p><pre>We need to add rate limiting to all our authentication endpoints.<br>Think through the approach before writing any code.<br>What are the key decisions? What files will we need to touch?<br>What could go wrong? Give me a plan.</pre><p>A good Plan Mode response from Claude Code will include:</p><ul><li>A summary of the approach and why it makes sense for your codebase</li><li>The files that will be created or modified, and what each change accomplishes</li><li>Dependencies or prerequisites (things that need to be true before implementation)</li><li>Risks and open questions that you should decide before building</li><li>An ordered sequence of implementation steps</li></ul><p>Review this carefully. Push back on anything that looks wrong. The plan is a conversation, not a decree:</p><pre>That approach makes sense for most endpoints, but don&#39;t apply rate limiting<br>to /auth/logout — we want that to always succeed. <br>Update the plan and then we&#39;ll build it.</pre><p>Only after you are satisfied with the plan:</p><pre>Good. Now implement it, following the plan step by step.</pre><h4>Ultraplan Mode</h4><p>Ultraplan Mode is an extended version of Plan Mode for genuinely complex tasks — multi-file refactors, feature systems that span multiple layers, architectural changes with downstream effects.</p><p>Where Plan Mode produces a planning response in the current context, Ultraplan Mode runs a dedicated planning session that is more comprehensive, more thorough in its risk analysis, and more explicit about dependencies and ordering.</p><p>To invoke Ultraplan Mode:</p><pre>/ultraplan</pre><pre>We need to migrate our authentication system from JWT to session-based auth.<br>This touches the middleware, all protected routes, the frontend token handling,<br>and the logout flow. Think through this comprehensively before we start.</pre><p>Ultraplan Mode is appropriate when:</p><ul><li>The change touches more than three or four interconnected files</li><li>The task involves an architectural decision with non-obvious trade-offs</li><li>Getting the ordering wrong would cause significant rework</li><li>You want to use SubAgents for parallel implementation and need a plan that SubAgents can operate from</li></ul><p>The output of an Ultraplan session can be saved as a document and used as the orchestration spec for a SubAgent workflow. Plan with Ultraplan, then delegate execution to SubAgents — each one gets a clearly scoped piece of the plan to implement in its own context.</p><h4>The discipline that makes it work</h4><p>Plan Mode only delivers its value if you actually read the plan before approving it. This sounds obvious, but the pressure to move fast creates a temptation to skim. Resist it.</p><p>The five minutes you spend reviewing a plan is the best investment in a session. It is where you catch the architectural mistake before it costs an hour of refactoring. It is where you notice that Claude assumed a library you do not use. It is where you realize the approach would work but there is a simpler one.</p><p>Read the plan. Change what is wrong. Then build.</p><h3>Part 3: Custom Slash Commands</h3><h4>The problem they solve</h4><p>Built-in slash commands handle session management — /clear, /compact, /add, /status. But every project has its own repeated workflows that no built-in command covers.</p><p>You run the same deployment checklist before every release. You start every debugging session the same way. You apply the same code review criteria to every pull request. Every time, you re-type the instructions from memory, or copy them from a doc somewhere, or — most often — you just do a worse job of it because you cannot be bothered.</p><p>Custom slash commands eliminate this. They let you encode your repeated workflows once and invoke them with a single command, with consistent thoroughness, every time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*hNLbbedrpXBBnTA782_cNA.png" /></figure><h4>What custom commands are</h4><p>A custom slash command is a Markdown file stored in .claude/commands/ in your project root. The filename becomes the command name. The contents become the prompt that Claude Code executes when you invoke the command.</p><pre>your-project/<br>├── .claude/<br>│   └── commands/<br>│       ├── review.md<br>│       ├── debug.md<br>│       ├── deploy-check.md<br>│       └── new-feature.md<br>├── CLAUDE.md<br>└── src/</pre><p>You invoke a command by typing its name with a leading slash:</p><pre>/review<br>/debug<br>/deploy-check</pre><h4>Writing a useful custom command</h4><p>The power of a custom command is that it can be far more thorough than what you would type in a hurry. A /review command can apply every code review standard your team cares about, consistently, without forgetting anything.</p><p>Here is a realistic example:</p><pre># /review — Code review<br><br>You are performing a code review on the changes in context.<br>Apply all of the following criteria:<br><br>## Correctness<br>- Does the logic handle all the edge cases in the spec?<br>- Are there any off-by-one errors, null reference risks, or unhandled promise rejections?<br>- Does the error handling match our typed error patterns in /lib/errors?<br><br>## Security<br>- Is all user input validated with Zod before use?<br>- Are there any SQL injection risks (we use Drizzle, but check raw queries)?<br>- Are any secrets or sensitive values being logged?<br><br>## Performance<br>- Are there any N+1 query patterns?<br>- Are expensive operations being done inside loops?<br>- Is any data that should be paginated being returned in full?<br><br>## Code quality<br>- Does this follow the conventions in CLAUDE.md?<br>- Are function and variable names clear without needing a comment?<br>- Is there any duplicated logic that should be extracted?<br><br>## Output format<br>Present findings as:<br>- Critical (blocks merge): list each issue with file and line<br>- Should fix (important but not blocking): list each issue<br>- Suggestion (optional improvement): list each issue<br>- Looks good: anything specifically well done worth noting</pre><p>A command this thorough would take five minutes to type from scratch every review. As a custom command, it takes two seconds to invoke and applies completely, consistently, every time.</p><h4>More command patterns</h4><p><strong>/debug</strong> — Structures the debugging process:</p><pre># /debug — Systematic debugging<br><br>Before suggesting fixes, work through this process:<br><br>1. State what the observed behavior is and what the expected behavior is<br>2. Identify the earliest point in the code where the divergence could occur<br>3. List your hypotheses about the cause, ranked by likelihood<br>4. For each hypothesis, identify what evidence would confirm or rule it out<br>5. Check the evidence for each hypothesis before concluding<br><br>Only after completing the above: propose a fix with an explanation<br>of why it addresses the root cause, not just the symptom.</pre><p><strong>/new-feature</strong> — Kicks off structured feature development:</p><pre># /new-feature — Feature kickoff<br><br>When starting a new feature, complete these steps in order:<br><br>1. Ask for the feature description if not provided<br>2. Create a spec file at /specs/[feature-name].md using the spec template<br>3. Identify which existing files will need to be modified<br>4. Identify any new files that will need to be created<br>5. Check CLAUDE.md for any constraints relevant to this feature type<br>6. Propose a Plan Mode session before any implementation begins<br><br>Do not write implementation code until a spec exists and a plan is approved.</pre><p><strong>/deploy-check</strong> — Pre-deployment verification:</p><pre># /deploy-check — Pre-deployment checklist<br><br>Verify each of the following before confirming deployment readiness:<br><br>- [ ] All tests passing (run: npm test)<br>- [ ] No TypeScript errors (run: npm run typecheck)<br>- [ ] No console.log statements in production code paths<br>- [ ] Environment variables documented in .env.example<br>- [ ] Database migrations are backwards compatible<br>- [ ] API changes are backwards compatible or version-bumped<br>- [ ] Feature flags in place for any incomplete work<br>- [ ] Error monitoring configured for new code paths<br><br>Report each item as PASS, FAIL, or NEEDS REVIEW with specific findings.</pre><h4>Global vs project commands</h4><p>Commands in .claude/commands/ are scoped to your project. Claude Code also supports global commands — stored in ~/.claude/commands/ on your machine — that are available in every project.</p><p>Global commands are ideal for workflows that transcend any single project: your personal debugging process, your code review style, your preference for how Claude Code explains things. Project commands are ideal for project-specific workflows: deployment procedures, the particular testing patterns your team follows, feature kickoff processes.</p><p>Build both libraries. Your global commands are the practices that define how you work; your project commands are the practices that define how your team works.</p><h4>The compounding effect</h4><p>Custom commands get more valuable as you build more of them, because they free up cognitive load progressively. Every workflow you do not have to remember, re-explain, or improvise is a workflow you can rely on being done consistently. The ROI is not just the time saved on each invocation — it is the accumulated quality difference between ad-hoc and systematic.</p><p>The developers who get the most from Claude Code are the ones who invest early in encoding their best practices into commands. By the time a new team member joins, the institutional knowledge is not in someone’s head — it is in .claude/commands/.</p><h3>How the Three Practices Reinforce Each Other</h3><p>These three practices are not independent techniques — they form a workflow:</p><p>You write a spec first. The spec defines what done looks like.</p><p>You run Plan Mode (or Ultraplan Mode for complex work) before implementation. The plan defines how you will get there.</p><p>You use custom commands to apply consistent quality standards at each stage — starting a new feature, reviewing the code, debugging problems, checking readiness to ship.</p><p>The spec prevents drift. The plan prevents architectural mistakes. The custom commands prevent inconsistency in how you apply your own standards.</p><p>Together they give you something that vibe coding never delivers: a reliable, repeatable process for producing AI-assisted code you can trust.</p><h3>What’s Next</h3><p>The final article in this series covers extending Claude Code beyond its defaults: <strong>MCP, Hooks, and Plugins</strong> — how to connect Claude Code to external services, automate behavior triggered by Claude’s actions, and build a customized development environment that fits exactly how your team works.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d950563ca7c9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/expertminds/structured-development-with-claude-code-specs-plan-mode-and-custom-commands-part-4-d950563ca7c9">Structured Development with Claude Code: Specs, Plan Mode, and Custom Commands - Part 4</a> was originally published in <a href="https://medium.com/expertminds">ExpertMinds</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Big Data and Spark Introduction]]></title>
            <link>https://medium.com/expertminds/big-data-and-spark-introduction-bf04f0ec0181?source=rss----03b5985a10e7---4</link>
            <guid isPermaLink="false">https://medium.com/p/bf04f0ec0181</guid>
            <category><![CDATA[spark]]></category>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[apache-spark]]></category>
            <dc:creator><![CDATA[Ravi Kumar Peta]]></dc:creator>
            <pubDate>Thu, 28 May 2026 11:07:42 GMT</pubDate>
            <atom:updated>2026-05-28T11:07:42.076Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RKbqomXqUbcPkPfwGLYw_g.png" /></figure><h3>1. What is Big Data?</h3><p>Big Data refers to datasets that are so large, fast-moving, or complex that traditional data processing tools (like a single relational database on one machine) cannot handle them efficiently.</p><h3>The 5 Vs of Big Data</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/681/1*eqqPK671CltNAkwjCjWHlA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QdBwFEfHdQqJaXNnzXzQrQ.png" /></figure><h3>Why Can’t a Single Machine Handle It?</h3><p>A typical laptop has:</p><ul><li>16–32 GB RAM</li><li>4–8 CPU cores</li><li>1–2 TB SSD</li></ul><p>But modern businesses generate:</p><ul><li><strong>Netflix</strong> — 1+ petabyte of data processed daily</li><li><strong>Facebook</strong> — 4+ petabytes of new data every day</li><li><strong>NYSE</strong> — 1 TB of trade data per trading session</li></ul><p>A single machine simply cannot store or process this much data efficiently. The solution is <strong>distributed computing</strong> — spreading the work across many machines (a cluster) so they work in parallel.</p><h3>2. The Challenges of Big Data</h3><h3>Storage Challenge</h3><p>Data doesn’t fit on one disk. You need a <strong>distributed file system</strong> (like HDFS or cloud object stores like AWS S3, Azure ADLS Gen2, GCS).</p><h3>Processing Challenge</h3><p>You can’t load 10 TB into RAM on one server. You need to break the data into chunks and process them in parallel across machines.</p><h3>Fault Tolerance Challenge</h3><p>If you have 100 machines running a 6-hour job and one machine fails after 5 hours, you don’t want to restart from scratch.</p><h3>Coordination Challenge</h3><p>Multiple machines need to communicate results, shuffle data between themselves, and coordinate work without creating bottlenecks.</p><h3>3. Evolution: From Hadoop to Spark</h3><h3>The Hadoop Era (2006–2014)</h3><p><strong>Apache Hadoop</strong> was the first widely adopted big data framework. It consisted of:</p><ul><li><strong>HDFS</strong> (Hadoop Distributed File System) — stores large files across many machines</li><li><strong>MapReduce</strong> — programming model for parallel data processing</li></ul><h4>How MapReduce Works</h4><pre>Input Data (on HDFS)<br>       ↓<br>   [MAP phase]          ← Each mapper processes one chunk of data independently<br>       ↓<br> (key, value) pairs<br>       ↓<br>  [SHUFFLE phase]       ← Framework groups all values with the same key together<br>       ↓<br>  [REDUCE phase]        ← Each reducer aggregates values for one key<br>       ↓<br>  Output (on HDFS)</pre><h4>MapReduce Word Count — Classic Example</h4><pre>// This is conceptual pseudocode for MapReduce<br>// MAP function: for each word in document, emit (word, 1)<br>map(String document) {<br>    for each word in document:<br>        emit(word, 1)<br>}<br><br>// REDUCE function: sum all counts for same word<br>reduce(String word, List&lt;Integer&gt; counts) {<br>    int total = 0;<br>    for each count in counts:<br>        total += count;<br>    emit(word, total);<br>}</pre><h3>Problems with MapReduce</h3><ol><li><strong>Every step writes to disk</strong> — after each Map or Reduce, results are written to HDFS. Reading/writing disk is 100x slower than RAM.</li><li><strong>No interactive queries</strong> — you had to write and compile Java code just to ask a question.</li><li><strong>Complex multi-step pipelines</strong> — chaining 10 MapReduce jobs meant 10 disk reads and 10 disk writes.</li><li><strong>No support for streaming</strong> — MapReduce is batch-only.</li><li><strong>Machine Learning was painful</strong> — iterative algorithms (like gradient descent) ran incredibly slowly.</li></ol><h3>Enter Apache Spark (2009→2014)</h3><p>Spark was created at UC Berkeley’s AMPLab in 2009 to solve all of Hadoop’s shortcomings. It became an Apache top-level project in 2014.</p><p><strong>Spark vs MapReduce Performance (Word Count on 100GB data):</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/406/1*SmMnHFpwQjWdIHJ7l3o2Cg.png" /></figure><p><strong>Why is Spark so much faster?</strong></p><ol><li><strong>In-memory computation</strong> — Spark tries to keep data in RAM between operations instead of writing to disk.</li><li><strong>DAG execution engine</strong> — Spark builds a Directed Acyclic Graph (DAG) of all operations and optimizes them before running.</li><li><strong>Lazy evaluation</strong> — Spark doesn’t execute anything until you request a result.</li><li><strong>Unified engine</strong> — one engine handles batch, streaming, SQL, ML, and graph processing.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*scFqDZgFbDUgrS1uJywNQg.png" /></figure><h3>4. What is Apache Spark?</h3><p>Apache Spark is an <strong>open-source, distributed computing engine</strong> for large-scale data processing. It provides:</p><ul><li><strong>Speed</strong>: In-memory computation, up to 100x faster than Hadoop MapReduce</li><li><strong>Ease of Use</strong>: APIs in Python (PySpark), Scala, Java, R, and SQL</li><li><strong>Flexibility</strong>: Batch processing, streaming, SQL queries, ML, and graph processing — all in one framework</li><li><strong>Fault Tolerance</strong>: Automatically recovers from node failures</li></ul><h3>Spark’s Unified Stack</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*61SCY-f2zsW46W8O_a4iow.png" /></figure><h3>5. Spark Architecture Deep Dive</h3><p>Understanding Spark’s architecture is critical. Let’s break it down piece by piece.</p><h3>High-Level Architecture</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LfbN7_a15xLYtNFOlwzwKA.png" /></figure><h3>Component Explanations</h3><h4>1. Driver Program</h4><p>The Driver is <strong>your Spark application</strong> — the main process that:</p><ul><li>Contains your application code (main() function or notebook)</li><li>Creates the SparkSession (entry point to Spark)</li><li>Analyzes your code and builds a logical plan</li><li>Converts the logical plan into a DAG (Directed Acyclic Graph) of stages and tasks</li><li>Schedules tasks on executors</li><li>Collects results from executors</li><li>Monitors job progress</li></ul><blockquote><strong><em>Important</em></strong><em>: The Driver runs on ONE machine. It does NOT process data itself — it orchestrates others.</em></blockquote><h4>2. Cluster Manager</h4><p>The Cluster Manager is responsible for <strong>resource allocation</strong>. It manages the cluster’s machines and decides how many resources (CPU, RAM) to give to each application.</p><p>Supported cluster managers:</p><ul><li><strong>Spark Standalone</strong> — Simple built-in cluster manager, great for learning</li><li><strong>Apache YARN</strong> — Hadoop’s resource manager, common in enterprise</li><li><strong>Apache Mesos</strong> — General-purpose cluster manager</li><li><strong>Kubernetes</strong> — Container orchestration, increasingly popular</li><li><strong>Databricks</strong> — Managed cluster manager (handles everything for you)</li></ul><h4>3. Worker Nodes</h4><p>Worker nodes are the <strong>machines in your cluster</strong> that actually process data. Each worker node runs one or more <strong>Executors</strong>.</p><h4>4. Executors</h4><p>Executors are <strong>JVM processes</strong> that run on worker nodes. Each executor:</p><ul><li>Runs the actual computation (Tasks)</li><li>Stores data in memory (for caching)</li><li>Communicates results back to the Driver</li></ul><p>Executors are launched at the start of an application and remain alive for its entire duration (unless an error occurs).</p><h4>5. Tasks</h4><p>A Task is the <strong>smallest unit of work</strong> in Spark. Each task:</p><ul><li>Processes one partition of data</li><li>Runs inside an executor</li><li>Is essentially a function applied to a data chunk</li></ul><p>If your dataset has 200 partitions, Spark will create 200 tasks to process them in parallel.</p><h3>6. Key Abstractions in Spark</h3><p>Spark has three main data abstractions, each built on top of the previous one:</p><h3>6.1 RDD (Resilient Distributed Dataset) — The Foundation</h3><p>RDD is Spark’s original low-level abstraction (Spark 1.x). It represents:</p><ul><li><strong>R</strong>esilient — fault tolerant (can rebuild lost partitions)</li><li><strong>D</strong>istributed — spread across many nodes</li><li><strong>D</strong>ataset — a collection of data elements</li></ul><p>An RDD is essentially an <strong>immutable, partitioned collection of objects</strong> distributed across the cluster.</p><pre>RDD with 4 partitions across 2 worker nodes:<br>Worker Node 1:                Worker Node 2:<br>┌─────────────────┐           ┌─────────────────┐<br>│  Partition 0    │           │  Partition 2    │<br>│  [1, 2, 3, 4]   │           │  [9, 10, 11, 12]│<br>├─────────────────┤           ├─────────────────┤<br>│  Partition 1    │           │  Partition 3    │<br>│  [5, 6, 7, 8]   │           │  [13, 14, 15,16]│<br>└─────────────────┘           └─────────────────┘</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P_2iyNcLBz7m-QOR8uXOQA.png" /></figure><h3>6.2 DataFrame — The Structured Layer</h3><p>Introduced in Spark 1.3, DataFrames add <strong>schema</strong> (column names and types) on top of RDDs. Think of them like a distributed Excel spreadsheet or SQL table.</p><pre>DataFrame: employees<br><br>+-------+----------+------+----------+<br>|emp_id |name      |salary|department|<br>+-------+----------+------+----------+<br>|1      |Alice     |70000 |Engineering|<br>|2      |Bob       |80000 |Marketing  |<br>|3      |Charlie   |90000 |Engineering|<br>|4      |Diana     |75000 |HR         |<br>+-------+----------+------+----------+</pre><pre>Data is split into partitions internally, but you see it as one logical table.</pre><p>DataFrames:</p><ul><li>Have named columns with types</li><li>Can be queried with SQL</li><li>Go through the <strong>Catalyst optimizer</strong> (automatically optimized)</li><li>Are much faster than RDDs for structured data</li></ul><h3>6.3 Dataset — Type-Safe DataFrames (Scala/Java Only)</h3><p>Datasets combine the benefits of RDDs (compile-time type safety) with DataFrames (Catalyst optimization). In Python, DataFrame = Dataset (Python doesn’t have compile-time type checking).</p><h3>Summary: Which to Use?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*R1hNlRRZmkIWEzXQS_CSUQ.png" /></figure><blockquote><strong><em>Recommendation</em></strong><em>: Use DataFrames/Spark SQL for 95% of your work. They are faster, easier to write, and benefit from automatic optimization.</em></blockquote><h3>7. Lazy Evaluation — The Secret Sauce</h3><p>Lazy evaluation means <strong>Spark does NOT execute operations immediately</strong>. Instead, it builds up a plan (logical plan → physical plan) and only executes when you actually need a result.</p><h3>Transformations vs Actions</h3><pre>┌─────────────────────────────────────────────────────────┐<br>│                    TRANSFORMATIONS                      │<br>│         (Lazy — just builds a plan, no execution)       │<br>│                                                         │<br>│  map(), filter(), flatMap(), groupBy(), join(),         │<br>│  select(), withColumn(), drop(), union(), ...           │<br>└─────────────────────────────────────────────────────────┘<br>                            ↓ builds up until...<br>┌─────────────────────────────────────────────────────────┐<br>│                       ACTIONS                           │<br>│         (Triggers actual execution of the plan)         │<br>│                                                         │<br>│  collect(), count(), show(), save(), write(),           │<br>│  first(), take(n), reduce(), foreach(), ...             │<br>└─────────────────────────────────────────────────────────┘</pre><h3>Why Lazy Evaluation is Powerful</h3><p>Consider this code:</p><pre># Reading 1 billion rows from disk<br>df = spark.read.parquet(&quot;/data/huge_dataset/&quot;)   # Transformation - lazy</pre><pre># Filter to only rows where country = &#39;US&#39; <br>us_df = df.filter(df.country == &quot;US&quot;)            # Transformation - lazy</pre><pre># Select only 2 columns<br>small_df = us_df.select(&quot;name&quot;, &quot;email&quot;)         # Transformation - lazy</pre><pre># THIS triggers execution<br>result = small_df.count()                         # Action - EXECUTES NOW</pre><p><strong>Without lazy evaluation</strong>: Spark would read ALL 1 billion rows, THEN filter, THEN select columns.</p><p><strong>With lazy evaluation</strong>: Spark’s Catalyst optimizer looks at the ENTIRE plan and pushes the filter/column selection DOWN to the data source. So it only reads country, name, and email columns, and skips all records where country != &#39;US&#39; during the read itself.</p><p>This is called <strong>predicate pushdown</strong> and <strong>column pruning</strong> — two automatic optimizations from lazy evaluation.</p><h3>8. Spark Execution Model</h3><h3>DAG (Directed Acyclic Graph)</h3><p>When you call an Action, Spark creates a DAG of all the transformations needed:</p><pre>Action: count()<br>         ↑<br>      select(&quot;name&quot;, &quot;email&quot;)<br>         ↑<br>      filter(country == &quot;US&quot;)<br>         ↑<br>      read.parquet(&quot;/data/&quot;)</pre><p>The DAG Scheduler converts this into <strong>Stages</strong>, and stages into <strong>Tasks</strong>:</p><pre>Stage boundary occurs at a &quot;shuffle&quot; (data needs to be redistributed across nodes)</pre><pre>Stage 1: read + filter + select  (no shuffle needed — works on each partition independently)<br>   Task 1 → Partition 0<br>   Task 2 → Partition 1<br>   ...<br>   Task N → Partition N</pre><pre>[Shuffle here if groupBy/join was added]</pre><pre>Stage 2: (would start after shuffle)<br>   ...</pre><h3>Narrow vs Wide Transformations</h3><p>This is crucial for understanding Spark performance:</p><pre>NARROW TRANSFORMATIONS (no shuffle needed):<br>Each partition of the output depends on at most one partition of the input.<br>Data stays on the same node — efficient!</pre><pre>  Input Partitions    Output Partitions<br>       P0                  P0&#39;<br>       P1        →         P1&#39;     (filter, map, select)<br>       P2                  P2&#39;<br>       P3                  P3&#39;<br></pre><pre>WIDE TRANSFORMATIONS (shuffle required):<br>Each partition of the output may depend on multiple partitions of input.<br>Data must move across the network — expensive!</pre><pre>  Input Partitions    Output Partitions<br>       P0  ──────────→  P0&#39;<br>       P1  ──────────→  P0&#39;<br>       P2  ──────────→  P1&#39;     (groupBy, join, distinct, repartition)<br>       P3  ──────────→  P1&#39;</pre><p>Wide transformations create <strong>stage boundaries</strong> in the DAG and require a <strong>shuffle</strong> (data redistribution across the network), which is expensive.</p><h3>9. Installing Spark Locally</h3><h3>Prerequisites</h3><ol><li><strong>Java 8 or 11</strong> — Spark runs on the JVM</li><li><strong>Python 3.7+</strong> — for PySpark</li><li><strong>pip</strong> — for installing PySpark</li></ol><h3>Option 1: Install PySpark via pip (Easiest)</h3><pre># Install PySpark (includes Spark binaries)<br>pip install pyspark</pre><pre># Verify installation<br>python -c &quot;import pyspark; print(pyspark.__version__)&quot;</pre><h3>Option 2: Use Databricks Community Edition (Recommended)</h3><p>The best way to learn Spark is directly in Databricks. Sign up at:</p><ul><li><a href="https://community.cloud.databricks.com/">https://community.cloud.databricks.com</a> (free, no credit card needed)</li></ul><h3>Option 3: Docker</h3><pre># Pull the official Jupyter PySpark image<br>docker pull jupyter/pyspark-notebook</pre><pre># Run it<br>docker run -p 8888:8888 jupyter/pyspark-notebook</pre><h3>10. Your First Spark Program</h3><p>Let’s write real Spark code from scratch and understand every line.</p><h3>10.1 Creating a SparkSession</h3><p>SparkSession is the <strong>single entry point</strong> to all Spark functionality (introduced in Spark 2.0). It replaces the older SparkContext, SQLContext, and HiveContext.</p><pre># file: 01_first_spark_program.py<br><br>from pyspark.sql import SparkSession<br># Create a SparkSession<br># - builder: factory pattern to configure Spark<br># - appName: name shown in Spark UI<br># - master(&quot;local[*]&quot;): run locally using ALL available CPU cores<br>#   - local[1] = 1 thread<br>#   - local[4] = 4 threads<br>#   - local[*] = all available cores<br># - getOrCreate(): return existing session or create new one<br>spark = SparkSession.builder \<br>    .appName(&quot;MyFirstSparkApp&quot;) \<br>    .master(&quot;local[*]&quot;) \<br>    .getOrCreate()<br># The SparkSession has a SparkContext accessible as .sparkContext<br>sc = spark.sparkContext<br>print(f&quot;Spark Version: {spark.version}&quot;)<br>print(f&quot;App Name: {sc.appName}&quot;)<br>print(f&quot;Master: {sc.master}&quot;)<br># Output:<br># Spark Version: 3.5.0<br># App Name: MyFirstSparkApp<br># Master: local[*]</pre><h3>10.2 Creating Data</h3><pre># Method 1: Create DataFrame from a Python list<br>data = [<br>    (1, &quot;Alice&quot;, 28, &quot;Engineering&quot;, 70000),<br>    (2, &quot;Bob&quot;,   32, &quot;Marketing&quot;,   80000),<br>    (3, &quot;Charlie&quot;, 25, &quot;Engineering&quot;, 60000),<br>    (4, &quot;Diana&quot;,  35, &quot;HR&quot;,          75000),<br>    (5, &quot;Eve&quot;,    29, &quot;Marketing&quot;,   85000),<br>    (6, &quot;Frank&quot;,  31, &quot;Engineering&quot;, 90000),<br>]<br><br># Define column names<br>columns = [&quot;emp_id&quot;, &quot;name&quot;, &quot;age&quot;, &quot;department&quot;, &quot;salary&quot;]<br># Create DataFrame<br>df = spark.createDataFrame(data, schema=columns)<br># Show the DataFrame (Action - triggers execution)<br>df.show()<br># +------+-------+---+-----------+------+<br># |emp_id|  name |age| department|salary|<br># +------+-------+---+-----------+------+<br># |     1|  Alice| 28|Engineering| 70000|<br># |     2|    Bob| 32|  Marketing| 80000|<br># |     3|Charlie| 25|Engineering| 60000|<br># |     4|  Diana| 35|         HR| 75000|<br># |     5|    Eve| 29|  Marketing| 85000|<br># |     6|  Frank| 31|Engineering| 90000|<br># +------+-------+---+-----------+------+</pre><h3>10.3 Exploring the DataFrame</h3><pre># Check the schema (column names + data types)<br>df.printSchema()<br># root<br>#  |-- emp_id: long (nullable = true)<br>#  |-- name: string (nullable = true)<br>#  |-- age: long (nullable = true)<br>#  |-- department: string (nullable = true)<br>#  |-- salary: long (nullable = true)<br><br># Number of rows<br>print(df.count())  # 6<br># Number of columns<br>print(len(df.columns))  # 5<br># Column names<br>print(df.columns)  # [&#39;emp_id&#39;, &#39;name&#39;, &#39;age&#39;, &#39;department&#39;, &#39;salary&#39;]<br># Shape equivalent (rows, columns)<br>print(f&quot;Shape: ({df.count()}, {len(df.columns)})&quot;)  # Shape: (6, 5)<br># Summary statistics<br>df.describe().show()<br># +-------+------------------+-------+------------------+-----------+------------------+<br># |summary|            emp_id|   name|               age| department|            salary|<br># +-------+------------------+-------+------------------+-----------+------------------+<br># |  count|                 6|      6|                 6|          6|                 6|<br># |   mean|               3.5|   null|30.166666666666668|       null|  76666.6666666....|<br># | stddev|1.8708286933869707|   null| 3.430782600499538|       null|10801.234497346432|<br># |    min|                 1|  Alice|                25| Engineering|             60000|<br># |    max|                 6|    Eve|                35|   Marketing|             90000|<br># +-------+------------------+-------+------------------+-----------+------------------+</pre><h3>10.4 Basic Transformations</h3><pre># SELECT — pick specific columns<br>df.select(&quot;name&quot;, &quot;salary&quot;).show()<br># +-------+------+<br># |   name|salary|<br># +-------+------+<br># |  Alice| 70000|<br># |    Bob| 80000|<br># ...<br><br># FILTER — keep only rows matching condition<br>df.filter(df.department == &quot;Engineering&quot;).show()<br># +------+-------+---+-----------+------+<br># |emp_id|   name|age| department|salary|<br># +------+-------+---+-----------+------+<br># |     1|  Alice| 28|Engineering| 70000|<br># |     3|Charlie| 25|Engineering| 60000|<br># |     6|  Frank| 31|Engineering| 90000|<br># +------+-------+---+-----------+------+<br><br># Multiple conditions<br>df.filter((df.department == &quot;Engineering&quot;) &amp; (df.salary &gt; 65000)).show()<br># +------+------+---+-----------+------+<br># |emp_id|  name|age| department|salary|<br># +------+------+---+-----------+------+<br># |     1| Alice| 28|Engineering| 70000|<br># |     6| Frank| 31|Engineering| 90000|<br># +------+------+---+-----------+------+<br><br># Add a new column<br>from pyspark.sql.functions import col, round as spark_round<br><br>df_with_bonus = df.withColumn(&quot;bonus&quot;, spark_round(col(&quot;salary&quot;) * 0.1, 2))<br>df_with_bonus.show()<br># +------+-------+---+-----------+------+------+<br># |emp_id|   name|age| department|salary| bonus|<br># +------+-------+---+-----------+------+------+<br># |     1|  Alice| 28|Engineering| 70000|7000.0|<br># ...<br><br># GROUP BY and aggregation<br>df.groupBy(&quot;department&quot;).agg(<br>    {&quot;salary&quot;: &quot;avg&quot;, &quot;emp_id&quot;: &quot;count&quot;}<br>).show()<br># +-----------+-----------+----------+<br># | department|avg(salary)|count(emp_id)|<br># +-----------+-----------+----------+<br># |Engineering|   73333.33|          3|<br># |  Marketing|   82500.0 |          2|<br># |         HR|   75000.0 |          1|<br># +-----------+-----------+----------+<br><br># ORDER BY<br>df.orderBy(df.salary.desc()).show()<br># Highest salary first</pre><h3>10.5 Using SQL</h3><pre># Register DataFrame as a temporary SQL view<br>df.createOrReplaceTempView(&quot;employees&quot;)<br><br># Now use standard SQL!<br>result = spark.sql(&quot;&quot;&quot;<br>    SELECT <br>        department,<br>        COUNT(*) as headcount,<br>        AVG(salary) as avg_salary,<br>        MAX(salary) as max_salary<br>    FROM employees<br>    WHERE age &gt;= 28<br>    GROUP BY department<br>    ORDER BY avg_salary DESC<br>&quot;&quot;&quot;)</pre><pre>result.show()<br># +-----------+---------+----------+----------+<br># | department|headcount|avg_salary|max_salary|<br># +-----------+---------+----------+----------+<br># |  Marketing|        2|   82500.0|     85000|<br># |         HR|        1|   75000.0|     75000|<br># |Engineering|        2|   80000.0|     90000|<br># +-----------+---------+----------+----------+</pre><h3>10.6 Reading and Writing Files</h3><pre># Write DataFrame to Parquet format (compressed, columnar — ideal for analytics)<br>df.write.mode(&quot;overwrite&quot;).parquet(&quot;/tmp/employees_parquet/&quot;)<br><br># Read it back<br>df_from_parquet = spark.read.parquet(&quot;/tmp/employees_parquet/&quot;)<br>df_from_parquet.show()<br># Write to CSV<br>df.write.mode(&quot;overwrite&quot;).option(&quot;header&quot;, True).csv(&quot;/tmp/employees_csv/&quot;)<br># Read CSV<br>df_from_csv = spark.read.option(&quot;header&quot;, True).option(&quot;inferSchema&quot;, True).csv(&quot;/tmp/employees_csv/&quot;)<br>df_from_csv.show()<br># Write to JSON<br>df.write.mode(&quot;overwrite&quot;).json(&quot;/tmp/employees_json/&quot;)<br># Read JSON<br>df_from_json = spark.read.json(&quot;/tmp/employees_json/&quot;)<br>df_from_json.show()</pre><h3>10.7 Stopping the SparkSession</h3><pre># Always stop SparkSession when done (releases cluster resources)<br>spark.stop()<br>print(&quot;SparkSession stopped.&quot;)</pre><h3>Complete Working Script</h3><pre># complete_first_spark_program.py<br>from pyspark.sql import SparkSession<br>from pyspark.sql.functions import col, avg, count, max as spark_max</pre><pre># ─── Setup ────────────────────────────────────────────────────────────<br>spark = SparkSession.builder \<br>    .appName(&quot;FirstSparkApp&quot;) \<br>    .master(&quot;local[*]&quot;) \<br>    .config(&quot;spark.sql.shuffle.partitions&quot;, &quot;4&quot;)  # reduce shuffle partitions for local mode<br>    .getOrCreate()</pre><pre>spark.sparkContext.setLogLevel(&quot;WARN&quot;)  # Reduce verbose output</pre><pre># ─── Create Data ──────────────────────────────────────────────────────<br>data = [<br>    (1, &quot;Alice&quot;,   28, &quot;Engineering&quot;, 70000),<br>    (2, &quot;Bob&quot;,     32, &quot;Marketing&quot;,   80000),<br>    (3, &quot;Charlie&quot;, 25, &quot;Engineering&quot;, 60000),<br>    (4, &quot;Diana&quot;,   35, &quot;HR&quot;,          75000),<br>    (5, &quot;Eve&quot;,     29, &quot;Marketing&quot;,   85000),<br>    (6, &quot;Frank&quot;,   31, &quot;Engineering&quot;, 90000),<br>]<br>columns = [&quot;emp_id&quot;, &quot;name&quot;, &quot;age&quot;, &quot;department&quot;, &quot;salary&quot;]</pre><pre>df = spark.createDataFrame(data, schema=columns)<br>df.printSchema()<br>df.show()</pre><pre># ─── Transformations ──────────────────────────────────────────────────<br># Department summary<br>print(&quot;=== Department Summary ===&quot;)<br>df.groupBy(&quot;department&quot;) \<br>  .agg(<br>      count(&quot;emp_id&quot;).alias(&quot;headcount&quot;),<br>      avg(&quot;salary&quot;).alias(&quot;avg_salary&quot;),<br>      spark_max(&quot;salary&quot;).alias(&quot;max_salary&quot;)<br>  ) \<br>  .orderBy(&quot;avg_salary&quot;, ascending=False) \<br>  .show()</pre><pre># High earners<br>print(&quot;=== High Earners (salary &gt; 75000) ===&quot;)<br>df.filter(col(&quot;salary&quot;) &gt; 75000) \<br>  .select(&quot;name&quot;, &quot;department&quot;, &quot;salary&quot;) \<br>  .orderBy(&quot;salary&quot;, ascending=False) \<br>  .show()</pre><pre># ─── SQL Query ────────────────────────────────────────────────────────<br>df.createOrReplaceTempView(&quot;employees&quot;)</pre><pre>print(&quot;=== SQL: Engineering Team ===&quot;)<br>spark.sql(&quot;&quot;&quot;<br>    SELECT name, age, salary,<br>           salary - AVG(salary) OVER (PARTITION BY department) AS salary_diff_from_dept_avg<br>    FROM employees<br>    WHERE department = &#39;Engineering&#39;<br>    ORDER BY salary DESC<br>&quot;&quot;&quot;).show()</pre><pre># ─── Cleanup ──────────────────────────────────────────────────────────<br>spark.stop()</pre><h3>11. Summary &amp; What’s Next</h3><h3>Key Takeaways from This Article</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*Xg2lyRvWWvvpzJ3ryXFvtg.png" /></figure><h3>What’s Next</h3><p>In <strong>Next Article </strong>, we’ll dive into the <strong>Databricks Platform</strong> — the managed Spark environment used by thousands of companies. We’ll learn:</p><ul><li>What Databricks adds on top of Spark</li><li>Databricks architecture (Control Plane vs Data Plane)</li><li>Creating your first cluster</li><li>Navigating notebooks</li><li>Using dbutils — Databricks utility library</li><li>DBFS (Databricks File System)</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bf04f0ec0181" width="1" height="1" alt=""><hr><p><a href="https://medium.com/expertminds/big-data-and-spark-introduction-bf04f0ec0181">Big Data and Spark Introduction</a> was originally published in <a href="https://medium.com/expertminds">ExpertMinds</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ontology 101 : URIs Are Not Just URLs: The Identity Crisis at the Heart of the Web]]></title>
            <link>https://medium.com/expertminds/ontology-101-uris-are-not-just-urls-the-identity-crisis-at-the-heart-of-the-web-33ed5bd2176d?source=rss----03b5985a10e7---4</link>
            <guid isPermaLink="false">https://medium.com/p/33ed5bd2176d</guid>
            <category><![CDATA[ontology]]></category>
            <category><![CDATA[rdf]]></category>
            <category><![CDATA[url]]></category>
            <category><![CDATA[semantics]]></category>
            <category><![CDATA[semanticweb]]></category>
            <dc:creator><![CDATA[Ravi Kumar Peta]]></dc:creator>
            <pubDate>Thu, 28 May 2026 03:54:29 GMT</pubDate>
            <atom:updated>2026-05-28T03:54:29.809Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qTl3-ZeMSPI4wnJKc3WLJg.png" /></figure><h3>The Identifier Problem</h3><p>In Previous Article we established that every entity in a knowledge graph needs a globally unique identifier — a URI. But what exactly <em>is</em> a URI? How does it differ from the URLs you type into a browser every day? And how do you design identifiers that will remain stable and meaningful for decades?</p><p>These questions might seem like plumbing. They are not. Getting your identifier strategy wrong is one of the most expensive mistakes you can make in a knowledge graph project. Changing a URI after data is published is equivalent to renaming every primary key in a production database — every foreign reference breaks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xZ6vNifojXd1g_McTVF6rA.png" /></figure><h3>The Terminology Minefield</h3><p>Let’s clear up the terminology once and for all.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vyozW_y-qyswJWi-2E-4rQ.png" /></figure><blockquote>The key insight: <strong>every URL is a URI, but not every URI is a URL.</strong></blockquote><p>In the Semantic Web, we almost always use <strong>HTTP URIs</strong> because they satisfy Linked Data rule #2: they are resolvable over the standard web protocol. When a machine encounters an HTTP URI it does not recognize, it can dereference it (make an HTTP GET request) and receive structured data in return.</p><pre>https://building.example/sensor/TMP-B3-R12-01<br>      ↑                  ↑<br>  HTTP scheme      path identifying the specific resource</pre><h3>The Two URI Design Patterns</h3><p>When you want a URI to both <em>identify</em> a thing and return data when looked up, you face a design decision. There are two widely-used patterns.</p><h3>Pattern 1: Hash URIs (#)</h3><p>The resource is identified by appending a fragment (#identifier) to a document URI. When dereferenced, the server returns the whole document and the client reads the fragment.</p><pre># The ontology document URI<br>&lt;https://building.example/ontology&gt;</pre><pre># Individual entity URIs (hash-based)<br>&lt;https://building.example/ontology#Chiller&gt;<br>&lt;https://building.example/ontology#VAV_Box&gt;<br>&lt;https://building.example/ontology#Server_Room_B&gt;</pre><p><strong>Pros:</strong> Simple — one document serves all entities. Works well for small, stable vocabularies.<br><strong>Cons:</strong> The entire document must be downloaded to resolve any single URI. Fragments are stripped by HTTP — you cannot serve different content for different entities without extra server logic.</p><p><strong>Best for:</strong> Ontology class and property definitions (e.g. FOAF uses hash URIs: foaf:Person expands to <a href="http://xmlns.com/foaf/0.1/Person)">http://xmlns.com/foaf/0.1/Person)</a></p><h3>Pattern 2: Slash URIs (/)</h3><p>Each entity gets its own distinct path. The server can serve a separate response for each resource.</p><pre># Entity URIs (slash-based)<br>&lt;https://building.example/equipment/chiller/RKP-007&gt;<br>&lt;https://building.example/space/room/B3-R12&gt;<br>&lt;https://building.example/sensor/TMP-B3-R12-01&gt;</pre><p><strong>Pros:</strong> Each URI is independently dereferenceable. The server can return different RDF representations for different entities. Scales to millions of instances.<br><strong>Cons:</strong> Requires server-side routing (or a 303 redirect pattern — see below).</p><p><strong>Best for:</strong> Instance data — individual sensors, rooms, assets, people.</p><h3>The 303 Redirect Pattern</h3><p>Here is the subtle problem with using HTTP URIs to identify <em>things</em> (not just web pages): HTTP was designed to retrieve <em>representations of resources</em>, not to identify physical objects.</p><p>If https://building.example/chiller/RKP-007 is a URI for a physical chiller, what should happen when a browser requests it? Returning HTML about the chiller would be useful for humans but confusing for machines expecting RDF.</p><p>The W3C’s solution is the <strong>303 See Other redirect</strong>:</p><pre>1. Client: GET https://building.example/chiller/SE-007<br>           Accept: text/turtle<br><br>2. Server: 303 See Other<br>           Location: https://building.example/data/chiller/RKP-007.ttl<br>3. Client: GET https://building.example/data/chiller/RKP-007.ttl<br>4. Server: 200 OK  (returns RDF Turtle)</pre><p>The original URI (/chiller/RKP-007) is the <strong>identity URI</strong> — it names the real-world thing. The redirect target (/data/chiller/RKP-007.ttl) is the <strong>information URI</strong> — it locates the document about that thing. This preserves the principle that the identity URI refers to the chiller itself, not a webpage.</p><h3>Designing Stable Identifiers for Your Smart Building</h3><p>Here are practical rules for minting URIs that will not haunt you:</p><h3>Rule 1 — Use a domain you control</h3><p>Never use a third-party domain like github.io as your canonical identifier base if there is any chance you might move. Register a dedicated domain and protect it.</p><pre>✅ https://ontology.yourcompany.com/building/<br>❌ https://ravipeta.github.io/ontology/building/  (personal page — may disappear)</pre><h3>Rule 2 — Separate the version from the identifier</h3><p>Put the version in the ontology metadata, not in the URI path. Stable identifiers should survive version upgrades.</p><pre># ✅ Good — version is metadata, not part of the identity URI<br>&lt;https://onto.example/building/Chiller&gt;<br>    owl:versionInfo &quot;2.1.0&quot; .<br><br># ❌ Bad - breaking change when v3 arrives<br>&lt;https://onto.example/building/v2/Chiller&gt;</pre><h3>Rule 3 — Use a consistent, readable path structure</h3><pre>/ontology/{domain}/{ConceptName}     →  for classes and properties<br>/data/{domain}/{type}/{local-id}     →  for instances</pre><p>Applied to our Smart Building:</p><pre># Classes<br>&lt;https://onto.example/building/ontology/Chiller&gt;<br>&lt;https://onto.example/building/ontology/TemperatureSensor&gt;<br>&lt;https://onto.example/building/ontology/VAV_Box&gt;<br><br># Instances<br>&lt;https://onto.example/building/data/chiller/RKP-007&gt;<br>&lt;https://onto.example/building/data/sensor/TMP-B3-R12-01&gt;<br>&lt;https://onto.example/building/data/floor/14&gt;</pre><h3>Rule 4 — Never encode transient information in a URI</h3><pre>❌ https://onto.example/building/active/chiller/RKP-007   (status changes)<br>❌ https://onto.example/building/floor14/room12/sensor01  (might move floors)<br>✅ https://onto.example/building/data/sensor/TMP-B3-R12-01  (stable unique ID)</pre><h3>Rule 5 — Document your URI policy</h3><p>Publish a short policy page at your base URI explaining the structure, redirect behavior, and deprecation process. Future maintainers (including future you) will thank you.</p><h3>IRIs: Unicode in Identifiers</h3><p>Standard URIs are limited to ASCII characters. For organizations whose domain names, asset codes, or location names include non-ASCII characters, the W3C extended the specification with <strong>IRIs (Internationalized Resource Identifiers)</strong>.</p><pre># A valid IRI — contains Japanese characters<br>&lt;https://onto.example/建物/センサー/001&gt;<br><br># Turtle handles IRIs natively<br>@prefix 建物: &lt;https://onto.example/建物/&gt; .<br>建物:センサー/001  a  建物:温度センサー .</pre><p>Most modern triple stores and RDF libraries handle IRIs correctly. If you need to embed IRIs in legacy XML-based systems, percent-encode the non-ASCII portions.</p><h3>Reusing vs Minting: A Practical Decision Tree</h3><p>Before minting a new URI, always check whether a suitable one already exists:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JmNR79wlocTsTNRKm6pqLg.jpeg" /></figure><p>For our Smart Building, the shortlist of existing URIs to reuse before minting new ones:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/407/1*iGbbEzuxhmFRPTM9i2C0Iw.png" /></figure><h3>Key Takeaways</h3><ul><li>URI is the general concept; URL is a URI that locates a resource; IRI extends URI with Unicode</li><li>Use <strong>hash URIs</strong> for small stable ontology definitions; <strong>slash URIs</strong> for large instance datasets</li><li>The <strong>303 redirect pattern</strong> separates the identity of a thing from the document describing it</li><li>Stable URI design: own your domain, version in metadata, never encode transient state</li><li>Always check existing open ontologies before minting a new URI</li></ul><h3>What’s Next</h3><p>Now that every entity has a stable identity URI, <strong>Next Article </strong>examines the data structure that connects them: the <strong>graph</strong>. We will cover directed vs undirected graphs, why graph traversal beats recursive SQL JOINs for connected data, and how to visually reason about a knowledge graph before writing a single line of code.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=33ed5bd2176d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/expertminds/ontology-101-uris-are-not-just-urls-the-identity-crisis-at-the-heart-of-the-web-33ed5bd2176d">Ontology 101 : URIs Are Not Just URLs: The Identity Crisis at the Heart of the Web</a> was originally published in <a href="https://medium.com/expertminds">ExpertMinds</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Context and Memory Management in Claude Code - Part 3]]></title>
            <link>https://medium.com/expertminds/context-and-memory-management-in-claude-code-d59bb696473f?source=rss----03b5985a10e7---4</link>
            <guid isPermaLink="false">https://medium.com/p/d59bb696473f</guid>
            <category><![CDATA[anthropic-claude-code]]></category>
            <category><![CDATA[claude-ai]]></category>
            <category><![CDATA[anthropic-claude]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[claude]]></category>
            <dc:creator><![CDATA[Amit Naik]]></dc:creator>
            <pubDate>Wed, 27 May 2026 17:36:09 GMT</pubDate>
            <atom:updated>2026-06-24T13:29:52.530Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Claude Code has no memory by default. Here is how to give it one — and how to stop running out of it mid-task.</strong></p><p>Here is something most developers discover the hard way.</p><p>You are halfway through a complex feature. Claude Code has been doing well — it knows your stack, it is following your conventions, the code it is producing fits your codebase. Then the conversation gets long. You ask Claude to make another change, and it starts doing something slightly wrong. It forgets a constraint you mentioned earlier. It suggests a dependency you already told it not to use. It contradicts a decision you made three sessions ago.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8Eggs49C8tsEh7NuIftABw.png" /></figure><p>This is what context window exhaustion looks like in practice. And it is not just about length — it is about what is in that limited space, how long it stays there, and whether the things Claude needs to know are actually available when it needs them.</p><p>This article covers the four tools that solve this problem: the context window itself, CLAUDE.md, Skills, and SubAgents. Together, they form a complete memory architecture for serious AI-assisted development.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/979/1*Rn1kmuJSolKsLTyEURXXLg.png" /></figure><h3>Part 1: The Context Window</h3><h4>What it is</h4><p>Every Claude Code session has a context window — a finite amount of space that holds everything Claude can “see” at once: your conversation history, the files you have added, Claude’s previous outputs, system instructions, everything.</p><p>Think of it as working memory. A brilliant colleague who can only remember the last N pages of notes. Once something scrolls off the edge, it is gone from Claude’s awareness — even if it matters.</p><p>The context window in Claude Code is large by modern standards, but it is not infinite. And because it holds code (which is verbose), outputs (which can be long), and files (which you keep adding), it fills up faster than you expect.</p><h4>What happens when it fills up</h4><p>When the context window gets full, Claude Code does not crash or stop. Something subtler happens: it starts losing track of earlier parts of the conversation. Decisions made at the start of the session become invisible. Constraints you set get quietly forgotten. The code starts to drift.</p><p>This is the root cause of most of the frustrating, inconsistent behavior people blame on “the AI being wrong.” It is usually not the model failing — it is context saturation.</p><h4>Managing it deliberately</h4><p>Claude Code gives you three tools for managing the context window:</p><p><strong>/status</strong> — Shows how much of the context window is currently in use. Run this periodically during long sessions. When it starts getting high, act before it hits the limit.</p><p><strong>/compact</strong> — Compresses the conversation history into a summary. The full transcript is gone, but a condensed version of what happened stays in context. Use this when you are continuing the same work but need to free up space.</p><p><strong>/clear</strong> — Wipes the context entirely. Use this when you are switching to a different task or starting something new. Cleaner than you might think — because the things Claude actually needs between sessions live in CLAUDE.md and Skills, not in the chat history.</p><p>The key mindset shift: treat the context window like RAM. Only load what is relevant to the current task. Add files deliberately, not indiscriminately. And clean up regularly.</p><h3>Part 2: CLAUDE.md — The Persistent Brain</h3><h4>What it is</h4><p>CLAUDE.md is a special Markdown file that Claude Code reads automatically at the start of every session. It is your project&#39;s persistent memory — the things Claude should always know, regardless of what is in the current conversation.</p><p>It lives in your project root:</p><pre>your-project/<br>├── CLAUDE.md        ← Claude reads this first<br>├── src/<br>├── package.json<br>└── ...</pre><h4>Why it matters</h4><p>Without CLAUDE.md, every session starts cold. You explain your stack, your conventions, your constraints — again. The AI has no idea what decisions were made last week, what patterns your team follows, or what is off-limits.</p><p>With CLAUDE.md, every session starts informed. Claude knows the codebase before you type a single word.</p><h4>What to put in it</h4><p>A well-written CLAUDE.md covers five things:</p><p><strong>1. Project overview</strong> — What is this? What does it do? One paragraph is enough.</p><pre>## Project overview<br>A B2B SaaS platform for construction project management.<br>Backend is Node.js + PostgreSQL. Frontend is Next.js 14.<br>Multi-tenant — every query must be scoped to a tenant_id.</pre><p><strong>2. Tech stack</strong> — The exact libraries, versions, and tools in use.</p><pre>## Tech stack<br>- Runtime: Node.js 20, TypeScript 5.3<br>- Database: PostgreSQL 16, Drizzle ORM (not Prisma)<br>- Auth: Clerk (not NextAuth — this was migrated in Jan 2024)<br>- Testing: Vitest + Testing Library<br>- Styling: Tailwind CSS 3.4</pre><p><strong>3. Coding conventions</strong> — The patterns your team follows. This is where most of the value lives.</p><p>markdown</p><pre>## Conventions<br>- All API routes use Zod for input validation — never trust raw req.body<br>- Database queries go through /lib/db, never inline SQL<br>- Error handling: throw typed errors from /lib/errors/index.ts<br>- All React components are functional — no class components<br>- Use async/await throughout, never .then() chains</pre><p><strong>4. Architecture decisions</strong> — The “why” behind important choices, so Claude does not suggest alternatives.</p><pre>## Architecture decisions<br>- We use tRPC, not REST — all new endpoints go in /server/routers<br>- Redis is used for session storage and rate limiting only, not as a cache<br>- File uploads go to S3 via presigned URLs — never through our API server</pre><p><strong>5. Do-not-do list</strong> — Explicit constraints that Claude should never violate.</p><pre>## Do not<br>- Install new npm packages without asking first<br>- Modify files in /migrations — these are write-once<br>- Use process.env directly — always go through /lib/config<br>- Add any external API calls without rate limiting</pre><h4>Keeping it current</h4><p>CLAUDE.md is a living document. Treat it like that. When your team makes a significant architectural decision, add it. When a library gets replaced, update the stack section. When a new &quot;do not&quot; emerges from a painful lesson, write it down.</p><p>A stale CLAUDE.md is worse than none — it gives Claude incorrect information confidently. Set a reminder to review it monthly, or just make updating it part of your &quot;done&quot; criteria whenever a significant change lands.</p><h4>Project vs sub-directory CLAUDE.md</h4><p>You can have multiple CLAUDE.md files — one in the root, and additional ones in subdirectories. Claude reads all of them, with the more specific ones taking precedence. This is useful for large monorepos where the frontend and backend have different conventions:</p><pre>my-monorepo/<br>├── CLAUDE.md           ← global conventions<br>├── packages/<br>│   ├── api/<br>│   │   └── CLAUDE.md   ← backend-specific rules<br>│   └── web/<br>│       └── CLAUDE.md   ← frontend-specific rules</pre><h3>Part 3: Skills — Reusable Encoded Knowledge</h3><h4>What they are</h4><p>Skills are reusable knowledge packages that you build once and reference across multiple projects or sessions. Where CLAUDE.md is project-specific context, Skills are portable expertise.</p><p>A Skill is a directory containing a SKILL.md file — a structured document that teaches Claude how to do a specific thing in your environment. Claude reads it when you reference the skill, and it stays in context for the duration of that task.</p><h4>What Skills are good for</h4><p>Skills shine when you have recurring tasks that require specific, non-obvious knowledge. Common examples:</p><ul><li><strong>Deployment procedures</strong> — The exact sequence of steps to deploy your application, including the flags, the order, the health checks, the rollback procedure.</li><li><strong>Testing patterns</strong> — How your team writes tests, what utilities are available, what patterns are required, what to avoid.</li><li><strong>Database migration workflows</strong> — The right way to create and apply migrations in your codebase.</li><li><strong>Code review standards</strong> — What your team looks for in a code review, what will always get flagged.</li><li><strong>API integration patterns</strong> — How to authenticate with and call your internal services.</li></ul><h4>What a Skill looks like</h4><pre># SKILL: Database Migrations<br><br>## When to use this skill<br>Whenever creating or modifying database migrations.<br><br>## Our migration tool<br>We use Drizzle Kit. Never write raw SQL migrations by hand.<br><br>## Creating a migration<br>1. Make changes to the schema file in /db/schema.ts<br>2. Run: npm run db:generate - this creates the migration file<br>3. Review the generated file in /db/migrations before applying<br>4. Run: npm run db:migrate - applies pending migrations<br><br>## Critical rules<br>- Never edit a migration file after it has been committed<br>- Always generate migrations from schema changes, never write them manually<br>- Test migrations on a local database before committing<br>- Migration files are named by timestamp - do not rename them<br><br>## Common mistakes<br>- Running db:migrate before db:generate (no-op, confusing)<br>- Editing schema without generating a migration (schema and DB diverge)</pre><h4>How to reference a Skill</h4><p>In Claude Code, you add a Skill to your context with the @ syntax:</p><pre>@skills/database-migrations.md <br>I need to add a new `subscription_tier` column to the users table. <br>Walk me through creating the migration.</pre><p>Claude reads the Skill, understands your migration workflow, and guides you correctly — without you having to re-explain it every time.</p><h4>Building your Skill library</h4><p>Think of Skills as your team’s institutional knowledge, codified. Every time someone has to explain a process more than twice, that process is a candidate for a Skill. Every onboarding document that lives in Notion and never gets updated is a candidate for a Skill.</p><p>Start small — one or two Skills for your most repeated workflows — and add to the library over time. The ROI compounds as the library grows.</p><h3>Part 4: SubAgents — Solving the Scale Problem</h3><h4>The problem SubAgents solve</h4><p>Even with a well-managed context window, CLAUDE.md, and Skills, some tasks are simply too large for a single session. A full feature spanning multiple files, a refactor across a large codebase, a task that requires researching and then building — these tasks push against the context window before the work is done.</p><p>The naive solution is to just keep prompting, reprompting, and hoping Claude holds the thread. It does not. Context gets saturated, decisions get forgotten, and the code drifts.</p><p>SubAgents are the structural solution. Instead of one Claude session trying to hold everything in a single context window, SubAgents break the work into focused, independent tasks — each running in its own context, each fully focused on one piece of the problem.</p><h4>How SubAgents work</h4><p>When you invoke a SubAgent in Claude Code, you are spinning up a separate Claude instance for a specific, bounded task. That instance has its own fresh context window. It does its work. It returns a result. The orchestrating session (the main Claude Code context) receives that result and continues.</p><p>The mental model: you are a senior developer. SubAgents are junior developers you can delegate to. You do not give each junior developer the entire project context — you give them a clear, scoped task and the specific files they need. They return their work. You review it and integrate it.</p><h4>What SubAgents are good for</h4><p><strong>Research tasks.</strong> Gather information about a library, an API, or an approach — without cluttering the main implementation context with all that exploratory noise.</p><p><strong>Parallel work.</strong> Multiple SubAgents can work simultaneously on independent parts of the same feature — one handles the backend endpoint, another handles the frontend component, a third writes the tests.</p><p><strong>Large file analysis.</strong> When you need Claude to read and understand a very large file, doing it in a SubAgent preserves the main context for actual implementation work.</p><p><strong>Isolated refactors.</strong> Refactoring a module is a contained task. Put it in a SubAgent, get a clean result, integrate it.</p><h4>A concrete example</h4><p>Suppose you are building a new user notification system. The work involves:</p><ul><li>A database schema change for notification records</li><li>A backend service to create and queue notifications</li><li>An API endpoint to fetch a user’s notifications</li><li>A frontend component to display them</li><li>Tests for all of the above</li></ul><p>In a single session, by the time you finish the backend, the context is crowded with schema discussions, migration outputs, and implementation notes — and there is barely room to think about the frontend without losing the thread.</p><h4>With SubAgents:</h4><pre>Main session: Plan the notification system architecture.<br><br>SubAgent 1: Create the database schema and migration.<br>SubAgent 2: Build the backend notification service.<br>SubAgent 3: Build the API endpoint.<br>SubAgent 4: Build the frontend notification component.<br>SubAgent 5: Write tests for the service and API.<br>Main session: Review all outputs, integrate, resolve conflicts.</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*UlrptJmqYXs8ij0l6XPuNA.png" /></figure><p>Each SubAgent works with a clean, focused context. The main session acts as the integrator, not the implementer. The total work is the same — but nothing gets lost, nothing gets confused, and every piece is fully focused.</p><h4>SubAgents and token cost</h4><p>SubAgents also help with cost. When a single context window fills up and Claude starts re-reading the entire history on every response, token usage spikes. SubAgents avoid this: each one starts fresh, does focused work, and exits. The token cost per task stays proportional to the task size, not to the total session length.</p><h3>How the Four Layers Work Together</h3><p>These four tools are not independent — they form a layered architecture where each one compensates for the limits of the others.</p><p>The context window is your working memory: fast, powerful, but finite and temporary. CLAUDE.md is your project&#39;s long-term memory: persistent, always available, survives every session reset. Skills are your institutional knowledge library: portable expertise you encode once and reuse forever. SubAgents are your delegation mechanism: the way you scale past what any single context window can hold.</p><p>A mature Claude Code workflow uses all four:</p><ul><li>CLAUDE.md loaded automatically, keeping every session informed from the start</li><li>Skills referenced explicitly when a recurring workflow is involved</li><li>Context window managed deliberately — files added with intention, /compact used before it gets critical</li><li>SubAgents invoked for any task that is too large, too parallel, or too exploratory for one session</li></ul><p>Together they give you something that vibe coding never delivers: a working relationship with an AI that actually knows your project, follows your conventions, stays within your constraints, and scales to the complexity of real work.</p><h3>What’s Next</h3><p>The next article in this series goes into the tools that extend Claude Code beyond the core workflow: <strong>MCP, Hooks, and Plugins</strong> — how to connect Claude Code to external services, automate behavior around Claude’s actions, and build a customized environment that fits your specific development needs.</p><p><em>This is article 3 in a series on mastering Claude Code. Article 1 covers why structured AI coding beats vibe coding. Article 2 covers setup, slash commands, making changes, and image context. Article 4 covers extending Claude Code with MCP, Hooks, and Plugins.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d59bb696473f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/expertminds/context-and-memory-management-in-claude-code-d59bb696473f">Context and Memory Management in Claude Code - Part 3</a> was originally published in <a href="https://medium.com/expertminds">ExpertMinds</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Beyond Vibe Coding: A Structured Approach to Claude Code - Part 1]]></title>
            <link>https://medium.com/expertminds/beyond-vibe-coding-a-structured-approach-to-claude-code-427f1b48e5f5?source=rss----03b5985a10e7---4</link>
            <guid isPermaLink="false">https://medium.com/p/427f1b48e5f5</guid>
            <category><![CDATA[claude-code-tips]]></category>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[anthropic-claude]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[claude-ai]]></category>
            <dc:creator><![CDATA[Amit Naik]]></dc:creator>
            <pubDate>Wed, 27 May 2026 10:51:06 GMT</pubDate>
            <atom:updated>2026-06-24T13:27:44.094Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Most developers are using AI coding tools wrong. Here’s what structured AI development actually looks like.</strong></p><p>There’s a pattern I keep seeing with developers who pick up AI coding tools for the first time.</p><p>They open Claude or Copilot, type something like <em>“build me a user authentication system”</em>, get a wall of code back, paste it in, see something break, ask AI to fix it, get more code, paste that in, something else breaks — and they repeat this loop until either it works or they give up.</p><p>This is vibe coding. And while it feels productive in the moment, it’s quietly building a mess you’ll spend weeks cleaning up.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rDg1K3IaJBJgJc0U9IYObw.png" /></figure><h3>What is Vibe Coding?</h3><p>The term “vibe coding” was coined by Andrej Karpathy to describe a style of AI-assisted development where you essentially <em>feel your way</em> through the code. You describe what you want, accept what the AI gives you, and iterate based on whether things seem to be working.</p><p>No plan. No structure. Just vibes.</p><p>To be fair — it works for throwaway scripts, quick prototypes, or weekend projects where you never look at the code again. The problem starts when vibe coding bleeds into real work. Into codebases that need to be maintained. Into features that other developers will touch. Into systems that need to scale.</p><p>At that point, vibe coding stops being fast and starts being technical debt at machine speed.</p><h3>The Specific Problems with Vibe Coding</h3><p><strong>1. You lose context, and so does the AI</strong></p><p>Every AI model has a context window — a limit to how much it can “remember” within a conversation. When you vibe code, you keep layering new requests on top of old ones, often without a clear structure. The AI starts to lose the thread of what it’s building. You start to lose the thread too. Decisions made three prompts ago get quietly contradicted by decisions made now.</p><p><strong>2. There’s no single source of truth</strong></p><p>In a vibe coding session, the “spec” for your feature lives inside the chat history. It’s implicit, scattered, and completely invisible to anyone who wasn’t in the room. Your future self included.</p><p><strong>3. You don’t understand what you built</strong></p><p>This is the most dangerous part. When you accept AI-generated code without understanding it, you own a system you can’t reason about. Debugging becomes guesswork. Code reviews become theater. New team members inherit code that nobody can explain.</p><p><strong>4. Token costs spiral</strong></p><p>If you’re using Claude Code or any API-based tool, vibe coding is expensive. You’re burning tokens reprompting, context-recovering, and fixing avoidable mistakes — none of which would happen with upfront planning.</p><h3>What Structured AI Coding Actually Looks Like</h3><p>Structured AI coding isn’t about limiting what the AI does for you. It’s about giving the AI — and yourself — a framework to operate within. Think of it as the difference between handing a contractor a napkin sketch versus a proper blueprint.</p><p>Here’s what it looks like in practice, specifically with Claude Code.</p><h3>Start with a Spec, Not a Prompt</h3><p>Before you write a single line of code, write a specification. Not a novel — even a one-page document that defines what you’re building, what it should do, and what it explicitly should <em>not</em> do.</p><p>In Claude Code, this is called <strong>Spec-Driven Development</strong>. You create a spec file, feed it to Claude as context, and all subsequent code generation stays anchored to that spec. When something drifts, you catch it against the spec — not against your memory of what you wanted.</p><p>A basic spec answers:</p><ul><li>What is this feature doing?</li><li>What are the inputs and outputs?</li><li>What are the edge cases and constraints?</li><li>What does success look like?</li></ul><p>This one habit alone eliminates a huge class of vibe coding problems.</p><h3>Use CLAUDE.md as Your Project Brain</h3><p>Claude Code has a special file called CLAUDE.md. It&#39;s the most important file in your project — and most developers don&#39;t know it exists.</p><p>CLAUDE.md is a persistent context file that Claude reads at the start of every session. It&#39;s where you document:</p><ul><li>Project architecture and key decisions</li><li>Coding conventions and standards your team follows</li><li>What tools and libraries are in use</li><li>Common gotchas or things Claude should never do in this codebase</li></ul><p>Without CLAUDE.md, every Claude Code session starts cold. With it, every session starts informed. You stop re-explaining your project from scratch every time you open a new chat.</p><h3>Plan Before You Build</h3><p>Claude Code has a <strong>Plan Mode</strong> (and an even more powerful <strong>Ultraplan Mode</strong>) where you ask Claude to think through a problem before writing any code.</p><p>Instead of: <em>“Build me a caching layer”</em></p><p>You say: <em>“Let’s plan how to add a caching layer. What are the key decisions we need to make? What are the tradeoffs? Don’t write code yet.”</em></p><p>You review the plan. You push back. You refine. Then — and only then — you say <em>“Now build it.”</em></p><p>This one step makes the generated code dramatically more coherent because the AI has reasoned through the architecture rather than jumping straight to implementation.</p><h3>Manage Context Deliberately</h3><p>One of the biggest mistakes developers make with Claude Code is treating the context window as infinite. It isn’t.</p><p>Structured AI coding means being intentional about what’s in context at any given moment. In Claude Code, you control this explicitly — you add specific files, remove others, and compact the conversation when it gets unwieldy.</p><p>The mental model: context is like RAM. It’s precious and finite. Load only what’s relevant to the task at hand.</p><h3>Use Subagents for Complex Work</h3><p>For larger tasks, Claude Code supports <strong>subagents</strong> — separate Claude instances that handle specific subtasks independently, then report back.</p><p>This isn’t just a cool feature. It’s a structural solution to a real problem. Complex tasks, when handled in a single context, create exactly the context bloat and drift that vibe coding suffers from. Breaking work into subagents keeps each piece focused, cheaper, and easier to debug when something goes wrong.</p><h3>A Tale of Two Workflows</h3><p><strong>Vibe coding workflow:</strong></p><ol><li>Open Claude Code</li><li>Ask for a feature</li><li>Accept code</li><li>See what breaks</li><li>Ask Claude to fix it</li><li>Repeat 40 times</li><li>Declare victory when tests pass (or when you give up)</li></ol><p><strong>Structured workflow:</strong></p><ol><li>Write a brief spec</li><li>Update CLAUDE.md with relevant context</li><li>Use Plan Mode to design the approach</li><li>Break the work into scoped tasks</li><li>Generate code task by task</li><li>Review and understand each piece before moving on</li></ol><p><strong>The second workflow takes longer to start. It’s faster to finish. And critically — it’s faster to revisit, debug, and extend three months later.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/1*GuAXfLuef7oPkJokSZBllA.png" /></figure><h3>The Right Mental Model</h3><p>Here’s the shift that makes everything click: <strong>AI is a powerful junior developer, not a magic solution machine.</strong></p><p>A junior developer who’s brilliant but needs clear instructions, a well-documented project, a defined scope for each task, and visibility into the decisions that came before. If you give that developer vague instructions on a poorly documented project, you’ll get vague, inconsistent code — no matter how talented they are.</p><p>Claude Code, at its best, is that developer working from a great spec, a clear CLAUDE.md, and a plan that you both agreed on before writing any code.</p><p>The AI hasn’t changed. The structure around it has.</p><h3>What’s Next</h3><p>This article is the first in a series on mastering Claude Code the right way. In the next pieces, we’ll go deep on:</p><ul><li><strong>Context and Memory Management</strong> — CLAUDE.md, Skills, and SubAgents in detail</li><li><strong>Structured Development</strong> — Spec-Driven Development, Plan Mode, and Custom Commands</li><li><strong>Extending Claude Code</strong> — MCP, Hooks, and Plugins</li></ul><p>If you’re already using Claude Code and want to get more out of it, those articles will be worth bookmarking.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=427f1b48e5f5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/expertminds/beyond-vibe-coding-a-structured-approach-to-claude-code-427f1b48e5f5">Beyond Vibe Coding: A Structured Approach to Claude Code - Part 1</a> was originally published in <a href="https://medium.com/expertminds">ExpertMinds</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting Started with Claude Code: Setup, Slash Commands, Making Changes, and Image Context -Part 2]]></title>
            <link>https://medium.com/expertminds/getting-started-with-claude-code-setup-slash-commands-making-changes-and-image-context-ade076dbc640?source=rss----03b5985a10e7---4</link>
            <guid isPermaLink="false">https://medium.com/p/ade076dbc640</guid>
            <category><![CDATA[claude-ai]]></category>
            <category><![CDATA[claude-code-tips]]></category>
            <category><![CDATA[anthropic-claude]]></category>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[claude-code]]></category>
            <dc:creator><![CDATA[Amit Naik]]></dc:creator>
            <pubDate>Wed, 27 May 2026 10:50:50 GMT</pubDate>
            <atom:updated>2026-06-24T13:28:14.217Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>A practical walkthrough of the four things you need to know before writing your first real line of AI-assisted code.</strong></p><p>Most tutorials about Claude Code start with “install it and run it.” That’s fine for a five-minute demo. But if you actually want to use it on real work the kind that ships, you need to understand four things before you write a single prompt.</p><p>This article walks through each one: setting up correctly, using slash commands to stop repeating yourself, making code changes with intention, and adding image context to give Claude the full picture of what you’re building.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tzTE0LwATe4w8lZYAeClbA.png" /></figure><h3>Part 1: Setup</h3><h4>Installing Claude Code</h4><p>Claude Code runs as a command-line tool. You install it globally via npm:</p><pre>npm install -g @anthropic-ai/claude-code</pre><p>Once installed, navigate to your project directory and start a session:</p><pre>cd your-project<br>claude</pre><p>That’s the technical part. The more important part is what you do before you start prompting.</p><h4>Set up your project context before anything else</h4><p>The single most valuable thing you can do at setup time is create a CLAUDE.md file in your project root. This file gets read by Claude at the start of every session. It&#39;s your project&#39;s persistent memory — the place where you document what Claude needs to know about your codebase, your conventions, and your preferences.</p><p>A minimal CLAUDE.md might look like this:</p><pre>## Project overview<br>E-commerce backend API built with Node.js and PostgreSQL.<br>Auth handled via JWT tokens. All routes require authentication except /health.<br><br>## Tech stack<br>- Runtime: Node.js 20<br>- Database: PostgreSQL with Drizzle ORM<br>- Testing: Vitest<br>- Linting: ESLint with Airbnb config<br><br>## Conventions<br>- Use async/await, never callbacks<br>- All database queries go through the /db layer, never inline SQL<br>- Error handling: always throw typed errors from /errors/index.ts<br><br>## Do not<br>- Install new dependencies without asking<br>- Modify migration files that have already been run</pre><p>Without CLAUDE.md, every session starts cold. Claude doesn&#39;t know your stack, your conventions, or what&#39;s off limits. With it, every session starts informed — and you spend your tokens on actual work instead of re-explaining your project from scratch.</p><p>We’ll cover CLAUDE.md in much greater depth in the next article in this series. For now: create it, fill it in with the basics, and get in the habit of updating it when something important changes.</p><h4>Understanding the interface</h4><p>When Claude Code starts, you get a terminal-style chat interface. A few things worth knowing immediately:</p><ul><li><strong>Files are not automatically in context.</strong> You have to add them explicitly. Use @filename to include a file in your prompt, or use the /add command.</li><li><strong>The context window is finite.</strong> Everything you add — files, conversation history, outputs — counts toward the limit. We’ll discuss managing this carefully in the next article.</li><li><strong>Claude Code has tools.</strong> It can read files, run shell commands, edit code, search your codebase, and more. These tools execute in your actual environment. That’s powerful and requires some care — we’ll get to that.</li></ul><h3>Part 2: Slash Commands</h3><h4>What are slash commands?</h4><p>Slash commands are shortcuts built into Claude Code. Type / and you&#39;ll see a list. They handle common tasks without requiring you to write a full prompt every time.</p><p>The most useful built-in ones:</p><p><strong>/help</strong> — Lists all available commands. Worth running once when you start.</p><p><strong>/clear</strong> — Clears the current conversation context. Use this when you&#39;re switching to a different task and want a clean slate, or when the context is getting long and cluttered.</p><p><strong>/compact</strong> — Compresses the conversation history into a summary. Unlike /clear, it preserves a sense of what happened — useful when you want to continue the same work but need to free up context window space.</p><p><strong>/add</strong> — Adds files to the current context. Example: /add src/auth/middleware.ts. You can add multiple files at once.</p><p><strong>/status</strong> — Shows what&#39;s currently in context: which files are loaded, how much of the context window is used. Get in the habit of checking this regularly.</p><p><strong>/undo</strong> — Rolls back the last code change Claude made. Your safety net when something goes wrong.</p><h4>Why slash commands matter more than they seem</h4><p>The biggest waste in most people’s Claude Code sessions is repetition. They write the same setup instructions at the start of every conversation. They re-add the same files. They re-explain the same constraints.</p><p>Slash commands — particularly custom ones, which we’ll cover in a later article — eliminate most of that. But even the built-in ones save meaningful time. The /clear and /compact commands in particular are habits worth developing early, because context management becomes more important the longer you work in a session.</p><h3>Part 3: Making Code Changes</h3><h4>How Claude Code edits files</h4><p>When you ask Claude Code to make a code change, it uses its built-in tools to read your file, generate the modified version, and write it back. This is not copy-paste — it edits your actual files directly.</p><p>This means two things:</p><ol><li><strong>Version control is non-negotiable.</strong> If you’re not using git, start now. Every Claude Code session should begin with a clean git state so you can diff, review, and roll back anything that goes wrong.</li><li><strong>Review before you move on.</strong> Claude Code will tell you what it changed. Read it. Every time. The habit of accepting changes without reading them is exactly how vibe coding creeps back in.</li></ol><h4>A structured approach to requesting changes</h4><p>The difference between a good change request and a vague one is specificity. Compare:</p><p><strong>Vague:</strong> <em>“Fix the login bug”</em></p><p><strong>Specific:</strong> <em>“The login endpoint at POST /auth/login is returning 500 when the user’s email doesn’t exist in the database. It should return 401 with the message ‘Invalid credentials’. The handler is in src/auth/routes.ts around line 47.”</em></p><p>The specific version gives Claude the location, the current behavior, the desired behavior, and the boundary of what should change. It produces a targeted edit. The vague version produces a guess.</p><h4>One change at a time</h4><p>This is the discipline most developers resist because it feels slower. It isn’t.</p><p>When you bundle multiple changes into one request — “fix the login bug, also add rate limiting, and update the error messages” — you get code that’s hard to review, hard to test, and hard to roll back if something goes wrong. The scope bleeds. Unexpected side effects compound.</p><p>One change, reviewed, committed. Then the next. This is the pace that produces maintainable code.</p><h4>Using Plan Mode before big changes</h4><p>For anything beyond a small, isolated fix, use Plan Mode before asking for code. Type:</p><pre>Let&#39;s plan how to add rate limiting to the auth endpoints. <br>Don&#39;t write any code yet — just outline the approach and what files we&#39;ll need to touch.</pre><p>Review the plan. Push back if something looks wrong. Agree on the approach. Then say:</p><pre>That looks right. Now implement it.</pre><p>This one step — separating planning from implementation — produces dramatically more coherent code because Claude has reasoned through the architecture rather than jumping straight to the keyboard.</p><h3>Part 4: Adding Image Context</h3><h4>Why image context matters</h4><p>Claude Code can accept images as context alongside your prompts. This sounds like a small feature. In practice it changes how you work.</p><p>Here are the situations where it becomes indispensable:</p><p><strong>Matching a UI design.</strong> If you’re building a component from a Figma export or a designer’s mockup, pasting the image and saying “build a React component that matches this” is dramatically faster than describing the layout in words — and far more accurate. Claude can see the spacing, the colors, the hierarchy.</p><p><strong>Debugging a visual problem.</strong> “The layout breaks on mobile” is an underspecified problem. A screenshot of the broken layout is specific. Claude can look at it and identify what’s causing the issue.</p><p><strong>Referencing a diagram or schema.</strong> If you have an architecture diagram, an ERD, or a flowchart that describes how something should work, including it as context means Claude can write code that reflects the actual design — not a guess about it.</p><p><strong>Understanding error screenshots.</strong> Some errors are easier to understand visually — a browser console with a stack trace, a failing test output, a misconfigured UI. Drop the screenshot in as context.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/878/1*inQ9Sg3lA0eIx8O5yQKGhQ.png" /></figure><h4>How to add an image</h4><p>In Claude Code’s terminal interface, you can reference image files using the @ syntax:</p><pre>@screenshot.png Look at this broken mobile layout. The sidebar is overlapping the content area. <br>What&#39;s causing it and how do I fix it?</pre><p>You can also drag and drop images directly into the Claude Code interface if you’re using the desktop version.</p><p>For Figma designs, export your frame as a PNG and include it. For screenshots, grab them directly. For diagrams, export from whatever tool you’re using.</p><h4>The right way to prompt with images</h4><p>Images give Claude visual context, but your prompt still needs to tell Claude what to do with that context. A few patterns that work well:</p><p><strong>For UI implementation:</strong></p><pre>@design-mockup.png <br>Build a React component that matches this design exactly. <br>Use Tailwind for styling. The component should be in src/components/HeroSection.tsx.</pre><p><strong>For debugging:</strong></p><pre>@console-error.png <br>This error is happening when I click the Submit button on the checkout form. <br>The form is in src/checkout/CheckoutForm.tsx. What&#39;s causing it?</pre><p><strong>For design matching:</strong></p><pre>@current-ui.png @figma-target.png<br>Here&#39;s what our component currently looks like (first image) and what it should look like (second image).<br>What CSS changes do I need to make to get from the current state to the target?</pre><p>Notice the pattern: image first (as context), then a specific question or instruction. Don’t just drop an image — tell Claude what you want done with it.</p><h3>Putting It All Together: A Typical Session</h3><p>Here’s what a structured Claude Code session looks like when these four pieces are in place:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/853/1*TfxH7A_gP4WzWXaLAFU3nA.png" /></figure><p><strong>1. Start clean.</strong> Check git status — make sure you’re starting from a committed, clean state.</p><p><strong>2. Start Claude Code.</strong> Your CLAUDE.md loads automatically. Claude knows your project.</p><p><strong>3. Define the task clearly.</strong> Before prompting, know what you’re trying to accomplish and what “done” looks like.</p><p><strong>4. Use Plan Mode for anything non-trivial.</strong> Plan first, then implement.</p><p><strong>5. Add context intentionally.</strong> Use /add to bring in the specific files relevant to the task. If you have a design or screenshot, include it.</p><p><strong>6. Make one change at a time.</strong> Review each change. Commit when you’re satisfied.</p><p><strong>7. Manage context.</strong> Watch your context window. Use /compact when things get long. Use /clear when you switch to a different task.</p><p><strong>8. End with a commit.</strong> Don’t leave sessions in an uncommitted state.</p><p>This isn’t the fastest way to start. It’s the fastest way to stay fast over time — because you’re building code you understand, in a codebase that stays comprehensible.</p><h3>What’s Next</h3><p>This is the foundation. With setup, slash commands, structured change-making, and image context in place, you have the basic toolkit.</p><p>The next article goes deeper into the part most developers underestimate: <strong>Context and Memory Management</strong> — how CLAUDE.md works in detail, how to use Claude Code Skills to encode reusable knowledge, and how SubAgents help you tackle work that&#39;s too large for a single context window.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ade076dbc640" width="1" height="1" alt=""><hr><p><a href="https://medium.com/expertminds/getting-started-with-claude-code-setup-slash-commands-making-changes-and-image-context-ade076dbc640">Getting Started with Claude Code: Setup, Slash Commands, Making Changes, and Image Context -Part 2</a> was originally published in <a href="https://medium.com/expertminds">ExpertMinds</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ontology 101 : Why the Web Has a Memory Problem, and How Linked Data Solves It]]></title>
            <link>https://medium.com/expertminds/ontology-101-why-the-web-has-a-memory-problem-and-how-linked-data-solves-it-f051a5282810?source=rss----03b5985a10e7---4</link>
            <guid isPermaLink="false">https://medium.com/p/f051a5282810</guid>
            <category><![CDATA[linked-data]]></category>
            <category><![CDATA[ontology]]></category>
            <category><![CDATA[semanticweb]]></category>
            <category><![CDATA[semantics]]></category>
            <dc:creator><![CDATA[Ravi Kumar Peta]]></dc:creator>
            <pubDate>Wed, 27 May 2026 02:07:10 GMT</pubDate>
            <atom:updated>2026-05-27T02:07:10.309Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DZVgSEvxwhNRx9ZhhCTumQ.png" /></figure><h3>The Web You Use Every Day Is Amnesiac</h3><p>The World Wide Web is the greatest information system ever built. And it has a profound, structural memory problem.</p><p>Open any page about a commercial building — say, an energy efficiency report for a smart high-rise in Bengaluru. The HTML page might contain the building name, its energy consumption figures, the HVAC system brand, and the facility manager’s contact. A human reads it and immediately understands how those facts connect. But the web browser rendering that page, and every crawler, API, or analytics system that touches it, sees <strong>a bag of text inside markup tags</strong>. No machine can understand that “Chiller_7” in one report is the same physical device as “Unit 7 — York HVAC” in a different report.</p><p>This is the memory problem. The web is a <strong>web of documents</strong>. What Tim Berners-Lee — the web’s inventor — spent decades campaigning for is a <strong>web of data</strong>: a web where the facts themselves are the first-class citizens, not the pages that happen to contain them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZfboJmCOpJuhOdB4iQD1Cg.png" /></figure><h3>The Four Linked Data Principles</h3><p>In 2006, Berners-Lee published a short design note that became the manifesto for the Semantic Web movement. He proposed four rules, elegant in their simplicity, that — if followed — would transform isolated data silos into a global, machine-readable knowledge graph:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2wzPojo6fesJTCGOAwCo4w.png" /></figure><p>These four rules are the DNA of Linked Data. Everything else in the Semantic Web stack — RDF, RDFS, OWL, SPARQL — is machinery built to honor them.</p><h3>Why Documents Are the Wrong Abstraction</h3><p>Consider what happens when two organizations want to share data about the same physical asset.</p><p><strong>Organization A</strong> (facilities team) stores:</p><pre>Asset ID: CHILLER-RKP-007<br>Type: Water-Cooled Chiller<br>Manufacturer: Carrier<br>Floor: 14</pre><p><strong>Organization B</strong> (energy auditor) stores:</p><pre>Equipment Code: C7-WCC<br>Category: HVAC / Cooling<br>Brand: Carrier Corporation<br>Location: Level 14, East Wing</pre><p>These are the same chiller. But integrating these two records requires a human analyst, a data-cleaning script, or an expensive integration project. The entities are described, but not <em>identified</em>. There is no shared anchor.</p><p>In Linked Data, both organizations would use the same URI:</p><pre>https://assets.building-registry.example/chiller/RKP-007</pre><p>When fetched, that URI returns RDF triples:</p><pre>@prefix bldg:  &lt;https://assets.building-registry.example/&gt; .<br>@prefix schema: &lt;https://schema.org/&gt; .<br>@prefix rdf:   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt; .<br><br>bldg:chiller/RKP-007<br>    rdf:type         bldg:WaterCooledChiller ;<br>    schema:name      &quot;Carrier 30XA Water-Cooled Chiller — Unit 7&quot; ;<br>    schema:location  bldg:floor/14 ;<br>    schema:brand     bldg:manufacturer/Carrier .</pre><p>Now both teams, and every downstream system, reference the same URI. The integration problem dissolves.</p><h3>The Linked Open Data Cloud</h3><p>Following Berners-Lee’s principles, a global community of institutions began publishing data as Linked Data. Today the <strong>Linked Open Data (LOD) cloud</strong> — a publicly visualized map of interlinked datasets — contains:</p><ul><li><strong>DBpedia</strong> — structured data extracted from Wikipedia</li><li><strong>Wikidata</strong> — a community-edited knowledge base with 100+ million items</li><li><strong>GeoNames</strong> — geographical data for every place on earth</li><li><strong>EU Open Data Portal</strong> — legislation, statistics, and public procurement</li><li><strong>UniProt</strong> — protein and genome data in RDF</li><li><strong>ORCID</strong> — researcher identifiers linked to publications</li></ul><p>Each dataset publishes RDF using stable URIs and links to others. A query about a building’s location can seamlessly resolve to GeoNames coordinates, which link to climate data, which link to energy regulation documents — without any human writing integration code.</p><h3>Applying Linked Data to Our Smart Building</h3><p>Here is what it looks like to Linked-Data-ify our building’s sensor infrastructure.</p><p><strong>Before (a flat JSON record from a proprietary IoT platform):</strong></p><pre>{<br>  &quot;sensor_id&quot;: &quot;TMP-B3-R12-01&quot;,<br>  &quot;type&quot;: &quot;temperature&quot;,<br>  &quot;room&quot;: &quot;B3-R12&quot;,<br>  &quot;value&quot;: 22.4,<br>  &quot;unit&quot;: &quot;Celsius&quot;<br>}</pre><p><strong>After (Linked Data as RDF Turtle):</strong></p><pre>@prefix bldg:  &lt;https://building.example/&gt; .<br>@prefix sosa:  &lt;http://www.w3.org/ns/sosa/&gt; .<br>@prefix qudt:  &lt;http://qudt.org/schema/qudt/&gt; .<br>@prefix unit:  &lt;http://qudt.org/vocab/unit/&gt; .<br>@prefix xsd:   &lt;http://www.w3.org/2001/XMLSchema#&gt; .<br><br>bldg:sensor/TMP-B3-R12-01<br>    a                   sosa:Sensor ;<br>    sosa:observes       bldg:property/AirTemperature ;<br>    sosa:isHostedBy     bldg:room/B3-R12 .<br><br>bldg:observation/TMP-B3-R12-01-2026-05-25T09:00:00Z<br>    a                   sosa:Observation ;<br>    sosa:madeBySensor   bldg:sensor/TMP-B3-R12-01 ;<br>    sosa:hasResult      bldg:result/001 .<br><br>bldg:result/001<br>    qudt:numericValue   &quot;22.4&quot;^^xsd:decimal ;<br>    qudt:unit           unit:DEG_C .</pre><p>Notice what changed:</p><ul><li>The sensor type is no longer a string &quot;temperature&quot; — it is now a URI linked to the <strong>SOSA</strong> (Sensor, Observation, Sample, and Actuator) ontology, an open W3C standard</li><li>The room is identified by a dereferenceable URI, not an opaque local code</li><li>The unit is a <strong>QUDT</strong> URI — understood by any application that knows the QUDT vocabulary, not just your system</li></ul><p>This single record is now <strong>interoperable by design</strong>.</p><h3>The Five Stars of Linked Open Data</h3><p>Berners-Lee later extended his original four rules into a practical <strong>five-star maturity model</strong> for open data:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*96WCoJLf9igLliU033tIZA.png" /></figure><p>Most enterprise datasets today sit at two or three stars. A knowledge graph targeting five stars becomes part of the global web of data.</p><h3>What Linked Data Is Not</h3><p>It is worth addressing two common misconceptions:</p><p><strong>Linked Data ≠ Linked Open Data.</strong> You can apply all four Linked Data principles inside a private enterprise network using internal URIs. The data does not have to be public. The discipline of using stable URIs and RDF is just as valuable for internal integration as it is for publishing to the world.</p><p><strong>Linked Data ≠ a database product.</strong> It is a <em>design discipline</em> — a set of principles that any storage system (triple store, graph database, even a file system) can honor.</p><h3>Key Takeaways</h3><ul><li>The traditional web is a web of <strong>documents</strong>; the Semantic Web is a web of <strong>data</strong></li><li>Linked Data’s four principles give every entity a stable identity, a standard access mechanism, and connections to related data</li><li>Applying these principles to our Smart Building makes sensor records interoperable with open standards like SOSA and QUDT out of the box</li><li>The five-star model gives a practical maturity ladder to climb incrementally</li></ul><h3>What’s Next</h3><p>Now that we understand <em>why</em> every entity needs a URI, <strong>Next Article </strong>digs into URIs themselves — the difference between a URI, a URL, a URN, and an IRI, the two main patterns for making URIs dereferenceable (# hash URIs vs / slash URIs), and how to mint stable identifiers that will not embarrass you in five years.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f051a5282810" width="1" height="1" alt=""><hr><p><a href="https://medium.com/expertminds/ontology-101-why-the-web-has-a-memory-problem-and-how-linked-data-solves-it-f051a5282810">Ontology 101 : Why the Web Has a Memory Problem, and How Linked Data Solves It</a> was originally published in <a href="https://medium.com/expertminds">ExpertMinds</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ontology 101: The Complete Mental Model Before You Write a Single Triple]]></title>
            <link>https://medium.com/expertminds/ontology-101-the-complete-mental-model-before-you-write-a-single-triple-934ce4c7edca?source=rss----03b5985a10e7---4</link>
            <guid isPermaLink="false">https://medium.com/p/934ce4c7edca</guid>
            <category><![CDATA[knowledge-graph]]></category>
            <category><![CDATA[semanticweb]]></category>
            <category><![CDATA[ontology]]></category>
            <category><![CDATA[rdf]]></category>
            <dc:creator><![CDATA[Ravi Kumar Peta]]></dc:creator>
            <pubDate>Mon, 25 May 2026 17:54:44 GMT</pubDate>
            <atom:updated>2026-05-26T11:36:26.491Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w80z5RoZbACsl5SCBknCeA.png" /></figure><h3>The Problem with Tables</h3><p>As software engineers, data architects, and AI practitioners, we are trained to think in tables, collections, or document stores. Row by row. Column by column. That mental model serves us well — until the real world pushes back.</p><p>Imagine you are tasked with building a <strong>Digital Twin</strong> for a modern, energy-efficient commercial high-rise. Your data sources include:</p><ul><li><strong>IoT Sensors</strong> — temperature, humidity, CO₂, and motion detectors scattered across hundreds of rooms</li><li><strong>Hardware Assets</strong> — HVAC chillers, Variable Air Volume (VAV) boxes, and smart electricity meters</li><li><strong>Spatial Topology</strong> — floors, rooms, and open zones that physically nest inside one another</li><li><strong>External Systems</strong> — the city power grid, real-time weather feeds, and occupancy scheduling APIs</li></ul><p>Now try mapping those highly interconnected, constantly evolving relationships into a traditional relational database. You immediately descend into a nightmare of junction tables, recursive JOINs, and a schema that shatters the moment a facilities team installs a sensor from a new vendor.</p><p>This is precisely where <strong>Semantic Web technologies</strong> shine. Instead of forcing the world into rigid boxes, they model data as a natural, traversable graph of connected concepts — one that evolves without breaking a single existing query.</p><p>If you are encountering the stack for the first time, the acronyms — <strong>RDF, RDFS, OWL, SHACL, SPARQL</strong> — can feel overwhelming. This guide breaks them down precisely, step-by-step, using our Smart Building as a single running example throughout.</p><h3>The Semantic Architecture Stack</h3><p>Think of building an ontology like mastering a new language.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ATf7vK3JcRC4kgnZuOYUWg.png" /></figure><ol><li><strong>Taxonomy</strong> to classify the concepts in your domain</li><li><strong>RDF</strong> to write basic factual sentences</li><li><strong>RDFS</strong> to define the meaning of your vocabulary</li><li><strong>OWL</strong> to add logic rules that automatically infer new facts</li><li><strong>SHACL</strong> to enforce data quality contracts</li><li><strong>SPARQL</strong> to query the entire graph with precision</li></ol><h3>1. Taxonomy — The Structural Blueprint</h3><p>Before writing a single data triple, you must <strong>classify your domain</strong>. A taxonomy is a strict hierarchy whose only relationship is <em>“is a subtype of”</em> (parent → child).</p><pre>Equipment<br>├── HVAC_Equipment<br>│   ├── Chiller<br>│   └── VAV_Box<br>└── Electrical_Equipment<br>    └── SmartMeter<br>SpatialZone<br>├── Floor<br>└── Room</pre><p>Expressed in <strong>Turtle</strong> (.ttl), this hierarchy looks like:</p><pre>@prefix rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt; .<br>@prefix bldg: &lt;https://example.com/building#&gt; .<br><br># Equipment hierarchy<br>bldg:HVAC_Equipment       rdfs:subClassOf  bldg:Equipment .<br>bldg:Chiller              rdfs:subClassOf  bldg:HVAC_Equipment .<br>bldg:VAV_Box              rdfs:subClassOf  bldg:HVAC_Equipment .<br><br>bldg:Electrical_Equipment rdfs:subClassOf  bldg:Equipment .<br>bldg:SmartMeter           rdfs:subClassOf  bldg:Electrical_Equipment .<br><br># Spatial hierarchy<br>bldg:Floor                rdfs:subClassOf  bldg:SpatialZone .<br>bldg:Room                 rdfs:subClassOf  bldg:SpatialZone .</pre><p>This is the <strong>ground truth</strong> the rest of the stack is built on. Every validation rule, reasoning rule, and SPARQL query downstream will rely on these rdfs:subClassOf declarations to understand what kind of thing each asset is.</p><blockquote><strong><em>Core Rule:</em></strong><em> A taxonomy is a classification structure only. It does not express complex cross-domain relationships — that is the job of the layers above.</em></blockquote><h3>2. RDF — The Atoms of Data</h3><p>Once the taxonomy exists, you need a format to express <strong>facts about individual objects</strong>. RDF (Resource Description Framework) is that format — the absolute foundation of semantic data interchange.</p><p>RDF reduces every piece of information to an atomic three-part sentence called a <strong>Triple</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/407/1*XLsWkIScDbYV-vf15utO5Q.png" /></figure><p>To eliminate ambiguity across systems and organizations, every component of a triple is identified by a <strong>URI</strong> — a globally unique web identifier — rather than a raw string.</p><p><strong>Real-world fact:</strong> <em>“Sensor_99 is a temperature sensor installed in Server_Room_B.”</em></p><p>Written in <strong>Turtle syntax</strong> (.ttl), the most human-readable RDF format:</p><pre>@prefix rdf:  &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt; .<br>@prefix bldg: &lt;https://example.com/building#&gt; .<br><br>bldg:Sensor_99<br>    rdf:type         bldg:TemperatureSensor ;<br>    bldg:hasLocation bldg:Server_Room_B .</pre><p>Link enough triples together and you form a <strong>directed graph</strong> — a web of edges (predicates) connecting nodes (subjects and objects). Every new fact is just another edge; nothing existing ever needs to change.</p><h3>3. RDFS — The Domain Dictionary</h3><p>RDF lets you write sentences but provides no way to define the <strong>meaning</strong> of the vocabulary you are using. RDFS (RDF Schema) fills that gap, acting as your schema dictionary.</p><p>Two constraints are the workhorses of RDFS:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*sBDbSpKby8VkjuKwES7Q4g.png" /></figure><p>KeywordMeaningrdfs:domainRestricts <em>what type of subject</em> may use this propertyrdfs:rangeRestricts <em>what type of object</em> this property must point to</p><p><strong>Example:</strong> Define a property feedsAirTo — an HVAC VAV Box supplying conditioned air to a room.</p><pre>@prefix rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt; .<br>@prefix bldg: &lt;https://example.com/building#&gt; .<br><br>bldg:feedsAirTo<br>    rdfs:domain bldg:HVAC_Equipment ;<br>    rdfs:range  bldg:SpatialZone .</pre><p>If an automated ingestion script mistakenly asserts that a SmartMeter feedsAirTo Room_12, a semantic validator immediately flags it. Recall from Section 1 that we declared bldg:SmartMeter rdfs:subClassOf bldg:Electrical_Equipment — which is <em>not</em> a subclass of bldg:HVAC_Equipment. The feedsAirTo property requires its subject to be HVAC_Equipment, so the validator surfaces a <strong>domain violation</strong> and blocks the bad triple before it poisons downstream analytics.</p><p>This is the chain of accountability: the taxonomy from Section 1 defines <em>what things are</em>, and the RDFS domain/range constraints here define <em>what things are allowed to do</em>. The two layers work together.</p><h3>4. OWL — The Automated Thinker</h3><p>RDFS defines your vocabulary but is passive — it cannot reason. <strong>OWL (Web Ontology Language)</strong> introduces formal logic, enabling a software component called a <strong>Reasoner</strong> to analyze your graph and <strong>infer new facts</strong> that no human ever explicitly wrote.</p><h4>Inverse Properties</h4><p>Declare feedsAirTo and isCooledBy as inverses:</p><pre>@prefix owl:  &lt;http://www.w3.org/2002/07/owl#&gt; .<br>@prefix bldg: &lt;https://example.com/building#&gt; .<br><br>bldg:feedsAirTo  owl:inverseOf  bldg:isCooledBy .</pre><p><strong>Result:</strong> You write one fact — bldg:VAV_Box_1 bldg:feedsAirTo bldg:Server_Room_B — and the reasoner automatically generates bldg:Server_Room_B bldg:isCooledBy bldg:VAV_Box_1. Zero extra code.</p><h4>Transitive Properties</h4><p>Declare locatedIn as transitive:</p><pre>bldg:locatedIn  rdf:type  owl:TransitiveProperty .</pre><p>Given:</p><ul><li>bldg:Sensor_99 → locatedIn → bldg:Server_Room_B</li><li>bldg:Server_Room_B → locatedIn → bldg:Floor_3</li></ul><p>The reasoner instantly concludes Sensor_99 locatedIn Floor_3 — with no recursive JOINs, no application code, and no human ever writing that triple directly.</p><p>Your applications can query the full spatial and operational topology as simple one-hop lookups, with all inference handled transparently by the ontology layer.</p><h3>5. SHACL — The Data Contract Enforcer</h3><p>OWL operates under the <strong>Open World Assumption (OWA)</strong>: if a fact is absent, it is <em>unknown</em> — not necessarily wrong. This is philosophically correct for reasoning but dangerous in production systems where a missing serial number could mean an untracked asset or a compliance gap.</p><p><strong>SHACL (Shapes Constraint Language)</strong> closes that gap. It validates your live data against precise, business-defined constraints and rejects anything that violates them.</p><p><strong>Business requirement:</strong> <em>“Every Chiller registered in the system must have a serial number and be linked to at least one safety isolator switch.”</em></p><pre>@prefix sh:   &lt;http://www.w3.org/ns/shacl#&gt; .<br>@prefix bldg: &lt;https://example.com/building#&gt; .<br>@prefix xsd:  &lt;http://www.w3.org/2001/XMLSchema#&gt; .<br><br>bldg:ChillerShape<br>    a              sh:NodeShape ;<br>    sh:targetClass bldg:Chiller ;<br>    sh:property [<br>        sh:path     bldg:serialNumber ;<br>        sh:datatype xsd:string ;<br>        sh:minCount 1 ;<br>        sh:message  &quot;A Chiller must have a serial number.&quot; ;<br>    ] ;<br>    sh:property [<br>        sh:path     bldg:hasIsolator ;<br>        sh:minCount 1 ;<br>        sh:message  &quot;A Chiller must be linked to at least one safety isolator.&quot; ;<br>    ] .</pre><p>If a deployment script attempts to register a chiller without a serial number, SHACL blocks the transaction and returns a structured validation report pinpointing the exact violation — before a single bad triple reaches your graph.</p><h3>6. SPARQL — The Query Engine</h3><p>OWL reasons. SHACL validates. <strong>SPARQL</strong> is how you <em>ask questions</em> — it is the SQL of the Semantic Web.</p><p><strong>Query:</strong> <em>“List all temperature sensors on Floor 3 and the rooms they monitor.”</em></p><pre>PREFIX bldg: &lt;https://example.com/building#&gt;<br><br>SELECT ?sensor ?room WHERE {<br>    ?sensor  a                bldg:TemperatureSensor ;<br>             bldg:hasLocation ?room .<br>    ?room    bldg:locatedIn   bldg:Floor_3 .<br>}</pre><p>Because OWL already inferred Sensor_99 locatedIn Floor_3 transitively, this query returns the correct results even though no human ever explicitly wrote that triple. <strong>The graph knows more than it was directly told.</strong></p><h3>Ontology vs. Knowledge Graph — Know the Difference</h3><p>Beginners constantly conflate these two terms. The distinction is fundamental:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pLXMFmgOlqTamwDwqb8vOQ.png" /></figure><p>The ontology is the <strong>schema</strong>. The knowledge graph is the <strong>populated database</strong>. Both are required.</p><h3>Why This Matters Beyond the Building</h3><p>Transitioning to a semantic ontology stack makes your systems <strong>composable, self-describing, and future-proof</strong> in a way that relational models structurally cannot be.</p><p>Consider year two: your building gains rooftop solar arrays and EV charging stations. With a relational model this demands new tables, new columns, a migration script, and inevitable downtime. With a semantic model, you import an existing open-source energy ontology — such as <strong>SEAS</strong> (Smart Energy Aware Systems) — link it to your existing building taxonomy in a handful of triples, and your query layer immediately understands solar yield, grid feed-in ratios, and EV charge cycles. Not a single existing triple changes.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=934ce4c7edca" width="1" height="1" alt=""><hr><p><a href="https://medium.com/expertminds/ontology-101-the-complete-mental-model-before-you-write-a-single-triple-934ce4c7edca">Ontology 101: The Complete Mental Model Before You Write a Single Triple</a> was originally published in <a href="https://medium.com/expertminds">ExpertMinds</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS Storage Services]]></title>
            <link>https://medium.com/expertminds/aws-storage-services-89bacc1b165c?source=rss----03b5985a10e7---4</link>
            <guid isPermaLink="false">https://medium.com/p/89bacc1b165c</guid>
            <category><![CDATA[aws-s3]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-certification]]></category>
            <category><![CDATA[aws-exam]]></category>
            <category><![CDATA[aws-exam-preparation]]></category>
            <dc:creator><![CDATA[Amit Naik]]></dc:creator>
            <pubDate>Tue, 19 May 2026 17:38:55 GMT</pubDate>
            <atom:updated>2026-05-19T17:38:55.551Z</atom:updated>
            <content:encoded><![CDATA[<p>S3, EBS, EFS, FSx, S3 Glacier, Storage Gateway, and AWS Backup — the complete guide to storing every type of data on AWS</p><p>Storage appears in almost every domain — S3 is the most versatile and most tested storage service on the entire exam. Know S3 storage classes and lifecycle policies cold. EBS types appear in EC2 questions. EFS vs EBS vs S3 comparisons are frequent. Storage Gateway and FSx appear in hybrid and enterprise scenarios. Every section has a dedicated exam tip box.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MdUMMB0OEVvy-yup-e_f7g.png" /></figure><p>Every application generates data — files, databases, backups, logs, media. AWS offers specialised storage services for every type: object storage, block storage, shared file systems, archival, hybrid, and backup. Picking the right one determines your cost, performance, and durability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/925/1*-DjRai4ZfiFycYhrVA77aQ.png" /></figure><h3>Amazon S3 — Unlimited Object Storage</h3><p>Simple Storage Service — store any file, any size, forever, at massive scale with 11 nines of durability</p><p>S3 stores objects (files) in buckets (containers). An object can be anything — a photo, a video, a database backup, a log file, a CSV, a static website. There’s no limit on the total amount of data — you can store a terabyte or an exabyte. You pay only for what you use, per GB per month.</p><p><strong>The analogy:</strong> S3 is like an infinite filing cabinet in a bank vault. The bank (AWS) maintains the building, ensures it never burns down (11 nines durability = 99.999999999% — you’d have to lose data across all 3 AZs simultaneously), and lets you organise files in labelled folders (prefixes). You put files in and retrieve them whenever you need. You pay only for the drawer space you use.</p><p><strong>S3 durability vs availability:</strong> Durability = 99.999999999% (11 nines) — data is replicated across ≥3 AZs, almost impossible to lose. Availability varies by storage class — Standard = 99.99%. These are different things — durability means you won’t lose your data; availability means you can access it.</p><h4>S3 key concepts</h4><ul><li><strong>Buckets</strong> — globally unique name, created in a specific region. Bucket names must be globally unique across all AWS accounts worldwide</li><li><strong>Objects</strong> — files stored in buckets. Max object size = 5 TB. Objects larger than 5 GB must use multipart upload. Each object has a key (full path), value (data), metadata, and optional version ID</li><li><strong>Prefixes</strong> — S3 has no real folders, but you can simulate them using prefixes (e.g.images/2024/photo.jpg). S3 performance scales per prefix — use multiple prefixes for high-throughput workloads</li><li><strong>S3 is a regional service</strong> — but bucket names are globally unique. Data stays in the region you create it in unless you explicitly configure replication</li></ul><h4>S3 storage classes — the most tested S3 topic</h4><p>S3 has multiple storage classes — each with a different price, availability, and retrieval time. Choosing the right class for each type of data is a major cost optimisation lever.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*WLzO8WyLc1t_bGnNgEMrKQ.png" /></figure><h4>S3 lifecycle policies — automate storage class transitions</h4><p>Lifecycle policies automatically move objects between storage classes (or delete them) based on age. This is the key cost optimisation tool for S3.</p><ul><li>Transition actions — move to a cheaper class after N days (e.g. Standard → Standard-IA after 30 days → Glacier after 90 days)</li><li>Expiration actions — auto-delete objects after N days. Great for log files, temp files, old versions</li><li>Minimum storage duration charges — Standard-IA and One Zone-IA charge for 30 days minimum. Glacier classes charge for 90 days (Flexible) or 180 days (Deep Archive) minimum — transition too early and you pay both classes</li><li>Lifecycle rules can filter by prefix, object tag, or object size</li></ul><h4>S3 security and access control</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*tkl5REt91VzVxC4xWPRoCA.png" /></figure><h4>S3 encryption</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/845/1*ImFn6TaL_GgF-rWQLtf3pA.png" /></figure><h4>S3 replication — copy objects across regions or accounts</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*ugjxgJ2_xSLOd4f97eIz9g.png" /></figure><p><strong>Replication key facts:</strong> Only new objects are replicated after enabling — existing objects are NOT automatically replicated (use S3 Batch Replication for existing objects). Delete markers are NOT replicated by default (enable optionally). Replication is NOT chained — if A replicates to B and B replicates to C, objects from A don’t go to C automatically.</p><h4>S3 Versioning</h4><ul><li>Enable at bucket level — once enabled, cannot be disabled (only suspended)</li><li>Every PUT creates a new version. Every DELETE adds a delete marker (object not actually deleted)</li><li>Restore previous versions — restore accidentally overwritten or deleted objects by removing the delete marker</li><li>MFA Delete — require MFA to permanently delete versions or disable versioning</li><li>Lifecycle policies can expire old versions automatically to control storage cost</li></ul><h4>S3 performance and advanced features</h4><ul><li><strong>Transfer Acceleration</strong> — uploads go to nearest CloudFront edge location, then travel on AWS private backbone to the bucket. 50–500% faster for cross-continent uploads</li><li><strong>Multipart upload</strong> — required for objects &gt;5 GB, recommended for objects &gt;100 MB. Upload parts in parallel, resume interrupted uploads</li><li><strong>S3 Select</strong> — run SQL queries directly against CSV/JSON/Parquet files in S3 without loading the whole file. Retrieve only the rows/columns you need</li><li><strong>S3 Event Notifications</strong> — trigger Lambda, SQS, or SNS on object-level events (PUT, DELETE, copy). E.g. process every uploaded image automatically</li><li><strong>Object Lock / WORM</strong> — Write Once Read Many. Prevent objects from being deleted or overwritten for a set period. Used for compliance (financial records, audit logs)</li></ul><p><strong>SAA-C03 Exam Tips —</strong></p><p><strong>Amazon S3</strong></p><p>S3 is the most tested service — know every storage class. Standard = frequent access. Standard-IA = infrequent, retrieval fee, 30-day min. One Zone-IA = one AZ only, re-creatable data. Intelligent-Tiering = unknown patterns, auto-moves. Glacier Instant = quarterly access, instant retrieval. Glacier Flexible = 1–5min to 12h retrieval. Deep Archive = cheapest, 12–48h, 7+ year compliance. Lifecycle: Standard → Standard-IA (min 30d) → Glacier (min 90d) → Deep Archive (min 180d). SSE-S3 = default, free. SSE-KMS = audit trail, key control. CRR requires versioning on both buckets. Replication does NOT apply to existing objects retroactively. Pre-signed URLs = temporary access to private objects. Block Public Access = overrides bucket policy. S3 Transfer Acceleration = edge → backbone for fast uploads. Object Lock / WORM = compliance, immutable records.</p><h3>Amazon S3 Glacier — Long-Term Archival Storage</h3><p>Extremely low-cost storage for data you rarely access — compliance archives, regulatory records, media masters</p><p>S3 Glacier is optimised for data you need to keep but almost never access — compliance archives, old database backups, medical records required for 7+ years, raw video master files. The trade-off is retrieval time: you can’t instantly access Glacier data the way you can S3 Standard objects.</p><p><strong>The analogy:</strong> S3 Standard is your desk — things you use daily are right there. S3 Glacier Flexible is your offsite storage unit — things you might need once a year. S3 Glacier Deep Archive is iron mountain storage — things required by law that you hope you never need to look at again. Cheaper to store, but you need to schedule a retrieval.</p><h4>The three Glacier storage classes compared</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/852/1*_AKvbptBQ_lXGpkw2gnhyw.png" /></figure><h4>Glacier Vaults and Archives (legacy API)</h4><p>Before Glacier was integrated into S3, it had its own API with Vaults (containers) and Archives (objects). This legacy API still exists — relevant for the exam only in the context of Vault Lock.</p><ul><li><strong>Vault Lock</strong> — enforce compliance controls on Glacier vaults using a lockable policy (WORM). Once locked, the policy cannot be changed. Used for SEC 17a-4, FINRA, HIPAA compliance where records must be immutable</li><li><strong>Vault Access Policy</strong> — resource-based policy controlling who can access the vault (modifiable, unlike Vault Lock)</li></ul><p><strong>SAA-C03 Exam Tips —</strong></p><p><strong>S3 Glacier </strong>Glacier Instant = instant retrieval, 90-day min, quarterly access. Glacier Flexible = 1–5m/3–5h/5–12h retrieval, 90-day min. Glacier Deep Archive = 12–48h retrieval, 180-day min, cheapest. All Glacier classes = 11 nines durability, 3+ AZs. Vault Lock = immutable compliance policy, cannot be changed after locking (WORM). Use Lifecycle policies to automatically move S3 objects to Glacier after N days. “7-year compliance archive, rarely accessed” → Glacier Deep Archive. “Medical images accessed quarterly, need instant access” → Glacier Instant Retrieval. Minimum storage charges — transition to Glacier too early and you pay minimum storage for both classes.</p><h3>Amazon EBS — The Hard Drive for Your EC2</h3><p>Elastic Block Store — persistent, high-performance block storage that attaches to EC2 instances like a hard drive</p><p>EBS is a network-attached storage volume that you mount to your EC2 instance like a hard drive. When your instance stops, the EBS volume persists — unlike instance store, which disappears. You can detach a volume from one instance and attach it to another. Think of it as a USB drive for EC2, but over the network and much more reliable.</p><p><strong>The analogy:</strong> EBS is like a portable external hard drive. You plug it into your computer (EC2 instance), use it as normal storage, unplug it, take it to another computer, and plug it in again. Your files are still there. S3 is a cloud drive (like Dropbox) — you access files via API. EBS is a physical drive — your OS reads and writes to it directly.</p><p><strong>Key EBS characteristics:</strong> Locked to one AZ — you cannot attach an EBS volume in us-east-1a to an instance in us-east-1b. Move volumes between AZs using snapshots. One EBS volume attaches to one EC2 instance at a time (except io1/io2 Multi-Attach). One EC2 instance can have multiple EBS volumes attached.</p><h4>EBS volume types — know each one’s purpose</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/1*TuOmpBB51iEghORP01tHIA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/842/1*Yl2YTJGK3YuwV_K7UuLA0w.png" /></figure><h4>EBS Snapshots — backups and cross-AZ/region copies</h4><ul><li>Snapshots are incremental — only changed blocks since the last snapshot are stored (saves space and time)</li><li>Stored in S3 (managed by AWS, you don’t see them in your S3 bucket)</li><li>Restore a snapshot to a new EBS volume in any AZ or region — how you move volumes across AZs</li><li>EBS Snapshot Archive — move snapshots to a 75% cheaper archive tier. Restore takes 24–72 hours</li><li>Recycle Bin — recover accidentally deleted snapshots within a retention window you define</li><li>Fast Snapshot Restore (FSR) — pre-warms snapshots so restored volumes are immediately at full performance (no lazy loading)</li></ul><p><strong>SAA-C03 Exam Tips —</strong></p><p><strong>Amazon EBS — </strong>gp3 = default choice for most workloads, configurable IOPS/throughput independently, 20% cheaper than gp2. io2 = highest IOPS (256K), 99.999% durability, Multi-Attach. st1 = throughput HDD for sequential big data. sc1 = cold HDD, cheapest, infrequent access. HDD types (st1, sc1) CANNOT be boot volumes. EBS volumes locked to one AZ — move via snapshot. Multi-Attach (io1/io2) = same volume to multiple EC2 in same AZ. Snapshot = incremental, stored in S3, use to copy volume to another AZ/region. EBS encryption = uses KMS, encrypts volume + snapshots + volumes from snapshots. Encrypt an unencrypted volume: snapshot → copy with encryption → restore. Delete on termination: by default root volume deleted when EC2 terminates, additional volumes are NOT.</p><h3>Amazon EFS — Shared File System for Linux</h3><p>Elastic File System — managed NFS that multiple EC2 instances across multiple AZs can mount simultaneously</p><p>EFS is a managed Network File System (NFS). The critical difference from EBS: multiple EC2 instances — across different AZs and even different VPCs — can mount and use the same EFS volume at the same time. There’s no pre-provisioning — EFS scales automatically as you add or remove files, and you pay only for what you use.</p><p><strong>The analogy:</strong> EBS is a private hard drive — only one computer can use it at a time. EFS is a shared network drive — like a NAS (Network Attached Storage) in an office. Every computer on the network can open, edit, and save files to it simultaneously. When the IT team adds a new employee’s laptop, it automatically gets access without anyone resizing or reconfiguring the drive.</p><h4>EFS performance modes</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/845/1*ItamyAzyrDmY17_yBNasTQ.png" /></figure><h4>EFS throughput modes</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*-0OR9BVllCcDMTrlucOPag.png" /></figure><h4>EFS storage classes</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*DYFwvRevj871Gx4cBpH_nQ.png" /></figure><h4>EFS vs EBS vs S3 — the exam’s key storage comparison</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/842/1*ZF1j0IISxkzO4r29jftn_g.png" /></figure><p><strong>SAA-C03 Exam Tips —</strong></p><p><strong>Amazon EFS — </strong>EFS = managed NFS, shared file system, Linux only (NFSv4), multi-AZ, multi-instance. Scales automatically — no provisioning. “Multiple EC2 instances need shared file access” → EFS. EFS is ~3× more expensive than EBS — use lifecycle management to move cold files to IA. Performance modes: General Purpose (default, low latency) vs Max I/O (high throughput for parallel access). Throughput modes: Bursting (scales with size) vs Provisioned (set independently) vs Elastic (auto). Windows file sharing → FSx for Windows (SMB/NTFS). EFS One Zone = lower cost, single AZ, less resilient — good for dev/test. EFS does NOT work with Windows instances natively.</p><h3>Amazon FSx — Managed File Systems for Specialised Workloads</h3><p>Fully managed Windows, Lustre, NetApp ONTAP, and OpenZFS file systems</p><p>EFS is great for Linux shared storage. But what about Windows? What about HPC workloads needing a Lustre file system? What about enterprises already running NetApp? FSx provides fully managed versions of industry-standard file systems — each purpose-built for a specific workload.</p><h4>The four FSx file systems</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*OanwcktyOeteBHy5mqz6Pg.png" /></figure><p><strong>SAA-C03 Exam Tips —</strong></p><p><strong>Amazon FSx — </strong>FSx for Windows = SMB + NTFS + Active Directory — the answer for “Windows shared file system on AWS”. FSx for Lustre = HPC, ML, video rendering, massive parallel throughput — integrates with S3 as backend storage. FSx vs EFS: EFS = Linux NFS for general shared storage. FSx for Windows = Windows SMB. FSx for Lustre = high-performance compute. “Windows application needs a shared file system” → FSx for Windows. “Machine learning training needs fast shared storage” → FSx for Lustre. “Migrate NetApp environment to AWS” → FSx for NetApp ONTAP. FSx for Lustre can use an S3 bucket as its data repository — ML models trained on S3 data.</p><h3>AWS Storage Gateway — Bridge Between On-Premises and AWS</h3><p>On-premises storage appliance (hardware or VM) that connects your local network to AWS storage services</p><p>Storage Gateway is a hybrid storage service. You install a gateway (a VM or physical hardware appliance) in your data centre. It appears to your local applications as a standard NFS/SMB file share, iSCSI volume, or tape drive — but behind the scenes, it stores data in AWS (S3, Glacier, EBS). Your apps don’t need to know about AWS at all.</p><p><strong>The analogy:</strong> Storage Gateway is like a translator who sits between your old-school office systems (that only speak French — NFS/SMB/iSCSI) and the AWS cloud (which speaks English). Your apps talk to the translator in French, and the translator converts and forwards everything to AWS. Your apps never need to learn English.</p><h4>The three gateway types</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/843/1*iXsi3BJalCbQmI2bvPR_vg.png" /></figure><h4>Volume Gateway — two modes</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/843/1*6pdu5mE4MmLPEDnXmz6VTw.png" /></figure><p><strong>SAA-C03 Exam Tips —</strong></p><p><strong>AWS Storage Gateway — </strong>Storage Gateway = hybrid storage, on-prem apps talk to it, it stores in AWS. Three types: S3 File Gateway (NFS/SMB → S3 objects, users manage via S3 console), Volume Gateway (iSCSI block → EBS snapshots in S3, Cached or Stored mode), Tape Gateway (VTL → S3 Glacier, replace physical tape). “Replace physical tape backup with cloud” → Tape Gateway. “On-prem apps need NFS/SMB access to S3” → S3 File Gateway. “On-prem servers need iSCSI block volumes backed up to cloud” → Volume Gateway. Cached volume = S3 primary + local cache. Stored volume = local primary + async S3 backup. Gateway can be deployed as a VM on VMware, Hyper-V, or as a hardware appliance.</p><h3>AWS Backup — Centralised Backup for All AWS Services</h3><p>One place to manage, automate, and monitor backups across EC2, EBS, RDS, DynamoDB, EFS, FSx, S3, and more</p><p>Without AWS Backup, you’d manage backups separately in each service — EBS snapshots here, RDS automated backups there, DynamoDB PITR somewhere else. AWS Backup centralises all of this. Define backup plans (schedules, retention, lifecycle), assign resources by tag, and get a unified view of all backups across your account and organisation.</p><p><strong>The analogy:</strong> AWS Backup is like a company-wide insurance policy managed by one broker. Instead of each department buying their own insurance from different companies with different terms — one broker (AWS Backup) handles everything, applies consistent policies across all assets, and gives the CFO one dashboard showing coverage status.</p><h4>What AWS Backup supports</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*JwbswTFpLBA36lu2-atIdQ.png" /></figure><h4>Key AWS Backup features</h4><ul><li><strong>Backup plans</strong> — define frequency (daily, weekly, monthly), backup window, retention period, and lifecycle (move to cold storage after N days). Assign to resources by tag</li><li><strong>Backup Vault Lock</strong> — WORM protection for backups. Prevents deletion or modification of backups for a set period — even by the root account. Compliance use case</li><li><strong>Cross-region backup</strong> — copy backups to a different region for disaster recovery. Protects against full regional outage</li><li><strong>Cross-account backup</strong> — copy backups to a separate AWS account. Protects against accidental deletion, ransomware, or account compromise</li><li><strong>AWS Backup Audit Manager</strong> — generate compliance reports showing which resources are backed up, how often, and whether policies are being followed</li><li><strong>Organisation-wide policies</strong> — via AWS Organizations, enforce backup policies across all member accounts from one central account</li></ul><p><strong>SAA-C03 Exam Tips —</strong></p><p><strong>AWS Backup — </strong>AWS Backup = centralised backup management for all AWS services. “Consistent backup policy across EC2, RDS, DynamoDB, EFS in one place” → AWS Backup. Backup Vault Lock = WORM, backups cannot be deleted even by admin — compliance use case. Cross-region + cross-account copies = disaster recovery + ransomware protection. Tag-based resource assignment — all resources tagged Environment=Production get backed up by the production plan. AWS Backup does NOT replace service-native backup features (RDS automated backups, DynamoDB PITR still exist) — it orchestrates them centrally. Supports AWS Organizations → organisation-wide backup compliance.</p><h3>All seven storage services — quick reference</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*_z2V8RKkpUQS5LQlEEYUiQ.png" /></figure><h4>Scenario keyword map</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*kRFNtK-fwS3gmxv84z_97A.png" /></figure><p><strong>The SAA-C03 mindset for Storage:</strong></p><p>First ask — how is data accessed? Via API (object) → S3. Mounted as a drive by one instance (block) → EBS. Mounted by many instances simultaneously (file) → EFS (Linux) or FSx (Windows/HPC). Is it archival? → S3 Glacier. Is it on-premises connecting to cloud? → Storage Gateway. Is it backup management? → AWS Backup. Then ask — what are the access patterns? Frequent = Standard. Infrequent = IA. Rare = Glacier. Never = Deep Archive. Match access patterns to cost.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=89bacc1b165c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/expertminds/aws-storage-services-89bacc1b165c">AWS Storage Services</a> was originally published in <a href="https://medium.com/expertminds">ExpertMinds</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>