<?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: Maiko Trindade</title>
    <description>The latest articles on DEV Community by Maiko Trindade (@maikotrindade).</description>
    <link>https://dev.to/maikotrindade</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%2F1048373%2Ffb33656d-f0cb-437d-bf61-4c01e402b674.png</url>
      <title>DEV Community: Maiko Trindade</title>
      <link>https://dev.to/maikotrindade</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/maikotrindade"/>
    <language>en</language>
    <item>
      <title>The Verification Phase: Why Testing Matters More When Agents Write the Code</title>
      <dc:creator>Maiko Trindade</dc:creator>
      <pubDate>Fri, 20 Nov 2026 21:11:51 +0000</pubDate>
      <link>https://dev.to/maikotrindade/the-verification-phase-why-testing-matters-more-when-agents-write-the-code-38i2</link>
      <guid>https://dev.to/maikotrindade/the-verification-phase-why-testing-matters-more-when-agents-write-the-code-38i2</guid>
      <description>&lt;p&gt;Coding agents made writing code cheap. They didn't make &lt;em&gt;knowing the code works&lt;/em&gt; cheap. In her AI Engineer Code Summit talk, Lauren Tan (poteto online) explained how her team at SpaceXSI ships thousands of agent-written pull requests a month with a revert rate around half a percent. The secret isn't the model. It's the phase most of us still treat as an afterthought: &lt;strong&gt;verification&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Verification for coding agents means running the changed software, observing the behavior the change was supposed to produce, and keeping evidence a reviewer can check. It's not the same as "the tests pass", and it's what lets you trust code you didn't read line by line. This post explains that phase and what it looks like in a React Native app.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why verification became the bottleneck
&lt;/h2&gt;

&lt;p&gt;The talk, &lt;a href="https://www.youtube.com/watch?v=O_zcc6Xl12g" rel="noopener noreferrer" title="All Code Is Slop (Except Mine) by Lauren Tan on YouTube"&gt;All Code Is Slop (Except Mine)&lt;/a&gt;, has a few numbers worth remembering. Lauren shipped around 3,000 PRs in the month before the talk. Her team shipped around 11,000, with a revert rate of about 0.5%. And in 2024 she reviewed PRs from about three colleagues, while today it's closer to 300.&lt;/p&gt;

&lt;p&gt;Nobody can read the diffs of 300 people. Generation takes minutes now, so the cost has moved from writing code to checking it. Agents also make checking harder in specific ways:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;They copy what they see.&lt;/strong&gt; An anti-pattern in the codebase gets copied by the next agent, then copied again.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;They justify their mistakes.&lt;/strong&gt; Her team saw agents patch a bug with timers, then write comments explaining why the timers were needed. The next agent trusted the comments and added more timers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;They declare victory early.&lt;/strong&gt; Anthropic saw this while building long-running coding agents: Claude marked features as done after unit tests and a few &lt;code&gt;curl&lt;/code&gt; calls, without noticing the feature didn't work end to end.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Their own tests prove little.&lt;/strong&gt; Tests written by the agent that wrote the code encode the same misunderstanding. As the &lt;a href="https://aiidelist.com/blog/lauren-tan-grok-bot-pstack-workflow" rel="noopener noreferrer" title="Lauren Tan's Grok Bot workflow with pstack and Cursor Cloud Agents"&gt;AI IDE List write-up of her workflow&lt;/a&gt; notes, the builder saying the tests passed adds no independent evidence.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Constrain first, then verify
&lt;/h2&gt;

&lt;p&gt;Lauren's rule is that every correction to an agent becomes a deterministic check: a lint rule, a type, or an API that makes the mistake impossible. A prompt saying "don't do X" works sometimes. A lint rule works every time, especially when its message tells the agent what to do instead:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// eslint.config.js: stop agents from hardcoding colors in screens&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;files&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"src/screens/**/*.{ts,tsx}"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;rules&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="s2"&gt;"no-restricted-syntax"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;selector&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Property[key.name=/^(color|backgroundColor|borderColor)$/] &amp;gt; Literal"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Don't hardcode colors. Use a token from src/design-system/tokens.ts."&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every bug that's impossible is one you don't have to verify. Constraints shrink the problem, and verification covers what's left.&lt;/p&gt;

&lt;h2&gt;
  
  
  What counts as verification
&lt;/h2&gt;

&lt;p&gt;The key idea, which Lauren's open-source &lt;a href="https://flaviocopes.com/pstack.md" rel="noopener noreferrer" title="Flavio Copes: A deep dive into pstack"&gt;pstack plugin&lt;/a&gt; is built around, is that &lt;strong&gt;a green build isn't evidence&lt;/strong&gt;. You have to observe the behavior that motivated the change, in the running app, and keep proof of it. The proof depends on the change:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Change type&lt;/th&gt;
&lt;th&gt;What counts as evidence&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Bug fix&lt;/td&gt;
&lt;td&gt;Reproduce the bug, fix it, rerun the same reproduction&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Refactor&lt;/td&gt;
&lt;td&gt;Characterization tests that stay green through each step&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Performance&lt;/td&gt;
&lt;td&gt;A trace compared against a baseline. "It feels faster" doesn't count&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Visual change&lt;/td&gt;
&lt;td&gt;Screenshots diffed against approved baselines&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Data change&lt;/td&gt;
&lt;td&gt;Read back the stored values and check them directly&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The question to ask isn't "did the agent test it?" It's "what would I have to see to believe this works?" Then make the agent show you exactly that.&lt;/p&gt;

&lt;h2&gt;
  
  
  The test layers in a React Native app
&lt;/h2&gt;

