MoreRSS

site iconThe Practical DeveloperModify

A constructive and inclusive social network for software developers.
Please copy the RSS to your reader, or quickly subscribe to:

Inoreader Feedly Follow Feedbin Local Reader

Rss preview of Blog of The Practical Developer

Beginner guide for anyone on ChatGPT who has never touched CODEX before. No terminal, no tech talk. Ten easy steps with a plain explanation and a tip

2026-04-17 06:49:50

1.
Get the Codex app onto your machine. You go to http://openai.com, find Codex up in the menu, hit the install button and grab the build for Mac or Windows I guess. Whole thing is about a minute, zero setup decisions along the way. A tip from me, even if you have been poking around Codex in the browser, get the Desktop version running from day one, that is where the real usage happens later and you do not want to redo the setup then.

2.
Sign in with the ChatGPT account you already use. Codex runs on the same subscription you are paying for, so Plus, Pro, Business or Enterprise all work, and Free has a limited window right now while OpenAI tests the rollout. A tip, stick to the same email as your ChatGPT so you do not end up juggling two accounts, and if your usage ever tops out switch to GPT 5.4 mini in the chat, gives you roughly two and a half times more runway and the quality holds up fine. You need to give some permissions for read and write, you can change any time or just allow once.. codex will not read your files on the computer if you don't tell him, normally you work in the app folder of codex only!

  1. (optional)
    Grab your ChatGPT data first. Pop back into ChatGPT, click on your profile icon, go into Settings, then Data Controls, and press Export Data. OpenAI mails you a zip file within a day or two. Inside you get every chat you ever had plus the stuff the platform knows about you. A tip, kick off the export now even if you are still undecided about moving, the mail takes time to arrive and you want the file ready when the moment comes.

  2. (optional)
    Get the gist of your ChatGPT history into Codex. Once the mail is in your inbox, open the zip and pull out the chats that actually describe you or your work. Codex has no one click importer, so paste a short personal brief into your first Codex thread, a few sentences about who you are and what you do. A tip, if the full archive feels like too much, three sentences about your job and your style are already plenty, the rest comes out in conversation. Even faster, just ask ChatGPT to write you a short summary of the most important stuff about you in one message, then copy that message straight into Codex, no zip needed.

  3. (optional)
    Set up a folder for your main topic. Codex lets you group threads together under a folder, so every chat about the same thing lives next to each other. Think one client, one research thread, one side project. Even putting a folder in with just the name of your business counts. A tip, resist the urge to build a perfect structure on day one, start with the one topic you touch the most and add more folders only when they earn their place.

6.
Let Codex get to know you in plain language. This is the part where people raise an eyebrow because there is no configuration involved. You just tell it. Open a new thread and say something like this. I run a small accounting firm, we use QuickBooks and Stripe, keep the tone formal when anything goes to clients. That gets saved and Codex adjusts its responses around it. A tip, feed context in pieces, not in one huge dump, you will naturally add bits as new situations come up anyway.

7.
Get your feet wet with questions first. That input field at the bottom says Ask Codex anything, and for the first day that is exactly how to use it. Ask things you would normally ask ChatGPT, request a draft, think something out loud. Treat it like the familiar chat for a bit before pushing further. A tip, spend a day putting the same question side by side into ChatGPT and Codex, you will figure out on your own which one you reach for and when.

8.
Send Codex a file and tell it what to do. Paste it in, drop it in, upload it, whatever feels natural. PDF, Excel sheet, long email chain, it does not matter. Ask for a summary, a sorted view, a translation, a draft reply. Codex spins up a sandbox in the cloud and works through it, you watch it live in the thread. A tip, start with one small file, the first time you watch Codex handle a real task end to end is when the whole idea clicks in your head.

9.
Ignore the code in the name when it comes to what you use it for. Most of what I hand to Codex has nothing to do with programming. Excel sheets that need sorting. PDFs that need summarising. Research notes. Translation drafts with consistency checks. Inbox triage. Occasional Notion cleanup. Coding just happens to be one of the things it does, not the only thing. A tip, pick three recurring tasks you hate doing by hand and feed them to Codex for two weeks straight, one of them drops off your plate permanently.

10.
Once the basics click, there is a whole power user layer waiting. Six names worth knowing, AGENTS.md, Skills, Hooks, Subagents, Memory and MCP. Nothing you need today, jumping in early is how people burn out. I am putting together a dedicated follow up on exactly these six, it will land here in the sub in the next few days. A tip, when you do dig in, start with AGENTS.md alone, it is the softest learning curve and the one you will end up using every session.

