<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: lui were</title>
    <description>The latest articles on DEV Community by lui were (@lui_were).</description>
    <link>https://dev.to/lui_were</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3876890%2Fbdcf1c3d-39cc-489b-b8c2-fa28ecb050a4.png</url>
      <title>DEV Community: lui were</title>
      <link>https://dev.to/lui_were</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lui_were"/>
    <language>en</language>
    <item>
      <title>Shipping Real-Time AI in 48 Hours: Engineering Lessons from Hackathon Builds</title>
      <dc:creator>lui were</dc:creator>
      <pubDate>Tue, 17 Nov 2026 07:58:44 +0000</pubDate>
      <link>https://dev.to/lui_were/shipping-real-time-ai-in-48-hours-engineering-lessons-from-hackathon-builds-3c6b</link>
      <guid>https://dev.to/lui_were/shipping-real-time-ai-in-48-hours-engineering-lessons-from-hackathon-builds-3c6b</guid>
      <description>&lt;p&gt;A hackathon compresses software engineering into its most honest form. You have a fixed deadline, a small team, unfamiliar tools, and a demo that must work in front of strangers. There is no room for the comfortable fiction that you will refactor later. Every decision is a trade-off between ambition and finishing, and the choices that look boring (scoping, contracts between teammates, error handling, a rehearsed demo) turn out to separate the projects that run from the ones that merely get described.&lt;/p&gt;

&lt;p&gt;This article draws on three kinds of builds that are typical of AI-era hackathons: a real-time listener that analyzes a live phone call for scam tactics, a generative agent that turns a photograph into ready-to-post social media captions, and a data-heavy backend serving a map-based app for a space-themed challenge. Each one teaches a different engineering lesson, and together they make a useful playbook for the next time you have a weekend and a blank repository.&lt;/p&gt;

&lt;p&gt;Lesson 1: Choose the Problem Before the Technology&lt;/p&gt;

&lt;p&gt;The most common hackathon failure is not technical. It is choosing an idea that is either too generic or too big. A useful filter, applied before writing any code:&lt;/p&gt;

&lt;p&gt;Is the problem real for many people right now? The most memorable projects solve a problem the judges themselves have experienced. Agriculture, health, and education are worthy domains, but they are also what most teams pick, so a fresh angle on a problem everyone recognizes can stand out. Phone scams, which push urgency, secrecy, and requests for PINs or transfers, are an example: nearly everyone knows someone who has been targeted, and mobile money fraud in particular has real consequences.&lt;br&gt;
Can you demo it in 90 seconds? If the core value cannot be shown live in a minute or two, it is probably too complex for the time you have.&lt;br&gt;
Is there one sharp thing it does? "A live guardian that warns you mid-call" is a sentence. "A platform that protects people from all forms of fraud" is a pitch deck.&lt;br&gt;
Does it need data you do not have? Projects that depend on large proprietary datasets stall early. Prefer ideas where pretrained models and a small set of rules or examples are enough.&lt;/p&gt;

&lt;p&gt;Sometimes the best move is to write down three candidate ideas, score each against these questions, and commit to one decisively. Alternatives such as a tool that reads the fine print on predatory deals, or a bot that checks whether viral media in a family group chat is real, are good ideas, and discarding them is part of the work. Indecision costs hours you will not get back.&lt;/p&gt;

&lt;p&gt;Lesson 2: Real-Time Systems Are Pipelines With a Latency Budget&lt;/p&gt;

&lt;p&gt;Consider what a live scam-call guardian actually has to do. It listens to audio as it arrives, converts speech to text, decides whether the conversation shows scam patterns, and warns the user while the call is still happening. A warning that arrives after the victim has already read out their PIN is worthless, so latency is the product.&lt;/p&gt;

&lt;p&gt;A workable architecture is a streaming pipeline:&lt;/p&gt;

&lt;p&gt;microphone/audio ──► chunker (1–3 s) ──► streaming speech-to-text&lt;br&gt;
                                              │&lt;br&gt;
                                              ▼&lt;br&gt;
                                   rolling transcript window (~30 s)&lt;br&gt;
                                              │&lt;br&gt;
                          ┌───────────────────┴──────────────────┐&lt;br&gt;
                          ▼                                      ▼&lt;br&gt;
                  fast rule layer (ms)                  LLM classifier (≈1 s)&lt;br&gt;
                  urgency / secrecy /                   only for ambiguous or&lt;br&gt;
                  credential / transfer                 high-stakes windows&lt;br&gt;
                          └───────────────────┬──────────────────┘&lt;br&gt;
                                              ▼&lt;br&gt;
                                  risk score + explanation&lt;br&gt;
                                              │&lt;br&gt;
                                              ▼&lt;br&gt;
                                  alert pushed to the user&lt;/p&gt;

&lt;p&gt;Every stage consumes part of a time budget. If speech-to-text takes about a second, the rule layer a few milliseconds, and the language model another second or so, the user can be warned within a few seconds of the phrase being spoken. That is fast enough to be useful. If you added a slow step, such as calling several models in sequence, you would blow the budget. Writing the budget down at the start forces good design decisions.&lt;/p&gt;

&lt;p&gt;Why Two Layers Beat One&lt;/p&gt;

&lt;p&gt;It is tempting to send everything to a large language model. In a real-time setting, that has three problems: it is slower, it costs more per call, and it is harder to explain. A layered design plays to each component's strength.&lt;/p&gt;

&lt;p&gt;The rule layer is fast, cheap, deterministic, and explainable. It looks for the signature tactics of scams:&lt;/p&gt;

&lt;p&gt;python&lt;br&gt;
import re&lt;br&gt;
from dataclasses import dataclass&lt;/p&gt;

&lt;p&gt;PATTERNS = {&lt;br&gt;
    "urgency":     [r"\bright now\b", r"\bimmediately\b", r"\blast chance\b",&lt;br&gt;
                    r"\bwithin \d+ (minutes|hours)\b", r"\bor (your account|you) will be\b"],&lt;br&gt;
    "secrecy":     [r"\bdon'?t tell (anyone|your)\b", r"\bkeep this (between us|secret)\b",&lt;br&gt;
                    r"\bdo not hang up\b", r"\bdon'?t (call|speak to) (the bank|anyone)\b"],&lt;br&gt;
    "credentials": [r"\b(pin|otp|cvv|password)\b", r"\bone[- ]time (code|password)\b",&lt;br&gt;
                    r"\bverification code\b"],&lt;br&gt;
    "transfer":    [r"\b(send|transfer|wire) (me |the )?(money|funds|cash)\b",&lt;br&gt;
                    r"\bgift cards?\b", r"\bmobile money\b", r"\bsend (it )?to this (number|account)\b"],&lt;br&gt;
}&lt;br&gt;
WEIGHTS = {"urgency": 1.0, "secrecy": 1.5, "credentials": 2.0, "transfer": 2.0}&lt;/p&gt;

&lt;p&gt;COMPILED = {k: [re.compile(p, re.I) for p in v] for k, v in PATTERNS.items()}&lt;/p&gt;

&lt;p&gt;@dataclass&lt;br&gt;
class Signal:&lt;br&gt;
    category: str&lt;br&gt;
    phrase: str&lt;/p&gt;

&lt;p&gt;def scan(text: str) -&amp;gt; list[Signal]:&lt;br&gt;
    found = []&lt;br&gt;
    for category, regexes in COMPILED.items():&lt;br&gt;
        for rx in regexes:&lt;br&gt;
            m = rx.search(text)&lt;br&gt;
            if m:&lt;br&gt;
                found.append(Signal(category, m.group(0)))&lt;br&gt;
                break  # one hit per category is enough per window&lt;br&gt;
    return found&lt;/p&gt;

&lt;p&gt;def score(signals: list[Signal]) -&amp;gt; float:&lt;br&gt;
    base = sum(WEIGHTS[s.category] for s in signals)&lt;br&gt;
    # Combinations matter more than single signals: urgency + credentials is far&lt;br&gt;
    # more suspicious than either alone.&lt;br&gt;
    categories = {s.category for s in signals}&lt;br&gt;
    if {"urgency", "credentials"} &amp;lt;= categories or {"secrecy", "transfer"} &amp;lt;= categories:&lt;br&gt;
        base *= 1.5&lt;br&gt;
    return base&lt;/p&gt;

&lt;p&gt;Notice the important design idea: combinations. A bank employee might legitimately say "verification code." A scammer says it alongside "right now" and "don't tell anyone." The score should rise sharply when categories co-occur.&lt;/p&gt;

&lt;p&gt;The LLM layer handles what regular expressions cannot: paraphrase, indirect pressure, and context. Use it selectively, for windows where the rule score lands in an ambiguous range, and ask for structured output you can validate:&lt;/p&gt;

&lt;p&gt;python&lt;br&gt;
CLASSIFIER_PROMPT = """You are a fraud-detection assistant analysing a live phone-call transcript.&lt;br&gt;
Return ONLY valid JSON: {"risk": "low"|"medium"|"high", "tactics": [strings], "reason": string}.&lt;br&gt;
High risk means the caller pressures urgency, demands secrecy, or asks for PINs, codes, or money transfers.&lt;br&gt;
Do not flag ordinary customer-service conversations."""&lt;/p&gt;

&lt;p&gt;Parsing and validating that JSON (and falling back to the rule score if parsing fails) is not optional. Models occasionally return malformed output, and a real-time system must never crash mid-call.&lt;/p&gt;

&lt;p&gt;Streaming Over WebSockets&lt;/p&gt;

&lt;p&gt;FastAPI makes the streaming endpoint compact:&lt;/p&gt;

&lt;p&gt;python&lt;br&gt;
from collections import deque&lt;br&gt;
import time&lt;br&gt;
from fastapi import FastAPI, WebSocket, WebSocketDisconnect&lt;/p&gt;

&lt;p&gt;app = FastAPI()&lt;br&gt;
WINDOW_SECONDS = 30&lt;/p&gt;

&lt;p&gt;@app.websocket("/ws/call")&lt;br&gt;
async def call_guardian(ws: WebSocket):&lt;br&gt;
    await ws.accept()&lt;br&gt;
    window = deque()   # (timestamp, text) pairs&lt;br&gt;
    try:&lt;br&gt;
        while True:&lt;br&gt;
            audio_chunk = await ws.receive_bytes()&lt;br&gt;
            text = await transcribe(audio_chunk)      # your speech-to-text call&lt;br&gt;
            now = time.time()&lt;br&gt;
            if text:&lt;br&gt;
                window.append((now, text))&lt;br&gt;
            while window and now - window[0][0] &amp;gt; WINDOW_SECONDS:&lt;br&gt;
                window.popleft()&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;        transcript = " ".join(t for _, t in window)
        signals = scan(transcript)
        risk = score(signals)

        if risk &amp;gt;= 3.0:
            await ws.send_json({
                "level": "high",
                "signals": [s.category for s in signals],
                "message": "This call shows scam patterns. Do not share PINs or send money.",
            })
        elif risk &amp;gt;= 1.5:
            await ws.send_json({"level": "caution", "signals": [s.category for s in signals]})
except WebSocketDisconnect:
    pass   # call ended; nothing to clean up in this simple version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The rolling window is what makes the system aware of context without growing without bound. It remembers the last half-minute, which is enough to connect "act now" to "give me the code" a few sentences later.&lt;/p&gt;

&lt;p&gt;Design for the Cost of Being Wrong&lt;/p&gt;

&lt;p&gt;Every detection system trades false positives against false negatives, and the right balance depends on the consequences. A guardian that cries wolf on every call will be switched off within a day. One that stays silent during a real scam fails completely. Practical mitigations:&lt;/p&gt;

&lt;p&gt;Two alert levels (caution and high) so mild signals produce a gentle note and only strong combinations produce a loud warning.&lt;br&gt;
Always show why. "Flagged: urgency + request for a PIN" lets the user judge the warning rather than blindly trusting it.&lt;br&gt;
Test against normal calls, not only scam scripts. A set of ordinary conversations with banks, delivery services, and family tells you about false alarms.&lt;/p&gt;

&lt;p&gt;Also be upfront about privacy and legality. Analyzing a call means processing sensitive audio. Prefer on-device or ephemeral processing where possible, avoid storing transcripts by default, tell users clearly what is being analyzed, and remember that rules about recording and analyzing calls vary by country. A demo can simulate calls with scripted audio, which sidesteps most of these concerns while you prove the idea.&lt;/p&gt;

&lt;p&gt;Lesson 3: Generative Agents Need Structure and Guardrails&lt;/p&gt;

&lt;p&gt;The second build is a different shape of AI product: an agent that looks at a photograph and produces captions for X and LinkedIn, complete with relevant hashtags and mentions. It is a good example of how to make a generative system reliable enough to demo.&lt;/p&gt;

&lt;p&gt;The pipeline is simple to describe:&lt;/p&gt;

&lt;p&gt;A vision-capable model describes the image and extracts what is notable: setting, people, objects, any visible text, the apparent event.&lt;br&gt;
A writing step turns that description into platform-specific captions.&lt;br&gt;
A post-processing step enforces the rules of each platform.&lt;/p&gt;

&lt;p&gt;The third step is where many hackathon projects fall short, and it is where reliability comes from. Language models are good at fluent text and unreliable at hard constraints, so move the constraints into code:&lt;/p&gt;

&lt;p&gt;python&lt;br&gt;
from pydantic import BaseModel, Field&lt;/p&gt;

&lt;p&gt;class Caption(BaseModel):&lt;br&gt;
    text: str&lt;br&gt;
    hashtags: list[str] = Field(default_factory=list, max_length=5)&lt;br&gt;
    mentions: list[str] = Field(default_factory=list)&lt;/p&gt;

&lt;p&gt;class Captions(BaseModel):&lt;br&gt;
    x: Caption&lt;br&gt;
    linkedin: Caption&lt;/p&gt;

&lt;p&gt;def finalize_x(c: Caption) -&amp;gt; str:&lt;br&gt;
    tags = " ".join(f"#{t.lstrip('#')}" for t in c.hashtags[:3])&lt;br&gt;
    mentions = " ".join(f"@{m.lstrip('@')}" for m in c.mentions[:2])&lt;br&gt;
    post = f"{c.text} {mentions} {tags}".strip()&lt;br&gt;
    # Hard limit enforced in code, not left to the model&lt;br&gt;
    return post if len(post) &amp;lt;= 280 else trim_to_limit(post, 280)&lt;/p&gt;

&lt;p&gt;Asking the model for structured JSON and validating it with a schema (here Pydantic) means malformed output is caught immediately, and a retry or fallback can handle it. Then deterministic code handles the character limit, the number of hashtags, and formatting.&lt;/p&gt;

&lt;p&gt;One category of error deserves special care: handles and mentions. A model can confidently invent a username that belongs to a real, unrelated person, or tag the wrong organization. For a tool that publishes under your name, that is a genuine reputational risk. Safer designs let the user supply or confirm handles, only suggest mentions that were provided or extracted from visible text, and always present the result as a draft for human approval rather than posting automatically. Keeping a human in the loop for anything that publishes publicly is a good rule at any scale.&lt;/p&gt;

&lt;p&gt;The agent pattern also generalizes. The same structure of perceive, draft, validate, and present for approval applies to many useful tools: turning receipts into expense entries, meeting notes into task lists, or crop photos into diagnoses with advice.&lt;/p&gt;

&lt;p&gt;Lesson 4: Backends for Data-Heavy, Team-Built Apps&lt;/p&gt;

&lt;p&gt;The third kind of build is a map-based application, such as a trail-planning tool for a space-exploration challenge built on Mars terrain data. On a team of several people, the backend developer's job is partly technical and partly about unblocking everyone else.&lt;/p&gt;

&lt;p&gt;Agree the API contract first. Before anyone writes real logic, write down the endpoints, request shapes, and response shapes. With FastAPI, this is nearly free: define Pydantic models and stub endpoints that return hard-coded sample data, and the interactive docs at /docs become the contract the frontend developers build against.&lt;/p&gt;

&lt;p&gt;python&lt;br&gt;
from fastapi import FastAPI&lt;br&gt;
from pydantic import BaseModel&lt;/p&gt;

&lt;p&gt;app = FastAPI()&lt;/p&gt;

&lt;p&gt;class Waypoint(BaseModel):&lt;br&gt;
    lat: float&lt;br&gt;
    lon: float&lt;br&gt;
    elevation_m: float&lt;/p&gt;

&lt;p&gt;class Route(BaseModel):&lt;br&gt;
    waypoints: list[Waypoint]&lt;br&gt;
    distance_km: float&lt;br&gt;
    difficulty: str&lt;/p&gt;

&lt;p&gt;@app.get("/route", response_model=Route)&lt;br&gt;
def get_route(start_lat: float, start_lon: float, end_lat: float, end_lon: float):&lt;br&gt;
    # Stub first: return sample data so the frontend can integrate on hour one.&lt;br&gt;
    return {&lt;br&gt;
        "waypoints": [&lt;br&gt;
            {"lat": start_lat, "lon": start_lon, "elevation_m": -2500.0},&lt;br&gt;
            {"lat": end_lat, "lon": end_lon, "elevation_m": -2480.0},&lt;br&gt;
        ],&lt;br&gt;
        "distance_km": 1.2,&lt;br&gt;
        "difficulty": "moderate",&lt;br&gt;
    }&lt;/p&gt;

&lt;p&gt;Replace the stub with the real implementation later. Because the response model did not change, nobody else's work breaks.&lt;/p&gt;

&lt;p&gt;Treat big datasets as a build step, not a request-time cost. Terrain and imagery datasets can be large. Download and preprocess them once into a compact format (tiles, a simplified grid, a small database file), commit the script that does it, and have the API read the prepared data. A request that processes raw data on every call will be too slow to demo.&lt;/p&gt;

&lt;p&gt;Cache aggressively. Many requests repeat. A simple in-memory cache around expensive computations such as route calculations makes the demo feel instant.&lt;/p&gt;

&lt;p&gt;Fail visibly and specifically. Return clear error messages and status codes the frontend can display inline, rather than a generic crash. During a demo, a specific message like "No route found between these points" is recoverable, while a blank screen is not.&lt;/p&gt;

&lt;p&gt;Do not block on perfect data. If the ideal dataset is hard to obtain, start with a smaller or synthetic one that matches the expected format. A working vertical slice with approximate data beats a perfect pipeline that is not finished.&lt;/p&gt;

&lt;p&gt;Lesson 5: Team Workflow Under Pressure&lt;/p&gt;

&lt;p&gt;Technical choices matter, but how the team works matters as much:&lt;/p&gt;

&lt;p&gt;Build a vertical slice early. Get one complete path working (input, processing, output, shown in the UI) within the first few hours, even if it is crude. Then improve it. Teams that build layers in isolation often discover at the end that they do not connect.&lt;br&gt;
Use Git with discipline. Small commits with clear conventional prefixes (feat:, fix:, docs:, chore:), short-lived branches, and frequent merges prevent the classic final-hour merge disaster. Agree on who owns which files to avoid conflicts.&lt;br&gt;
Mock everything external. If the model API is slow or rate-limited, a mock keeps the rest of the team moving, and a cached fallback keeps the demo alive.&lt;br&gt;
Timebox decisions. If a choice (a library, a model, a design) is not resolved in fifteen minutes, pick one and move on.&lt;br&gt;
Freeze features early. Stop adding features with a few hours left and spend that time on bugs, polish, and rehearsal.&lt;br&gt;
Rehearse the demo. Write a script, practice it, and prepare a recorded backup in case the network or a model fails live. Judges remember the demo, not the architecture.&lt;br&gt;
Write the README as you go. It should explain what the project does, how to run it, the architecture, and the limitations honestly. Judges and future you will both read it.&lt;br&gt;
Lesson 6: Turn the Weekend Into a Career Asset&lt;/p&gt;

&lt;p&gt;The work does not end when the hackathon does. For a student building a portfolio, a hackathon project is raw material, and how you present it matters:&lt;/p&gt;

&lt;p&gt;Write a case study, not just a link. For each project, explain the problem, why it matters, the architecture (a diagram helps), the hardest technical challenge and how you solved it, and what you would improve with more time.&lt;br&gt;
Show the demo. A short screen recording or GIF in the README and on your portfolio site communicates more than paragraphs of description.&lt;br&gt;
Be honest about the limits. Saying "this prototype uses scripted audio and rule-based detection; a production version would need on-device processing and a wider evaluation set" shows maturity, not weakness.&lt;br&gt;
Clean up the repository. Remove dead code, document setup steps, and make sure the project actually runs from a fresh clone.&lt;br&gt;
Connect the dots. A portfolio with real hackathon projects, a RAG assistant, and a computer-vision app tells a coherent story: this person builds working AI systems end to end.&lt;br&gt;
Write about it. A post explaining what you learned, such as the latency budget of a real-time pipeline or why validation matters for generative output, builds visibility and reinforces your own understanding.&lt;br&gt;
Key Takeaways&lt;br&gt;
Pick a problem that is real, demoable in about 90 seconds, and narrow enough to finish. Be willing to discard good ideas.&lt;br&gt;
For real-time AI, latency is the product. Design a pipeline with an explicit time budget, and layer fast deterministic rules with a slower language model used only where needed.&lt;br&gt;
Consider the cost of false positives and negatives, show users why an alert fired, and take privacy seriously.&lt;br&gt;
Generative agents become reliable when structure and guardrails live in code: schemas, validation, hard limits, and human approval for anything public.&lt;br&gt;
On a team, define the API contract first, stub endpoints with sample data, preprocess large datasets ahead of time, and cache.&lt;br&gt;
Build a vertical slice early, use clean Git habits, freeze features, and rehearse the demo with a backup.&lt;br&gt;
After the event, turn the project into a documented case study. That is where hackathon work becomes a lasting career asset.&lt;/p&gt;