&lt;p&gt;Verification is a stack. Each layer catches different mistakes at a different cost, and the agent should run the cheap ones on every change.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Layer&lt;/th&gt;
&lt;th&gt;What it catches&lt;/th&gt;
&lt;th&gt;Typical tools&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Static analysis&lt;/td&gt;
&lt;td&gt;Type errors, broken hook rules, unsafe patterns, dead code&lt;/td&gt;
&lt;td&gt;TypeScript in strict mode, ESLint with the React Hooks and React Native plugins, Knip&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Unit&lt;/td&gt;
&lt;td&gt;Logic bugs in prices, reducers, validation&lt;/td&gt;
&lt;td&gt;Jest, fast-check for property-based tests&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Component&lt;/td&gt;
&lt;td&gt;A screen that renders or reacts wrong&lt;/td&gt;
&lt;td&gt;React Native Testing Library&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Integration&lt;/td&gt;
&lt;td&gt;Bugs between screen, store, and network&lt;/td&gt;
&lt;td&gt;Jest with the network mocked (MSW)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Contract&lt;/td&gt;
&lt;td&gt;App and API disagreeing on a payload&lt;/td&gt;
&lt;td&gt;Pact, or a schema check in CI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Design system&lt;/td&gt;
&lt;td&gt;Off-token colors, broken shared components&lt;/td&gt;
&lt;td&gt;Storybook stories, lint rules&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Screenshot&lt;/td&gt;
&lt;td&gt;Unintended visual changes&lt;/td&gt;
&lt;td&gt;Image diffs on a fixed simulator&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Accessibility&lt;/td&gt;
&lt;td&gt;Missing labels and roles, tiny touch targets&lt;/td&gt;
&lt;td&gt;eslint-plugin-react-native-a11y, role queries in tests, agent-device snapshots&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Performance&lt;/td&gt;
&lt;td&gt;Slower renders, slower startup, dropped frames&lt;/td&gt;
&lt;td&gt;Reassure, Flashlight, React Native DevTools profiler&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Dependencies&lt;/td&gt;
&lt;td&gt;Vulnerable or mismatched native packages&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;npm audit&lt;/code&gt;, &lt;code&gt;npx expo-doctor&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;End-to-end&lt;/td&gt;
&lt;td&gt;The user can't actually finish the flow&lt;/td&gt;
&lt;td&gt;agent-device, Maestro, Detox&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Static analysis is the cheapest layer and the one agents hit most often, so make it strict and run it first. TypeScript in strict mode and ESLint catch a whole class of agent mistakes before a single test runs, and Knip flags the unused files and exports agents tend to leave behind after a refactor. Reassure (from Callstack) is worth calling out too: it measures component render times and fails the PR when an agent's change makes a screen slower, which turns "it feels faster" into a number.&lt;/p&gt;

&lt;p&gt;Two tips make the lower layers much stronger with agents. Prefer &lt;strong&gt;property-based tests&lt;/strong&gt; for core logic, because they describe intent ("the total always equals the sum of the items") instead of mirroring the implementation. And query components by role and label in React Native Testing Library, so a missing accessibility label fails the test.&lt;/p&gt;

&lt;h2&gt;
  
  
  AI-driven end-to-end testing
&lt;/h2&gt;

&lt;p&gt;End-to-end is where AI changes verification the most. Lauren's team lets agents run the app and hand back screenshots and videos instead of claims. On React Native, two tools cover this.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/callstack/agent-device" rel="noopener noreferrer" title="agent-device by Callstack on GitHub"&gt;agent-device&lt;/a&gt;&lt;/strong&gt; is Callstack's CLI that lets a coding agent drive iOS and Android apps. The agent reads an accessibility snapshot, acts on elements by ref, and sees what changed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;agent-device open ShopApp --platform ios
agent-device snapshot -i
&lt;span class="c"&gt;# @e4 [button] "Remove Coffee"&lt;/span&gt;
agent-device press @e4 --settle
&lt;span class="c"&gt;# + @e9 [text] "Your cart is empty"&lt;/span&gt;
agent-device screenshot ./evidence/cart-empty.png
agent-device close
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The agent gets a description of the screen, not just pass or fail, so it can notice on its own that the empty state never appeared. Because the snapshot comes from the accessibility tree, an unlabeled button shows up right away.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://maestro.dev/" rel="noopener noreferrer" title="Maestro mobile UI testing framework"&gt;Maestro&lt;/a&gt;&lt;/strong&gt; keeps what the agent learned. Once the fix is verified, the agent saves the path it took as a flow and commits it with the PR, so CI replays it on every future change, with no LLM involved:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# .maestro/cart-remove-last-item.yaml
&lt;/span&gt;&lt;span class="na"&gt;appId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;com.example.shop&lt;/span&gt;
&lt;span class="nn"&gt;---
&lt;/span&gt;&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;launchApp&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;clearState&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;startRecording&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;cart-remove-last-item&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;tapOn&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Add to cart"&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;tapOn&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"cart-tab"&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;tapOn&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Remove Coffee"&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;assertVisible&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Your cart is empty"&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;takeScreenshot&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;cart-empty&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;stopRecording&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The AI does the expensive, exploratory part once. The deterministic tool keeps the result forever. Agents also help write flows from a plain-language description, fix flows when a label changes, and read failed runs to tell a real bug from a flaky wait. Lauren's team goes further: on every release, an agent uses the app, hunts for bugs, and opens fix PRs.&lt;/p&gt;

&lt;h3&gt;
  
  
  The same lesson from Anthropic's long-running agents
&lt;/h3&gt;

&lt;p&gt;Anthropic reached the same conclusion from a different direction. In &lt;a href="https://www.anthropic.com/research/effective-harnesses-for-long-running-agents" rel="noopener noreferrer" title="Anthropic: Effective harnesses for long-running agents"&gt;Effective harnesses for long-running agents&lt;/a&gt;, Justin Young describes agents building a full web app across many sessions. What fixed premature "done" wasn't a better prompt about quality. It was giving the agent browser automation and telling it to "do all testing as a human user would." That change dramatically improved results, because the agent found bugs that weren't visible from the code. agent-device plays the same role on mobile.&lt;/p&gt;

&lt;p&gt;Three ideas from that harness carry over directly to a React Native project:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A feature list as the definition of done.&lt;/strong&gt; Every feature starts as failing, and the agent may only flip it to passing after testing it end to end. Verification becomes the gate, not a step the agent can skip.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A smoke test at the start of every session.&lt;/strong&gt; Before touching anything, the agent launches the app and runs one basic flow. If the last session left the app broken, it gets caught before new work piles on top. A single Maestro flow is a perfect fit here.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your tools' blind spots become bug hotspots.&lt;/strong&gt; Claude couldn't see browser-native alert dialogs, and features that relied on them ended up buggier. On mobile, check what your tooling can see: native alerts, permission prompts, and system sheets are where agent-verified features fail quietly.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The human in the loop
&lt;/h2&gt;