Matthias Meyer
Founder & AI Director at StudioMeyer. Has been building websites and AI systems for 10+ years. Living on Mallorca for 15 years, running an AI-first digital studio with its own agent fleet, 680+ MCP tools and 6 SaaS products for SMBs and agencies across DACH and Spain.

Why event-driven agents reduce scope, cost, and decision dispersion

2026-04-17 06:45:25

Why event-driven agents reduce scope, cost, and decision dispersion

Most agent systems do not control their costs because they spend tokens letting the model discover boundaries that the architecture should have defined up front.

A task arrives. A general-purpose agent receives a large context window, too many available tools, mixed historical signals, and a loosely defined objective. From there, the model must infer what matters, what does not, which tools are plausible, which constraints apply, and how success should be measured.

That is expensive.

Not only in tokens, but in unnecessary exploration, latency, failed tool calls, policy denials, and avoidable reasoning over irrelevant possibility space.

This is the core issue I want to highlight: many agent systems are expensive because the architecture leaves too many decisions open for the model before reasoning even begins.

I think event-driven agents are one of the cleanest ways to reduce those open decisions.

A well-defined event does more than trigger work. It defines the boundaries of the problem and becomes the initial context the agent works with. The better the event is designed, the more precise the agent will be.

That event is routed to a specialist agent — not a generic agent that has to figure out what to do, but one that already knows what type of problem it focuses on.

The real cost of generality

The default pattern in many agent systems is still broad and implicit:

  • give the model a lot of context
  • expose a wide action surface
  • provide generic instructions
  • hope the model discovers the right boundary at inference time

That scales poorly.

As systems grow, the agent is forced to reason over:

  • heterogeneous history
  • multiple subsystems
  • weakly related signals
  • many candidate tools
  • overlapping objectives

At that point, the problem is no longer just context size.

It is decision dispersion: too many plausible interpretations, too many candidate actions, and too much irrelevant context competing for attention.

A broad agent can still succeed, but the system is making it solve problem decomposition again and again on every cycle. And the more the system grows, the more likely the model is to fail or take shortcuts just to get through.

That is architectural waste.

Events are not just triggers

In a well-designed event-driven system, an event is not merely a transport primitive.

It is a semantic boundary.

A well-defined event already carries a strong signal about:

  • what class of situation has occurred
  • which specialist capability is relevant
  • which context should be materialized
  • which tools are worth considering
  • which policies should govern the response
  • how the result should be evaluated

That changes the starting point of the system.

Instead of asking:

What should an agent do in this entire environment?

The system can ask:

How should this specialist handle this class of situation under these constraints?

That is a much healthier question.

The key idea: narrowing before reasoning

The architectural value of event-driven agents is not just decoupling. It is control.

A well-defined event lets the system narrow four things before the model starts reasoning:

1. Problem scope

The event defines the operational boundary.

2. Context scope

Only the relevant knowledge should be materialized.

3. Action scope

Only the relevant tools and permissions should be exposed.

4. Evaluation scope

Success criteria become more local and easier to observe.

This is why event-driven systems can become cheaper and more reliable at the same time.

Narrowing across four architectural layers

A serious event-driven agent system should narrow the problem across four layers.

1. Event routing — narrowing the problem surface

The first narrowing step is event classification and routing.

A well-defined event such as:

  • ThermalDriftDetected
  • PolicyViolationDetected
  • ExecutionFailureObserved
  • IncidentSeverityRaised

already tells the system that not every capability is equally relevant.

Routing should select the specialist capability or specialist set that is appropriate for that class of problem.

The model should not spend tokens discovering what the event already told us.

2. Context materialization — narrowing the knowledge surface

Once the event boundary is known, context should not be assembled as a flat prompt bundle.

It should be materialized explicitly and narrowly:

  • relevant entities only
  • causal relationships only where useful
  • prior mitigations and outcomes
  • rationale from previous decisions
  • constraints tied to the event class

This is where many systems either win or fail.

A narrow context is not automatically a good context. The goal is not merely to shrink tokens. The goal is to increase relevance density.

That is why context quality should be observable.

Useful metrics here include:

  • raw_equivalent_tokens
  • compression_ratio
  • causal_density
  • noise_ratio
  • detail_coverage

Those metrics make it possible to ask a much better question than “how much context did we pass?”

The better question is:

how much unnecessary context did we discard without losing what the specialist actually needs?

3. Governed execution — narrowing the action surface

Even with the right context, an agent should not operate over an unrestricted action surface.

Execution should be governed.