&lt;p&gt;Hackathons reward a particular kind of engineering maturity: knowing what to leave out, designing around constraints, and making something that works rather than something that merely impresses on a slide. Those habits are exactly the ones that matter in professional software work, which is why a few intense weekends can teach more than months of tutorials.&lt;/p&gt;

</description>
      <category>hackathon</category>
      <category>ai</category>
      <category>fastapi</category>
    </item>
    <item>
      <title>How RAG Works: Embeddings, Vector Search, and Why Your AI App Needs Retrieval</title>
      <dc:creator>lui were</dc:creator>
      <pubDate>Mon, 16 Nov 2026 13:20:05 +0000</pubDate>
      <link>https://dev.to/lui_were/how-rag-works-embeddings-vector-search-and-why-your-ai-app-needs-retrieval-18cm</link>
      <guid>https://dev.to/lui_were/how-rag-works-embeddings-vector-search-and-why-your-ai-app-needs-retrieval-18cm</guid>
      <description>&lt;p&gt;A language model knows a lot, but it does not know your data. It has never seen your company's internal documents, your course notes, last week's policy update, or the contents of your database. It also has a training cutoff, so it can be out of date, and when it does not know something it sometimes produces a confident, fluent, wrong answer. Fine-tuning a model on your data is possible but slow, expensive, and awkward to keep current.&lt;/p&gt;

&lt;p&gt;The dominant practical solution is Retrieval-Augmented Generation (RAG): instead of asking the model to remember your information, you look up the relevant pieces at question time and hand them to the model along with the question. RAG powers a large share of the AI features people use today, from document Q&amp;amp;A to customer support assistants to internal knowledge search. This article explains how it works end to end, the building blocks involved, where it breaks, and how to build and evaluate a basic version yourself.&lt;/p&gt;

&lt;p&gt;The Core Idea in One Paragraph&lt;/p&gt;

&lt;p&gt;When a user asks a question, a RAG system (1) searches a knowledge base for the passages most relevant to the question, (2) inserts those passages into the prompt as context, and (3) asks the model to answer using that context, ideally with citations. The model is not retrieving anything itself. Your code does the retrieval, and the model does the reading and writing. That division is the whole trick.&lt;/p&gt;

&lt;p&gt;The Two Phases&lt;/p&gt;

&lt;p&gt;A RAG system has an indexing phase (done ahead of time) and a query phase (done for every question).&lt;/p&gt;

&lt;p&gt;Indexing:&lt;/p&gt;

&lt;p&gt;Collect documents (PDFs, web pages, wikis, tickets, database records).&lt;br&gt;
Clean and split them into chunks.&lt;br&gt;
Convert each chunk into an embedding (a vector of numbers).&lt;br&gt;
Store the chunks and embeddings in a searchable index.&lt;/p&gt;

&lt;p&gt;Querying:&lt;/p&gt;

&lt;p&gt;Convert the user's question into an embedding using the same model.&lt;br&gt;
Find the stored chunks whose embeddings are closest to it.&lt;br&gt;
Build a prompt containing those chunks plus the question.&lt;br&gt;
Have the model generate an answer grounded in that context.&lt;/p&gt;

&lt;p&gt;Let's go through the pieces.&lt;/p&gt;

&lt;p&gt;Embeddings: Turning Meaning Into Numbers&lt;/p&gt;

&lt;p&gt;An embedding is a list of numbers (commonly hundreds to a few thousand) that represents the meaning of a piece of text. An embedding model is trained so that texts with similar meanings end up close together in this high-dimensional space, even if they share no words. "How do I reset my password?" and "I forgot my login credentials" would land near each other, while "Quarterly revenue report" would land far away.&lt;/p&gt;

&lt;p&gt;This is why embedding-based search is called semantic search. Traditional keyword search matches the literal words you typed. Semantic search matches what you meant. That makes it much better at handling paraphrases and vague questions, and sometimes worse at exact identifiers like error codes or product SKUs, which is a limitation we will return to.&lt;/p&gt;

&lt;p&gt;"Close" needs a measurement. The most common one is cosine similarity, which compares the angle between two vectors:&lt;/p&gt;