&lt;p&gt;Automated checks answer "does it work?" They're weak at "is it good?" That's why verification has to produce &lt;strong&gt;artifacts&lt;/strong&gt; that both an AI and a human can review:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;videos of the end-to-end flows&lt;/li&gt;
&lt;li&gt;screenshots in light mode, dark mode, and large text, plus diffs against baselines&lt;/li&gt;
&lt;li&gt;accessibility snapshots showing what a screen reader will announce&lt;/li&gt;
&lt;li&gt;logs from Metro, the device, and the app&lt;/li&gt;
&lt;li&gt;performance traces for startup, scrolling, and key flows&lt;/li&gt;
&lt;li&gt;observability data, like crash and error reports from staging builds&lt;/li&gt;
&lt;li&gt;reports from every test layer&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A &lt;strong&gt;verifier agent&lt;/strong&gt; with fresh context reviews the evidence first. It checks that the video shows the fixed behavior, the logs have no new errors, and the screenshot diffs only touch the screens the task mentioned. Then a &lt;strong&gt;human&lt;/strong&gt; reviews what needs judgment: visual quality, accessibility with VoiceOver or TalkBack, performance against the baseline, and whether the change solves the user's problem.&lt;/p&gt;

&lt;p&gt;Lauren describes the shift directly:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"our code review process has now really shrunk into looking at verification artifacts instead"&lt;br&gt;
&lt;cite&gt;Lauren Tan, All Code Is Slop (Except Mine)&lt;/cite&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The diff is still there, but it's no longer where trust comes from. Two rules keep this honest: the agent that wrote the code is never the only one who verifies it, and any new commit means verifying again.&lt;/p&gt;

&lt;h2&gt;
  
  
  The verification phase, organized
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://maikotrindade.com/public/img/verification-phase-coding-agents.png" rel="noopener noreferrer" title="Full-size verification phase diagram"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmaikotrindade.com%2Fpublic%2Fimg%2Fverification-phase-coding-agents.png" width="799" height="503" alt="Verification phase workflow for coding agents: a task with a feature list starts with a smoke test, then static analysis, the test layers, and accessibility and performance checks lead to AI-driven end-to-end tests with agent-device, which are saved as Maestro flows. Screenshot tests and observability feed an evidence bundle that a verifier agent and then a human review before merge, with findings looping back to the agent."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Constrain.&lt;/strong&gt; Lint rules, types, and architecture make whole classes of bugs impossible.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run the fast tests.&lt;/strong&gt; Unit, component, integration, contract, and design system tests on every change.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify on a real app.&lt;/strong&gt; The agent starts with a smoke test, drives the change with agent-device, then saves the path as a Maestro flow.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Collect evidence.&lt;/strong&gt; Videos, screenshots, accessibility snapshots, logs, traces, and observability data go on the PR.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Review by AI, then by a human.&lt;/strong&gt; A verifier agent checks the evidence. A human judges visuals, accessibility, and performance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Merge, or loop back.&lt;/strong&gt; Findings go back to the agent, and a new commit means verifying again.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Lauren warned that automating this loop before the codebase is in good shape just produces more slop, faster. Her team spent months on constraints and verification before letting agents merge most of their own PRs. That's the order that works: earn the trust first, then hand over the autonomy.&lt;/p&gt;

&lt;p&gt;For the mobile side of this, I also wrote about &lt;a href="https://maikotrindade.com/ai-agents/engineering/2026/11/02/why-coding-agents-struggle-mobile-harness.html" rel="noopener noreferrer" title="Why coding agents struggle with mobile development"&gt;why coding agents struggle with mobile, and the harness that fixes it&lt;/a&gt;, and about &lt;a href="https://maikotrindade.com/ai-agents/engineering/2026/07/24/loop-engineering-verifying-ai-written-code-no-middleman.html" rel="noopener noreferrer" title="Loop engineering in practice: verifying AI-written code"&gt;verifying AI-written code in practice&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Lauren Tan, &lt;a href="https://www.youtube.com/watch?v=O_zcc6Xl12g" rel="noopener noreferrer" title="All Code Is Slop (Except Mine) by Lauren Tan, AI Engineer on YouTube"&gt;All Code Is Slop (Except Mine)&lt;/a&gt;, AI Engineer Code Summit, November 2026 (video), and the &lt;a href="https://ai.engineer/code/2026/talks/lauren-tan" rel="noopener noreferrer" title="AI Engineer Code 2026 talk page for Lauren Tan"&gt;talk page&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Lauren Tan (&lt;a class="mentioned-user" href="https://dev.to/poteto"&gt;@poteto&lt;/a&gt;), &lt;a href="https://x.com/poteto/status/2111133080526495985" rel="noopener noreferrer" title="Lauren Tan (poteto) post on X"&gt;post on X&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;AI IDE List, &lt;a href="https://aiidelist.com/blog/lauren-tan-grok-bot-pstack-workflow" rel="noopener noreferrer" title="Lauren Tan's Grok Bot Workflow: Chief of Staff, Cloud Agents, and pstack"&gt;Lauren Tan's Grok Bot Workflow: Chief of Staff, Cloud Agents, and pstack&lt;/a&gt;, September 2026&lt;/li&gt;
&lt;li&gt;Justin Young, Anthropic, &lt;a href="https://www.anthropic.com/research/effective-harnesses-for-long-running-agents" rel="noopener noreferrer" title="Effective harnesses for long-running agents by Anthropic"&gt;Effective harnesses for long-running agents&lt;/a&gt;, November 2025&lt;/li&gt;
&lt;li&gt;Flavio Copes, &lt;a href="https://flaviocopes.com/pstack.md" rel="noopener noreferrer" title="A deep dive into pstack by Flavio Copes"&gt;A deep dive into pstack&lt;/a&gt;, August 2026&lt;/li&gt;
&lt;li&gt;Callstack, &lt;a href="https://github.com/callstack/agent-device" rel="noopener noreferrer" title="agent-device on GitHub"&gt;agent-device&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://maestro.dev/" rel="noopener noreferrer" title="Maestro mobile UI testing"&gt;Maestro&lt;/a&gt;, &lt;a href="https://callstack.github.io/react-native-testing-library/" rel="noopener noreferrer" title="React Native Testing Library documentation"&gt;React Native Testing Library&lt;/a&gt;, &lt;a href="https://fast-check.dev/" rel="noopener noreferrer" title="fast-check property-based testing"&gt;fast-check&lt;/a&gt;, and &lt;a href="https://docs.pact.io/" rel="noopener noreferrer" title="Pact contract testing documentation"&gt;Pact&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Diagram made with &lt;a href="https://github.com/tt-a1i/archify" rel="noopener noreferrer" title="Archify diagram tool on GitHub"&gt;Archify&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://maikotrindade.com/ai-agents/engineering/2026/11/20/verification-phase-coding-agents.html" rel="noopener noreferrer"&gt;maikotrindade.com&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>codingagents</category>
      <category>verification</category>
    </item>
    <item>
      <title>Solidity Fundamentals: A Practical Guide for 0.8.x</title>
      <dc:creator>Maiko Trindade</dc:creator>
      <pubDate>Fri, 20 Nov 2026 21:11:29 +0000</pubDate>
      <link>https://dev.to/maikotrindade/solidity-fundamentals-a-practical-guide-for-08x-15lp</link>
      <guid>https://dev.to/maikotrindade/solidity-fundamentals-a-practical-guide-for-08x-15lp</guid>
      <description>&lt;p&gt;Solidity is the main language for writing smart contracts on Ethereum and other EVM chains. This guide covers the fundamentals you need for Solidity 0.8.x: how a contract is laid out, value and reference types, data locations, mappings, events and errors, how gas is charged, the difference between a call and a transaction, the global variables you'll reach for, and how inheritance works. Every example compiles with the 0.8 compiler.&lt;/p&gt;