A runtime layer can narrow execution by:

  • restricting the candidate tool set
  • ranking likely actions before invocation
  • applying policy checks before execution
  • isolating execution environments
  • capturing telemetry, logs, and traces

The cost of a system is not only what it spends on prompts. It is also what it spends on tool fan-out, denied actions, and unnecessary exploration.

This is why execution quality also needs metrics.

Useful metrics here include:

  • workspace_tool_calls_per_task
  • workspace_success_on_first_tool_rate
  • workspace_recommendation_acceptance_rate
  • workspace_policy_denial_rate_bad_recommendation
  • invocation_latency_histograms

4. Observability and feedback — narrowing through evidence

The final layer is observability.

Without observability, “event-driven agents reduce cost” remains a belief.

With observability, it becomes testable.

A well-instrumented system can show:

  • whether context is becoming denser or just smaller
  • whether specialists use fewer tools than broad agents
  • whether routing improves first-action success
  • whether policy boundaries are helping or creating churn
  • whether outcome quality improves as scope narrows

This is where the architecture stops being an opinion and becomes an operational hypothesis.

A concrete example: alert-driven remediation

A useful way to think about this is an operational remediation loop in a live cluster.

Imagine an alert arrives from the observability stack because a subsystem crosses a critical threshold.

A broad agent design might do something like this:

  • gather recent logs
  • gather broad system history
  • expose many tools
  • ask a general-purpose agent to stabilize the situation

That approach pushes too much decomposition work into the model.

An event-driven design works differently.

Step 1 — a well-defined event enters the system

The alert becomes a well-defined event such as IncidentSeverityRaised or ExecutionFailureObserved.

Step 2 — the event selects a specialist path

The system routes the event to a specialist capability responsible for that class of issue.

Step 3 — context is materialized narrowly

The context layer assembles only what is relevant to that incident type:

  • the affected subsystem
  • recent related failures
  • prior mitigations
  • current operational constraints
  • known causal dependencies

Step 4 — execution is governed

The runtime narrows the available action space:

  • only relevant tools are visible
  • suggested actions are ranked
  • policy checks can reject unsafe actions before execution
  • telemetry is attached to the full cycle

Step 5 — the outcome becomes evidence

The result of the mitigation becomes a new event and a new measurement point.

At that point, the system can observe not only whether the incident was addressed, but how expensive the path was:

  • how much context was needed
  • how many tools were considered
  • whether the first recommended action succeeded
  • whether policy narrowed or blocked the path
  • how long the cycle took end to end

That is the real strength of the pattern.

The event is not just a trigger for work. It is the boundary that lets the whole system narrow problem scope, knowledge scope, and action scope before reasoning begins.

The architecture in one line

A useful mental model is this:

Seven stacked boxes connected by arrows showing the stages: Event, Specialist routing, Context materialization, Tool suggestion and policy check, Governed execution, Outcome event, and<br>
   Metrics, Traces, Logs

Every stage should remove irrelevant possibilities.

If the system keeps adding options instead of removing them, it is probably moving in the wrong direction.

Why this reduces cost

Cost reduction comes from multiple sources at once:

  • fewer input tokens
  • denser context
  • fewer candidate tools
  • fewer executions without result
  • fewer unsafe actions reaching execution
  • fewer retries caused by vague reasoning
  • shorter cycles to first useful action

A broad agent pays these costs implicitly.

An event-driven specialist system avoids them structurally.

Why this reduces decision dispersion

Decision dispersion appears when the system leaves too many paths open at once.

Too much context.
Too many tools.
Too many plausible interpretations.
Too many weakly bounded goals.

A well-defined event cuts through that.

It does not eliminate uncertainty, but it turns a diffuse reasoning problem into a more local one.

The system no longer asks for a global interpretation of the world. It asks for a bounded response to a bounded class of situation.

That is the kind of narrowing that helps both quality and cost.

What to measure in a live system

For this architecture to be credible, it has to be measurable.

A strong live demonstration would compare a broader path against an event-driven specialist path on the same class of incident.

For the context layer, useful measurements include:

  • raw_equivalent_tokens
  • compression_ratio
  • causal_density
  • noise_ratio
  • detail_coverage
  • context_bytes_saved

For the execution layer, useful measurements include:

  • workspace_tool_calls_per_task
  • workspace_success_on_first_tool_rate
  • workspace_recommendation_acceptance_rate
  • workspace_policy_denial_rate_bad_recommendation
  • invocation_latency_histograms
  • trace_span_durations

The point is not to claim that every event-driven design is automatically better.