&lt;p&gt;go&lt;br&gt;
func cosine(a, b []float64) float64 {&lt;br&gt;
    var dot, na, nb float64&lt;br&gt;
    for i := range a {&lt;br&gt;
        dot += a[i] * b[i]&lt;br&gt;
        na += a[i] * a[i]&lt;br&gt;
        nb += b[i] * b[i]&lt;br&gt;
    }&lt;br&gt;
    return dot / (math.Sqrt(na) * math.Sqrt(nb))&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;A result near 1 means the vectors point in nearly the same direction (very similar meaning), near 0 means unrelated. Many embedding models produce normalized vectors, in which case cosine similarity equals a simple dot product, which is faster to compute.&lt;/p&gt;

&lt;p&gt;Chunking: The Underrated Step&lt;/p&gt;

&lt;p&gt;You cannot embed an entire 200-page manual as a single vector and expect useful retrieval, because one vector would blur every topic together. So documents are split into chunks. How you split is one of the biggest factors in quality, and it gets less attention than it deserves.&lt;/p&gt;

&lt;p&gt;Key trade-offs:&lt;/p&gt;

&lt;p&gt;Chunks too small lose context. A sentence like "It must be renewed annually" is meaningless without knowing what "it" refers to.&lt;br&gt;
Chunks too large dilute the signal, waste prompt space, and make retrieval less precise.&lt;br&gt;
A common starting point is chunks of a few hundred tokens with some overlap between neighbors so ideas that straddle a boundary are not lost.&lt;br&gt;
Structure-aware splitting often beats fixed-size splitting. Splitting on headings, paragraphs, or function boundaries in code keeps coherent units together.&lt;br&gt;
Attach metadata to each chunk: source document, title, section, page number, date. This enables citations and filtering later.&lt;/p&gt;

&lt;p&gt;A simple chunker:&lt;/p&gt;

&lt;p&gt;go&lt;br&gt;
func chunk(text string, size, overlap int) []string {&lt;br&gt;
    words := strings.Fields(text)&lt;br&gt;
    var chunks []string&lt;br&gt;
    step := size - overlap&lt;br&gt;
    for start := 0; start &amp;lt; len(words); start += step {&lt;br&gt;
        end := start + size&lt;br&gt;
        if end &amp;gt; len(words) {&lt;br&gt;
            end = len(words)&lt;br&gt;
        }&lt;br&gt;
        chunks = append(chunks, strings.Join(words[start:end], " "))&lt;br&gt;
        if end == len(words) {&lt;br&gt;
            break&lt;br&gt;
        }&lt;br&gt;
    }&lt;br&gt;
    return chunks&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;Real systems use smarter splitters, but the structure is the same.&lt;/p&gt;

&lt;p&gt;Vector Search and Vector Databases&lt;/p&gt;

&lt;p&gt;Once every chunk has an embedding, answering a query means finding the nearest stored vectors to the query vector. The brute-force approach is to compute similarity against every chunk, which is perfectly fine for thousands of chunks. For millions, it becomes too slow, so systems use approximate nearest neighbor (ANN) algorithms that trade a small amount of accuracy for large speedups. A popular one is HNSW, which builds a layered graph of vectors so a search can hop quickly toward the closest region instead of scanning everything.&lt;/p&gt;

&lt;p&gt;Where do you store them? Options include:&lt;/p&gt;

&lt;p&gt;Dedicated vector databases such as Qdrant, Weaviate, Milvus, and Pinecone, built for large-scale similarity search.&lt;br&gt;
Extensions to databases you may already use, such as pgvector for PostgreSQL, which lets you store embeddings in a column and query by distance with SQL. For many applications this is the simplest path, because your vectors live next to your relational data and you avoid running another system.&lt;br&gt;
Embedded or in-memory libraries such as FAISS or lightweight local stores, which are good for prototypes and smaller datasets.&lt;/p&gt;

&lt;p&gt;An example of what a pgvector query looks like:&lt;/p&gt;

&lt;p&gt;sql&lt;br&gt;
SELECT id, content, source&lt;br&gt;
FROM chunks&lt;br&gt;
ORDER BY embedding &amp;lt;=&amp;gt; $1   -- cosine distance to the query embedding&lt;br&gt;
LIMIT 5;&lt;/p&gt;

&lt;p&gt;A practical tip: you do not need a specialized vector database on day one. Start with what you already run, and move to dedicated infrastructure only if scale or performance demands it.&lt;/p&gt;

&lt;p&gt;Assembling the Prompt&lt;/p&gt;

&lt;p&gt;After retrieval, you build a prompt that gives the model the context and clear instructions. A typical structure:&lt;/p&gt;

&lt;p&gt;text&lt;br&gt;
You are a helpful assistant. Answer the question using ONLY the context below.&lt;br&gt;
If the answer is not in the context, say you don't know.&lt;br&gt;
Cite the source id in brackets after each claim, like [doc-3].&lt;/p&gt;

&lt;p&gt;Context:&lt;br&gt;
[doc-3] &lt;br&gt;
[doc-7] &lt;br&gt;
[doc-12] &lt;/p&gt;

&lt;p&gt;Question: How long do customers have to request a refund?&lt;/p&gt;

&lt;p&gt;Several details matter here:&lt;/p&gt;

&lt;p&gt;Grounding instruction. Telling the model to use only the provided context, and to admit when the answer is missing, reduces fabrication.&lt;br&gt;
Citations. Labeling chunks with identifiers and asking the model to cite them lets users verify answers, and lets you check them programmatically.&lt;br&gt;
Ordering and size. Models can pay less attention to material buried in the middle of a long context. Keep the retrieved set focused rather than stuffing in as much as possible.&lt;br&gt;
Making Retrieval Better&lt;/p&gt;

&lt;p&gt;Naive RAG, embed everything and take the top five matches, works surprisingly well as a demo and often disappoints in production. Teams typically add several refinements.&lt;/p&gt;

&lt;p&gt;Hybrid search. Combine semantic search with traditional keyword search (such as BM25) and merge the results. This recovers the exact-match strength of keywords for things like error codes, names, and identifiers while keeping the flexibility of embeddings.&lt;/p&gt;

&lt;p&gt;Reranking. Retrieve a generous candidate set (say, 30 chunks) cheaply, then use a more accurate but slower reranker model to score each candidate against the question and keep the best few. Reranking is one of the highest-return upgrades available.&lt;/p&gt;

&lt;p&gt;Query rewriting. User questions are often short, ambiguous, or dependent on earlier conversation ("what about the second option?"). Rewriting the question into a standalone search query, or generating several variants, improves recall.&lt;/p&gt;

&lt;p&gt;Metadata filtering. Restrict search to the right product, date range, language, or access level before similarity ranking. This both improves relevance and, importantly, enforces permissions.&lt;/p&gt;

&lt;p&gt;Better chunk context. Prepending a short description of the document or section to each chunk before embedding helps a chunk remain interpretable on its own.&lt;/p&gt;

&lt;p&gt;Agentic retrieval. Instead of one retrieval step, an agent decides what to search for, reads results, and searches again if needed, which helps with multi-part questions. This ties into the broader move toward agents in AI systems, at the cost of more latency and complexity.&lt;/p&gt;

&lt;p&gt;Where RAG Fails&lt;/p&gt;

&lt;p&gt;Knowing the failure modes is what separates a demo from a dependable system.&lt;/p&gt;

&lt;p&gt;Retrieval misses the right chunk. If the relevant passage is not retrieved, the model cannot use it, and it may guess. Most RAG failures are retrieval failures, not generation failures. Debug by inspecting what was retrieved before blaming the model.&lt;/p&gt;

&lt;p&gt;Retrieval finds plausible but wrong chunks. Semantically similar is not the same as correct. A question about "2024 refund policy" may retrieve the 2022 policy.&lt;/p&gt;

&lt;p&gt;The model ignores or misreads context. Even with the right passages present, a model can overlook them, blend them with its prior knowledge, or draw an unsupported conclusion.&lt;/p&gt;

&lt;p&gt;Questions that need reasoning across many documents. "Summarize trends across all our incident reports" is not a lookup problem. Retrieving a handful of chunks will not cover it. Such tasks need different approaches, such as pre-computed summaries or structured queries.&lt;/p&gt;

&lt;p&gt;Stale or duplicate data. Out-of-date documents in the index produce out-of-date answers. You need a pipeline to update, deduplicate, and delete content.&lt;/p&gt;

&lt;p&gt;Prompt injection through documents. If retrieved text contains instructions ("ignore previous instructions and..."), a model may follow them. Documents from untrusted sources should be treated as untrusted input, and systems that take actions based on retrieved content need guardrails.&lt;/p&gt;

&lt;p&gt;Access control leaks. If your index mixes documents with different permissions, retrieval can surface content the user should not see. Enforce permissions at retrieval time through metadata filters, not by hoping the model will refrain from revealing things.&lt;/p&gt;

&lt;p&gt;Evaluating a RAG System&lt;/p&gt;

&lt;p&gt;You cannot improve what you do not measure, and "it seems to work" is not measurement. Evaluate the two stages separately.&lt;/p&gt;

&lt;p&gt;Retrieval quality: build a test set of real questions, each labeled with the passage(s) that should be retrieved. Measure how often the correct chunk appears in the top results (recall at k) and how highly it is ranked.&lt;/p&gt;

&lt;p&gt;Answer quality: check whether answers are correct, whether they are supported by the retrieved context (faithfulness), whether they actually address the question, and whether citations point to real supporting text. Evaluations can use human review, automated checks, and carefully validated model-based graders.&lt;/p&gt;

&lt;p&gt;Start small: even 30 to 50 representative questions with known answers will reveal problems quickly and give you a baseline to compare every change against. When you change chunk size, swap an embedding model, or add reranking, rerun the set and see whether things actually got better.&lt;/p&gt;

&lt;p&gt;RAG, Fine-Tuning, and Long Context&lt;/p&gt;

&lt;p&gt;Students often ask how RAG relates to other approaches.&lt;/p&gt;

&lt;p&gt;RAG is best for knowledge that changes, is large, needs citations, or has access restrictions. Updating knowledge means updating the index, not retraining.&lt;br&gt;
Fine-tuning is best for changing a model's behavior, style, or format, or teaching a narrow skill, not for reliably injecting facts.&lt;br&gt;
Long context windows, now large enough to hold entire books in some models, let you paste whole documents into a prompt. That is often the simplest solution for small knowledge sets, but cost and latency grow with every token, accuracy can degrade on very long inputs, and it does not scale to large or constantly changing corpora.&lt;/p&gt;

&lt;p&gt;These are complementary, not competing. Many systems combine retrieval to find relevant material with a long-context model to reason over it.&lt;/p&gt;

&lt;p&gt;Build One This Weekend&lt;/p&gt;

&lt;p&gt;A minimal RAG project is a great way to understand all of this:&lt;/p&gt;

&lt;p&gt;Pick a small corpus: your own notes, a documentation site, or a few PDFs.&lt;br&gt;
Write a script to extract text and split it into overlapping chunks, attaching source metadata.&lt;br&gt;
Embed each chunk using an embedding model (hosted API or a local model) and store the vectors in pgvector, SQLite with a vector extension, or even a plain in-memory list.&lt;br&gt;
Write a query function: embed the question, find the top-k chunks by cosine similarity, and print them. Stop here first and check whether the retrieved chunks are actually good. This single step teaches the most.&lt;br&gt;
Add generation: build the grounded prompt with citations and call a language model.&lt;br&gt;
Write down 30 test questions with expected sources and measure retrieval recall.&lt;br&gt;
Improve one thing at a time, such as chunk size, hybrid search, or reranking, and re-measure.&lt;br&gt;
Key Takeaways&lt;br&gt;
RAG gives a language model access to your data by retrieving relevant passages at question time and including them in the prompt.&lt;br&gt;
Embeddings map text to vectors so that similar meaning means nearby vectors, enabling semantic search measured with cosine similarity or dot product.&lt;br&gt;
Chunking is a major quality lever, and the right strategy depends on your documents.&lt;br&gt;
You do not need a dedicated vector database to start. pgvector or an in-memory index is often enough, and ANN indexes like HNSW matter at larger scale.&lt;br&gt;
Real-world quality comes from hybrid search, reranking, query rewriting, metadata filtering, and good prompts with citations.&lt;br&gt;
Most failures are retrieval failures, so inspect retrieved chunks first, and enforce permissions in the retrieval layer.&lt;br&gt;
Evaluate retrieval and answers separately using a small, real test set before and after every change.&lt;/p&gt;

&lt;p&gt;RAG is not glamorous, and it is not a single product you install. It is a pipeline of ordinary engineering steps (parsing, chunking, indexing, searching, prompting, and testing) wrapped around a language model. That is exactly why it rewards developers who care about data quality and evaluation, and why it is one of the most useful practical skills in AI engineering today.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>rag</category>
    </item>
    <item>
      <title>WebAssembly Beyond the Browser: What It Is, Where It Works, and Where It Doesn't (Yet)</title>
      <dc:creator>lui were</dc:creator>
      <pubDate>Mon, 16 Nov 2026 12:13:05 +0000</pubDate>
      <link>https://dev.to/lui_were/webassembly-beyond-the-browser-what-it-is-where-it-works-and-where-it-doesnt-yet-5917</link>
      <guid>https://dev.to/lui_were/webassembly-beyond-the-browser-what-it-is-where-it-works-and-where-it-doesnt-yet-5917</guid>
      <description>&lt;p&gt;Few technologies have been "about to change everything" for as long as WebAssembly. Its fans call it the universal runtime that finally makes "write once, run anywhere" real. Its skeptics point out that years of predictions have not displaced containers or JavaScript. In 2026, the honest picture sits between those views: WebAssembly (Wasm) is genuinely mature in the browser, genuinely production-ready in a few server-side niches, and still maturing everywhere else. For a developer, it is worth understanding what is real, what is hype, and why the idea is technically interesting regardless.&lt;/p&gt;

&lt;p&gt;What WebAssembly Actually Is&lt;/p&gt;

&lt;p&gt;WebAssembly is a compact binary instruction format that runs on a stack-based virtual machine. You do not usually write it by hand. Instead, you write code in a language like Rust, C, C++, Go, or Zig, compile it to a .wasm file, and a Wasm runtime executes it.&lt;/p&gt;

&lt;p&gt;Four properties explain why people care:&lt;/p&gt;

&lt;p&gt;Portable. The same .wasm file runs on any compliant runtime, regardless of the underlying CPU architecture or operating system.&lt;br&gt;
Fast. Wasm is designed to compile quickly to efficient machine code, often approaching native speed for compute-heavy work.&lt;br&gt;
Sandboxed. A Wasm module has no ability to touch the outside world unless the host explicitly gives it that ability. It cannot read files, open sockets, or call the OS on its own.&lt;br&gt;
Language-neutral. Many languages can target it, so a project can reuse existing libraries written in other languages.&lt;/p&gt;

&lt;p&gt;The name is misleading in one way: WebAssembly is neither only for the web nor an assembly language you write by hand. It is better thought of as a portable, secure compilation target.&lt;/p&gt;

&lt;p&gt;In the Browser: The Mature Part&lt;/p&gt;

&lt;p&gt;Wasm began as a way to run performance-sensitive code, such as games, image processing, and CAD-style tools, in the browser alongside JavaScript. That use case is solid. Chrome's platform metrics reportedly show Wasm used on roughly five percent of page loads in early 2026, and growing steadily. It is behind web versions of major design tools, video and audio processing, in-browser databases, and scientific computing.&lt;/p&gt;

&lt;p&gt;The core spec keeps advancing. WebAssembly 3.0 became a W3C standard in September 2025, adding features such as garbage collection support, 64-bit memory addressing, and exception handling. Garbage collection support is especially important, because it lets languages with managed memory (Kotlin, Java, Dart, and others) compile to Wasm efficiently without shipping their own entire runtime.&lt;/p&gt;

&lt;p&gt;A minimal example of loading a Wasm module from JavaScript:&lt;/p&gt;

&lt;p&gt;javascript&lt;br&gt;
// Load and run a function exported from a compiled Wasm module&lt;br&gt;
const response = await fetch("math.wasm");&lt;br&gt;
const { instance } = await WebAssembly.instantiateStreaming(response);&lt;/p&gt;

&lt;p&gt;console.log(instance.exports.add(2, 3)); // 5&lt;/p&gt;

&lt;p&gt;Notice the division of labor: JavaScript handles the DOM, events, and networking, while Wasm does the heavy computation. Wasm in the browser does not directly access the DOM. It calls into JavaScript for that. So Wasm complements JavaScript rather than replacing it.&lt;/p&gt;

&lt;p&gt;Leaving the Browser: WASI&lt;/p&gt;

&lt;p&gt;If Wasm modules are sandboxed and cannot touch the outside world, how do they do anything useful on a server? The answer is WASI, the WebAssembly System Interface. WASI defines standardized, capability-based APIs that a runtime can give a module: files, clocks, random numbers, sockets, and HTTP.&lt;/p&gt;

&lt;p&gt;The key word is capability. A WASI module only gets access to what the host explicitly hands it. You might give it read access to a single directory and nothing else. This is the opposite of a normal process, which inherits broad ambient authority from the user who runs it. It is a design with strong security properties, and it is a big part of the appeal.&lt;/p&gt;

&lt;p&gt;WASI has progressed in versions:&lt;/p&gt;

&lt;p&gt;WASI 0.2 (stabilized around 2024) was the first version built around the Component Model and brought standard interfaces for I/O such as filesystem, sockets, and HTTP.&lt;br&gt;
WASI 0.3, reported as shipping in June 2026, adds native asynchronous I/O to the model, removing callback workarounds that made network-heavy code awkward.&lt;br&gt;
WASI 1.0 and full threading support are still on the roadmap, according to ecosystem write-ups.&lt;/p&gt;

&lt;p&gt;Popular runtimes include Wasmtime, Wasmer, WasmEdge, and WAMR, each with different emphasis, from server performance to embedded devices.&lt;/p&gt;

&lt;p&gt;The Component Model&lt;/p&gt;

&lt;p&gt;The most ambitious idea in the ecosystem is the Component Model. A plain Wasm module only understands numbers, so passing strings, records, or lists between modules requires awkward manual conventions. The Component Model defines a richer interface language, called WIT (Wasm Interface Types), so components written in different languages can call each other with proper types.&lt;/p&gt;

&lt;p&gt;An interface definition looks like this:&lt;/p&gt;

&lt;p&gt;wit&lt;br&gt;
package example:greeter;&lt;/p&gt;

&lt;p&gt;interface greet {&lt;br&gt;
  greet: func(name: string) -&amp;gt; string;&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;world greeter {&lt;br&gt;
  export greet;&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;A Rust component could implement this interface, and a JavaScript or Python program could call it, with the tooling handling the conversion of strings and data at the boundary. If it fully delivers, the Component Model offers something new: composing software from sandboxed pieces written in different languages, with no network calls or serialization formats between them.&lt;/p&gt;

&lt;p&gt;One caveat matters. As of mid-2026 the Component Model is still described by its maintainers as a preview heading toward 1.0, even though WASI and components are already used in production. Expect that interfaces and tooling may still change, and be careful with sources that claim it is fully finalized.&lt;/p&gt;

&lt;p&gt;Where Server-Side Wasm Works Today&lt;/p&gt;

&lt;p&gt;Practitioners generally agree on a set of workloads where Wasm earns its place:&lt;/p&gt;

&lt;p&gt;Edge functions and serverless. Wasm modules start in microseconds to milliseconds because there is no operating system or container to boot, only a small sandboxed module. For short-lived, bursty, globally distributed logic, that cold-start advantage is real. Several edge platforms run Wasm-based workloads for exactly this reason.&lt;/p&gt;

&lt;p&gt;Plugin systems. Suppose your application lets customers write custom logic. Running arbitrary native code or scripts from users is dangerous. Running it as a Wasm component with tightly limited capabilities is much safer, and users can write plugins in any language that compiles to Wasm. Proxies, databases, editors, and SaaS platforms increasingly use Wasm for extensibility.&lt;/p&gt;

&lt;p&gt;Portable, untrusted compute. Running code from third parties, whether user-submitted functions or analysis jobs, with strong isolation and resource limits.&lt;/p&gt;

&lt;p&gt;Embedded and IoT. Small runtimes can run Wasm on constrained devices, allowing updates to logic without reflashing firmware.&lt;/p&gt;

&lt;p&gt;A clarification worth making: Wasm containers are sometimes described as "lighter than containers," and that is true in specific ways (startup time, size, sandbox granularity), but containers do not boot a full kernel per invocation, so the comparison needs care. Wasm and containers solve overlapping but different problems.&lt;/p&gt;

&lt;p&gt;Where It Struggles&lt;/p&gt;

&lt;p&gt;An honest account of 2026 includes the reasons server-side Wasm has stayed niche.&lt;/p&gt;

&lt;p&gt;Threading. General multi-threading support is not yet standardized for server-side Wasm. Many backend workloads rely on threads, which rules those out for now.&lt;/p&gt;

&lt;p&gt;Ecosystem gaps. Not every library compiles cleanly to Wasm, especially ones that depend on OS features, native extensions, or specific system calls. Language support also varies. Rust has the most mature tooling, with other languages at different stages.&lt;/p&gt;

&lt;p&gt;Maturity of tooling. Debugging, profiling, and observability for Wasm are less polished than for native or container-based workloads.&lt;/p&gt;

&lt;p&gt;Performance is not magic. Wasm is fast for compute, but there is overhead crossing boundaries between host and module, and it is not always faster than well-tuned native code.&lt;/p&gt;

&lt;p&gt;Moving targets. With the Component Model still preview and WASI evolving, there is migration cost for early adopters.&lt;/p&gt;

&lt;p&gt;Competition from "good enough" options. Containers, serverless platforms, and V8 isolates are already deployed and well understood. Wasm has to be meaningfully better for a given workload to justify adoption.&lt;/p&gt;

&lt;p&gt;The result is that server-side Wasm is a strong fit for specific, carefully chosen workloads and not yet a general-purpose replacement for how you build typical backend services.&lt;/p&gt;

&lt;p&gt;Wasm and the Languages You Already Know&lt;/p&gt;

&lt;p&gt;If you are learning Go, JavaScript, or Java, here is how Wasm intersects with them:&lt;/p&gt;

&lt;p&gt;Go can compile to Wasm directly, though the standard compiler's Wasm output includes the Go runtime and yields larger binaries. TinyGo produces much smaller output and is popular for edge and embedded targets. Go has also been adding support for WASI.&lt;br&gt;
JavaScript is the host language in the browser, and runtimes like Node.js and Deno can load Wasm modules, so it is the glue between your Wasm code and the rest of the web.&lt;br&gt;
Rust has the strongest, most mature Wasm toolchain and is the default recommendation for serious Wasm work.&lt;br&gt;
Java and Kotlin are gaining paths to Wasm, with garbage collection support in the spec helping managed languages. Treat these as emerging rather than mainstream.&lt;br&gt;
A Small Experiment&lt;/p&gt;

&lt;p&gt;You can learn a lot in an afternoon:&lt;/p&gt;

&lt;p&gt;Compile something tiny. Write a simple function in Go (with TinyGo), Rust, or C, such as computing the nth Fibonacci number, and compile it to .wasm.&lt;br&gt;
Run it in two places. Load it in a browser with the JavaScript snippet above, then run it with a standalone runtime such as Wasmtime from the command line. Seeing the same binary run in both places makes portability concrete.&lt;br&gt;
Explore the sandbox. Try giving the module access to a directory versus none, and observe that it fails when it lacks the capability. This shows what "capability-based security" really means.&lt;br&gt;
Measure startup. Compare how quickly a tiny Wasm module starts compared with a small container image. This is the core of the edge computing pitch.&lt;br&gt;
Key Takeaways&lt;br&gt;
WebAssembly is a portable, fast, sandboxed compilation target that many languages can use.&lt;br&gt;
In the browser it is mature and widely used for compute-heavy work, with JavaScript still handling the DOM and the page.&lt;br&gt;
WASI gives modules controlled access to the outside world through capabilities, and recent versions add standardized I/O and async support.&lt;br&gt;
The Component Model enables type-safe composition across languages but is still a preview heading to 1.0.&lt;br&gt;
Server-side Wasm shines for edge functions, plugin systems, untrusted code, and embedded use, and still faces gaps in threading, tooling, and ecosystem coverage.&lt;br&gt;
Treat both breathless hype and flat dismissal with suspicion. Wasm is real infrastructure in specific niches and a technology worth watching.&lt;/p&gt;

&lt;p&gt;The deepest idea behind WebAssembly is not speed. It is that software can be packaged as small, portable, isolated units with explicit permissions. Whether or not Wasm ends up as the universal runtime, that idea is shaping how platforms think about plugins, security, and deployment, and understanding it will make you a more versatile developer.&lt;/p&gt;

</description>
      <category>webassembly</category>
      <category>javascript</category>
      <category>serverless</category>
    </item>
    <item>
      <title>Your Dependencies Are Your Attack Surface: Software Supply Chain Security in 2026</title>
      <dc:creator>lui were</dc:creator>
      <pubDate>Mon, 16 Nov 2026 11:14:00 +0000</pubDate>
      <link>https://dev.to/lui_were/your-dependencies-are-your-attack-surface-software-supply-chain-security-in-2026-1l5a</link>
      <guid>https://dev.to/lui_were/your-dependencies-are-your-attack-surface-software-supply-chain-security-in-2026-1l5a</guid>
      <description>&lt;p&gt;Run npm install on a fresh project with a single dependency and look inside node_modules. It is common to find hundreds of packages you never chose, written by maintainers you have never heard of, some of which run code on your machine during installation. Every one of those packages is code you are trusting. In 2026 that trust has been tested repeatedly and publicly, and the lesson for every developer is the same: attackers have stopped breaking into applications one by one and started poisoning the things applications are built from.&lt;/p&gt;

&lt;p&gt;This article explains how software supply chain attacks work, walks through what happened in the npm and PyPI ecosystems over the past year, and gives a practical, ordered list of defenses a student or junior developer can adopt right away.&lt;/p&gt;

&lt;p&gt;What Is a Supply Chain Attack?&lt;/p&gt;

&lt;p&gt;A software supply chain attack compromises code, dependencies, or build systems that an organization already trusts, rather than attacking the organization directly. The logic is leverage. Compromising one popular library gives an attacker code execution on the machines of everyone who installs it. Compromising a build pipeline lets an attacker alter software after the developers have written it and before users receive it.&lt;/p&gt;

&lt;p&gt;The attack surface is wider than most developers realize:&lt;/p&gt;

&lt;p&gt;Package registries: npm, PyPI, crates.io, Maven Central, Docker Hub.&lt;br&gt;
Build and CI systems: GitHub Actions workflows, runners, caches, signing keys.&lt;br&gt;
Developer tooling: editor extensions, CLI tools, security scanners, AI coding assistants and their plugins.&lt;br&gt;
Maintainer accounts: the people (and tokens) with permission to publish.&lt;/p&gt;

&lt;p&gt;Notice that a developer's laptop and a CI runner are both rich targets. They hold cloud credentials, SSH keys, API tokens, and publish rights, which is exactly what an attacker wants.&lt;/p&gt;

&lt;p&gt;The Common Attack Techniques&lt;/p&gt;

&lt;p&gt;Most incidents combine a few recurring patterns.&lt;/p&gt;

&lt;p&gt;Typosquatting and lookalike packages. An attacker publishes reqeusts hoping someone mistypes requests. This is the oldest trick and still works, though it is the least sophisticated.&lt;/p&gt;

&lt;p&gt;Dependency confusion. If a company uses a private package named internal-utils and an attacker publishes a public package with the same name and a higher version number, a misconfigured build may fetch the public one.&lt;/p&gt;

&lt;p&gt;Install scripts. Many ecosystems allow packages to run arbitrary commands at install time (for example, npm's preinstall and postinstall hooks). Malicious packages use them to steal credentials the moment they are installed, before any of your code runs.&lt;/p&gt;

&lt;p&gt;Account and token takeover. Phishing a maintainer, stealing a publishing token from a leaked file or compromised machine, or abusing weak multi-factor authentication lets an attacker publish a malicious version of a legitimate, trusted package. This is the most dangerous pattern because the package name, history, and reputation all look normal.&lt;/p&gt;

&lt;p&gt;CI/CD abuse. Misconfigured GitHub Actions workflows can be tricked into running attacker-controlled code with access to secrets, or into using a poisoned build cache. Attackers then publish malicious releases through the project's own legitimate pipeline.&lt;/p&gt;

&lt;p&gt;Worms. Newer attacks self-propagate. Malware steals the publishing credentials of the developer who installed it, then uses them to infect that developer's own packages, which infect the next victims, and so on.&lt;/p&gt;

&lt;p&gt;What Happened: A Year of Incidents&lt;/p&gt;

&lt;p&gt;Several events over the past year show how these techniques play out. Details below come from security vendor and community write-ups, so specifics (dates, counts, attribution) may be refined as investigations conclude. Check primary sources before citing any figure.&lt;/p&gt;

&lt;p&gt;The Shai-Hulud worm (September 2025). One of the first widely reported self-spreading npm attacks. Malicious code harvested secrets from infected environments and used stolen npm tokens to republish additional compromised packages, turning one compromised maintainer into dozens or hundreds of infected packages. In response, npm announced a major authentication overhaul around the end of 2025. Security researchers noted that this was progress, but did not make npm immune, since phished credentials can still lead to malicious publishes.&lt;/p&gt;

&lt;p&gt;A chained campaign in early 2026. Multiple reports describe a financially motivated group, tracked as TeamPCP, running a sustained campaign beginning around late February 2026 with the compromise of a widely used security scanner, Trivy. Stolen credentials from one victim were then used to reach others. Reports link the campaign to a malicious release of LiteLLM, a popular AI-gateway library on PyPI, in late March.&lt;/p&gt;

&lt;p&gt;The axios compromise (31 March 2026). Axios, an HTTP client with on the order of 100 million weekly downloads, had malicious versions published to npm after a maintainer account was taken over. Analyses emphasized how deliberately the release avoided classic red flags: it came from a long-established package with a trusted history, not a brand-new lookalike. Because the malicious versions were live for only a short window, the damage depended heavily on whether projects automatically pulled the newest version.&lt;/p&gt;

&lt;p&gt;July 2026 npm incidents. Further compromises affected packages including AsyncAPI, reportedly via a GitHub Actions "pwn request" weakness, where a workflow executed untrusted code from a pull request with privileged access. This showed that compromising a project's CI could be as effective as stealing a maintainer's password.&lt;/p&gt;

&lt;p&gt;Platform responses. GitHub published a summary in late July 2026 of changes to npm and GitHub Actions aimed at disrupting these techniques. Some reports also say a major npm release now blocks install scripts by default. Because this is the kind of detail that changes quickly, verify the current behavior in the official npm documentation rather than relying on a summary.&lt;/p&gt;

&lt;p&gt;The pattern across all of these is that the attacks target trust and automation: trusted maintainers, trusted tools, trusted pipelines, and automatic installs.&lt;/p&gt;

&lt;p&gt;Why Developers Are Attractive Targets&lt;/p&gt;

&lt;p&gt;Think about what is on a typical developer machine or CI runner: cloud provider credentials, database passwords, .env files, SSH keys, package registry tokens, and browser sessions. Malware that runs during npm install can read all of it. Compromising a developer can also provide a route to compromising every product that developer ships. This is why defenders now say to protect the development environment first.&lt;/p&gt;

&lt;p&gt;AI coding tools add a new angle. Agents that install packages, run commands, and use plugins extend the same trust problem. A model that suggests a dependency that does not exist, which an attacker then registers, is sometimes called "slopsquatting." Treat every AI-suggested package name as unverified until you have checked it.&lt;/p&gt;

&lt;p&gt;Defenses You Can Apply Today&lt;/p&gt;

&lt;p&gt;There is no single fix, so the goal is layered defense: make attacks harder, reduce what they can reach, and notice them sooner. These are ordered roughly from easiest to more involved.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Use lockfiles and install from them&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A lockfile records the exact version (and integrity hash) of every dependency. Installing from the lockfile means a newly published malicious version cannot silently slip in.&lt;/p&gt;

&lt;p&gt;bash&lt;/p&gt;

&lt;h1&gt;
  
  
  Reproducible, lockfile-only install. Fails if package.json and lockfile disagree.
&lt;/h1&gt;

&lt;p&gt;npm ci&lt;/p&gt;

&lt;h1&gt;
  
  
  Python equivalent: pin with hashes
&lt;/h1&gt;

&lt;p&gt;pip install --require-hashes -r requirements.txt&lt;/p&gt;

&lt;h1&gt;
  
  
  Go: go.sum records module hashes and is verified automatically
&lt;/h1&gt;

&lt;p&gt;go mod verify&lt;/p&gt;

&lt;p&gt;Commit your lockfile. Be wary of blindly running npm install or npm update in CI, since those can change what gets installed.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Add a cooldown before adopting new versions&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Many malicious releases are discovered and removed within hours or days. Delaying adoption of brand-new versions gives the ecosystem time to catch problems. Dependency update tools can often be configured to wait a set period before proposing a new release. Even a simple habit of not upgrading the same day a version appears helps.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Disable or restrict install scripts&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Since install scripts execute automatically, restricting them removes a major attack path.&lt;/p&gt;

&lt;p&gt;bash&lt;/p&gt;

&lt;h1&gt;
  
  
  Skip lifecycle scripts for this install
&lt;/h1&gt;

&lt;p&gt;npm ci --ignore-scripts&lt;/p&gt;

&lt;h1&gt;
  
  
  Make it the default for a project
&lt;/h1&gt;

&lt;p&gt;npm config set ignore-scripts true&lt;/p&gt;

&lt;p&gt;Some packages legitimately need scripts (for example, to compile native code), so you may need to allow-list those individually and rebuild them deliberately.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Reduce the number of dependencies&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Every dependency is a liability as well as a convenience. Before adding a package for something small, consider whether a few lines of your own code would do. Go's culture of a rich standard library and few dependencies is partly a security advantage. A smaller tree means fewer maintainers to trust and fewer places to be compromised.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Protect your own accounts and tokens&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you publish packages, your account is part of everyone else's supply chain.&lt;/p&gt;

&lt;p&gt;Enable multi-factor authentication, preferably with a hardware key or passkey, which resists phishing better than SMS or codes typed into websites.&lt;br&gt;
Prefer short-lived, narrowly scoped tokens over long-lived ones, and never commit them.&lt;br&gt;
Where supported, use "trusted publishing," which lets your CI publish using short-lived identity-based credentials rather than a stored secret.&lt;br&gt;
Review who has publish rights and remove people who no longer need them.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Harden your CI/CD pipeline&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For GitHub Actions in particular:&lt;/p&gt;

&lt;p&gt;yaml&lt;/p&gt;

&lt;h1&gt;
  
  
  Pin third-party actions to a full commit SHA, not a movable tag
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;uses: actions/checkout@&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Give the workflow the minimum permissions it needs
&lt;/h1&gt;

&lt;p&gt;permissions:&lt;br&gt;
  contents: read&lt;/p&gt;

&lt;p&gt;Key habits:&lt;/p&gt;

&lt;p&gt;Pin actions to commit SHAs. Tags like @v3 can be moved by an attacker who compromises the action's repository.&lt;br&gt;
Use least-privilege permissions. Default the token to read-only and grant more only where needed.&lt;br&gt;
Never run untrusted pull request code with secrets. Be especially careful with the pull_request_target trigger, which runs with elevated privileges and has been behind multiple real-world compromises.&lt;br&gt;
Be careful with caches. Poisoned build caches have been used to inject code into later, trusted builds.&lt;br&gt;
Separate build from publish, so the step with release credentials does not run untrusted code.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Verify provenance and scan for known problems
Audit known vulnerabilities: npm audit, pip-audit, govulncheck, and similar tools flag dependencies with published CVEs.
Check signatures and provenance: npm supports provenance attestations showing which source repository and build produced a package, and npm audit signatures verifies registry signatures. Sigstore and SLSA are broader frameworks for signing and attesting builds.
Generate an SBOM (software bill of materials): a machine-readable inventory of everything in your software. When a new compromise is announced, an SBOM lets you answer "are we affected?" in minutes rather than days.&lt;/li&gt;
&lt;li&gt;Isolate your development environment&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Assume that one day something malicious will run. Limit the blast radius:&lt;/p&gt;

&lt;p&gt;Develop inside containers or dev containers where practical, so a compromised package cannot read your whole home directory.&lt;br&gt;
Keep production credentials off your laptop. Use short-lived credentials and separate accounts for development and production.&lt;br&gt;
Use a password manager or credential helper rather than plain-text .env files holding long-lived secrets.&lt;br&gt;
Review browser extensions and editor extensions as carefully as you review packages. They run with significant access too.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Prepare to respond&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Assume you will eventually install something bad. Know in advance how you would respond:&lt;/p&gt;

&lt;p&gt;Identify which projects and machines installed the affected version (lockfiles and SBOMs help).&lt;br&gt;
Rotate every credential that could have been exposed: cloud keys, registry tokens, SSH keys, API keys.&lt;br&gt;
Rebuild from a clean environment rather than trying to clean an infected one.&lt;br&gt;
Review logs for unusual activity, such as unexpected publishes or cloud API calls.&lt;/p&gt;

&lt;p&gt;Speed matters. In several recent incidents, the malicious versions were available only for hours, so quickly noticing and rotating secrets limited damage.&lt;/p&gt;

&lt;p&gt;A Realistic Mindset&lt;/p&gt;

&lt;p&gt;It is tempting to react to all this by distrusting everything, but that is not workable. Modern software is built on shared components, and no individual can audit all of them. Security specialists increasingly frame the problem differently: the attack surface is permanent, so the aim is to make compromise less likely, limit what a compromise can reach, and shorten the time to detect and recover.&lt;/p&gt;

&lt;p&gt;For a student developer, that translates into a short checklist worth making habitual:&lt;/p&gt;

&lt;p&gt;Commit lockfiles and use npm ci (or your ecosystem's equivalent) in CI.&lt;br&gt;
Do not upgrade to a version the day it is published unless you need to.&lt;br&gt;
Restrict install scripts and review new dependencies before adding them.&lt;br&gt;
Use hardware-key or passkey MFA on registry and GitHub accounts.&lt;br&gt;
Pin CI actions to SHAs and keep workflow permissions minimal.&lt;br&gt;
Keep long-lived secrets out of your repo and off your laptop wherever possible.&lt;br&gt;
Double-check any package an AI tool suggests actually exists and is the real one.&lt;br&gt;
Key Takeaways&lt;br&gt;
Supply chain attacks target the trusted components and processes software depends on, giving attackers leverage over many victims at once.&lt;br&gt;
Recent incidents show account takeover, CI/CD abuse, install scripts, and self-spreading worms working in combination, and attackers now deliberately avoid obvious warning signs.&lt;br&gt;
Developer machines and CI runners are high-value targets because they hold credentials and publishing rights.&lt;br&gt;
Defenses are layered: lockfiles, version cooldowns, restricted install scripts, fewer dependencies, strong account security, hardened CI, provenance checks, SBOMs, and isolation.&lt;br&gt;
Having an incident-response plan, especially for rotating credentials, matters as much as prevention.&lt;/p&gt;

&lt;p&gt;The uncomfortable truth is that you inherit the security of everything you import. The encouraging truth is that a handful of inexpensive habits, adopted early, remove most of the easy paths attackers rely on. Starting those habits while you are still learning means they will be second nature by the time you are shipping code that other people depend on.&lt;/p&gt;

</description>
      <category>dependencyinversion</category>
      <category>security</category>
      <category>software</category>
    </item>
    <item>
      <title>Smaller Is the New Bigger: Small Language Models and the Move to On-Device AI</title>
      <dc:creator>lui were</dc:creator>
      <pubDate>Wed, 11 Nov 2026 10:56:43 +0000</pubDate>
      <link>https://dev.to/lui_were/smaller-is-the-new-bigger-small-language-models-and-the-move-to-on-device-ai-453f</link>
      <guid>https://dev.to/lui_were/smaller-is-the-new-bigger-small-language-models-and-the-move-to-on-device-ai-453f</guid>
      <description>&lt;p&gt;For years the headline metric in AI was size. More parameters, more training data, bigger clusters, bigger bills. The assumption was that capability came from scale, and scale lived in data centers. In 2026 a counter-trend has become impossible to ignore: small language models (SLMs) running directly on phones, laptops, vehicles, and industrial hardware. Instead of every request traveling to a cloud GPU and back, a growing share of AI work happens on the device in your hand.&lt;/p&gt;

&lt;p&gt;This article explains what small models are, the techniques that make them work, the hardware behind the shift, the hybrid architecture most teams are settling on, and what it means for a developer building real applications, including in places where connectivity and data costs are real constraints.&lt;/p&gt;

&lt;p&gt;What Counts as a "Small" Model?&lt;/p&gt;

&lt;p&gt;There is no official line, but a common definition is a language model somewhere between roughly 0.5 and 14 billion parameters, small enough to run efficiently on consumer hardware or edge devices. For comparison, frontier cloud models are far larger and need clusters of specialized accelerators. Well-known small and mid-sized open families include Google's Gemma, Microsoft's Phi, and Meta's Llama small variants, along with compact models built into phone operating systems.&lt;/p&gt;

&lt;p&gt;Two clarifications keep this honest. First, "small" is relative and moving: a model that needed a server rack a few years ago now fits in a laptop's memory. Second, small models trail the largest frontier models on hard, open-ended reasoning. The interesting claim is not that small beats large everywhere. It is that for many well-defined tasks, a small model is good enough, and the savings in cost, latency, and privacy are decisive.&lt;/p&gt;

&lt;p&gt;Why the Industry Is Moving This Way&lt;/p&gt;

&lt;p&gt;Several forces are converging.&lt;/p&gt;

&lt;p&gt;Cost. Cloud inference is billed per token, and at scale those bills are large. Running routine requests on hardware the user already owns removes that marginal cost.&lt;/p&gt;

&lt;p&gt;Latency. A network round trip plus queueing in a data center adds delay. On-device inference removes the network from the path, which matters for features that must feel instant, like keyboard suggestions, voice commands, or real-time camera processing.&lt;/p&gt;

&lt;p&gt;Privacy and regulation. If data never leaves the device, there is much less to leak, store, or explain to an auditor. Laws like GDPR push toward data minimization, which favors local processing. For health, finance, and personal messaging, "it stays on your phone" is a real product feature.&lt;/p&gt;

&lt;p&gt;Offline operation and connectivity. A model on the device works with a weak signal or none at all. For developers building for regions where mobile data is expensive or networks are unreliable, this is not a luxury. It can decide whether an app is usable.&lt;/p&gt;

&lt;p&gt;Specialization. A small model fine-tuned on one narrow job, such as classifying support tickets or extracting fields from receipts, can match or beat a general giant on that job while being a fraction of the size. NVIDIA researchers have argued publicly that small models are well suited to many agentic tasks, since agents spend most of their time on narrow, repetitive subtasks rather than open-ended reasoning.&lt;/p&gt;

&lt;p&gt;Market analysts project the category growing quickly, with some forecasts calling for on-device to become the default for routine language tasks within a few years. Forecasts like this are speculative, so treat the specific numbers loosely. The qualitative direction, though, matches what engineers report.&lt;/p&gt;

&lt;p&gt;How Big Models Become Small Ones&lt;/p&gt;

&lt;p&gt;Shrinking a model without wrecking its usefulness relies on a handful of techniques. Understanding them demystifies a lot of the jargon.&lt;/p&gt;

&lt;p&gt;Quantization&lt;/p&gt;

&lt;p&gt;Model weights are normally stored as 16-bit floating point numbers. Quantization stores them with fewer bits, such as 8-bit or 4-bit integers. Memory use drops dramatically: a 7-billion-parameter model needs around 14 GB at 16 bits but roughly 3.5 to 4 GB at 4 bits, which fits on many laptops and some phones. The cost is some loss of precision, and good quantization methods minimize the quality hit. Quantization is the single most important reason local models are practical.&lt;/p&gt;

&lt;p&gt;Distillation&lt;/p&gt;

&lt;p&gt;In knowledge distillation, a small "student" model is trained to imitate a large "teacher" model's outputs. The student learns a compressed version of the teacher's behavior, often reaching surprisingly strong performance for its size on the tasks it was distilled for.&lt;/p&gt;

&lt;p&gt;Pruning and Sparsity&lt;/p&gt;

&lt;p&gt;Pruning removes weights or whole structures that contribute little. Related ideas include mixture-of-experts (MoE) architectures, where only a subset of the model's parameters activate for each token. Some very large MoE models have hundreds of billions of total parameters but use only a fraction per token, cutting compute. The same idea is now being used in smaller models.&lt;/p&gt;

&lt;p&gt;Better Data and Training&lt;/p&gt;

&lt;p&gt;A major reason small models improved is that researchers learned how much training data quality matters. Carefully curated or synthetic training data lets a smaller model punch above its weight.&lt;/p&gt;

&lt;p&gt;Efficient Inference Runtimes&lt;/p&gt;

&lt;p&gt;Software matters as much as the model. Runtimes such as llama.cpp, ONNX Runtime, and platform-specific frameworks use optimized kernels, memory mapping, and hardware acceleration to run models quickly on modest hardware. A single-file, quantized model plus an efficient runtime is often all you need to run a language model on a laptop.&lt;/p&gt;

&lt;p&gt;The Hardware Behind It: NPUs&lt;/p&gt;

&lt;p&gt;Phones and PCs now ship with neural processing units (NPUs), specialized chips designed to run the matrix math of neural networks efficiently and with low power. Unlike a general CPU or a power-hungry GPU, an NPU can run inference at a fraction of the energy cost, which matters because battery life is the real budget on a mobile device. As NPU-equipped devices make up more of the installed base, developers can assume on-device AI capability the way they once assumed a camera or GPS.&lt;/p&gt;

&lt;p&gt;One real headache here is fragmentation. Each chip vendor and platform exposes on-device AI differently, so code that runs well on one phone family may need rework for another. Cross-platform runtimes and abstraction layers help, but this remains one of the bigger practical costs of going on-device.&lt;/p&gt;

&lt;p&gt;The Pattern Most Teams Land On: Hybrid Architecture&lt;/p&gt;

&lt;p&gt;The real-world answer is rarely "all local" or "all cloud." The architecture gaining ground is hybrid: a small model on the device handles the bulk of routine work, and requests that are too hard, too long, or too important are escalated to a larger cloud model. Industry write-ups describe enterprise deployments where small local models handle the large majority of workflow steps and only complex reasoning goes to the cloud. As with market forecasts, the exact percentages vary by source, but the pattern is consistent.&lt;/p&gt;

&lt;p&gt;A simple routing layer captures the idea:&lt;/p&gt;

&lt;p&gt;go&lt;br&gt;
type Router struct {&lt;br&gt;
    Local  Model // small, on-device&lt;br&gt;
    Cloud  Model // large, remote&lt;br&gt;
    Threshold float64&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;func (r *Router) Answer(prompt string) (string, error) {&lt;br&gt;
    // Try the cheap, private option first.&lt;br&gt;
    reply, confidence, err := r.Local.Generate(prompt)&lt;br&gt;
    if err == nil &amp;amp;&amp;amp; confidence &amp;gt;= r.Threshold {&lt;br&gt;
        return reply, nil&lt;br&gt;
    }&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Escalate only when needed, and only with user consent
// if the prompt contains personal data.
return r.Cloud.Generate(prompt)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;The hard part, of course, is the confidence signal. Real systems use a mix of task classification, output validation, heuristics, and sometimes a separate small model that decides where to route. Getting routing right is one of the most valuable skills in applied AI engineering right now, because it directly controls cost, speed, and quality.&lt;/p&gt;

&lt;p&gt;What You Can Actually Do With Small Models&lt;/p&gt;

&lt;p&gt;Practical use cases where small and on-device models already make sense:&lt;/p&gt;

&lt;p&gt;Text tasks on the device: summarizing notes, rewriting messages, smart replies, grammar correction, and autocomplete.&lt;br&gt;
Classification and extraction: tagging support tickets, pulling fields out of invoices or forms, routing emails.&lt;br&gt;
Private assistants: searching personal documents or messages without uploading them.&lt;br&gt;
Voice and vision on the edge: wake-word detection, on-device transcription, and camera-based detection and counting, where sending every video frame to the cloud would be slow and expensive.&lt;br&gt;
Offline-first apps: tools for farmers, clinics, or field workers that must function with intermittent connectivity.&lt;br&gt;
Agent subtasks: formatting tool arguments, validating outputs, and doing routine steps cheaply inside a larger agent system.&lt;br&gt;
Limitations You Should Know About&lt;/p&gt;

&lt;p&gt;A real quality gap. Small models are weaker on complex multi-step reasoning, broad world knowledge, and long, nuanced tasks. If your task needs frontier-level capability, a small model will visibly struggle.&lt;/p&gt;

&lt;p&gt;Hallucination does not disappear. Smaller models can be less reliable on facts. For anything factual, pair them with retrieval (searching a trusted document set and feeding results to the model) rather than trusting what the model "remembers."&lt;/p&gt;

&lt;p&gt;Device constraints. Memory, thermal limits, and battery life cap how large a model you can run and for how long. A model that runs fine on a flagship phone may be unusable on a budget one. Test on the lowest-end device you intend to support.&lt;/p&gt;

&lt;p&gt;Updating is harder. A cloud model improves silently. A model shipped inside an app must be updated through app releases or downloads, and users on old versions keep old behavior.&lt;/p&gt;

&lt;p&gt;Security is different, not absent. A model stored on the device can potentially be extracted, and on-device does not make an app immune to prompt injection if it reads untrusted content.&lt;/p&gt;

&lt;p&gt;Fragmented tooling. As noted, different platforms and chips mean more testing and more code paths.&lt;/p&gt;

&lt;p&gt;Trying It Yourself&lt;/p&gt;

&lt;p&gt;You can explore this trend today with a laptop and no cloud bill:&lt;/p&gt;

&lt;p&gt;Run a small model locally. Tools like Ollama or llama.cpp let you download a quantized model and talk to it from the terminal or a local HTTP API within minutes.&lt;br&gt;
Call it from code. Local runtimes typically expose a simple REST endpoint. Write a small Go or JavaScript program that sends a prompt and prints the response. This takes less than an hour and demystifies the whole stack.&lt;br&gt;
Measure, do not guess. Time the responses, check memory use, and compare quantization levels (for example 8-bit versus 4-bit) on the same prompts. Seeing the speed and quality trade-off firsthand teaches more than any article.&lt;br&gt;
Build a router. Send easy prompts to the local model and hard ones to a hosted API, and log which path was taken and why.&lt;br&gt;
Try a narrow task. Pick one job, such as classifying short messages into categories, and see how well a small model handles it with a good prompt or light fine-tuning.&lt;br&gt;
Key Takeaways&lt;br&gt;
Small language models, typically a few billion parameters, are now capable enough for many focused tasks and run on consumer hardware.&lt;br&gt;
The drivers are cost, latency, privacy, offline use, and specialization, not just hype.&lt;br&gt;
Quantization, distillation, pruning and sparsity, better data, and efficient runtimes make shrinking models practical, while NPUs make running them power-efficient.&lt;br&gt;
Hybrid architectures, local by default with cloud escalation, are the pragmatic pattern, and routing quality is the key engineering challenge.&lt;br&gt;
Limits are real: weaker reasoning, memory and battery constraints, update difficulty, and platform fragmentation.&lt;br&gt;
Hands-on experimentation with a local model is cheap and one of the best ways to understand where AI is heading.&lt;/p&gt;

&lt;p&gt;The story of AI is often told as a race to build ever larger models. The more practical story of 2026 is about fit: choosing the smallest model that does the job well, in the place where it makes the most sense to run. Developers who understand that trade-off can build products that are faster, cheaper, more private, and usable by many more people in many more places.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>llm</category>
    </item>
    <item>
      <title>From Chatbots to Agents: How Agentic AI and MCP Are Changing Software Development</title>
      <dc:creator>lui were</dc:creator>
      <pubDate>Wed, 11 Nov 2026 10:54:05 +0000</pubDate>
      <link>https://dev.to/lui_were/from-chatbots-to-agents-how-agentic-ai-and-mcp-are-changing-software-development-4f83</link>
      <guid>https://dev.to/lui_were/from-chatbots-to-agents-how-agentic-ai-and-mcp-are-changing-software-development-4f83</guid>
      <description>&lt;p&gt;For the first few years of the generative AI boom, the interaction model was simple: you typed a prompt, a model returned text, and you copied the useful parts into your editor. The model was a very smart autocomplete with a chat window. The most important shift in 2026 is that this model of interaction is being replaced. AI systems no longer just answer. They plan, call tools, read results, and keep going until a task is done. That is what people mean by agentic AI, and it is the trend that touches almost every other trend in the industry right now.&lt;/p&gt;

&lt;p&gt;This article explains what an agent actually is at the code level, why a protocol called MCP became the standard way to connect agents to the world, what multi-agent systems are, where agents still fail, and what a student developer should learn now.&lt;/p&gt;

&lt;p&gt;What Is an Agent, Technically?&lt;/p&gt;

&lt;p&gt;Strip away the marketing and an agent is a loop. A language model is called repeatedly, and between calls, ordinary code executes actions the model asked for. The core pattern looks like this:&lt;/p&gt;

&lt;p&gt;Give the model a goal and a list of tools it may use.&lt;br&gt;
The model responds with either a final answer or a request to call a tool (for example, read_file with a path).&lt;br&gt;
Your program runs the tool and appends the result to the conversation.&lt;br&gt;
Go back to step 2 until the model produces a final answer or a limit is reached.&lt;/p&gt;

&lt;p&gt;In Go, the skeleton is short:&lt;/p&gt;

&lt;p&gt;go&lt;br&gt;
func runAgent(goal string, tools map[string]Tool, maxSteps int) (string, error) {&lt;br&gt;
    messages := []Message{{Role: "user", Content: goal}}&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for step := 0; step &amp;lt; maxSteps; step++ {
    reply, err := callModel(messages, toolSchemas(tools))
    if err != nil {
        return "", err
    }

    // No tool requested: the model is done.
    if reply.ToolCall == nil {
        return reply.Text, nil
    }

    tool, ok := tools[reply.ToolCall.Name]
    if !ok {
        messages = append(messages, toolError("unknown tool"))
        continue
    }

    result, err := tool.Run(reply.ToolCall.Args)
    if err != nil {
        result = "error: " + err.Error() // let the model recover
    }
    messages = append(messages, reply.AsMessage(), toolResult(reply.ToolCall.ID, result))
}
return "", errors.New("step limit reached")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;Notice what is and is not in this code. The intelligence is in the model. Everything else is plain engineering: a loop, a map of functions, error handling, and a hard step limit. That maxSteps guard matters. Agents that can call tools can also call them forever, burn money, or repeat a failing action, so every production agent needs budgets for steps, time, and cost.&lt;/p&gt;

&lt;p&gt;This is also why agentic development rewards ordinary software skills. The reliability of an agent depends far more on the quality of its tools, its error messages, and its guardrails than on clever prompting.&lt;/p&gt;

&lt;p&gt;Why Tools Are the Real Interface&lt;/p&gt;

&lt;p&gt;A tool is just a function with a name, a description, and a JSON schema for its arguments. The model reads the description and schema to decide when and how to call it. A good tool is:&lt;/p&gt;

&lt;p&gt;Narrow. search_orders(customer_id) is easier for a model to use correctly than run_sql(query).&lt;br&gt;
Self-describing. The description is effectively documentation written for a model. Vague descriptions produce wrong calls.&lt;br&gt;
Forgiving in its errors. Returning "customer_id must be a number, got 'abc'" lets the model fix its own mistake. Returning a stack trace does not.&lt;br&gt;
Safe by construction. Read-only tools can run freely. Tools that delete data, send money, or send email should require confirmation or run with limited permissions.&lt;/p&gt;

&lt;p&gt;The practical consequence: the hard part of building an agent is usually designing its tool surface, not choosing the model.&lt;/p&gt;

&lt;p&gt;The Integration Problem and Why MCP Won&lt;/p&gt;

&lt;p&gt;Early agent builders hit the same wall. Every tool integration was custom. If you wanted your assistant to read GitHub issues, query a database, and post to Slack, you wrote three separate connectors, in the format your particular framework expected. Switch frameworks or models and you rewrote them. With N applications and M tools, the industry was heading toward N times M one-off integrations.&lt;/p&gt;

&lt;p&gt;The Model Context Protocol (MCP), introduced by Anthropic in late 2024, attacks this the same way earlier standards did. Think of how USB-C replaced a drawer of incompatible cables, or how the Language Server Protocol let one language tool work in many editors. MCP defines a common way for an AI application (the client) to talk to a program that exposes capabilities (the server). Build a server once and any MCP-aware client can use it.&lt;/p&gt;

&lt;p&gt;An MCP server can expose three kinds of things:&lt;/p&gt;

&lt;p&gt;Tools: functions the model can call (create an issue, run a query).&lt;br&gt;
Resources: data the application can read and attach as context (a file, a database row, a document).&lt;br&gt;
Prompts: reusable, parameterized prompt templates a user can invoke.&lt;/p&gt;

&lt;p&gt;Communication happens over JSON-RPC, either through standard input and output for local servers or over HTTP for remote ones. A tool call over MCP looks roughly like this:&lt;/p&gt;

&lt;p&gt;json&lt;br&gt;
{&lt;br&gt;
  "jsonrpc": "2.0",&lt;br&gt;
  "id": 7,&lt;br&gt;
  "method": "tools/call",&lt;br&gt;
  "params": {&lt;br&gt;
    "name": "search_issues",&lt;br&gt;
    "arguments": { "repo": "my-org/my-app", "state": "open" }&lt;br&gt;
  }&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;The server replies with structured content that the client hands back to the model. Because the protocol is plain JSON-RPC, writing a basic server in Go, JavaScript, or Python is a small project, which is a big reason adoption spread so quickly.&lt;/p&gt;

&lt;p&gt;By mid-2026, multiple industry write-ups describe MCP as the default integration layer: native support across tools like Claude Code, Cursor, Codex CLI, and Windsurf, adapters in orchestration frameworks such as LangGraph, CrewAI, and n8n, and thousands of published servers. Treat exact counts with caution, since they come from vendor and community blogs, but the direction is not in doubt. A second protocol, Google's Agent-to-Agent (A2A), targets a different layer: how agents talk to each other rather than to tools. A common way to think about it is MCP for agent-to-tool and A2A for agent-to-agent.&lt;/p&gt;

&lt;p&gt;Multi-Agent Systems&lt;/p&gt;

&lt;p&gt;A single agent with fifty tools tends to get confused. Its context fills up, it picks the wrong tool, and it loses track of the goal. A popular answer is decomposition: several agents, each with a narrow role, a small toolset, and a focused prompt, coordinated by an orchestrator.&lt;/p&gt;

&lt;p&gt;A typical coding workflow might have:&lt;/p&gt;

&lt;p&gt;A planner that breaks a feature request into tasks.&lt;br&gt;
A coder that edits files and runs tests.&lt;br&gt;
A reviewer that reads the diff and flags problems.&lt;/p&gt;

&lt;p&gt;The benefits are real: smaller contexts, clearer responsibilities, and the ability to run work in parallel. The costs are real too. Every handoff is a place where information gets lost, every extra agent multiplies token spend, and debugging a conversation between three models is harder than debugging one. A good rule of thumb from practitioners: start with one agent and one good set of tools, and split only when you can point to a concrete failure that splitting would fix.&lt;/p&gt;

&lt;p&gt;Agentic Coding: What It Looks Like in Practice&lt;/p&gt;

&lt;p&gt;The most visible agents today are coding agents, and the shift is easy to describe. Autocomplete suggests the next line. A coding agent receives a task like "add pagination to the posts endpoint and update the tests," then explores the repository, edits several files, runs the test suite, reads the failures, and iterates. Anthropic's 2026 agentic coding report and similar industry analyses describe this move from suggestion to execution, with agents handling work such as writing tests, debugging, generating documentation, and navigating large codebases.&lt;/p&gt;

&lt;p&gt;Some patterns have emerged among developers who get good results:&lt;/p&gt;

&lt;p&gt;Give agents context files. Project conventions, build commands, and architecture notes stored in the repo (many tools read a file such as CLAUDE.md or AGENTS.md) save the agent from rediscovering them every session.&lt;br&gt;
Keep tasks small and verifiable. Agents do best when success is checkable, ideally by a test that either passes or fails.&lt;br&gt;
Review everything. The output is a pull request from a fast, confident, occasionally wrong colleague. It deserves the same scrutiny as any other pull request.&lt;br&gt;
Use version control as the safety net. Commit before letting an agent loose so any bad run can be discarded in one command.&lt;/p&gt;

&lt;p&gt;The honest framing is that agents shift where developer time goes. Less time typing boilerplate, more time specifying, reviewing, and verifying. That makes the skills from earlier in this series (reading code, writing tests, understanding Git) more valuable, not less.&lt;/p&gt;

&lt;p&gt;Where Agents Still Fail&lt;/p&gt;

&lt;p&gt;A balanced view matters, because trend articles are often written by people selling something. Real limitations show up consistently:&lt;/p&gt;

&lt;p&gt;Compounding errors. If each step in a ten-step task succeeds 95% of the time, the whole chain succeeds only about 60% of the time. Long autonomous runs magnify small failure rates.&lt;/p&gt;

&lt;p&gt;Prompt injection. An agent that reads untrusted content (a web page, an email, a GitHub issue) can be tricked by instructions hidden in that content. If the same agent also holds powerful tools, a malicious page can steer it into leaking data or taking harmful actions. This is the central security problem of agentic systems, and there is no complete fix yet. Mitigations include least-privilege tools, human approval for sensitive actions, and isolating untrusted content.&lt;/p&gt;

&lt;p&gt;Overbroad permissions. MCP makes it easy to connect an agent to many systems, which also makes it easy to over-grant access. Teams are now building management and visibility layers for MCP servers for exactly this reason: who connected what, with which credentials?&lt;/p&gt;

&lt;p&gt;Cost and latency. Every loop iteration is a model call. Complex agent runs can take minutes and use large numbers of tokens, so budgets and caching become engineering concerns.&lt;/p&gt;

&lt;p&gt;Evaluation is hard. Because outputs are non-deterministic and multi-step, you cannot test an agent with a handful of unit tests. Teams build evaluation sets of realistic tasks and measure success rates over many runs.&lt;/p&gt;

&lt;p&gt;Governance Moves Into the Code&lt;/p&gt;

&lt;p&gt;One of the quieter 2026 trends is that safety and compliance rules are being implemented as code rather than as policy documents. Audit logs of every tool call, allow-lists of permitted actions, spending caps, approval gates for destructive operations, and automated checks that run before an agent's changes merge. Regulation, including the EU AI Act, adds pressure in the same direction. For developers, this means that knowing how to build observability and permission systems is a core part of building agents, not an add-on.&lt;/p&gt;

&lt;p&gt;What a Student Should Do About This&lt;/p&gt;

&lt;p&gt;You do not need to chase every framework. The fundamentals are stable, and they are things you can practice with the languages you are already learning:&lt;/p&gt;

&lt;p&gt;Build the loop yourself once. Write a minimal agent in Go or JavaScript with two or three tools and a step limit, without a framework. You will understand every layer afterward.&lt;br&gt;
Write a small MCP server. Expose one useful capability (reading notes from a folder, querying a SQLite database) and connect it to an MCP-capable client. It is one of the best weekend projects available right now.&lt;br&gt;
Practice tool design. Write clear schemas, descriptive names, and helpful error messages. This transfers directly to API design in general.&lt;br&gt;
Learn to evaluate. Collect ten realistic tasks, run your agent on them repeatedly, and track how often it succeeds. This habit separates demos from products.&lt;br&gt;
Take security seriously early. Read about prompt injection and design your tools with least privilege from the start.&lt;br&gt;
Keep your fundamentals sharp. Agents amplify developers who can read code, reason about systems, and verify results. They do not replace the need to understand what is being built.&lt;br&gt;
Key Takeaways&lt;br&gt;
An agent is a loop: model call, tool execution, repeat, with limits. Most of the engineering is in the tools and guardrails.&lt;br&gt;
MCP standardizes how agents connect to tools and data, and has become the common integration layer. A2A addresses agent-to-agent communication.&lt;br&gt;
Multi-agent designs help with focus and parallelism but add cost and complexity, so split only for a concrete reason.&lt;br&gt;
Coding agents change developer work from typing to specifying, reviewing, and verifying.&lt;br&gt;
Prompt injection, compounding errors, cost, and evaluation remain unsolved or hard problems. Treat claims of fully autonomous software engineering with skepticism.&lt;br&gt;
The best preparation is learning the fundamentals and building a small agent and MCP server yourself.&lt;/p&gt;

&lt;p&gt;Agentic AI is not magic, and it is not a passing fad. It is a new layer of software architecture, built from loops, protocols, and permissions. Developers who understand those pieces will be the ones building, securing, and supervising the systems everyone else is using.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>mcp</category>
    </item>
    <item>
      <title>How the Open Source Economy Works — and Why It Powers Almost Everything You Build</title>
      <dc:creator>lui were</dc:creator>
      <pubDate>Tue, 29 Sep 2026 09:21:17 +0000</pubDate>
      <link>https://dev.to/lui_were/how-the-open-source-economy-works-and-why-it-powers-almost-everything-you-build-2lkb</link>
      <guid>https://dev.to/lui_were/how-the-open-source-economy-works-and-why-it-powers-almost-everything-you-build-2lkb</guid>
      <description>&lt;p&gt;Stop for a moment and list the tools you used today as a developer. A terminal running Bash. VS Code. Git. Go or Node.js. Docker. PostgreSQL. React. Linux, if you're on a server. Virtually every tool in that list was built by thousands of contributors working without a salary for that specific code, governed by a license that lets anyone in the world use it for free, including trillion-dollar corporations. And yet the people who built those tools — and the companies organized around them — have figured out how to turn free software into one of the most powerful economic forces in the tech industry.&lt;/p&gt;

&lt;p&gt;Understanding the open source economy isn't just background knowledge. It shapes what tools you use, how you get hired, how companies you'll work for make their money, and how you can build a reputation in the industry long before you have a job title to put on a resume.&lt;/p&gt;

&lt;p&gt;What Open Source Actually Means&lt;/p&gt;

&lt;p&gt;Open source software is software whose source code is publicly available and licensed in a way that allows anyone to read it, use it, modify it, and distribute it. The exact permissions and conditions vary by license — and those differences matter more than they might seem — but the core idea is that the code isn't a trade secret locked inside a company. It's a shared resource that anyone can inspect and build on.&lt;/p&gt;

&lt;p&gt;This is in contrast to proprietary software, where the source code is private and you interact with it only through a compiled binary or an API — Microsoft Windows, Adobe Photoshop, and most early commercial software were built this way. You could use them but you couldn't see how they worked or modify them to fit your needs.&lt;/p&gt;

&lt;p&gt;The philosophical argument for open source — that software should be free as in freedom, not locked up by corporations — was articulated loudly by the free software movement in the 1980s. But open source's explosion in the 1990s and 2000s was driven less by ideology and more by a pragmatic realization: code developed in public, by a large community, with many eyes on it, tends to become more reliable, more secure, and more capable faster than code developed by a single company's internal team in isolation. When thousands of developers around the world encounter bugs, report them, and sometimes fix them, software improves at a pace that's hard to match behind closed doors.&lt;/p&gt;

&lt;p&gt;The Licenses That Make It Work&lt;/p&gt;

&lt;p&gt;The legal foundation of open source is the license attached to a project. Licenses aren't all the same, and the differences have real practical implications:&lt;/p&gt;

&lt;p&gt;Permissive licenses (MIT, Apache 2.0, BSD) allow you to use, modify, and distribute the code with almost no restrictions — including in commercial, proprietary products. You can take MIT-licensed code, modify it, compile it into your closed-source product, and sell that product without open-sourcing your changes. Go's standard library, React, Vue, Docker, and thousands of other tools use permissive licenses. This is why companies happily build commercial products on top of them.&lt;/p&gt;

&lt;p&gt;Copyleft licenses (GPL, AGPL) work differently. They require that if you distribute software built on copyleft code, you must also distribute your modifications under the same license. This is sometimes called "viral" because the requirement propagates to derivative work. The Linux kernel is GPL-licensed — which means companies that distribute products running a modified Linux kernel (like Android device manufacturers) must release those kernel modifications publicly. The AGPL goes further, applying the same requirement even to software run as a service over a network.&lt;/p&gt;

&lt;p&gt;Choosing a license is a strategic decision. Projects that want maximum adoption often choose MIT or Apache. Projects where the maintainers want to prevent corporations from taking the code proprietary without contributing back often choose AGPL. This tension is at the heart of most "re-licensing" controversies in the open source world.&lt;/p&gt;

&lt;p&gt;How Companies Make Money From Free Software&lt;/p&gt;

&lt;p&gt;The most common question students ask about open source is the obvious one: if the code is free, where does the money come from? The answer is that free code and profitable businesses aren't mutually exclusive — companies have found several reliable models for monetizing open source.&lt;/p&gt;

&lt;p&gt;Support and services. The software is free; the expertise to run it at scale is not. Red Hat built a billion-dollar business (eventually acquired by IBM for $34 billion) entirely on this model — giving away Linux for free and charging enterprises for support contracts, certified engineers, and guaranteed security patches.&lt;/p&gt;

&lt;p&gt;Open core / commercial features. The core product is open source, but advanced features — enterprise security, audit logging, single sign-on, analytics dashboards — are available only in a paid commercial tier. GitLab, Elastic, and HashiCorp all use variations of this model. You get the open version for free; you pay for the enterprise-grade additions.&lt;/p&gt;

&lt;p&gt;Cloud hosting. Hosting and managing open source software reliably at scale is hard and expensive. Many companies are happy to pay AWS, Google Cloud, or a specialized provider to run PostgreSQL, Redis, Kafka, or MongoDB for them, even though they could theoretically run the same software themselves for free. This is the managed services model, and it's wildly profitable. It's also caused significant friction between open source maintainers and cloud providers, because a cloud giant can effectively monetize someone else's open source project without contributing meaningfully back to it.&lt;/p&gt;

&lt;p&gt;Dual licensing. A project releases under a restrictive license (like AGPL) so that companies using it in commercial products must either open-source their modifications or buy a commercial license. MySQL pioneered this model, and it's become common for database and infrastructure software.&lt;/p&gt;

&lt;p&gt;Consulting and training. Deep expertise in a complex open source project — Kubernetes, Apache Kafka, TensorFlow — commands real consulting rates. Many open source contributors build consulting businesses around the projects they help maintain.&lt;/p&gt;

&lt;p&gt;The Cloud Giants and the "Open Source Sustainability" Problem&lt;/p&gt;

&lt;p&gt;The rise of cloud computing created a structural tension in the open source world. Amazon, Microsoft, and Google offer managed versions of open source databases and tools as cloud services — Amazon offers managed PostgreSQL, MySQL, Redis, Elasticsearch, and more. They make significant revenue from these offerings. The original maintainers of those projects, often small teams or individual contributors, see little of that revenue.&lt;/p&gt;

&lt;p&gt;This led several major open source projects to change their licenses specifically to prevent cloud providers from running their software as a service without contributing back or paying. Elasticsearch, MongoDB, Redis, and HashiCorp's Terraform all made controversial license changes for exactly this reason — moves that sparked significant community backlash but also reflected a genuine sustainability problem.&lt;/p&gt;

&lt;p&gt;The sustainability question is real and unsolved: maintaining critical open source infrastructure is expensive, time-consuming, unglamorous work, and most of the people doing it are either subsidized by companies that benefit from the software or burning out doing it for free. The Log4Shell vulnerability in 2021 — a critical security flaw in a Java logging library maintained largely by volunteers, embedded in millions of production systems globally — made this problem viscerally clear to the broader industry.&lt;/p&gt;

&lt;p&gt;The Open Source Career Ladder Nobody Talks About&lt;/p&gt;

&lt;p&gt;Here's the part that matters most to you right now: open source is one of the best career-building tools available to a student developer, and it's entirely free to participate in.&lt;/p&gt;

&lt;p&gt;Every contribution you make to a public open source project is permanently, publicly visible. It's not on a resume line that a recruiter has to take on faith — it's a URL they can click and see the actual code you wrote, the actual problem you identified, the actual review feedback you responded to. For a developer without years of professional experience, this is enormously valuable.&lt;/p&gt;

&lt;p&gt;The entry points are more accessible than most students assume:&lt;/p&gt;

&lt;p&gt;Documentation fixes. Every major project has documentation that's outdated, unclear, or missing. Improving it is a real contribution, it's visible in the commit history, and it requires you to understand the project well enough to explain it accurately — which is itself valuable learning.&lt;/p&gt;

&lt;p&gt;Bug reports. A clear, reproducible bug report with a minimal test case is a genuine contribution, even if you never write a line of fix code. Learning to write good bug reports is a skill that matters in every professional context.&lt;/p&gt;

&lt;p&gt;Small bug fixes. Most large projects tag issues with "good first issue" or "beginner-friendly" specifically to invite new contributors. These are deliberately scoped to be approachable. Fixing one is a complete, end-to-end experience: understand the codebase, reproduce the bug, write a fix, write a test, open a PR, respond to review, get merged.&lt;/p&gt;

&lt;p&gt;Building on top of projects. Every side project you build using open source tools and publish publicly is itself a contribution to the ecosystem — showing real usage patterns, surfacing unexpected edge cases, and potentially inspiring others.&lt;/p&gt;

&lt;p&gt;The social dimension of open source matters too. The person who reviews your pull request might be a staff engineer at a company you'd like to work for. The maintainer of a project you've contributed to might recommend you for a role. Open source is a global, asynchronous networking event that runs continuously, and participation compounds over time.&lt;/p&gt;

&lt;p&gt;What the Biggest Projects Reveal About the Industry&lt;/p&gt;

&lt;p&gt;The open source projects that have become the most widely used also reveal a lot about where the industry has moved and is moving:&lt;/p&gt;

&lt;p&gt;Linux — the operating system kernel running most of the world's servers, cloud infrastructure, and Android phones — demonstrated early that distributed, volunteer-driven development could produce software more reliable than anything a single company could build internally. It remains the canonical example of open source at scale.&lt;/p&gt;

&lt;p&gt;Kubernetes — Google open-sourced its internal container orchestration system in 2014, and it became the industry standard for deploying and managing containerized applications within a few years. This is a pattern you'll see repeatedly: a company solves a hard problem internally, realizes the ecosystem benefit of open-sourcing the solution outweighs the competitive advantage of keeping it proprietary, and donates it to a foundation.&lt;/p&gt;

&lt;p&gt;VS Code — Microsoft open-sourced its code editor and it became the most used development tool in the world. A proprietary competitor would have struggled to achieve the same adoption.&lt;/p&gt;

&lt;p&gt;React, Vue, Svelte, Angular — all the major JavaScript UI frameworks are open source. The entire modern frontend ecosystem was built in the open.&lt;/p&gt;

&lt;p&gt;PostgreSQL — arguably the most advanced open source relational database, developed by a global community, trusted by some of the world's largest companies for their most critical data. No single company owns it. It's governed by a non-profit.&lt;/p&gt;

&lt;p&gt;How to Start Contributing&lt;/p&gt;

&lt;p&gt;If you're convinced and want to start, here's a practical path:&lt;/p&gt;

&lt;p&gt;Start with something you already use. Contributing to a project you depend on gives you real motivation to understand it deeply and a stake in making it better.&lt;br&gt;
Read the contributing guide first. Almost every serious project has a CONTRIBUTING.md file. Read it entirely before opening a PR. It covers the project's conventions, code style, testing requirements, and review process. Not reading it is the most common first-time contributor mistake.&lt;br&gt;
Look for "good first issue" tags on GitHub. Filter the issues tab by this label — it exists specifically for you.&lt;br&gt;
Lurk before you leap. Reading through existing issues, PRs, and review discussions teaches you the project's culture and technical standards faster than anything else.&lt;br&gt;
Write a test alongside any fix. Projects that survive long-term rely on test coverage. A fix with a test is almost always accepted faster than a fix without one.&lt;br&gt;
Be patient with the review process. Maintainers are often volunteers with limited time. A PR sitting without response for a week is normal, not a rejection.&lt;br&gt;
The Bigger Picture&lt;/p&gt;

&lt;p&gt;Open source has become the default mode of software development. The vast majority of the internet runs on open source software. The cloud platforms that power global commerce run on open source infrastructure. The languages developers use, the frameworks they build with, the databases they store data in — open source, open source, open source.&lt;/p&gt;

&lt;p&gt;As a developer entering the industry, you're inheriting a commons that generations of developers built for you. The tools that let you build a Go web server, containerize it with Docker, store data in PostgreSQL, and deploy it to a Linux server — all of it exists because people chose to build in public and share what they created.&lt;/p&gt;

&lt;p&gt;The most natural way to participate in that tradition is to build in public yourself: share your code, contribute to projects you use, write about what you're learning. The open source economy runs on reciprocity, and the developers who contribute to it — even modestly, even as students — tend to be the ones the industry rewards most generously later on.&lt;/p&gt;

</description>
      <category>opensource</category>
    </item>
    <item>
      <title>How Git Actually Works Under the Hood</title>
      <dc:creator>lui were</dc:creator>
      <pubDate>Thu, 30 Jul 2026 11:24:11 +0000</pubDate>
      <link>https://dev.to/lui_were/how-git-actually-works-under-the-hood-21dp</link>
      <guid>https://dev.to/lui_were/how-git-actually-works-under-the-hood-21dp</guid>
      <description>&lt;p&gt;Most developers learn Git the same way: a handful of commands memorized just well enough to get code onto GitHub without breaking anything. &lt;code&gt;git add&lt;/code&gt;, &lt;code&gt;git commit&lt;/code&gt;, &lt;code&gt;git push&lt;/code&gt;. Maybe &lt;code&gt;git pull&lt;/code&gt; when things go out of sync. And then, inevitably, the moment that every developer remembers — the first time a merge conflict appears, or a branch gets accidentally deleted, or a rebase goes sideways — and suddenly the memorized commands aren't enough anymore.&lt;/p&gt;

&lt;p&gt;The reason Git feels mysterious when things go wrong is that most developers learn the surface (the commands) without ever learning the model underneath. Git isn't magic. It's a surprisingly elegant data structure — a content-addressed, append-only graph — and once you understand that structure, the commands stop being incantations you've memorized and start being logical operations on a system you actually understand. Conflicts become explainable. Rebases become predictable. Even the most mangled repository state becomes recoverable.&lt;/p&gt;

&lt;p&gt;This article goes under the hood. By the end, you'll understand what Git is actually storing when you run &lt;code&gt;git commit&lt;/code&gt;, how branches really work, and why understanding the internals makes you dramatically better at using the tool.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Core Idea: A Content-Addressed Store
&lt;/h2&gt;

&lt;p&gt;Git's foundation is a simple but powerful idea: it stores everything by the hash of its content.&lt;/p&gt;

&lt;p&gt;When you add a file to Git, Git doesn't store the filename. It takes the file's content, computes a SHA-1 hash of it (a 40-character hexadecimal string like &lt;code&gt;a94a8fe5ccb19ba61c4c0873d391e987982fbbd3&lt;/code&gt;), and stores the content in a file named after that hash. This is called a &lt;strong&gt;blob object&lt;/strong&gt;. The hash is both the name and the address of the content.&lt;/p&gt;

&lt;p&gt;This design has an important consequence: if two files have identical content, they produce the same hash and Git stores the content only once. It also means that any change to content, however small, produces a completely different hash and a completely different object. Git never modifies stored objects — it only ever adds new ones. The store is append-only and immutable.&lt;/p&gt;

&lt;p&gt;You can see this directly. In any Git repository, the &lt;code&gt;.git/objects/&lt;/code&gt; directory is where all these objects live, organized into subdirectories by the first two characters of their hash:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.git/objects/
  a9/
    4a8fe5ccb19ba61c4c0873d391e987982fbbd3
  3b/
    18e512dba79e4c8300dd08aeb37f8e728b8dad
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Git builds everything — files, directories, commits, tags — out of four types of these objects.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Four Object Types
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Blob
&lt;/h3&gt;

&lt;p&gt;A blob stores the raw content of a file. Nothing else — no filename, no permissions, just bytes. Two files in different directories with the same content are represented by the same blob.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Tree
&lt;/h3&gt;

&lt;p&gt;A tree is the Git equivalent of a directory. It's a list of entries, where each entry records a filename, file permissions, and a pointer (hash) to either a blob (for files) or another tree (for subdirectories).&lt;/p&gt;

&lt;p&gt;A tree for a simple project might look like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;100644 blob a94a8fe5...  README.md
100644 blob 3b18e512...  main.go
040000 tree d8e7b0...    handlers/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Because trees point to blobs by hash, and blobs are immutable, a tree captures a complete, exact snapshot of a directory at a given moment.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Commit
&lt;/h3&gt;

&lt;p&gt;A commit is what ties everything together. A commit object contains:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A pointer to the &lt;strong&gt;root tree&lt;/strong&gt; — the tree representing the entire project at this point in time&lt;/li&gt;
&lt;li&gt;A pointer to the &lt;strong&gt;parent commit&lt;/strong&gt; (or two parents, in the case of a merge commit)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Author and committer information&lt;/strong&gt; — name, email, and timestamp&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;commit message&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Critically, a commit doesn't store a diff. It stores a complete snapshot of the entire repository — every file, every directory — represented as a tree of trees and blobs. When you look at a "diff" in &lt;code&gt;git show&lt;/code&gt; or &lt;code&gt;git log -p&lt;/code&gt;, Git is computing that diff on the fly by comparing the commit's tree to its parent's tree. The underlying storage is snapshots, not deltas.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Tag
&lt;/h3&gt;

&lt;p&gt;A tag object stores a named reference to a specific commit (an annotated tag), along with a message and the tagger's identity. Lightweight tags are simpler — they're just references, not full objects — but annotated tags are first-class objects in the store.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a Branch Actually Is
&lt;/h2&gt;

&lt;p&gt;This is where most people's mental model of Git breaks down: a branch is not a container for commits. A branch is just a file containing a single hash — the hash of the commit that branch currently points to.&lt;/p&gt;

&lt;p&gt;In your &lt;code&gt;.git/refs/heads/&lt;/code&gt; directory, there's a file for each local branch:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.git/refs/heads/main          → a3f5c21...
.git/refs/heads/feature/auth  → 9d2b441...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. Each file holds one commit hash. When you make a new commit on a branch, Git creates the commit object, then updates the file to hold the new commit's hash. The branch "moves forward" by updating a file — there's no restructuring of history, no moving of objects.&lt;/p&gt;

&lt;p&gt;This means branches in Git are essentially free to create and incredibly cheap to work with. Creating a branch is creating a 41-byte file. Deleting a branch is deleting that file. No data is duplicated.&lt;/p&gt;

&lt;h2&gt;
  
  
  HEAD: Where You Are Right Now
&lt;/h2&gt;

&lt;p&gt;There's a special file called &lt;code&gt;.git/HEAD&lt;/code&gt; that records which branch (or commit) you're currently on:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ref: refs/heads/main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When you run &lt;code&gt;git checkout feature/auth&lt;/code&gt;, Git updates this file to point to &lt;code&gt;refs/heads/feature/auth&lt;/code&gt;. When you run &lt;code&gt;git commit&lt;/code&gt;, Git creates the new commit object, updates the file at &lt;code&gt;refs/heads/feature/auth&lt;/code&gt; to point to the new commit, and HEAD continues to point at &lt;code&gt;feature/auth&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;When you check out a specific commit hash instead of a branch name (using &lt;code&gt;git checkout a3f5c21&lt;/code&gt;), HEAD contains that hash directly instead of a branch reference. This is what Git calls a "detached HEAD" state — you're not on any branch, so new commits won't be tracked by any branch automatically. It sounds alarming but it's not dangerous as long as you understand what it means.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Commits Form a Graph
&lt;/h2&gt;

&lt;p&gt;Because every commit points to its parent commit(s), the full commit history forms a directed acyclic graph (DAG) — a graph where edges point in one direction and there are no cycles.&lt;/p&gt;

&lt;p&gt;For a simple linear history it looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A ← B ← C ← D   (main)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each arrow means "C's parent is B" — the arrow points backward in time toward the root. &lt;code&gt;main&lt;/code&gt; points to &lt;code&gt;D&lt;/code&gt;, the most recent commit.&lt;/p&gt;

&lt;p&gt;When you create a branch and make commits on it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A ← B ← C ← D         (main)
              ↑
              E ← F    (feature)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;feature&lt;/code&gt; points to &lt;code&gt;F&lt;/code&gt;. &lt;code&gt;main&lt;/code&gt; still points to &lt;code&gt;D&lt;/code&gt;. Commits E and F have D as their parent — they branched off from D.&lt;/p&gt;

&lt;p&gt;When you merge &lt;code&gt;feature&lt;/code&gt; into &lt;code&gt;main&lt;/code&gt;, Git creates a new merge commit with two parents:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A ← B ← C ← D ← G     (main)
              ↑   ↑
              E ← F    (feature)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;G&lt;/code&gt; is the merge commit. It has two parents: D and F. This is what makes the history a graph rather than a straight line.&lt;/p&gt;

&lt;h2&gt;
  
  
  How &lt;code&gt;git rebase&lt;/code&gt; Works
&lt;/h2&gt;

&lt;p&gt;Rebasing is one of the most misunderstood operations in Git, but the internal model makes it straightforward. When you run &lt;code&gt;git rebase main&lt;/code&gt; from the &lt;code&gt;feature&lt;/code&gt; branch, Git:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Finds the common ancestor of &lt;code&gt;feature&lt;/code&gt; and &lt;code&gt;main&lt;/code&gt; (commit D in the example above).&lt;/li&gt;
&lt;li&gt;Takes each commit on &lt;code&gt;feature&lt;/code&gt; that comes after that ancestor (E and F) and replays them, one at a time, on top of the current tip of &lt;code&gt;main&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Replaying means creating &lt;em&gt;new&lt;/em&gt; commit objects with the same changes but different parent pointers (and therefore different hashes).&lt;/li&gt;
&lt;li&gt;Updates the &lt;code&gt;feature&lt;/code&gt; branch reference to point to the last replayed commit.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The result looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A ← B ← C ← D         (main)
               ↑
               E' ← F'  (feature)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;E' and F' are new commits — same content as E and F but different hashes because their parents changed. The original E and F objects still exist in the object store; they're just no longer reachable from any branch reference.&lt;/p&gt;

&lt;p&gt;This is why rebasing "rewrites history" — it creates new commits — and why rebasing commits that have already been pushed to a shared branch is problematic. Anyone else who has those commits will have the old hashes, and when they try to reconcile with your rebased history, Git sees them as diverged.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Staging Area (Index)
&lt;/h2&gt;

&lt;p&gt;One piece of the model that trips people up is the staging area, also called the index. In most version control systems, you commit directly from the working directory. Git has an intermediate step.&lt;/p&gt;

&lt;p&gt;The index lives at &lt;code&gt;.git/index&lt;/code&gt; and represents the current staged state — what the next commit will look like. When you run &lt;code&gt;git add file.go&lt;/code&gt;, you're not adding the file to a commit. You're updating the index to include the current version of &lt;code&gt;file.go&lt;/code&gt;. When you run &lt;code&gt;git commit&lt;/code&gt;, Git takes whatever is in the index and creates a tree from it, then creates the commit pointing to that tree.&lt;/p&gt;

&lt;p&gt;This three-way distinction — working directory, index, committed history — is what gives Git its flexibility. You can stage part of a file's changes with &lt;code&gt;git add -p&lt;/code&gt;, leaving other changes unstaged. You can stage changes across multiple files and commit them as a single logical unit. The index is the staging ground between "work in progress" and "permanent history."&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Nothing Is Ever Really Lost
&lt;/h2&gt;

&lt;p&gt;One practical consequence of the object store model: it's very hard to permanently lose work in Git, as long as you've committed it.&lt;/p&gt;

&lt;p&gt;Even when you delete a branch, the commit objects that branch pointed to remain in the object store. They're simply no longer reachable from any reference. Git has a garbage collector that eventually cleans up unreachable objects, but it only runs automatically after a significant delay (typically 90 days by default).&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;git reflog&lt;/code&gt; command is your recovery tool. It records every position HEAD has pointed to, even across operations like rebase, reset, or branch deletion. If you accidentally run &lt;code&gt;git reset --hard&lt;/code&gt; and lose commits you wanted, &lt;code&gt;git reflog&lt;/code&gt; will show you the hash of the commit you were on before the reset, and you can get back to it with &lt;code&gt;git checkout&lt;/code&gt; or &lt;code&gt;git reset&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git reflog
&lt;span class="c"&gt;# a3f5c21 HEAD@{0}: reset: moving to HEAD~3&lt;/span&gt;
&lt;span class="c"&gt;# 9d2b441 HEAD@{1}: commit: add authentication middleware&lt;/span&gt;
&lt;span class="c"&gt;# ...&lt;/span&gt;

git reset &lt;span class="nt"&gt;--hard&lt;/span&gt; 9d2b441  &lt;span class="c"&gt;# recover to before the reset&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is why Git power users are rarely afraid of drastic operations — they know the objects are still there, and reflog is the map to find them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Practical Things This Understanding Unlocks
&lt;/h2&gt;

&lt;p&gt;Once the internal model clicks, a lot of everyday Git confusion resolves:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Merge conflicts&lt;/strong&gt; stop being mysterious. They happen when two commits that share a common ancestor both changed the same part of the same file, and Git can't automatically decide which change to keep. You're resolving a difference between two timelines.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;git reset&lt;/code&gt; makes sense.&lt;/strong&gt; &lt;code&gt;--soft&lt;/code&gt; moves the branch pointer but leaves the index and working directory alone. &lt;code&gt;--mixed&lt;/code&gt; (the default) moves the pointer and resets the index but leaves the working directory. &lt;code&gt;--hard&lt;/code&gt; moves everything. Three different operations, all clearly distinct.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Detached HEAD is not scary.&lt;/strong&gt; You're just looking at a commit directly rather than through a branch. Make a branch before you commit anything important and you're fine.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rebasing vs merging is a conscious choice.&lt;/strong&gt; Merge preserves the exact history of what happened and when. Rebase produces a cleaner, linear history but rewrites commits. Neither is universally correct — the right choice depends on your team's conventions and what the history is meant to communicate.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Where to Go From Here
&lt;/h2&gt;

&lt;p&gt;If you want to go deeper on any of this, one exercise is worth more than any amount of reading: build a toy Git from scratch. The core data model — blob, tree, commit, references — can be implemented in a few hundred lines. Writing &lt;code&gt;git init&lt;/code&gt;, &lt;code&gt;git add&lt;/code&gt;, and &lt;code&gt;git commit&lt;/code&gt; from scratch, and seeing the objects appear in &lt;code&gt;.git/objects&lt;/code&gt;, makes the mental model completely concrete in a way that reading about it never quite does.&lt;/p&gt;

&lt;p&gt;The official Git documentation and the book &lt;em&gt;Pro Git&lt;/em&gt; (free online at git-scm.com/book) cover everything here in more depth. The &lt;code&gt;git cat-file&lt;/code&gt; command lets you inspect any object in the store directly (&lt;code&gt;git cat-file -p &amp;lt;hash&amp;gt;&lt;/code&gt; prints the object's content in human-readable form), which is an excellent way to verify that what you've read here is really what Git is actually doing.&lt;/p&gt;

&lt;p&gt;Every tool you'll use in your career as a software developer — CI/CD pipelines, code review platforms, deployment systems — is built on top of Git. Understanding it at the level of the model, not just the commands, is one of the highest-return investments you can make early in your career. The commands will always make more sense once you know what they're actually doing.&lt;/p&gt;

</description>
      <category>git</category>
    </item>
    <item>
      <title>What Actually Happens When You Type a URL Into Your Browser</title>
      <dc:creator>lui were</dc:creator>
      <pubDate>Sat, 25 Jul 2026 14:27:15 +0000</pubDate>
      <link>https://dev.to/lui_were/what-actually-happens-when-you-type-a-url-into-your-browser-4m80</link>
      <guid>https://dev.to/lui_were/what-actually-happens-when-you-type-a-url-into-your-browser-4m80</guid>
      <description>&lt;p&gt;It's the kind of thing you do hundreds of times a day without thinking about it. You open a browser, type something like &lt;a href="https://github.com" rel="noopener noreferrer"&gt;https://github.com&lt;/a&gt;, press Enter, and a page appears. The whole thing takes less than a second. Behind that second is one of the most intricate sequences of operations in all of computing — a chain of protocols, servers, handshakes, and transformations that almost nobody fully thinks about until they're debugging something that broke somewhere in the middle of it.&lt;/p&gt;

&lt;p&gt;As a software developer, understanding what happens in that gap between Enter and page load isn't trivia. It's the foundation. DNS, TCP, TLS, HTTP — these aren't abstract concepts that live in certifications. They're the machinery your code runs on top of every single day. When something goes wrong — a timeout, a 502, a CORS error, a certificate warning — the developer who understands this sequence can pinpoint the problem in minutes. The developer who doesn't spends hours guessing.&lt;/p&gt;

&lt;p&gt;This article walks through the full sequence, step by step, in the order it actually happens.&lt;/p&gt;

&lt;p&gt;Step 1: Parsing the URL&lt;/p&gt;

&lt;p&gt;Before any network activity happens at all, the browser parses what you typed. A URL like &lt;a href="https://github.com/explore" rel="noopener noreferrer"&gt;https://github.com/explore&lt;/a&gt; is broken into distinct components:&lt;/p&gt;

&lt;p&gt;Scheme: https — tells the browser which protocol to use&lt;br&gt;
Host: github.com — the domain name of the server to contact&lt;br&gt;
Path: /explore — the specific resource to request on that server&lt;br&gt;
Port: not shown, but implied — https defaults to port 443&lt;/p&gt;

&lt;p&gt;If you'd typed http:// instead of https://, the implied port would be 80 and the connection would be unencrypted. Most browsers today will automatically redirect you to the https version, but the distinction matters.&lt;/p&gt;

&lt;p&gt;Step 2: Checking the Cache&lt;/p&gt;

&lt;p&gt;Before doing anything on the network, the browser checks whether it already has a valid, cached response for this URL. If you visited github.com five minutes ago and the server told the browser to cache the response for ten minutes, the browser can skip the entire network sequence and show you the cached page immediately.&lt;/p&gt;

&lt;p&gt;This is why web pages sometimes feel instant on revisit — you're not actually hitting the network at all. Caching headers like Cache-Control, Expires, and ETag are how servers communicate to browsers (and intermediate CDN servers) how long a resource should be considered fresh. Understanding caching is important for every web developer, because a misconfigured cache is a common source of bugs where users see stale content — old JavaScript, outdated styles, yesterday's data — long after you've deployed an update.&lt;/p&gt;

&lt;p&gt;Step 3: DNS Resolution — Turning the Domain into an IP Address&lt;/p&gt;

&lt;p&gt;Assuming there's nothing useful in the cache, the browser needs to contact github.com. But the internet doesn't route traffic by domain name — it routes by IP address. Something like 140.82.121.4. DNS (Domain Name System) is the system that translates between the two.&lt;/p&gt;

&lt;p&gt;The resolution process goes like this:&lt;/p&gt;

&lt;p&gt;Browser DNS cache: The browser first checks its own DNS cache. If it has recently looked up github.com, it uses the stored IP.&lt;br&gt;
OS DNS cache: If the browser cache misses, the OS checks its own resolver cache.&lt;br&gt;
/etc/hosts file: Before hitting a network DNS server, the OS checks a local file called /etc/hosts (on Linux and macOS) that can manually map domain names to IPs. This is how developers often configure localhost or test custom domains locally.&lt;br&gt;
Recursive resolver: If all local caches miss, the OS sends a DNS query to a recursive resolver — typically one provided by your ISP or a public one like Google's 8.8.8.8 or Cloudflare's 1.1.1.1.&lt;br&gt;
The DNS hierarchy: If the recursive resolver doesn't have the answer cached either, it works up the DNS hierarchy — querying a root nameserver, then a TLD nameserver (responsible for .com), then the authoritative nameserver for github.com itself, which returns the actual IP address.&lt;/p&gt;

&lt;p&gt;The whole DNS resolution process, if it has to go all the way to the authoritative nameserver, typically takes somewhere between 20 and 120 milliseconds. Once it completes, the browser has an IP address and can actually make a network connection.&lt;/p&gt;

&lt;p&gt;Step 4: Opening a TCP Connection&lt;/p&gt;

&lt;p&gt;With an IP address in hand, the browser opens a TCP (Transmission Control Protocol) connection to the server. TCP is the transport layer protocol that most web traffic is built on — it provides a reliable, ordered channel over the otherwise unreliable packet-based internet.&lt;/p&gt;

&lt;p&gt;Opening a TCP connection involves a three-way handshake:&lt;/p&gt;

&lt;p&gt;The browser sends a SYN (synchronize) packet to the server.&lt;br&gt;
The server responds with a SYN-ACK (synchronize-acknowledge).&lt;br&gt;
The browser sends an ACK (acknowledge) back to the server.&lt;/p&gt;

&lt;p&gt;At this point, the connection is established and data can flow. But if you're connecting over https, there's one more step before any HTTP traffic moves.&lt;/p&gt;

&lt;p&gt;Step 5: The TLS Handshake&lt;/p&gt;

&lt;p&gt;HTTPS is HTTP layered on top of TLS (Transport Layer Security). TLS is what encrypts the connection, ensuring that data can't be intercepted or tampered with in transit. This matters enormously — without it, anyone on the same network as you (a coffee shop Wi-Fi, a corporate network, an ISP) could read or modify the data passing between your browser and the server.&lt;/p&gt;

&lt;p&gt;The TLS handshake is a sequence of back-and-forth messages that accomplishes three things:&lt;/p&gt;

&lt;p&gt;Authentication: The server presents a TLS certificate — a digitally signed document that proves it is who it says it is. The browser checks this certificate against a list of trusted Certificate Authorities (CAs) — organizations trusted to vouch for the identity of domains. If the certificate is valid, trusted, and matches the domain, the browser proceeds.&lt;br&gt;
Key exchange: The browser and server agree on a shared encryption key using a mathematical process that allows them to generate the same secret key without ever transmitting it directly — meaning an eavesdropper who observed the entire handshake still can't decrypt the subsequent traffic.&lt;br&gt;
Cipher agreement: They agree on which encryption algorithm to use for the rest of the session.&lt;/p&gt;

&lt;p&gt;Modern TLS (TLS 1.3) completes this in one round trip, reducing the performance overhead compared to older versions. When you see a padlock in your browser's address bar, you're looking at the end result of this handshake completing successfully.&lt;/p&gt;

&lt;p&gt;Step 6: The HTTP Request&lt;/p&gt;

&lt;p&gt;With a TCP connection open and (for HTTPS) TLS negotiated, the browser can finally send an HTTP request. For a page load, this is typically a GET request:&lt;/p&gt;

&lt;p&gt;GET /explore HTTP/2&lt;br&gt;
Host: github.com&lt;br&gt;
User-Agent: Mozilla/5.0 ...&lt;br&gt;
Accept: text/html,application/xhtml+xml,...&lt;br&gt;
Accept-Language: en-US,en;q=0.9&lt;br&gt;
Cookie: _gh_sess=...; user_session=...&lt;/p&gt;

&lt;p&gt;The Host header tells the server which domain is being requested — this matters because a single server can host hundreds of different domains (a practice called virtual hosting), and the server needs to know which one to serve. The Cookie header sends any cookies stored for this domain, which is how the server recognizes who you are between requests. The User-Agent tells the server what kind of browser or client is making the request.&lt;/p&gt;

&lt;p&gt;When you submit a form, create a resource, or send data, the browser typically uses a POST request instead, which includes a request body containing the data.&lt;/p&gt;

&lt;p&gt;Step 7: The Server Processes the Request&lt;/p&gt;

&lt;p&gt;On the other end of the connection, a server receives your request. For something like GitHub, that server isn't just a single machine — it's a fleet of servers behind a load balancer, which distributes incoming requests across many backend servers to handle the volume.&lt;/p&gt;

&lt;p&gt;What happens next depends entirely on the application. A simple static site might just read an HTML file from disk and return it. A dynamic application like GitHub will:&lt;/p&gt;

&lt;p&gt;Authenticate the session (checking cookies or tokens against a database)&lt;br&gt;
Query one or more databases for relevant data&lt;br&gt;
Apply business logic to determine what to show&lt;br&gt;
Render a response — either a full HTML page, or increasingly often, JSON data that the frontend JavaScript will use to build the page&lt;/p&gt;

&lt;p&gt;This is where your code lives, as a backend developer. HTTP requests come in; responses go out. Everything in between is the application.&lt;/p&gt;

&lt;p&gt;Step 8: The HTTP Response&lt;/p&gt;

&lt;p&gt;The server sends back an HTTP response:&lt;/p&gt;

&lt;p&gt;HTTP/2 200 OK&lt;br&gt;
Content-Type: text/html; charset=utf-8&lt;br&gt;
Content-Length: 89234&lt;br&gt;
Cache-Control: no-store&lt;br&gt;
Set-Cookie: _gh_sess=...; Path=/; Secure; HttpOnly&lt;/p&gt;

&lt;p&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;br&gt;
&lt;br&gt;
...&lt;/p&gt;

&lt;p&gt;The status code (200 OK) tells the browser what happened. The most common status codes you'll encounter as a developer:&lt;/p&gt;

&lt;p&gt;200 OK — success&lt;br&gt;
301 / 302 — redirect (the resource has moved)&lt;br&gt;
400 Bad Request — the client sent something malformed&lt;br&gt;
401 Unauthorized — authentication required&lt;br&gt;
403 Forbidden — authenticated but not permitted&lt;br&gt;
404 Not Found — resource doesn't exist&lt;br&gt;
500 Internal Server Error — something broke on the server&lt;br&gt;
502 Bad Gateway — a proxy or load balancer couldn't reach the backend&lt;/p&gt;

&lt;p&gt;The response headers also include caching instructions (Cache-Control), the content type, and often Set-Cookie headers to store or update cookies in the browser.&lt;/p&gt;

&lt;p&gt;Step 9: The Browser Renders the Page&lt;/p&gt;

&lt;p&gt;Once the HTML starts arriving, the browser begins rendering. This is its own complex pipeline:&lt;/p&gt;

&lt;p&gt;HTML parsing builds a DOM (Document Object Model) — a tree representation of the page structure.&lt;br&gt;
CSS parsing builds a CSSOM (CSS Object Model) — a tree of style rules.&lt;br&gt;
JavaScript execution can both read and modify the DOM and CSSOM, often triggering additional network requests to APIs.&lt;br&gt;
Layout calculates the size and position of every element.&lt;br&gt;
Painting draws pixels to the screen.&lt;/p&gt;

&lt;p&gt;As the HTML is parsed, the browser discovers references to additional resources — CSS files, JavaScript files, images, fonts — and fires off additional HTTP requests for each of them, going through the same DNS/TCP/TLS/HTTP process (though connections to the same server are reused via a mechanism called keep-alive).&lt;/p&gt;

&lt;p&gt;A non-trivial web page might make 50–100 individual HTTP requests before it's fully loaded. The browser optimizes this aggressively — fetching resources in parallel, reusing connections, and using HTTP/2's multiplexing to send multiple requests over a single TCP connection simultaneously.&lt;/p&gt;

&lt;p&gt;Where Things Go Wrong&lt;/p&gt;

&lt;p&gt;Understanding this sequence makes debugging far more systematic. Most network-level problems announce which step they failed at if you know how to read the signals:&lt;/p&gt;

&lt;p&gt;DNS resolution failure: ERR_NAME_NOT_RESOLVED — the domain name couldn't be translated to an IP. Usually a misconfigured DNS record or a typo in the URL.&lt;br&gt;
TCP connection refused: ERR_CONNECTION_REFUSED — the server isn't listening on that port. Common when a development server isn't running.&lt;br&gt;
TLS certificate errors: NET::ERR_CERT_AUTHORITY_INVALID or similar — the certificate is expired, self-signed without being trusted, or doesn't match the domain. Every developer eventually hits this locally when setting up HTTPS on a dev environment.&lt;br&gt;
HTTP 4xx errors: The server understood the request but refused or couldn't fulfill it. Usually an application-level problem — authentication, missing data, bad input.&lt;br&gt;
HTTP 5xx errors: Something broke on the server. Time to check your logs.&lt;br&gt;
CORS errors: These aren't network failures — they're security policy enforcements. The browser received a response just fine but refused to share it with your JavaScript because the server didn't include the right headers allowing cross-origin access.&lt;/p&gt;

&lt;p&gt;Your browser's developer tools (Network tab) expose all of this. Every single request, its status code, timing, headers, and response body are visible there. It's one of the most powerful debugging tools available to a web developer, and learning to read it fluently changes how fast you can isolate problems.&lt;/p&gt;

&lt;p&gt;Why This Matters for Everything You'll Build&lt;/p&gt;

&lt;p&gt;Whether you're building REST APIs in Go, frontend apps in JavaScript, or backend services that call other services, every layer of this sequence touches your code:&lt;/p&gt;

&lt;p&gt;You configure DNS records when you deploy.&lt;br&gt;
You manage TLS certificates to keep HTTPS working.&lt;br&gt;
You set response headers to control caching behavior.&lt;br&gt;
You return HTTP status codes that tell clients what happened.&lt;br&gt;
You read request headers and cookies to authenticate users.&lt;/p&gt;

&lt;p&gt;The URL-to-page sequence isn't background plumbing to ignore once it's working. It's the interface between your code and the rest of the internet. The developers who understand it confidently aren't just better at debugging — they make better design decisions, write more secure code, and build systems that behave correctly under the full range of real-world conditions.&lt;/p&gt;

&lt;p&gt;Next time you press Enter after typing a URL, you'll know exactly what's happening in that second.&lt;/p&gt;

</description>
      <category>google</category>
      <category>data</category>
      <category>github</category>
    </item>
    <item>
      <title>How to Manage AI Risks: A Practical Guide for Teams Building and Deploying AI</title>
      <dc:creator>lui were</dc:creator>
      <pubDate>Tue, 30 Jun 2026 20:29:53 +0000</pubDate>
      <link>https://dev.to/lui_were/how-to-manage-ai-risks-a-practical-guide-for-teams-building-and-deploying-ai-5fe</link>
      <guid>https://dev.to/lui_were/how-to-manage-ai-risks-a-practical-guide-for-teams-building-and-deploying-ai-5fe</guid>
      <description>&lt;p&gt;Artificial intelligence has moved from research labs into production systems that approve loans, screen resumes, write code, moderate content, and increasingly make decisions with real consequences for real people. With that shift comes a category of risk that's different from traditional software risk — not just "will this crash," but "will this behave in ways nobody intended, at scale, in ways that are hard to detect until damage is already done."&lt;/p&gt;

&lt;p&gt;Managing AI risk isn't a single checklist item. It's an ongoing discipline that spans how a system is designed, built, tested, deployed, and monitored — closer to how mature organizations think about security than how they think about typical feature QA. This article walks through the major categories of AI risk and the practical strategies teams use to manage each one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why AI Risk Is Different From Traditional Software Risk
&lt;/h2&gt;

&lt;p&gt;Traditional software either works or it doesn't — a bug is reproducible, the code path that caused it can usually be traced, and a fix is verifiable. AI systems, particularly those built on machine learning and large language models, behave probabilistically. The same input can occasionally produce different outputs, the boundaries of "correct" behavior are often fuzzy rather than binary, and failure modes can be subtle — a model can be 95% accurate and still be systematically wrong in ways that matter enormously for the 5%.&lt;/p&gt;

&lt;p&gt;This means AI risk management has to account for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Non-determinism.&lt;/strong&gt; Outputs aren't always reproducible, which complicates testing and debugging.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Emergent behavior.&lt;/strong&gt; Large models can do things their developers didn't explicitly design for — sometimes useful, sometimes harmful.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Distributional shift.&lt;/strong&gt; A model trained on one data distribution can degrade silently when real-world inputs drift away from that distribution over time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scale.&lt;/strong&gt; A flawed decision-making process that would affect one customer in a manual system can affect millions instantly when automated.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Categorizing the Risks
&lt;/h2&gt;

&lt;p&gt;Before managing AI risk, it helps to break it into distinct categories, since each requires a different mitigation strategy.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Safety and Reliability Risks
&lt;/h3&gt;

&lt;p&gt;These concern whether the system does what it's supposed to do, consistently and predictably. This includes hallucination (a model generating plausible-sounding but false information), brittleness (sharp performance drops on inputs slightly different from training data), and cascading failures in systems where an AI component feeds into other automated decisions.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Security Risks
&lt;/h3&gt;

&lt;p&gt;AI systems introduce attack surfaces that don't exist in traditional software:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Prompt injection&lt;/strong&gt;, where malicious input manipulates a language model into ignoring its instructions or leaking sensitive information.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data poisoning&lt;/strong&gt;, where an attacker corrupts training data to manipulate a model's future behavior.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Model extraction or inversion&lt;/strong&gt;, where an attacker reconstructs a model's parameters or training data through repeated queries.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Adversarial examples&lt;/strong&gt;, inputs deliberately crafted to fool a model — a classic example being subtly perturbed images that cause an image classifier to misidentify objects.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Bias and Fairness Risks
&lt;/h3&gt;

&lt;p&gt;Models trained on historical data inherit historical patterns, including discriminatory ones. A hiring model trained on past hiring decisions can learn to replicate past bias, even without explicit demographic features in the input, because correlated proxies (zip code, school name, employment gaps) can encode the same information indirectly.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Privacy Risks
&lt;/h3&gt;

&lt;p&gt;Models — especially large ones trained on broad datasets — can memorize and inadvertently reproduce sensitive information from their training data. This becomes a real concern for any system trained or fine-tuned on data containing personal or proprietary information.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Compliance and Legal Risks
&lt;/h3&gt;

&lt;p&gt;Regulatory frameworks for AI are evolving quickly and vary by jurisdiction and sector — the EU AI Act, sector-specific rules around automated decision-making in finance and healthcare, and emerging state-level regulations all impose different obligations depending on what a system does and who it affects. Operating without a clear view of which regulations apply is itself a risk.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Misuse and Dual-Use Risks
&lt;/h3&gt;

&lt;p&gt;Some capabilities that are beneficial in one context can be harmful in another. A code-generation tool helps developers and can also help write malware; a persuasive writing assistant helps marketers and can also help generate disinformation. These dual-use risks require thinking not just about a system's intended use, but its plausible misuse.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Operational and Organizational Risks
&lt;/h3&gt;

&lt;p&gt;Beyond the technology itself, risk also lives in process: who's accountable when an AI system makes a harmful decision, whether there's a clear escalation path when something goes wrong, and whether the team building the system actually understands its limitations well enough to communicate them honestly to the people relying on it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building a Risk Management Process
&lt;/h2&gt;

&lt;p&gt;With the categories in mind, the practical question becomes: how do teams actually manage these risks day to day? A few practices show up consistently in mature AI organizations.&lt;/p&gt;

&lt;h3&gt;
  
  
  Start With a Risk Assessment Before Building
&lt;/h3&gt;

&lt;p&gt;Before a model or AI feature ships — ideally before it's even built — it's worth explicitly answering:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What's the worst plausible outcome if this system is wrong?&lt;/li&gt;
&lt;li&gt;Who is affected, and how severely, by a wrong or biased output?&lt;/li&gt;
&lt;li&gt;Is a human in the loop for high-stakes decisions, or is the system fully automated?&lt;/li&gt;
&lt;li&gt;What's the system's intended scope, and what happens when it's used outside that scope?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This assessment should scale with stakes. A recommendation engine suggesting movies carries far less risk than a model influencing credit decisions or medical triage, and the rigor applied should reflect that difference rather than treating every AI feature identically.&lt;/p&gt;

&lt;h3&gt;
  
  
  Red Teaming and Adversarial Testing
&lt;/h3&gt;

&lt;p&gt;Rather than only testing whether a system works as intended, red teaming actively tries to break it — probing for prompt injection vulnerabilities, attempting to extract sensitive training data, testing for biased outputs across demographic groups, and trying to elicit harmful content through creative or adversarial phrasing. This is most effective when done by people who weren't involved in building the system, since builders tend to unconsciously test only the scenarios they already expect to work.&lt;/p&gt;

&lt;h3&gt;
  
  
  Human Oversight Proportional to Stakes
&lt;/h3&gt;

&lt;p&gt;Not every AI decision needs a human reviewer, but high-stakes ones generally should. A useful framework is thinking in terms of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Human-in-the-loop&lt;/strong&gt;, where AI assists but a human makes the final call — appropriate for high-stakes, low-volume decisions like medical diagnoses or loan approvals.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Human-on-the-loop&lt;/strong&gt;, where AI acts autonomously but humans monitor and can intervene — appropriate for moderate-stakes, higher-volume scenarios like content moderation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fully automated&lt;/strong&gt;, where intervention isn't practical at scale — appropriate primarily for low-stakes, easily reversible decisions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Misjudging which tier a given use case belongs in is one of the more common organizational failures — treating a high-stakes decision as if it were low-stakes because automation is convenient.&lt;/p&gt;

&lt;h3&gt;
  
  
  Continuous Monitoring, Not Just Pre-Launch Testing
&lt;/h3&gt;

&lt;p&gt;A model that performs well at launch can degrade over time as real-world data drifts from its training distribution, or as adversarial actors learn to exploit it. Ongoing monitoring should track:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Output quality metrics&lt;/strong&gt; specific to the use case — accuracy, relevance, or task success rate, depending on what the system does.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Distributional drift&lt;/strong&gt;, comparing the characteristics of live input data against the data the system was trained or validated on.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fairness metrics across subgroups&lt;/strong&gt;, checked on an ongoing basis rather than once before launch, since fairness issues can emerge or worsen over time even without any code changes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Anomaly and abuse detection&lt;/strong&gt;, flagging unusual usage patterns that might indicate misuse, attempted exploitation, or emerging failure modes.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Documentation and Transparency
&lt;/h3&gt;

&lt;p&gt;Two practices borrowed from responsible ML research have become standard in mature organizations: model cards and data sheets. A model card documents a system's intended use, known limitations, performance across different conditions, and the data it was trained on — giving downstream users and reviewers enough context to use it appropriately rather than assuming it's a general-purpose tool that works equally well everywhere. This documentation also matters internally, since institutional knowledge about a model's quirks tends to live in people's heads and disappear when they move teams, unless it's written down.&lt;/p&gt;

&lt;h3&gt;
  
  
  Layered Defenses, Not a Single Safeguard
&lt;/h3&gt;

&lt;p&gt;No single mitigation eliminates AI risk entirely, which is why mature systems rely on layered defenses rather than one safety mechanism:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Input validation and filtering&lt;/strong&gt;, catching obviously malicious or out-of-scope requests before they reach the model.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Output filtering and validation&lt;/strong&gt;, checking model outputs against policy before they reach end users.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rate limiting and anomaly detection&lt;/strong&gt;, to slow down or flag attempts at systematic abuse.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fallback behavior&lt;/strong&gt;, ensuring the system degrades gracefully — refusing or deferring to a human — rather than failing in an unsafe way when it encounters something outside its competence.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This layered approach mirrors security best practice: assume any single layer can fail, and design so that failure doesn't cascade into harm.&lt;/p&gt;

&lt;h3&gt;
  
  
  Clear Accountability and Incident Response
&lt;/h3&gt;

&lt;p&gt;When something does go wrong — a biased output gets flagged publicly, a model is jailbroken into producing harmful content, a system makes a costly automated decision — the organization needs a predefined process, not an improvised one. This includes a clear owner for the system, a process for quickly disabling or rolling back a problematic feature, and a postmortem process that feeds lessons back into future risk assessments rather than treating each incident as an isolated event.&lt;/p&gt;

&lt;h2&gt;
  
  
  Practical Steps for Teams Getting Started
&lt;/h2&gt;

&lt;p&gt;For teams earlier in this journey, a reasonable starting point looks like:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Inventory existing AI systems and their stakes.&lt;/strong&gt; Many organizations don't have a clear list of every place AI is influencing decisions, which makes prioritizing risk management nearly impossible.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Triage by impact&lt;/strong&gt;, focusing rigor first on systems where errors could cause real harm — financial, physical, reputational, or legal — rather than spreading effort evenly across low- and high-stakes systems alike.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Establish a lightweight review process&lt;/strong&gt; for new AI features before launch, even if it's just a short checklist covering intended use, known failure modes, and oversight level.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build monitoring before scale, not after.&lt;/strong&gt; It's much easier to instrument a system for drift and fairness monitoring while it's small than to retrofit monitoring onto something already running at scale.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Treat documentation as a deliverable&lt;/strong&gt;, not an afterthought — a model or feature isn't really done until its limitations are written down somewhere a future team member (or auditor) can find them.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Closing Thoughts
&lt;/h2&gt;

&lt;p&gt;Managing AI risk isn't about eliminating risk entirely — that's not realistic for any consequential technology — it's about understanding it clearly enough to make deliberate, informed trade-offs rather than discovering problems only after they've caused harm. The organizations that do this well tend to share a few traits: they assess risk before building rather than after shipping, they test adversarially rather than only confirming expected behavior, they keep humans appropriately involved based on stakes, and they monitor continuously rather than treating a pre-launch review as the finish line.&lt;/p&gt;

&lt;p&gt;As AI systems take on more consequential roles, the gap between organizations that manage this well and those that treat it as an afterthought is likely to become one of the clearest differentiators — not just in terms of avoiding harm, but in terms of building systems people can actually trust enough to rely on.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>claude</category>
    </item>
    <item>
      <title>Inside the Life Cycle of a Software Project</title>
      <dc:creator>lui were</dc:creator>
      <pubDate>Tue, 30 Jun 2026 11:17:21 +0000</pubDate>
      <link>https://dev.to/lui_were/inside-the-life-cycle-of-a-software-project-2e50</link>
      <guid>https://dev.to/lui_were/inside-the-life-cycle-of-a-software-project-2e50</guid>
      <description>&lt;p&gt;Every piece of software that's ever shipped — from a weekend side project to a banking platform processing millions of transactions a day — moves through a recognizable life cycle. The stages have different names depending on who you ask (waterfall purists, agile practitioners, and DevOps engineers all draw the boxes slightly differently), but the underlying journey is remarkably consistent: an idea gets shaped into a plan, the plan becomes code, the code gets tested and shipped, and then — in the part most outsiders don't realize is the &lt;em&gt;majority&lt;/em&gt; of a project's life — it gets watched, fixed, reworked, and kept alive for months or years.&lt;/p&gt;

&lt;p&gt;This article walks through that full life cycle, stage by stage, with an eye toward what actually happens at each step in a real, working engineering team — not just the idealized version found in textbooks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stage 1: Idea → Planning → Design
&lt;/h2&gt;

&lt;p&gt;Every project starts as a problem, not a solution. Someone notices that local vendors are still tracking expenses on paper, or that a forum platform needs a cleaner way to manage threaded discussions, or that an existing system breaks under load. The idea stage is about clearly defining that problem before jumping to "how."&lt;/p&gt;

&lt;p&gt;Once the problem is reasonably well understood, planning begins:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Scoping the minimum viable version.&lt;/strong&gt; What's the smallest version of this that's actually useful? Ambitious first versions are a common reason projects stall before shipping anything at all.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Identifying stakeholders and constraints.&lt;/strong&gt; Who needs to approve this? What existing systems does it need to integrate with? What's the realistic timeline?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Breaking the idea into concrete requirements.&lt;/strong&gt; Vague goals like "make it easier to track expenses" get turned into specific, testable requirements: "vendors can log a transaction with amount, date, and category in under 10 seconds."&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Design follows planning, and this is where architecture takes shape:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Data modeling.&lt;/strong&gt; What entities exist, and how do they relate? For something like an expense tracker, this means thinking through vendors, transactions, categories, and — eventually — roles like "accountant" that need different permissions than a basic vendor account.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;System architecture.&lt;/strong&gt; Will this be a monolith or split into services? How will authentication and session management work? What does the database schema look like, and what are the access patterns that schema needs to support efficiently?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Interface design.&lt;/strong&gt; Sketching the core user flows — often in low-fidelity wireframes — before any UI code is written, so the team agrees on &lt;em&gt;what&lt;/em&gt; is being built before debating &lt;em&gt;how&lt;/em&gt; it looks pixel-by-pixel.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This stage produces artifacts that don't run as code but are arguably just as important: design docs, architecture diagrams, and a shared understanding across the team of what "done" looks like for version one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stage 2: Development
&lt;/h2&gt;

&lt;p&gt;This is the stage most visible from the outside, but it's worth noting how much of the planning and design work directly shapes how smooth — or chaotic — development turns out to be. Good upstream design means development is largely about execution rather than constant re-litigation of architecture decisions.&lt;/p&gt;

&lt;p&gt;A few things characterize healthy development practice:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Incremental, reviewable chunks of work.&lt;/strong&gt; Rather than disappearing for two weeks and returning with a 4,000-line pull request, effective developers break work into smaller pieces that can be reviewed, tested, and merged independently.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Feature branches and pull requests.&lt;/strong&gt; Most teams isolate in-progress work on a branch, then open a pull request to merge it into the main branch — a workflow that creates a natural checkpoint for review and automated testing before code reaches production.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Writing code alongside tests, not after.&lt;/strong&gt; Whether through strict test-driven development or a looser "write the test soon after the code" habit, tests written close to the implementation tend to be more thorough than tests bolted on as an afterthought near a deadline.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Following established conventions.&lt;/strong&gt; Role-based routing, password hashing with something like bcrypt, and consistent session management patterns aren't reinvented on every feature — they follow whatever pattern the project already established, for consistency and security.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Development is also where the gap between "demo-ready" and "production-ready" becomes obvious. Code that looks finished in a local environment often needs additional work around error handling, edge cases, and input validation before it's safe to expose to real users.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stage 3: Testing
&lt;/h2&gt;

&lt;p&gt;Testing isn't a single stage that happens once — it's layered throughout the life cycle, but it's useful to think of it as its own distinct phase before deployment:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Unit tests&lt;/strong&gt; verify individual functions and components in isolation — does this password-hashing function behave correctly given valid and invalid input?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Integration tests&lt;/strong&gt; verify that components work correctly together — does the login flow correctly create a session and route the user based on their role?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;End-to-end tests&lt;/strong&gt; simulate real user behavior across the whole system — can a vendor actually log in, record a transaction, and see it reflected correctly?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Manual QA&lt;/strong&gt; still matters, especially for UI/UX issues that automated tests don't catch well, like a button being technically functional but confusingly placed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A mature testing culture also includes deliberately testing failure modes: what happens when the database is briefly unreachable, when a form is submitted with malformed data, or when two users try to modify the same record simultaneously. These edge cases are rarely glamorous to test, but they're exactly the scenarios that cause real production incidents.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stage 4: Deployment
&lt;/h2&gt;

&lt;p&gt;Deployment is the moment code crosses from "exists" to "is actually usable by real people." In modern teams, this is rarely a single dramatic event — it's usually automated, frequent, and (ideally) boring.&lt;/p&gt;

&lt;p&gt;Key elements of a healthy deployment process:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Automated build and deploy pipelines&lt;/strong&gt;, so that merging to the main branch reliably triggers a consistent, repeatable deployment process rather than a manual, error-prone checklist.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Staged environments&lt;/strong&gt; — development, staging, and production — so changes can be verified in an environment that mirrors production before real users are affected.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rollback plans.&lt;/strong&gt; Knowing how to revert a bad deployment quickly is as important as knowing how to ship a good one. Feature flags are a common tool here, allowing a feature to be turned off instantly without a full code rollback.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Database migrations handled carefully&lt;/strong&gt;, since unlike application code, database changes aren't always trivially reversible — a migration that drops a column, for instance, needs much more caution than one that adds one.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is also where Continuous Integration and Continuous Deployment (CI/CD) become central to the workflow, which deserves its own closer look.&lt;/p&gt;

&lt;h2&gt;
  
  
  CI/CD: Making Deployment Boring (On Purpose)
&lt;/h2&gt;

&lt;p&gt;Continuous Integration refers to the practice of frequently merging code changes into a shared branch, with automated builds and tests running on every change to catch problems early. Continuous Deployment extends this by automatically releasing code that passes those checks, often directly to production.&lt;/p&gt;

&lt;p&gt;A typical CI/CD pipeline, such as one built with GitHub Actions, runs through several stages automatically every time code is pushed:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Lint and format checks&lt;/strong&gt; — catching style issues before a human reviewer has to.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automated test suite execution&lt;/strong&gt; — unit and integration tests run against the new code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build step&lt;/strong&gt; — compiling the application or building container images.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security and dependency scanning&lt;/strong&gt; — checking for known vulnerabilities in dependencies.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deployment to staging&lt;/strong&gt;, often automatic on merge to a development branch.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deployment to production&lt;/strong&gt;, sometimes automatic, sometimes gated behind a manual approval step for higher-risk changes.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The value of CI/CD isn't just speed — it's consistency and confidence. A pull request that shows a green checkmark from an automated pipeline gives reviewers and teammates real evidence that the change doesn't break existing functionality, rather than relying purely on a human's manual verification, which is slower and more error-prone.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stage 5: Monitoring
&lt;/h2&gt;

&lt;p&gt;Once software is live, the work shifts from "does this work" to "is this still working, and how well." Monitoring is how teams answer that question without waiting for users to complain.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Application performance monitoring (APM)&lt;/strong&gt; tracks response times, error rates, and resource usage, often surfacing problems before they become visible to users.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Logging&lt;/strong&gt; captures detailed records of what the system did, which becomes essential during debugging — a well-structured log line today can save an hour of guesswork next month.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Alerting&lt;/strong&gt; notifies the team automatically when something crosses a concerning threshold — a spike in error rates, a slow database query, a server running low on memory — rather than relying on someone noticing manually.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Uptime and health checks&lt;/strong&gt; continuously verify that core functionality (login, checkout, data persistence) is working, often from outside the system entirely, to catch issues that internal monitoring might miss.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Good monitoring transforms incidents from mysteries into investigations with a clear starting point: instead of "something's broken, where do we even look," the team can say "error rates spiked at 2:14 PM, right after this deployment, in this specific service."&lt;/p&gt;

&lt;h2&gt;
  
  
  Stage 6: Bug Fixing
&lt;/h2&gt;

&lt;p&gt;No software ships bug-free, and treating bug fixing as a distinct, ongoing stage — rather than a failure of the earlier stages — reflects reality more accurately. Effective bug fixing tends to follow a consistent pattern:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Reproduce reliably before attempting a fix.&lt;/strong&gt; A bug that can't be reliably reproduced is extremely hard to confidently fix, and "fixes" applied without reproduction often don't actually resolve the underlying issue.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Isolate the root cause, not just the symptom.&lt;/strong&gt; Patching a crash without understanding why it happened risks masking a deeper problem that resurfaces later in a different form.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Write a regression test.&lt;/strong&gt; A bug fix without an accompanying test is a bug that's free to come back — often after the original context has been forgotten.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Communicate clearly when bugs are user-facing.&lt;/strong&gt; Especially for anything touching money, like the expense-tracking and accountant-role features common in fintech-adjacent tools, transparency about what went wrong and what was fixed builds trust rather than eroding it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Stage 7: Refactoring
&lt;/h2&gt;

&lt;p&gt;Refactoring is the deliberate practice of improving a codebase's internal structure without changing its external behavior. It's easy to deprioritize — refactoring rarely ships a visible new feature — but it's what keeps a codebase workable as it grows.&lt;/p&gt;

&lt;p&gt;Healthy refactoring habits include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Small, frequent refactors&lt;/strong&gt; integrated into regular feature work, rather than rare, large-scale rewrites that carry high risk and often get abandoned partway through.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Refactoring with test coverage as a safety net.&lt;/strong&gt; Confidently restructuring code requires confidence that behavior hasn't changed — which is exactly what a solid test suite provides.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recognizing genuine signals for refactoring&lt;/strong&gt;, like a function that's grown unreadably long, duplicated logic appearing in multiple places, or a module that's become difficult to extend without unexpected side effects — rather than refactoring purely on aesthetic preference.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Stage 8: Maintenance
&lt;/h2&gt;

&lt;p&gt;Maintenance is the longest stage of any project's life cycle, and the least discussed. It includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Dependency updates&lt;/strong&gt;, keeping libraries and frameworks current to avoid security vulnerabilities and compatibility issues that compound over time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Addressing technical debt&lt;/strong&gt; incurred during earlier, faster-moving stages of the project.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Adapting to changing requirements&lt;/strong&gt;, since the original assumptions a system was designed around rarely stay accurate forever — a project that starts as a simple vendor expense tracker may need to evolve to support combined vendor-and-accountant roles, multi-currency transactions, or new compliance requirements as it matures.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Documentation upkeep&lt;/strong&gt;, since documentation that isn't maintained alongside the code it describes quickly becomes actively misleading rather than just outdated.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Maintenance doesn't have the excitement of a new feature launch, but it's where most of a project's actual lifespan is spent — and neglecting it is how healthy systems slowly turn into ones nobody wants to touch.&lt;/p&gt;

&lt;h2&gt;
  
  
  What This Looks Like in Practice
&lt;/h2&gt;

&lt;p&gt;A real development workflow weaves all of these stages together rather than marching through them in a strict, one-directional line. A bug discovered during monitoring might trigger a small design discussion. A refactor might surface during what was meant to be a simple feature addition. CI/CD pipelines run continuously in the background, gating every single change regardless of which "stage" the surrounding work conceptually belongs to.&lt;/p&gt;

&lt;p&gt;Pull requests are the connective tissue across nearly every stage — design discussions often happen in PR comments, automated test results from CI gate whether a PR can merge, code review happens before deployment, and the PR history itself becomes a searchable record of &lt;em&gt;why&lt;/em&gt; the system evolved the way it did. Reading through old pull requests is frequently the fastest way to understand a decision that predates your involvement with a project.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary of Lessons
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The life cycle is circular, not linear.&lt;/strong&gt; Monitoring feeds bug fixing, bug fixing feeds refactoring, refactoring feeds future design decisions — the stages inform each other continuously rather than happening once in sequence.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Early stages are cheap insurance.&lt;/strong&gt; Time spent on planning and design is consistently cheaper than the cost of reworking a poorly architected system after it's in production with real users depending on it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Testing and CI/CD turn deployment from a risk into a routine.&lt;/strong&gt; Automation doesn't eliminate risk, but it makes risk visible and manageable before it reaches users.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monitoring is what makes "production-ready" meaningful.&lt;/strong&gt; Software that isn't observed isn't really understood once it's live — problems exist whether or not anyone's watching for them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Maintenance is the real majority of a project's life.&lt;/strong&gt; The exciting initial build is often a small fraction of a system's total lifespan compared to the years of fixes, updates, and adaptations that follow.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Documentation and process are part of the product&lt;/strong&gt;, not separate from it. A system that works but can't be understood or safely modified by anyone other than its original author is a liability, however well it functions today.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Understanding the full life cycle — not just the part where code gets written — is what separates developers who build software that lasts from those who build software that merely launches. The launch is just one moment in a much longer story.&lt;/p&gt;

</description>
      <category>developer</category>
    </item>
    <item>
      <title>Why Developers Spend More Time Reading Than Writing Code</title>
      <dc:creator>lui were</dc:creator>
      <pubDate>Tue, 30 Jun 2026 08:09:19 +0000</pubDate>
      <link>https://dev.to/lui_were/why-developers-spend-more-time-reading-than-writing-code-4fkc</link>
      <guid>https://dev.to/lui_were/why-developers-spend-more-time-reading-than-writing-code-4fkc</guid>
      <description>&lt;p&gt;There's a well-known (if hard to pin down precisely) idea in software engineering: developers spend far more time reading code than writing it — often cited at somewhere around 10 times more. Whatever the exact ratio, the underlying truth is one every working developer recognizes instantly. The job isn't really "write code." It's "understand systems well enough that the code you eventually write fits correctly into them." And understanding, almost by definition, is a reading-heavy activity.&lt;/p&gt;

&lt;p&gt;This article looks at where all that reading actually goes — the codebases, the APIs, the documentation, the forums, the GitHub issues, the AI tools — and the strategies professionals use to make sense of unfamiliar systems quickly and reliably.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reading Existing Codebases: The Real Onboarding
&lt;/h2&gt;

&lt;p&gt;Ask any developer who's joined a new team what their first two weeks looked like, and "reading code" will dominate the answer — far more than writing it. Before you can safely change a system, you need a mental model of it: what depends on what, where the dangerous edges are, and which parts are stable versus which are actively being rewritten.&lt;/p&gt;

&lt;p&gt;This kind of reading isn't passive skimming. Experienced developers approach an unfamiliar codebase with specific strategies:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Start from the entry point.&lt;/strong&gt; Where does execution begin? A &lt;code&gt;main()&lt;/code&gt; function, an HTTP router, a job queue consumer — finding the entry point gives you a thread to follow outward.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Follow the data, not just the code.&lt;/strong&gt; Understanding how a request or a piece of data moves through a system — what transforms it, what validates it, where it's persisted — often reveals architecture faster than reading files in alphabetical order ever would.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use the test suite as documentation.&lt;/strong&gt; Well-written tests describe intended behavior more reliably than comments do, because tests have to stay correct or the build breaks. Reading tests first, before diving into implementation, is a common and effective shortcut.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Look at git history and blame.&lt;/strong&gt; &lt;code&gt;git log -p&lt;/code&gt; on a file, or &lt;code&gt;git blame&lt;/code&gt; on a confusing line, often surfaces the commit message or PR that explains &lt;em&gt;why&lt;/em&gt; something was written a certain way — context that's invisible from the code alone.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Trace one feature end-to-end before trying to understand everything.&lt;/strong&gt; Trying to hold an entire large codebase in your head at once is a losing strategy. Picking a single user-facing feature and following it through every layer it touches builds a working mental model much faster.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This kind of reading is slow at first and gets dramatically faster with repetition — which is exactly why senior developers, who've internalized common architectural patterns, can often navigate a brand-new codebase faster than the team's own junior developers, despite having zero prior exposure to it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding APIs: Reading Before Calling
&lt;/h2&gt;

&lt;p&gt;Every time a developer integrates a new API — internal or third-party — there's a reading phase before there's a calling phase. This includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Reading the API reference for the specific endpoint or method&lt;/strong&gt;, not just skimming a quickstart example.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Checking request and response shapes carefully&lt;/strong&gt;, including optional fields, default values, and what happens when fields are omitted.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reading about authentication and rate limits&lt;/strong&gt;, which are frequently the source of production incidents that have nothing to do with business logic and everything to do with not reading the fine print.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reading error responses and status codes&lt;/strong&gt;, since how an API fails is often more important to handle correctly than how it succeeds.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For internal APIs without polished documentation, this reading often shifts to the source code directly — the controller or handler function, the request validation logic, and any middleware that touches the request before it reaches business logic. In statically typed languages like Go, type signatures themselves become a form of documentation: reading a function's parameter and return types often answers questions faster than prose ever could.&lt;/p&gt;

&lt;h2&gt;
  
  
  Documentation: The First Stop, Not the Last Resort
&lt;/h2&gt;

&lt;p&gt;Official documentation remains the highest-signal resource available, even in an era of AI-assisted coding — precisely because it's maintained by the people who built the thing. Reading documentation effectively is itself a skill:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Read changelogs before adopting a new version.&lt;/strong&gt; Breaking changes, deprecations, and migration notes live here, and skipping this step is a common source of "it worked yesterday" bugs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Read the "why," not just the "how."&lt;/strong&gt; The best documentation explains design philosophy and trade-offs, not just method signatures. Understanding &lt;em&gt;why&lt;/em&gt; a library is structured a certain way makes it far easier to use correctly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cross-reference multiple doc sources.&lt;/strong&gt; Official docs, inline code comments, and auto-generated API references (like Go's &lt;code&gt;pkg.go.dev&lt;/code&gt; or Python's Sphinx-generated docs) often complement each other — one might have a conceptual overview while another has precise type signatures.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Stack Overflow, GitHub Issues, and AI Tools: Reading the Crowd
&lt;/h2&gt;

&lt;p&gt;When official documentation runs out — and it often does, especially for obscure errors or edge-case behavior — developers turn to community sources. But reading these effectively requires some skepticism and triage:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stack Overflow&lt;/strong&gt; remains useful, but experienced developers read it critically: checking the date of an answer, the version of the library being discussed, and the comments underneath an accepted answer, which frequently contain corrections or caveats the original answer missed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub Issues&lt;/strong&gt; are often a richer resource than Stack Overflow for fast-moving libraries, because maintainers respond directly, and you can often find the exact bug you're hitting, described by someone else, with a workaround or a linked fix. Reading strategies here include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Searching closed issues, not just open ones — many questions have already been answered and the issue closed.&lt;/li&gt;
&lt;li&gt;Reading the linked pull request that closed an issue, since it often shows the actual code change and reasoning.&lt;/li&gt;
&lt;li&gt;Checking whether an issue is still open in the latest version, since library behavior shifts over time.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;AI coding tools&lt;/strong&gt; (chat-based assistants, in-editor completions) have added a new layer to this workflow, but they haven't replaced reading — they've shifted what gets read. Developers now frequently read AI-generated explanations or code suggestions critically, verifying claims against actual documentation or source code before trusting them, since AI tools can be confidently wrong about API details, especially for fast-changing libraries or less common languages. The most effective developers treat AI output as a draft or a starting hypothesis worth verifying, not a final, citable source.&lt;/p&gt;

&lt;h2&gt;
  
  
  Learning Unfamiliar Technologies: A Reading-Heavy Process
&lt;/h2&gt;

&lt;p&gt;When picking up a new language, framework, or tool, the actual hands-on coding usually comes &lt;em&gt;after&lt;/em&gt; a substantial reading phase:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Official "getting started" guides&lt;/strong&gt; for first exposure to syntax and core concepts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Idiomatic style guides&lt;/strong&gt; (like Go's official style guidelines or a framework's recommended project structure), since writing code that merely &lt;em&gt;works&lt;/em&gt; is different from writing code that fits the ecosystem's conventions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reading well-regarded open source projects&lt;/strong&gt; in that technology to see real-world patterns, not just textbook examples.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reading the standard library&lt;/strong&gt;, especially in languages like Go, where the standard library is intentionally written to be exemplary, readable code — making it a learning resource in its own right.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This reading-first approach pays off because it front-loads pattern recognition. A developer who's read several idiomatic Go projects will write more idiomatic Go from the start, rather than writing Python-flavored Go and fixing it later through trial and error.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reverse Engineering Projects: Reading With No Map
&lt;/h2&gt;

&lt;p&gt;Sometimes there's no documentation at all — an inherited project, an abandoned internal tool, or legacy code with the original author long gone. This is reading at its most demanding, and it has its own toolkit:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Static analysis and dependency graphs&lt;/strong&gt;, used to map out which modules depend on which, before reading any individual file in depth.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Running the code with a debugger attached&lt;/strong&gt;, stepping through execution to see actual runtime behavior rather than inferring it from static reading alone.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Searching for any test coverage, however thin&lt;/strong&gt;, since tests — even outdated ones — hint at original intent.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Looking for old commit messages, README fragments, or even comments marked &lt;code&gt;TODO&lt;/code&gt; or &lt;code&gt;FIXME&lt;/code&gt;&lt;/strong&gt;, which often preserve fragments of reasoning that never made it into formal documentation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Reverse engineering also requires resisting the urge to rewrite immediately. Reading first — understanding what a confusing piece of code is actually accomplishing, even if it's accomplishing it badly — prevents the common mistake of "fixing" code in a way that silently breaks an edge case the original (ugly) implementation was actually handling correctly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Debugging by Reading: The Compiler and the Stack Trace as Documents
&lt;/h2&gt;

&lt;p&gt;Debugging is, in large part, an exercise in careful reading. Compiler errors, stack traces, and log output are dense, information-rich documents — and reading them properly is a skill that separates fast debugging from frustrated guesswork.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Reading the full stack trace, not just the top line.&lt;/strong&gt; The actual point of failure is sometimes several frames removed from where the error message first appears.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reading compiler errors literally before interpreting them loosely.&lt;/strong&gt; A surprising number of confusing compiler errors say exactly what's wrong, but get misread because the developer is scanning rather than reading carefully — especially with verbose error output in languages like TypeScript or Rust.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reading logs around the failure, not just at it.&lt;/strong&gt; The events leading up to an error often explain &lt;em&gt;why&lt;/em&gt; it happened, not just &lt;em&gt;that&lt;/em&gt; it happened.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reading the diff between working and broken states.&lt;/strong&gt; When something "used to work," comparing the current code against a known-good commit is often faster than reasoning about the system from scratch.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is also where reading and writing genuinely intersect: a well-placed debug log statement is, in effect, writing code in order to generate something to read. Debugging is less about typing fixes and more about generating and interpreting evidence.&lt;/p&gt;

&lt;h2&gt;
  
  
  Search Strategies Professionals Use
&lt;/h2&gt;

&lt;p&gt;Effective searching is itself a reading-adjacent skill, and experienced developers tend to search more precisely than newer developers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Searching error messages verbatim, in quotes&lt;/strong&gt;, to find exact matches rather than vague paraphrases that return irrelevant results.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stripping out variable names and file paths from error messages&lt;/strong&gt; before searching, since those are unique to your codebase and won't appear in anyone else's search results.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Searching within a specific GitHub repository&lt;/strong&gt; using &lt;code&gt;repo:&lt;/code&gt; qualifiers, rather than the open web, when the issue is likely library-specific.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Searching code itself&lt;/strong&gt;, using tools like GitHub's code search or &lt;code&gt;grep&lt;/code&gt;/&lt;code&gt;ripgrep&lt;/code&gt; locally, to find every usage of a function or pattern across a codebase — often faster and more reliable than searching documentation for the same answer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Iterating on search terms deliberately&lt;/strong&gt; — starting broad, then narrowing based on what the first round of results reveals about the right vocabulary for the problem.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This last point matters more than it might seem. Knowing the &lt;em&gt;correct terminology&lt;/em&gt; for a problem is often the actual bottleneck in solving it — once you know it's called a "race condition" or a "N+1 query," the search results (and the fix) tend to follow quickly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Reading dominates the job because understanding precedes writing.&lt;/strong&gt; Code that's written without first understanding the surrounding system tends to be code that gets rewritten later.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tests and git history are underrated documentation.&lt;/strong&gt; They often explain intent more reliably than comments, which can go stale.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Community resources require critical reading, not blind trust.&lt;/strong&gt; Dates, versions, and comment threads matter as much as the accepted answer itself.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI tools shift but don't eliminate reading.&lt;/strong&gt; Verifying AI-generated suggestions against real documentation or source code is now part of the reading workflow, not a replacement for it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Debugging is a reading discipline.&lt;/strong&gt; Stack traces, compiler errors, and logs are dense documents that reward careful, literal reading over quick scanning.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Precise search vocabulary is a force multiplier.&lt;/strong&gt; Knowing what to call a problem is frequently the real unlock, more than the search tool itself.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Writing code will always be the most visible part of the job — it's the part that compiles, ships, and shows up in a pull request. But the quiet, constant activity underneath it all is reading: of codebases, APIs, documentation, community knowledge, and the system's own error messages. Developers who read deliberately and critically tend to write code faster, with fewer surprises, than developers who skip straight to typing. In that sense, becoming a better developer is, in no small part, about becoming a better reader.&lt;/p&gt;

</description>
      <category>devops</category>
    </item>
  </channel>
</rss>