&lt;p&gt;Between 2017 and 2020 I wrote nine short posts on these topics. A lot changed since then: &lt;code&gt;now&lt;/code&gt; and &lt;code&gt;msg.gas&lt;/code&gt; are gone, arithmetic overflow reverts by default, Ethereum moved to proof of stake, and fees work differently after EIP-1559. So I merged them into this one guide and brought everything up to date. The old URLs redirect here.&lt;/p&gt;

&lt;h2&gt;
  
  
  How the EVM runs your code
&lt;/h2&gt;

&lt;p&gt;Solidity doesn't run directly. The compiler (&lt;code&gt;solc&lt;/code&gt;) turns it into &lt;strong&gt;bytecode&lt;/strong&gt;, a list of low-level instructions (opcodes) for the &lt;strong&gt;Ethereum Virtual Machine&lt;/strong&gt;. Every Ethereum node runs the same EVM, which is why every node reaches the same result for the same transaction. Clients implement it in several languages: Geth in Go, Nethermind in C#, Besu in Java and Reth in Rust, among others.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmaikotrindade.com%2Fpublic%2Fimg%2Fevm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmaikotrindade.com%2Fpublic%2Fimg%2Fevm.png" width="705" height="414" alt="Diagram of the Ethereum Virtual Machine executing smart contract bytecode"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A few properties of the EVM explain a lot of Solidity's design:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It's a &lt;strong&gt;stack machine&lt;/strong&gt; with 256-bit words. That's why &lt;code&gt;uint256&lt;/code&gt; is the "natural" integer size, and why smaller types don't always save gas.&lt;/li&gt;
&lt;li&gt;Each opcode has a fixed &lt;strong&gt;gas&lt;/strong&gt; cost. Writing to storage is by far the most expensive thing you can do.&lt;/li&gt;
&lt;li&gt;A contract has several places to keep data: &lt;strong&gt;storage&lt;/strong&gt; (persistent, on chain), &lt;strong&gt;memory&lt;/strong&gt; (temporary, wiped after the call), &lt;strong&gt;calldata&lt;/strong&gt; (the read-only input of the call) and the stack. Since the Cancun upgrade there's also &lt;strong&gt;transient storage&lt;/strong&gt;, which lives only for the duration of a transaction.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The &lt;a href="https://ethereum.org/en/developers/docs/evm/" rel="noopener noreferrer" title="Ethereum Virtual Machine documentation on ethereum.org"&gt;EVM page on ethereum.org&lt;/a&gt; goes deeper if you're curious about opcodes and the execution model.&lt;/p&gt;

&lt;h2&gt;
  
  
  Anatomy of a contract
&lt;/h2&gt;

&lt;p&gt;A contract is a bit like a class: it groups state, functions and types. Here's a small but complete one. I'll refer back to it in the rest of the guide.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