The point is that this design gives you a coherent way to test whether narrowing is actually happening and whether it is paying off.

What this does not solve

Event-driven agents do not solve everything.

They can still fail badly if:

  • events are poorly designed
  • specialist boundaries are unclear
  • context materialization is weak
  • the runtime exposes the wrong tools
  • policies are too loose or too rigid
  • observability is incomplete

A noisy event taxonomy creates noise, not clarity.

A bad specialist boundary just moves confusion from the prompt to the routing layer.

A narrow system is only better if the narrowing is semantically sound.

The final idea

Reducing cost, improving focus, and eliminating dispersion are consequences of the same principle: narrow before reasoning. When that is combined with materialized context, governed execution, and real observability, the system stops being a prompt pipeline and becomes operational infrastructure.

The systems that will scale are not the ones that expose larger models to more context and more tools.

They are the ones that learn how to narrow the world before the model starts thinking.

Tirso Garcia · April 2026

Building these ideas in the open:
rehydration-kernel · underpass-runtime

If you're working on similar problems, I'd love to hear from you.

I built the most honest AI coding agent: it tells you exactly what it did (nothing)

2026-04-17 06:42:58

I've been using AI coding agents for a while. They all share one thing:
they sound very confident about work they may or may not have done.

So I built one that's upfront about it.

Meet p_ (Pinocchio)

  1. Asks smart clarifying questions (powered by a real LLM)
  2. Generates a convincing implementation plan
  3. Shows professional tool call output
  4. Does absolutely nothing

The nose grows with every "completed" task.

demo

How it works

The LLM (gemma4 via Ollama) handles the planning and conversation: that part is genuinely useful. The execution layer
is pure theater: Read, Edit, and Bash calls are fabricated from a pool of plausible file names and results.

Install

curl -fsSL https://raw.githubusercontent.com/sanieldoe/p_/main/install.sh | bash

Why

Sometimes the most honest thing you can do is be honest about the gap between what AI agents claim and what they do.

Also it's funny.

github.com/sanieldoe/p_

.NET Interview Questions: Key Concepts Explained

2026-04-17 06:40:20

What's the difference between IQueryable, IEnumerable and List?

  • IQueryable represents a query that is not executed yet. It allows building the query step by step and is typically executed when iterated.
  • IEnumerable represents a sequence of data that is already in memory (or will be pulled into memory). It supports iteration and can use lazy execution
  • List is a concrete collection in memory that implements IEnumerable. It is fully materialized and allows modification (add, remove, etc).

How does the lifecycle work for services in Dependency Injection (Singleton, Scoped, and Transient)?

  • Singleton creates a single instance for the entire lifetime of the application. The same instance is shared across all requests (e.g., cache service).
  • Scoped creates one instance per request. The same instance is shared across all components within that request (e.g., DbContext).
  • Transient creates a new instance every time it is requested. It is commonly used for lightweight, stateless services (e.g., mappers).

What is the difference between FirstOrDefault() and SingleOrDefault()?

  • FirstOrDefault returns the first element that match the condition, or the default value for that type.
    Every type has a default value. Here are some examples:

    • classes returns null
    • Int returns 0
    • bool returns false
  • SingleOrDefault is very similar to FirstOrDefault, but it throws an exception if the result of the condition returns more than one element.

What is the difference between Value Types and Reference Types?

  • Value Types
    • Store the value directly
    • Typically allocated on the stack (but can be stored on the heap in some cases)
    • struct, int, bool are examples
    • When you copy it, you copy the entire value, like below:
int n1 = 10;
int n2 = a;
n2 = 20; // change does not reflects in "n1"
Console.WriteLine(n1); // 10
Console.WriteLine(n2); // 20
  • Reference Types
    • Store a reference (memory address) to the object
    • Typically allocated on the heap
    • class, string, array, object are examples
    • When you copy it, you copy the reference, not the actual object, like below:
class Person{
    public string Name;
}
var p1 = new Person { Name = "Caique" };
var p2 = p1;
p2.Name = "John"; // change reflects in variable "p1"
Console.WriteLine(p1.Name); // "John"

When to use Record, Struct or Class

  • Class: Use it when your object has behavior, meaningful functions, and has identity like an entity.
public class User {
    public Guid Id { get; set; }
    public string Name { get; set; }
    public void ChangeName(string name) {
        Name = name;
    }
}
  • Struct: Use it when you want immutability or you have few properties, like a coordinate object.