contract TipJar {
    // State variables live in storage
    address public immutable owner;
    uint256 public constant MIN_TIP = 0.001 ether;

    struct Tip {
        address from;
        uint256 amount;
        string message;
    }

    Tip[] private tips;
    mapping(address tipper =&amp;gt; uint256 total) public totalByTipper;

    event TipReceived(address indexed from, uint256 amount, string message);
    error TipTooSmall(uint256 sent, uint256 minimum);
    error NotOwner();
    error WithdrawFailed();

    modifier onlyOwner() {
        if (msg.sender != owner) revert NotOwner();
        _;
    }

    constructor() {
        owner = msg.sender;
    }

    function tip(string calldata message) external payable {
        if (msg.value &amp;lt; MIN_TIP) revert TipTooSmall(msg.value, MIN_TIP);
        tips.push(Tip(msg.sender, msg.value, message));
        totalByTipper[msg.sender] += msg.value;
        emit TipReceived(msg.sender, msg.value, message);
    }

    function tipCount() external view returns (uint256) {
        return tips.length;
    }

    function withdraw() external onlyOwner {
        (bool ok, ) = payable(owner).call{value: address(this).balance}("");
        if (!ok) revert WithdrawFailed();
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The parts, from top to bottom:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;SPDX license line and &lt;code&gt;pragma&lt;/code&gt;&lt;/strong&gt;: the license is metadata, and &lt;code&gt;pragma solidity ^0.8.24&lt;/code&gt; means "any 0.8 compiler from 0.8.24 up".&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;State variables&lt;/strong&gt;: &lt;code&gt;owner&lt;/code&gt;, &lt;code&gt;tips&lt;/code&gt; and &lt;code&gt;totalByTipper&lt;/code&gt; are stored on chain. &lt;code&gt;constant&lt;/code&gt; values are inlined at compile time and &lt;code&gt;immutable&lt;/code&gt; values are set once in the constructor. Neither one uses a storage slot, so reading them is cheap.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Struct&lt;/strong&gt;: &lt;code&gt;Tip&lt;/code&gt; groups related fields into a custom type.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mapping&lt;/strong&gt;: &lt;code&gt;totalByTipper&lt;/code&gt; is a key-value store (more on mappings below).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Event and errors&lt;/strong&gt;: &lt;code&gt;TipReceived&lt;/code&gt; is for off-chain listeners, and the custom errors describe why a call reverted.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Modifier&lt;/strong&gt;: &lt;code&gt;onlyOwner&lt;/code&gt; wraps a function with a check. The &lt;code&gt;_;&lt;/code&gt; marks where the function body runs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Constructor&lt;/strong&gt;: runs once, at deployment.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Functions&lt;/strong&gt;: &lt;code&gt;tip&lt;/code&gt; accepts Ether because it's &lt;code&gt;payable&lt;/code&gt;, &lt;code&gt;tipCount&lt;/code&gt; only reads state because it's &lt;code&gt;view&lt;/code&gt;, and &lt;code&gt;withdraw&lt;/code&gt; sends Ether out.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Solidity is statically typed, so every variable's type is known at compile time.&lt;/p&gt;

&lt;h3&gt;
  
  
  Value types
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;What it holds&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;true&lt;/code&gt; or &lt;code&gt;false&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;uint8&lt;/code&gt; … &lt;code&gt;uint256&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Unsigned integers in steps of 8 bits. &lt;code&gt;uint&lt;/code&gt; is an alias for &lt;code&gt;uint256&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;int8&lt;/code&gt; … &lt;code&gt;int256&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Signed integers. &lt;code&gt;int&lt;/code&gt; is an alias for &lt;code&gt;int256&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;address&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;A 20-byte Ethereum address&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;address payable&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;An address you can send Ether to&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;bytes1&lt;/code&gt; … &lt;code&gt;bytes32&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Fixed-size byte arrays&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;enum&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;A user-defined set of named constants&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Two things changed in 0.8 that matter every day:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Arithmetic is checked.&lt;/strong&gt; Overflow and underflow revert instead of silently wrapping around. That's why you rarely see SafeMath in new code. When you're sure a value can't overflow and you want to save gas, wrap it in an &lt;code&gt;unchecked { ... }&lt;/code&gt; block.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;`&lt;/strong&gt;&lt;code&gt; is the power operator.** &lt;/code&gt;2 ** 8&lt;code&gt; is 256. &lt;/code&gt;^` is bitwise XOR, which is an easy mistake if you come from other languages (my 2017 post got this wrong).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Reference types
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;string&lt;/code&gt;, &lt;code&gt;bytes&lt;/code&gt; (a dynamic byte array), arrays (&lt;code&gt;uint256[]&lt;/code&gt;, &lt;code&gt;address[10]&lt;/code&gt;), structs and mappings are &lt;strong&gt;reference types&lt;/strong&gt;. For these you have to say where the data lives, which brings us to data locations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Data locations: storage, memory and calldata
&lt;/h2&gt;

&lt;p&gt;Every reference-type variable has a location:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;storage&lt;/code&gt;&lt;/strong&gt;: persistent contract state. State variables are always in storage.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;memory&lt;/code&gt;&lt;/strong&gt;: a temporary copy that disappears when the function returns.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;calldata&lt;/code&gt;&lt;/strong&gt;: the read-only input of an external call. It's the cheapest option for parameters you don't modify.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

contract Locations {
    uint256[] public numbers;

    function addAll(uint256[] calldata input) external {
        for (uint256 i = 0; i &amp;lt; input.length; i++) {
            numbers.push(input[i]);
        }
    }

    function doubled() external view returns (uint256[] memory result) {
        result = new uint256[](numbers.length);
        for (uint256 i = 0; i &amp;lt; numbers.length; i++) {
            result[i] = numbers[i] * 2;
        }
    }

    function resetFirst() external {
        uint256[] storage ref = numbers; // a pointer to storage, not a copy
        ref[0] = 0;
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The behavior that trips people up: assigning storage to a &lt;code&gt;memory&lt;/code&gt; variable &lt;strong&gt;copies&lt;/strong&gt; the data, so changes to the copy don't touch the contract state. Assigning it to a &lt;code&gt;storage&lt;/code&gt; variable creates a &lt;strong&gt;reference&lt;/strong&gt;, so changes do. Since 0.5.0 you must write the location explicitly for reference-type parameters and local variables, so the compiler won't let you guess. (Older tutorials, including mine, say local variables default to storage. That hasn't been true for years.)&lt;/p&gt;

&lt;h2&gt;
  
  
  Mappings
&lt;/h2&gt;

&lt;p&gt;A mapping is Solidity's hash table:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mapping(address user =&amp;gt; uint256 balance) public balances;
mapping(address owner =&amp;gt; mapping(address spender =&amp;gt; uint256 amount)) public allowance;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The named keys and values (&lt;code&gt;user&lt;/code&gt;, &lt;code&gt;balance&lt;/code&gt;) are optional and were added in 0.8.18. They make code and generated getters easier to read.&lt;/p&gt;

&lt;p&gt;Mappings behave differently from a dictionary in most languages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Every key exists.&lt;/strong&gt; A key that was never set returns the type's zero value (&lt;code&gt;0&lt;/code&gt;, &lt;code&gt;false&lt;/code&gt;, &lt;code&gt;address(0)&lt;/code&gt;). You can't tell "set to zero" apart from "never set" without tracking it yourself.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No length and no iteration.&lt;/strong&gt; The keys aren't stored, only the hashed slots. If you need to list entries, keep a separate array of keys alongside the mapping.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Storage only.&lt;/strong&gt; You can't create a mapping in memory or pass one to an external function.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Nesting works&lt;/strong&gt;, as the ERC-20 &lt;code&gt;allowance&lt;/code&gt; above shows.&lt;/li&gt;
&lt;li&gt;A &lt;code&gt;public&lt;/code&gt; mapping gets an automatic getter that takes the key as an argument.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Looping over large arrays costs gas on every iteration and can hit the block gas limit. So the usual pattern is: write to a mapping for lookups, emit an event for history, and let off-chain code (an indexer, or your app) build lists from those events.&lt;/p&gt;

&lt;h2&gt;
  
  
  Events and custom errors
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Events&lt;/strong&gt; write data to the transaction's logs. They're cheap compared to storage, and apps and indexers can subscribe to them. Contracts can't read logs, so events are only for the outside world.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;event Transfer(address indexed from, address indexed to, uint256 value);
emit Transfer(msg.sender, to, amount);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Up to three parameters can be &lt;code&gt;indexed&lt;/code&gt;, which makes them filterable (for example, "all transfers to this address").&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Custom errors&lt;/strong&gt;, added in 0.8.4, are the modern way to revert:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;error InsufficientBalance(uint256 available, uint256 required);

if (balance &amp;lt; amount) revert InsufficientBalance(balance, amount);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;They're cheaper than &lt;code&gt;require(condition, "long message")&lt;/code&gt; because the error is encoded as a 4-byte selector plus its arguments instead of a string. Your app can also decode them and show a meaningful message. You'll still see &lt;code&gt;require&lt;/code&gt; a lot, and since 0.8.26 it also accepts a custom error as its second argument.&lt;/p&gt;

&lt;h2&gt;
  
  
  Functions: visibility and state mutability
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Visibility
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Visibility&lt;/th&gt;
&lt;th&gt;Who can call it&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;external&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Only from outside (other contracts, transactions). Inside the contract you'd need &lt;code&gt;this.f()&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;public&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;From anywhere. For state variables, the compiler generates a getter.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;internal&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;This contract and contracts that inherit from it. This is the default for state variables.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;private&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Only this contract. Not even derived contracts.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;code&gt;private&lt;/code&gt; doesn't mean secret. Everything in storage is readable by anyone running a node, so never put passwords or keys in a contract.&lt;/p&gt;

&lt;h3&gt;
  
  
  State mutability
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;view&lt;/code&gt;&lt;/strong&gt;: reads state but doesn't change it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;pure&lt;/code&gt;&lt;/strong&gt;: neither reads nor changes state (calculations, encoding).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;payable&lt;/code&gt;&lt;/strong&gt;: can receive Ether with the call. Functions without it revert if Ether is sent.&lt;/li&gt;
&lt;li&gt;No keyword means the function can change state.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Calls vs transactions
&lt;/h2&gt;

&lt;p&gt;There are two ways to run a contract function from outside the chain, and they're very different.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;call&lt;/strong&gt; (&lt;code&gt;eth_call&lt;/code&gt; in JSON-RPC) runs the function on the node you're connected to and returns the result right away. Nothing is signed, nothing is broadcast and nothing is saved, so it costs you nothing. You use it to read data, for example &lt;code&gt;tipCount()&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;transaction&lt;/strong&gt; is signed by an account, broadcast to the network, included in a block by a validator and executed by every node. It can change state, it costs gas, and you don't get the function's return value back directly. You read the outcome from the receipt and its events. You use it for anything that writes, like &lt;code&gt;tip()&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Inside the EVM, when one contract calls another, that's a &lt;strong&gt;message call&lt;/strong&gt;. It runs as part of the same transaction and shares its gas.&lt;/p&gt;

&lt;p&gt;One nuance: a &lt;code&gt;view&lt;/code&gt; function is only free when you call it off chain. If a transaction calls it as part of other work, its execution costs gas like any other code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Gas, gas price and fees
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Gas&lt;/strong&gt; measures how much computation and storage a transaction uses. It's a unit of work, not a currency. You pay for it in ETH.&lt;/p&gt;

&lt;p&gt;Since the London upgrade (EIP-1559, in 2021), the fee works like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fee = gas used × (base fee + priority fee)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;base fee&lt;/strong&gt; is set by the protocol and goes up or down with network demand. It's &lt;strong&gt;burned&lt;/strong&gt;, not paid to anyone.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;priority fee&lt;/strong&gt; (the "tip") goes to the validator who includes your transaction.&lt;/li&gt;
&lt;li&gt;You also set a &lt;strong&gt;gas limit&lt;/strong&gt; (the most gas you'll allow) and a &lt;strong&gt;max fee per gas&lt;/strong&gt; (the most you'll pay per unit). If the base fee spikes above your max fee, the transaction just waits.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If a transaction reverts, its state changes are undone, but it still lands in a block and you still pay for the gas used up to that point. If it runs &lt;strong&gt;out of gas&lt;/strong&gt;, you pay for the whole gas limit.&lt;/p&gt;

&lt;h3&gt;
  
  
  Writing cheaper contracts
&lt;/h3&gt;

&lt;p&gt;The habits that make the biggest difference:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Touch storage as little as possible.&lt;/strong&gt; Writing a new non-zero value to a storage slot costs about 20,000 gas, while memory operations cost a handful. Read a storage value once into a local variable if you use it several times.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use &lt;code&gt;constant&lt;/code&gt; and &lt;code&gt;immutable&lt;/code&gt;&lt;/strong&gt; for values that don't change.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pack small variables.&lt;/strong&gt; Storage is organized in 32-byte slots, and variables declared next to each other share a slot if they fit (for example &lt;code&gt;uint128 a; uint64 b; uint64 c;&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use &lt;code&gt;calldata&lt;/code&gt;&lt;/strong&gt; for external function parameters you only read.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use custom errors&lt;/strong&gt; instead of long revert strings.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep contracts under the 24 KB size limit&lt;/strong&gt; (EIP-170) by splitting logic or using libraries.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Global variables
&lt;/h2&gt;

&lt;p&gt;These are always available. I've noted the ones that changed since older tutorials.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Variable&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;msg.sender&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The address that made the current call&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;msg.value&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Wei sent with the call&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;msg.data&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The complete calldata&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;msg.sig&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The first 4 bytes of the calldata (the function selector)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;block.number&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The current block number&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;block.timestamp&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The block timestamp in seconds. Replaces &lt;code&gt;now&lt;/code&gt;, which was removed in 0.7.0.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;block.chainid&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The chain ID (1 for Ethereum mainnet)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;block.basefee&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The current base fee (since EIP-1559)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;block.prevrandao&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Randomness from the beacon chain. Replaces &lt;code&gt;block.difficulty&lt;/code&gt;, which no longer means anything after the move to proof of stake.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;block.coinbase&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The address of the block's fee recipient&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;block.gaslimit&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The block's gas limit&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;blockhash(n)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The hash of one of the 256 most recent blocks. It used to be &lt;code&gt;block.blockhash&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;gasleft()&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Remaining gas. Replaces &lt;code&gt;msg.gas&lt;/code&gt;, which was removed in 0.5.0.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;tx.origin&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The account that started the transaction&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;tx.gasprice&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The gas price of the transaction&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Two warnings. &lt;strong&gt;Don't use &lt;code&gt;tx.origin&lt;/code&gt; for authorization.&lt;/strong&gt; If your contract checks &lt;code&gt;tx.origin == owner&lt;/code&gt;, a malicious contract the owner interacts with can call yours and pass the check. Use &lt;code&gt;msg.sender&lt;/code&gt;. And &lt;strong&gt;don't treat &lt;code&gt;block.timestamp&lt;/code&gt; or &lt;code&gt;block.prevrandao&lt;/code&gt; as a secure source of randomness&lt;/strong&gt; for anything valuable. Validators have some influence over both. Use a verifiable randomness service such as Chainlink VRF. Oracles like Chainlink are also how a contract gets any off-chain data; I used them in my &lt;a href="https://maikotrindade.com/2023/06/28/nomad-token-chainlink-hackathon.html" rel="noopener noreferrer" title="Nomad Token, a Chainlink hackathon project"&gt;Nomad Token hackathon project&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hashing and type conversion
&lt;/h2&gt;

&lt;h3&gt;
  
  
  keccak256
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;keccak256&lt;/code&gt; takes a single &lt;code&gt;bytes&lt;/code&gt; argument and returns a &lt;code&gt;bytes32&lt;/code&gt; hash. To hash several values, encode them first:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bytes32 id = keccak256(abi.encode(user, nonce));
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;abi.encodePacked&lt;/code&gt; gives a shorter encoding, but with two or more dynamic types (like two strings) different inputs can produce the same bytes: &lt;code&gt;("ab", "c")&lt;/code&gt; and &lt;code&gt;("a", "bc")&lt;/code&gt; collide. Prefer &lt;code&gt;abi.encode&lt;/code&gt; unless you know why you need packed encoding.&lt;/p&gt;

&lt;h3&gt;
  
  
  Converting between types
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Implicit&lt;/strong&gt; conversions happen only when no information can be lost. A &lt;code&gt;uint8&lt;/code&gt; fits in a &lt;code&gt;uint256&lt;/code&gt;, so this compiles:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;uint8 small = 8;
uint256 big = small;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Going the other way needs an &lt;strong&gt;explicit&lt;/strong&gt; conversion, and it silently cuts off the higher-order bits:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;uint32 a = 0x12345678;
uint16 b = uint16(a); // 0x5678
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Since 0.8.0, an explicit conversion can change only one thing at a time: sign, size or kind of type. &lt;code&gt;uint16(int8(x))&lt;/code&gt; doesn't compile because it changes both sign and size. You have to go through an intermediate type, for example &lt;code&gt;uint16(uint8(x))&lt;/code&gt;, which makes the risk visible in the code.&lt;/p&gt;

&lt;p&gt;Address conversions follow the same idea: &lt;code&gt;address(uint160(value))&lt;/code&gt; turns a number into an address, and &lt;code&gt;payable(addr)&lt;/code&gt; turns an &lt;code&gt;address&lt;/code&gt; into an &lt;code&gt;address payable&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Inheritance
&lt;/h2&gt;

&lt;p&gt;A contract inherits from others with &lt;code&gt;is&lt;/code&gt;. When you deploy it, the compiler copies the code from every parent into &lt;strong&gt;one contract with one address&lt;/strong&gt;. Calls to parent functions are just internal jumps.&lt;/p&gt;

&lt;p&gt;A function must be marked &lt;code&gt;virtual&lt;/code&gt; to be overridable, and the overriding function must say &lt;code&gt;override&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

contract Grandparent {
    function who() public pure virtual returns (string memory) {
        return "Grandparent";
    }
}

contract Parent is Grandparent {
    function who() public pure virtual override returns (string memory) {
        return "Parent";
    }
}

contract Uncle is Grandparent {
    function who() public pure virtual override returns (string memory) {
        return "Uncle";
    }
}

contract Child is Parent, Uncle {
    function who() public pure override(Parent, Uncle) returns (string memory) {
        return super.who(); // "Uncle"
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With multiple inheritance, order matters. List parents from "most base-like" to "most derived". Solidity linearizes the hierarchy (using C3 linearization, like Python), and &lt;code&gt;super&lt;/code&gt; calls the next contract in that order, not necessarily the parent you expect. For &lt;code&gt;Child is Parent, Uncle&lt;/code&gt;, the order from most derived is &lt;code&gt;Child&lt;/code&gt;, &lt;code&gt;Uncle&lt;/code&gt;, &lt;code&gt;Parent&lt;/code&gt;, &lt;code&gt;Grandparent&lt;/code&gt;, so &lt;code&gt;super.who()&lt;/code&gt; returns &lt;code&gt;"Uncle"&lt;/code&gt;. When a function exists in more than one parent, you have to list them all in &lt;code&gt;override(Parent, Uncle)&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;A few more rules:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A child can use everything that isn't &lt;code&gt;private&lt;/code&gt;: &lt;code&gt;internal&lt;/code&gt; and &lt;code&gt;public&lt;/code&gt; state and functions.&lt;/li&gt;
&lt;li&gt;An &lt;strong&gt;abstract contract&lt;/strong&gt; has at least one function without an implementation and can't be deployed on its own.&lt;/li&gt;
&lt;li&gt;An &lt;strong&gt;interface&lt;/strong&gt; only declares external functions. It's what you use to call another contract when you don't have its source code, for example &lt;code&gt;IERC20(token).transfer(to, amount)&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In practice you'll mostly inherit from audited libraries like &lt;a href="https://docs.openzeppelin.com/contracts/" rel="noopener noreferrer" title="OpenZeppelin Contracts documentation"&gt;OpenZeppelin Contracts&lt;/a&gt; instead of writing token logic or access control yourself.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where to go next
&lt;/h2&gt;

&lt;p&gt;To try any of these examples, paste them into &lt;a href="https://remix.ethereum.org" rel="noopener noreferrer" title="Remix, the browser-based Solidity IDE"&gt;Remix&lt;/a&gt;, which runs in the browser. For real projects, use &lt;a href="https://getfoundry.sh" rel="noopener noreferrer" title="Foundry, a Solidity development toolkit"&gt;Foundry&lt;/a&gt; or &lt;a href="https://hardhat.org" rel="noopener noreferrer" title="Hardhat, an Ethereum development environment"&gt;Hardhat&lt;/a&gt;. Truffle, which my older posts used, was retired in 2023.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://docs.soliditylang.org/en/latest/" rel="noopener noreferrer" title="Official Solidity documentation"&gt;official Solidity documentation&lt;/a&gt; is the reference for everything here, and its list of breaking changes per version explains why older code doesn't compile anymore. If you build on Android, I also wrote about how to &lt;a href="https://maikotrindade.com/2023/08/02/integrate-android-app-with-erc20-token.html" rel="noopener noreferrer" title="Integrate an Android app with an ERC-20 smart contract"&gt;integrate an Android app with an ERC-20 smart contract&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://maikotrindade.com/blockchain/solidity/2026/11/17/solidity-fundamentals-guide.html" rel="noopener noreferrer"&gt;maikotrindade.com&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>solidity</category>
      <category>ethereum</category>
      <category>evm</category>
      <category>smartcontracts</category>
    </item>
    <item>
      <title>Awesome React Native Skills: Claude Skills for Modern Mobile Dev</title>
      <dc:creator>Maiko Trindade</dc:creator>
      <pubDate>Wed, 13 May 2026 00:12:36 +0000</pubDate>
      <link>https://dev.to/maikotrindade/awesome-react-native-skills-claude-skills-for-modern-mobile-dev-313l</link>
      <guid>https://dev.to/maikotrindade/awesome-react-native-skills-claude-skills-for-modern-mobile-dev-313l</guid>
      <description>&lt;p&gt;&lt;a href="https://github.com/maikotrindade/awesome-react-native-skills" rel="noopener noreferrer"&gt;awesome-react-native-skills&lt;/a&gt; is a curated set of Claude Skills for building production-grade React Native apps in 2026. Each skill is a self-contained folder with reference docs and conventions, so Claude can pick up the right context the moment you ask it for help on a navigation bug, a Reanimated transition, or an EAS build issue.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why this exists
&lt;/h3&gt;

&lt;p&gt;I wrote about &lt;a href="https://maikotrindade.com/ai/agents/claude/anthropic/2026/05/02/building-reusable-skills-for-claude.html" rel="noopener noreferrer"&gt;building reusable Skills for Claude&lt;/a&gt; a few weeks ago. The same idea applies cleanly to React Native, maybe even more so. The ecosystem moves fast: the New Architecture is the default, Expo ships a new SDK every few months, and the "right" way to do navigation, state, or styling shifts often enough that stale answers are the norm. Packaging the current good practices as Skills means Claude loads the relevant slice on demand instead of guessing from training data.&lt;/p&gt;

&lt;h3&gt;
  
  
  What's inside
&lt;/h3&gt;

&lt;p&gt;Six skill groups, each focused on one part of the stack:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;React Native Core&lt;/strong&gt; — native primitives, platform APIs, animations, gestures, accessibility.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;React Native Ecosystem&lt;/strong&gt; — navigation, state management, data fetching, and the libraries you actually ship.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;React Native Expo&lt;/strong&gt; — Router, EAS Build/Update/Submit, SDK upgrades.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;React Native Reusables&lt;/strong&gt; — shadcn/ui-style components built on NativeWind v4.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;React Native Performance&lt;/strong&gt; — profiling, measurement, and the optimizations that move the needle.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;React Native Testing&lt;/strong&gt; — Testing Library v13/v14 patterns for unit and integration tests.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Tech the skills cover
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;React Native 0.76+ with the New Architecture on by default&lt;/li&gt;
&lt;li&gt;Expo SDK 53 to 56&lt;/li&gt;
&lt;li&gt;React Navigation v7&lt;/li&gt;
&lt;li&gt;TanStack Query v5 for server state&lt;/li&gt;
&lt;li&gt;Zustand, Jotai, and Redux Toolkit for client state&lt;/li&gt;
&lt;li&gt;Reanimated v3 and Gesture Handler v2&lt;/li&gt;
&lt;li&gt;NativeWind v4 for styling&lt;/li&gt;
&lt;li&gt;Testing Library v13 and v14&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  How to use it
&lt;/h3&gt;

&lt;p&gt;Drop the skills into your local Claude skills folder:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/maikotrindade/awesome-react-native-skills.git ~/.claude/skills/awesome-react-native-skills
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;From there, Claude's progressive disclosure does the rest. The frontmatter of each skill stays in the system prompt, and the body loads only when your question matches. You don't have to remember which skill to invoke.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where it goes next
&lt;/h3&gt;

&lt;p&gt;The repo is a starting point, not a finished thing. More skills are coming, and contributions are welcome if you've worked out a pattern that should be there. Check the project on &lt;a href="https://github.com/maikotrindade/awesome-react-native-skills" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; and open an issue or PR if something's missing or out of date.&lt;/p&gt;

</description>
      <category>reactnative</category>
      <category>ai</category>
      <category>mobile</category>
    </item>
  </channel>
</rss>