public struct Point {
    public int X { get; set; }
    public int Y { get; set; }
}
  • Record: Use it when you want to compare values, or when you are modeling just data, not behavior, like a DTO.
public record UserDto{
    public required string FirstName { get; init; }
    public required string LastName { get; init; }
};  // or
public record UserDto(string FirstName , string LastName );

Discussion: The Art of Imperfection: Why We’re obsessed with Digital Glitches | 0416-2239

2026-04-17 06:39:55

In an era of pixel-perfect CSS frameworks and high-definition displays, why are we so drawn to 'broken' aesthetics? As developers, we usually spend our time fixing bugs, but in creative coding, the 'bug' is the feature. Creating authentic retro effects—like chromatic aberration, interlacing, and pixel sorting—requires a deep dive into WebGL and shader math.

I’ve been exploring how to make these complex visual effects more accessible for designers who don't want to write raw GLSL. This led to the development of Glitch Studio, a browser-based tool that handles the heavy lifting of retro distortion.

I’m curious: for those of you working with the Canvas API or Three.js, do you prefer writing custom fragment shaders for your effects, or are you looking for more abstracted tools to speed up your workflow? Let’s talk about the tech behind the 'glitch'!

`gh skill`: GitHub's New CLI Command Turns Agent Skills Into Installable Packages

2026-04-17 06:31:59

I've been using SKILL.md files in my local Claude Code setup for months. Custom instructions for different tasks, each living in its own folder, each teaching the agent how to behave for a specific workflow. Works well. The annoying part has always been distribution — if I want to reuse a skill on another machine, I'm copying files manually like it's 2012.

GitHub apparently had the same frustration. Last week they shipped gh skill, a new GitHub CLI command that does for agent skills what npm did for packages.

What Even Are Agent Skills

Skills are SKILL.md files — folders of instructions, scripts, and resources that tell an AI agent how to handle a specific task. Write a documentation page. Run a specific test pattern. Format output a certain way.

They follow the open Agent Skills spec at agentskills.io and work across GitHub Copilot, Claude Code, Cursor, Codex, and Gemini CLI. The skill doesn't know or care which agent loads it.

What Shipped

Requires GitHub CLI v2.90.0 or later.

Install a skill:

gh skill install github/awesome-copilot documentation-writer

Target a specific agent and scope:

gh skill install github/awesome-copilot documentation-writer --agent claude-code --scope user

Skills go to the correct directory for your agent host automatically. No manual path work.

Pin to a version:

gh skill install github/awesome-copilot documentation-writer --pin v1.2.0

# Or pin to a commit for full reproducibility
gh skill install github/awesome-copilot documentation-writer --pin abc123def

Pinned skills get skipped during gh skill update --all, so upgrades are deliberate.

Check for updates:

gh skill update           # interactive
gh skill update --all     # everything at once

Validate and publish your own:

gh skill publish          # validate against agentskills.io spec
gh skill publish --fix    # auto-fix metadata issues

The Supply Chain Part

This is less flashy but it's the part that actually matters.

Agent skills are instructions. Instructions that shape what an AI agent does inside your codebase. A silently modified skill is a real attack surface — same as a tampered npm package, just newer.

gh skill handles this with a few concrete mechanisms:

When you install a skill, it writes provenance metadata directly into the SKILL.md frontmatter — source repo, ref, and git tree SHA. On every gh skill update call, local SHAs get compared against remote. It detects actual content changes, not just version bumps.

Publishers can enable immutable releases, meaning release content can't be altered after publication — even by repo admins. If you pin to a tag from an immutable release, you're fully protected even if the repo gets compromised later.

The provenance data lives inside the skill file itself, so it travels with the skill when it gets moved, copied, or reorganized.

Why This Is a Bigger Deal Than It Looks

The SKILL.md pattern has been spreading quietly for months. Anthropic has a reference skills repo. GitHub's awesome-copilot has a growing community collection. VS Code ships skill support. Claude Code loads them automatically.

What was missing was tooling. Right now, sharing a skill means sending a file. Updating a skill means remembering where you put it. There's no dependency graph, no version history, no integrity check.

gh skill is the package manager layer the ecosystem needed. It's early — the spec is still young, the community repo is still small — but the primitives are solid. Git tags for versioning. SHAs for integrity. Frontmatter for portable provenance.

If you maintain skills for your team or your own agent setup, the publish workflow is worth looking at now, before the ecosystem gets crowded.

gh extension upgrade --all   # make sure you're on v2.90.0+
gh skill install github/awesome-copilot documentation-writer

Building content around MCP and agentic AI? I write about this stuff weekly Here !!!