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

<channel>
	<title>Deep Fried Bytes</title>
	<atom:link href="http://deepfriedbytes.com/feed/" rel="self" type="application/rss+xml"/>
	<link>https://deepfriedbytes.com/</link>
	<description>Deep Fried Bytes is an audio talk show with a Southern flavor hosted by technologists and developers Keith Elder and Chris Woodruff. The show discusses a wide range of topics including application development, operating systems and technology in general. Anything is fair game if it plugs into the wall or takes a battery.</description>
	<lastBuildDate>Fri, 23 Oct 2026 10:39:32 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>

<image>
	<url>https://deepfriedbytes.com/wp-content/uploads/2025/07/cropped-cropped-Deep-Fried-Bytes-32x32.png</url>
	<title>Blog about a digital future</title>
	<link>https://deepfriedbytes.com/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<itunes:explicit>no</itunes:explicit><copyright>2008 by Deep Fried Bytes, All rights reserved</copyright><itunes:image href="http://deepfriedbytes.com/images/deepfried_feedimage.png"/><itunes:keywords>technology,windows,apple,linux,osx,net,c,vb,net,home,server,ipod,zune,sql,server,programmer,developer</itunes:keywords><itunes:summary>Deep Fried Bytes is an audio talk show with a Southern flavor hosted by technologists and developers Keith Elder and Chris Woodruff. The show discusses a wide range of topics including application development, operating systems and technology in general. Anything is fair game if it plugs into the wall or takes a battery.</itunes:summary><itunes:subtitle>Everything tastes better deep fried, especially technology!</itunes:subtitle><itunes:category text="Technology"/><itunes:category text="Technology"><itunes:category text="Podcasting"/></itunes:category><itunes:category text="Technology"><itunes:category text="Gadgets"/></itunes:category><itunes:category text="Technology"><itunes:category text="Tech News"/></itunes:category><itunes:author>Keith Elder &amp; Chris Woodruff</itunes:author><itunes:owner><itunes:email>comments@deepfriedbytes.com</itunes:email><itunes:name>Keith Elder &amp; Chris Woodruff</itunes:name></itunes:owner><item>
		<title>2024 Crypto Runbooks Fail Production in 2026</title>
		<link>https://deepfriedbytes.com/2024-crypto-runbooks-fail-production-in-2026/</link>
		
		
		<pubDate>Thu, 22 Oct 2026 07:47:32 +0000</pubDate>
				<category><![CDATA[Cryptocurrencies]]></category>
		<category><![CDATA[AI]]></category>
		<category><![CDATA[AI Web Solutions]]></category>
		<category><![CDATA[Blockchain]]></category>
		<category><![CDATA[Digital ecosystems]]></category>
		<guid isPermaLink="false">https://deepfriedbytes.com/2024-crypto-runbooks-fail-production-in-2026/</guid>

					<description><![CDATA[<p>A wallet request can time out after it has been broadcast, leaving the caller unable to tell whether retrying will create a second transfer. Since 2024, delegated accounts and more varied transaction paths have made that uncertainty harder to contain. My position: a production wallet needs a durable intent record before it needs another signing integration. If no component owns recovery, scaling workers only scales the ambiguity. The old build-or-buy boundary no longer matches the recovery boundary I disagree with Your 2024 Crypto Build-vs-Buy Playbook Is Obsolete if its sourcing question is treated as the production decision: buying signing, RPC, or account-abstraction services does not buy an answer to “Did this customer request execute?” Your team still has to join the HTTP request, the signed operation, the broadcast attempt, and the eventual chain result into one recoverable record. That distinction has become sharper over the last two years. Ethereum’s Pectra upgrade activated on May 7, 2025—a network date, not a performance claim—and introduced EIP-7702, which lets an externally owned account delegate execution to code. An EIP-7702-capable wallet can therefore have behavior that an older “EOA means one simple transaction” runbook does not describe. ERC-4337 adds another operational path: a UserOperation goes through a bundler and an EntryPoint rather than through the ordinary EOA transaction submission path. EntryPoint v0.7 matters as a version boundary because tooling that serializes a UserOperation for a different EntryPoint version can produce an operation the intended path will not accept. These mechanisms do not make every wallet request interchangeable. EIP-5792’s wallet_sendCalls describes a wallet-facing call-batching interface, while eth_sendRawTransaction broadcasts an already signed EVM transaction; a successful response from either interface is not proof of final execution because inclusion and chain history can still change. A paymaster may also be involved in an ERC-4337 operation, so rebuilding an apparently identical request after a timeout can change its signed contents. Store the exact bytes or canonical operation fields that were submitted, not merely the API payload that started the process. I would not make a vendor webhook the system of record, because a delayed, duplicated, or missing webhook cannot establish what your API already promised the caller. Use webhooks as evidence to reconcile against receipts and your durable intent record. Keep the vendor’s request ID, the chain ID, the signer or smart-account address, and the transaction or UserOperation hash together; without that mapping, an on-call engineer must guess which customer action a chain event represents. Idempotency now has to survive a signer and a broadcaster At 10x users, your crypto wallet breaks at idempotency names a real failure mode, but I would not use traffic growth as the trigger for fixing it: one timeout between signing and persistence is enough to make a retry unsafe. The operational contract should be narrower and testable: the same authenticated request key and the same request body identify one wallet intent, while a reused key with a different body is rejected. That contract prevents your API from deliberately creating a second intent; it does not claim that a blockchain provides exactly-once execution. Put a uniqueness constraint around the intent before dispatching work. This PostgreSQL example runs in psql; its sample hash is a placeholder, so production code must compute the digest from a canonical request representation before insertion. CREATE TABLE wallet_intents ( tenant text NOT NULL, chain_id bigint NOT NULL, idem_key text NOT NULL, body_hash text NOT NULL, state text NOT NULL DEFAULT 'accepted', tx_hash text, PRIMARY KEY (tenant, chain_id, idem_key) ); INSERT INTO wallet_intents (tenant, chain_id, idem_key, body_hash) VALUES ('demo', 1, 'request-7', 'sha256:sample') ON CONFLICT (tenant, chain_id, idem_key) DO NOTHING; SELECT body_hash, state, tx_hash FROM wallet_intents WHERE tenant = 'demo' AND chain_id = 1 AND idem_key = 'request-7'; The insert makes concurrent acceptance of the same key converge on one row because PostgreSQL enforces the primary key. It does not finish the API contract by itself: after a conflict, compare the stored body_hash with the incoming hash and return a conflict if they differ. Treat that check and any state claim as database transactions, because two workers that merely read “accepted” can both decide to sign. A worker should claim a dispatch state with a conditional update, record the resulting signed payload or hash, and only then proceed through the broadcast state machine. Nonce management needs its own boundary. For an EOA, reserve a nonce per chain ID plus signer under database coordination; asking two RPC endpoints for eth_getTransactionCount with pending is not a lock, because their mempools need not contain the same transactions. Never allocate a fresh nonce just because eth_sendRawTransaction timed out: rebroadcasting the same signed bytes preserves the transaction hash, whereas a newly signed transaction can create a second payment. Replacement under EIP-1559 is a deliberate state transition with the same nonce and changed fee fields, not an automatic retry of the customer intent. For ERC-4337, track the UserOperation hash, EntryPoint address, smart account, and bundler submission separately from the business intent. Calling eth_sendUserOperation again with altered operation fields is not equivalent to replaying the same submission, because the operation identifier depends on what was signed. A receipt lookup, followed by a check of the relevant chain state, is the recovery path when the submitter loses its response. An accepted API response should mean “durably recorded,” not “paid,” because a signer or bundler can still reject work after acceptance. PostgreSQL beats a Redis lock for the source of truth There are two plausible defaults for coordinating wallet workers: a PostgreSQL intent row with a conditional claim, or a Redis SET key value NX PX lock. PostgreSQL wins when the claim and intent transition must remain auditable together, because its transaction can make the state change and ownership decision atomic. Its cost is write latency and contention on a busy signer or intent partition. Redis wins for short-lived, replaceable coordination where another durable record already defines the truth, because acquiring an expiring lock is simple and avoids a database write on that fast path. Its cost is that lock expiry or loss does not tell you whether the former holder signed or broadcast anything. For money-moving work, I would choose PostgreSQL as the authority and use Redis only as an optional scheduling optimization, because a worker crash must not turn an expired lock into permission to create a new transaction. Start with a 5-minute lease as a tuning input for a worker claim, but make expiry return the intent to reconciliation, not directly to signing. That rule matters when a process broadcasts successfully and dies before writing the response: the next worker must inspect the stored signed payload, receipt, nonce, and account state before deciding what action remains. The state machine should distinguish accepted, claimed, signed, broadcast, included, final, and needs_review. Those names are useful because they separate your own durable actions from observations about the chain. A transaction receipt showing inclusion is not the same thing as your application’s finality policy; a reorganization can remove a recently observed receipt. Configure that policy per chain rather than copying an Ethereum mainnet confirmation count to an L2, because the chains can expose different settlement and finality signals. Resist collapsing a stuck item into “failed” merely because the provider returned an error. An RPC timeout says that your client did not receive an answer, not that a node did not receive the bytes. Conversely, a nonce-too-low response does not by itself prove this intent succeeded, because another transaction from the signer may have consumed the nonce. The useful on-call question is whether the exact operation is known to be included, still eligible for broadcast, deliberately replaced, or genuinely unaccounted for. A recovery drill is more valuable than a throughput benchmark Put an end-to-end trace around intent acceptance, worker claim, signing, submission, and reconciliation with OpenTelemetry, but keep raw signing material out of spans because tracing backends are not key stores. Propagate an internal intent ID through Kubernetes jobs or queue messages; do not use the transaction hash as the only correlation ID, because it may not exist when the request first fails. With Prometheus, count state transitions and expose the age of the oldest non-final intent by chain and signer. Avoid a metric label containing every idempotency key, because unbounded label cardinality can overwhelm the monitoring system. As a proposed SLO rather than an observed result, target 99.9% availability for durably accepting valid wallet intents; measure chain completion separately because network fees and inclusion are outside the API acceptance boundary. Set an initial alert threshold when the oldest claimed or broadcast intent has made no verifiable progress for 15 minutes, then tune it against the chains and fee policies you operate. Alert on an aging state, not merely a low transaction count, because a quiet wallet can have no transactions while a single stranded transfer still needs intervention. Run a fault drill before raising Kubernetes Horizontal Pod Autoscaler worker limits. Inject a 30-second test timeout after submission but before the broadcaster records its response, then retry the same API key while two workers are active. The expected result is one intent row, no second nonce allocation for that intent, and a reconciliation path that either finds the submitted operation or marks the evidence insufficient for automated resubmission. That test catches a more consequential defect than a requests-per-second benchmark because it exercises the moment at which the caller, database, and chain can disagree. Budget two independently operated RPC providers as an operational starting point for investigation, not as a voting oracle. Comparing their receipt and pending-nonce views helps expose provider-local gaps, but disagreement should pause an irreversible decision rather than cause a third broadcast. Record which provider saw each submission and which block and receipt informed each transition, so the next on-call engineer can reconstruct the decision without relying on a dashboard’s current view. Prove one timeout cannot become two payments Start by selecting one production transfer path and finding the exact point where signed bytes can leave your process before their identity is durable. Add a fault-injection test at that boundary and retry the customer request with the same key. If the test creates a second nonce or operation, stop increasing worker concurrency: fix the intent record and reconciliation transition first. That is a release gate an on-call engineer can verify, not a promise that the network will never fail.</p>
<p>The post <a href="https://deepfriedbytes.com/2024-crypto-runbooks-fail-production-in-2026/">2024 Crypto Runbooks Fail Production in 2026</a> appeared first on <a href="https://deepfriedbytes.com">Blog about a digital future</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>A wallet request can time out after it has been broadcast, leaving the caller unable to tell whether retrying will create a second transfer. Since 2024, delegated accounts and more varied transaction paths have made that uncertainty harder to contain. My position: a production wallet needs a durable intent record before it needs another signing integration. If no component owns recovery, scaling workers only scales the ambiguity.</p>
<h2>The old build-or-buy boundary no longer matches the recovery boundary</h2>
<p>I disagree with <a href=/your-2024-crypto-build-vs-buy-playbook-is-obsolete/>Your 2024 Crypto Build-vs-Buy Playbook Is Obsolete</a> if its sourcing question is treated as the production decision: buying signing, RPC, or account-abstraction services does not buy an answer to “Did this customer request execute?” Your team still has to join the HTTP request, the signed operation, the broadcast attempt, and the eventual chain result into one recoverable record.</p>
<p>That distinction has become sharper over the last two years. Ethereum’s Pectra upgrade activated on May 7, 2025—a network date, not a performance claim—and introduced EIP-7702, which lets an externally owned account delegate execution to code. An EIP-7702-capable wallet can therefore have behavior that an older “EOA means one simple transaction” runbook does not describe. ERC-4337 adds another operational path: a UserOperation goes through a bundler and an EntryPoint rather than through the ordinary EOA transaction submission path. EntryPoint v0.7 matters as a version boundary because tooling that serializes a UserOperation for a different EntryPoint version can produce an operation the intended path will not accept.</p>
<p>These mechanisms do not make every wallet request interchangeable. EIP-5792’s <em>wallet_sendCalls</em> describes a wallet-facing call-batching interface, while <em>eth_sendRawTransaction</em> broadcasts an already signed EVM transaction; a successful response from either interface is not proof of final execution because inclusion and chain history can still change. A paymaster may also be involved in an ERC-4337 operation, so rebuilding an apparently identical request after a timeout can change its signed contents. Store the exact bytes or canonical operation fields that were submitted, not merely the API payload that started the process.</p>
<p>I would <strong>not</strong> make a vendor webhook the system of record, because a delayed, duplicated, or missing webhook cannot establish what your API already promised the caller. Use webhooks as evidence to reconcile against receipts and your durable intent record. Keep the vendor’s request ID, the chain ID, the signer or smart-account address, and the transaction or UserOperation hash together; without that mapping, an on-call engineer must guess which customer action a chain event represents.</p>
<h2>Idempotency now has to survive a signer and a broadcaster</h2>
<p><a href=/at-10x-users-your-crypto-wallet-breaks-at-idempotency/>At 10x users, your crypto wallet breaks at idempotency</a> names a real failure mode, but I would not use traffic growth as the trigger for fixing it: one timeout between signing and persistence is enough to make a retry unsafe. The operational contract should be narrower and testable: the same authenticated request key and the same request body identify one wallet intent, while a reused key with a different body is rejected. That contract prevents your API from deliberately creating a second intent; it does not claim that a blockchain provides exactly-once execution.</p>
<p>Put a uniqueness constraint around the intent before dispatching work. This PostgreSQL example runs in <em>psql</em>; its sample hash is a placeholder, so production code must compute the digest from a canonical request representation before insertion.</p>
<pre>CREATE TABLE wallet_intents (
  tenant text NOT NULL, chain_id bigint NOT NULL,
  idem_key text NOT NULL, body_hash text NOT NULL,
  state text NOT NULL DEFAULT 'accepted',
  tx_hash text, PRIMARY KEY (tenant, chain_id, idem_key)
);
INSERT INTO wallet_intents (tenant, chain_id, idem_key, body_hash)
VALUES ('demo', 1, 'request-7', 'sha256:sample')
ON CONFLICT (tenant, chain_id, idem_key) DO NOTHING;
SELECT body_hash, state, tx_hash FROM wallet_intents
WHERE tenant = 'demo' AND chain_id = 1 AND idem_key = 'request-7';</pre>
<p>The insert makes concurrent acceptance of the same key converge on one row because PostgreSQL enforces the primary key. It does <strong>not</strong> finish the API contract by itself: after a conflict, compare the stored <em>body_hash</em> with the incoming hash and return a conflict if they differ. Treat that check and any state claim as database transactions, because two workers that merely read “accepted” can both decide to sign. A worker should claim a dispatch state with a conditional update, record the resulting signed payload or hash, and only then proceed through the broadcast state machine.</p>
<p>Nonce management needs its own boundary. For an EOA, reserve a nonce per <em>chain ID plus signer</em> under database coordination; asking two RPC endpoints for <em>eth_getTransactionCount</em> with <em>pending</em> is not a lock, because their mempools need not contain the same transactions. Never allocate a fresh nonce just because <em>eth_sendRawTransaction</em> timed out: rebroadcasting the same signed bytes preserves the transaction hash, whereas a newly signed transaction can create a second payment. Replacement under EIP-1559 is a deliberate state transition with the same nonce and changed fee fields, not an automatic retry of the customer intent.</p>
<p>For ERC-4337, track the UserOperation hash, EntryPoint address, smart account, and bundler submission separately from the business intent. Calling <em>eth_sendUserOperation</em> again with altered operation fields is not equivalent to replaying the same submission, because the operation identifier depends on what was signed. A receipt lookup, followed by a check of the relevant chain state, is the recovery path when the submitter loses its response. An accepted API response should mean “durably recorded,” not “paid,” because a signer or bundler can still reject work after acceptance.</p>
<h2>PostgreSQL beats a Redis lock for the source of truth</h2>
<p>There are two plausible defaults for coordinating wallet workers: a PostgreSQL intent row with a conditional claim, or a Redis <em>SET key value NX PX</em> lock. PostgreSQL wins when the claim and intent transition must remain auditable together, because its transaction can make the state change and ownership decision atomic. Its cost is write latency and contention on a busy signer or intent partition. Redis wins for short-lived, replaceable coordination where another durable record already defines the truth, because acquiring an expiring lock is simple and avoids a database write on that fast path. Its cost is that lock expiry or loss does not tell you whether the former holder signed or broadcast anything.</p>
<p>For money-moving work, I would choose PostgreSQL as the authority and use Redis only as an optional scheduling optimization, because a worker crash must not turn an expired lock into permission to create a new transaction. Start with a <strong>5-minute lease as a tuning input</strong> for a worker claim, but make expiry return the intent to <em>reconciliation</em>, not directly to <em>signing</em>. That rule matters when a process broadcasts successfully and dies before writing the response: the next worker must inspect the stored signed payload, receipt, nonce, and account state before deciding what action remains.</p>
<p>The state machine should distinguish <em>accepted</em>, <em>claimed</em>, <em>signed</em>, <em>broadcast</em>, <em>included</em>, <em>final</em>, and <em>needs_review</em>. Those names are useful because they separate your own durable actions from observations about the chain. A transaction receipt showing inclusion is not the same thing as your application’s finality policy; a reorganization can remove a recently observed receipt. Configure that policy per chain rather than copying an Ethereum mainnet confirmation count to an L2, because the chains can expose different settlement and finality signals.</p>
<p>Resist collapsing a stuck item into “failed” merely because the provider returned an error. An RPC timeout says that your client did not receive an answer, not that a node did not receive the bytes. Conversely, a nonce-too-low response does not by itself prove this intent succeeded, because another transaction from the signer may have consumed the nonce. The useful on-call question is whether the exact operation is known to be included, still eligible for broadcast, deliberately replaced, or genuinely unaccounted for.</p>
<h2>A recovery drill is more valuable than a throughput benchmark</h2>
<p>Put an end-to-end trace around intent acceptance, worker claim, signing, submission, and reconciliation with OpenTelemetry, but keep raw signing material out of spans because tracing backends are not key stores. Propagate an internal intent ID through Kubernetes jobs or queue messages; do not use the transaction hash as the only correlation ID, because it may not exist when the request first fails. With Prometheus, count state transitions and expose the age of the oldest non-final intent by chain and signer. Avoid a metric label containing every idempotency key, because unbounded label cardinality can overwhelm the monitoring system.</p>
<p>As a <strong>proposed SLO rather than an observed result</strong>, target 99.9% availability for durably accepting valid wallet intents; measure chain completion separately because network fees and inclusion are outside the API acceptance boundary. Set an <strong>initial alert threshold</strong> when the oldest claimed or broadcast intent has made no verifiable progress for 15 minutes, then tune it against the chains and fee policies you operate. Alert on an aging state, not merely a low transaction count, because a quiet wallet can have no transactions while a single stranded transfer still needs intervention.</p>
<p>Run a fault drill before raising Kubernetes Horizontal Pod Autoscaler worker limits. Inject a <strong>30-second test timeout</strong> after submission but before the broadcaster records its response, then retry the same API key while two workers are active. The expected result is one intent row, no second nonce allocation for that intent, and a reconciliation path that either finds the submitted operation or marks the evidence insufficient for automated resubmission. That test catches a more consequential defect than a requests-per-second benchmark because it exercises the moment at which the caller, database, and chain can disagree.</p>
<p>Budget <strong>two independently operated RPC providers as an operational starting point</strong> for investigation, not as a voting oracle. Comparing their receipt and pending-nonce views helps expose provider-local gaps, but disagreement should pause an irreversible decision rather than cause a third broadcast. Record which provider saw each submission and which block and receipt informed each transition, so the next on-call engineer can reconstruct the decision without relying on a dashboard’s current view.</p>
<h2>Prove one timeout cannot become two payments</h2>
<p>Start by selecting one production transfer path and finding the exact point where signed bytes can leave your process before their identity is durable. Add a fault-injection test at that boundary and retry the customer request with the same key. If the test creates a second nonce or operation, stop increasing worker concurrency: fix the intent record and reconciliation transition first. That is a release gate an on-call engineer can verify, not a promise that the network will never fail.</p>
<p>The post <a href="https://deepfriedbytes.com/2024-crypto-runbooks-fail-production-in-2026/">2024 Crypto Runbooks Fail Production in 2026</a> appeared first on <a href="https://deepfriedbytes.com">Blog about a digital future</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>comments@deepfriedbytes.com (Keith Elder &amp; Chris Woodruff)</dc:creator></item>
		<item>
		<title>CTO, Score Robotics Stacks Before You Build or Buy</title>
		<link>https://deepfriedbytes.com/cto-score-robotics-stacks-before-you-build-or-buy/</link>
		
		
		<pubDate>Tue, 13 Oct 2026 09:41:24 +0000</pubDate>
				<category><![CDATA[Robotics]]></category>
		<category><![CDATA[AI]]></category>
		<category><![CDATA[AI Integration]]></category>
		<category><![CDATA[Machine Learning Apps]]></category>
		<guid isPermaLink="false">https://deepfriedbytes.com/cto-score-robotics-stacks-before-you-build-or-buy/</guid>

					<description><![CDATA[<p>A vision API can win a demo and lose the procurement decision: the invoice may be predictable while data retention, camera drift, and migration remain untested. For a first production app, I would buy inference only from a vendor that passes a priced exit test. If the contract or interface prevents that test, I would start with a licensed model running in-house, even if its initial accuracy is lower. A vendor trial should start with an exit test, not a leaderboard Before asking vendors for accuracy claims, write down what you would need to replace them. That means access to the original images where your rights permit it, human-reviewed labels, model outputs, confidence values, timestamps, and enough request metadata to replay a decision. A supplier that returns only a category name makes replacement harder because you cannot reconstruct thresholds or diagnose disagreements after the fact. Ask each candidate to process the same held-out images through the interface you would actually deploy. A useful trial set includes ordinary images, low-light captures, motion blur, empty frames, and examples from every camera type you expect to support. Set 2,000 labeled images as an initial trial size to tune, then increase it if important slices contain too few examples to estimate error rates. Keep near-duplicate frames from the same event together when splitting data; otherwise, a test can reward recognition of a scene rather than performance on a new one. Record results by slice, not just in one aggregate score. A measured 95% overall agreement in your trial would still be unacceptable if one camera’s false-accept rate exceeded the limit you set for that camera. For each vendor, report false accepts and false rejects at a threshold selected on a separate development set. Do not move the threshold after inspecting held-out results, because doing so turns the test set into another tuning set. The simplest comparison artifact is a JSON Lines file with one reviewed truth value and one prediction per candidate. The following script runs with Python’s standard library; give it an eval.jsonl file whose rows contain slice, truth, api, and onnx fields. Use the same categorical output vocabulary for both candidates. python3 - &#60;&#60;'PY' import json from collections import defaultdict rows = [json.loads(s) for s in open("eval.jsonl") if s.strip()] by = defaultdict(lambda: [0, 0]) for r in rows: for name in ("api", "onnx"): key = (name, r["slice"]) by[key][0] += int(r[name] != r["truth"]) by[key][1] += 1 for (name, sl), (errors, n) in sorted(by.items()): print(name, sl, f"errors={errors}/{n}", f"rate={errors/n:.3f}") PY That script counts disagreements, not detection quality; use intersection over union and class-specific precision and recall when the app depends on bounding boxes. Make a human review procedure part of the trial, since “ground truth” produced by one of the competing services would favor that service. I would not accept a vendor’s public benchmark as the procurement test, because its image distribution, annotation rules, and decision threshold are unlikely to match yours. Amazon Rekognition wins on setup; ONNX Runtime wins on control Compare two concrete options: Amazon Rekognition DetectLabels as the bought service and ONNX Runtime 1.20 running a properly licensed vision model as the in-house path. Rekognition wins when its labels match your decision, request volume is uncertain, and you need an operational endpoint quickly; you pay per applicable API request, plus engineering time for mapping labels, handling failures, and reviewing AWS service terms. ONNX Runtime wins when you need a fixed preprocessing path, local inference, or tighter control over output formats; you pay for model selection, compute, deployment, monitoring, and an owner for every regression. Neither option should receive credit for work it does not perform. Rekognition’s MinConfidence parameter can filter returned labels, but a setting of 80 is a threshold to tune against your error costs, not proof that returned results are correct 80% of the time. ONNX Runtime executes a model efficiently, but it does not supply an appropriate model, usable training data, or a license to ship the weights. If you consider an Ultralytics YOLO11 export, review its AGPL-3.0 and enterprise licensing paths with counsel before treating an ONNX file as unrestricted. Use OpenCV 4.10 to make resizing, color conversion, and image orientation explicit in the trial harness. Record the exported ONNX opset, such as 17 where compatible, and the ONNX Runtime execution provider, such as CPUExecutionProvider or CUDAExecutionProvider; these settings matter because a benchmark from one preprocessing and hardware path does not establish production latency on another. If deployment needs NVIDIA TensorRT 10 or Triton Inference Server 2.50, test the exported graph there before approving a model, since a successful notebook inference does not prove the target runtime accepts every operation. Set a 200 ms p95 server-side inference budget as a provisional design target if that fits your app, and measure it under the concurrency you intend to support. Separate decode, preprocessing, inference, and network time using OpenTelemetry traces; a vendor may have fast model execution while upload and response transfer dominate the user-visible wait. Track a Prometheus latency histogram rather than an average, because the p95 estimated with histogram_quantile() will expose slow requests that an average conceals. Read Custom Vision Model or Pretrained API Which Fits Your First App before soliciting model proposals. I would make reversibility the earlier decision, because an excellent model is a poor purchase if you cannot reproduce its inputs and outputs elsewhere. The contract can erase an apparent accuracy advantage Run the technical trial in parallel with a contract review. Ask whether uploaded images are retained, whether they can be used to improve the supplier’s services, where processing occurs, how deletion is verified, and what changes require notice. Get the answers in the governing agreement or service terms, not only in a sales email, because your team will need enforceable terms if policies change. Price three years of use with a volume model you can explain. For example, treat 1 million images per month as a planning scenario to revise, and include retries, duplicate submissions, minimum commitments, storage, outbound transfer, and human review. Price the in-house alternative with compute, a spare-capacity allowance, model maintenance, and on-call time. Compare both at low and high volume: per-request pricing can be attractive while demand is uncertain, whereas owned capacity becomes easier to justify when utilization is steady. Then ask the vendor to perform an exit drill. Give its team a written request for your available images, annotations, outputs, and configuration, and time how long it takes to receive a usable export. Require stable identifiers so exported decisions can be joined to your records. A promise that “data is portable” is weak evidence because portability depends on file formats, identifiers, rights, and the effort needed to replay decisions. Read CTOs, Your 2024 GenAI Build-vs-Buy Playbook Is Outdated after pricing that exit. A revised build-versus-buy argument is useful, but I would reject any shortcut from “buying is faster” to “this supplier is replaceable”; the second claim requires an export and replay test. Open-source choices need a contract review too. Check model-weight terms separately from framework terms, and retain a software bill of materials using SPDX 3.0 or CycloneDX 1.6 if your organization supports those formats. ONNX Runtime’s license does not grant rights to every model loaded into it, so record the provenance of weights, training datasets where known, and any commercial-use restrictions before counting self-hosting as the safer option. A purchase decision should have a failure gate and an owner Turn the trial into a short approval memo with gates that can fail. One gate should cover error by image slice; another should cover latency under load; a third should cover deletion, export, and contract terms. Assign an owner to each gate, since an unowned exception is likely to become an implicit approval. Set a 30-day shadow period as an initial operating window to adjust, during which the candidate produces results without controlling the final decision. During shadow operation, log the model or API version, request identifier, preprocessing version, threshold, and human override. Sample disagreements for review rather than sending every image back to an annotator, because review cost can overwhelm a low per-request inference price. Give reviewers a documented rule for ambiguous images; inconsistent labels can make either option appear unstable even when its predictions have not changed. Write the rollback trigger before launch. For example, choose a 1% false-accept ceiling for a high-cost decision only if your product owner agrees that it reflects the real cost of errors; otherwise, set a different value and document why. Trigger rollback on a sustained breach in the affected slice, not merely on an overall average. Keep the previous inference path callable until you have tested rollback, because a feature flag that points to a retired endpoint is not a recovery plan. Finally, decide who can change the system. A managed API still needs an owner for changed label taxonomies, quotas, authentication, and vendor notices. A self-hosted model needs an owner for patches, capacity, model updates, and drift investigations. Approve the option whose ongoing duties have named people and budget, since an apparently cheaper path can become expensive when those duties surface during an incident. The first approval artifact should be a paired test set Tomorrow, select one real decision your app makes and collect its first reviewed, consent-appropriate image sample. Define the output schema and error cost before inviting either vendor demos or model proposals. Then send both candidates the same test and ask for a priced export. The winner is the option your team can operate and replace, not the one with the most persuasive demo.</p>
<p>The post <a href="https://deepfriedbytes.com/cto-score-robotics-stacks-before-you-build-or-buy/">CTO, Score Robotics Stacks Before You Build or Buy</a> appeared first on <a href="https://deepfriedbytes.com">Blog about a digital future</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>A vision API can win a demo and lose the procurement decision: the invoice may be predictable while data retention, camera drift, and migration remain untested. For a first production app, I would buy inference only from a vendor that passes a priced exit test. If the contract or interface prevents that test, I would start with a licensed model running in-house, even if its initial accuracy is lower.</p>
<h2>A vendor trial should start with an exit test, not a leaderboard</h2>
<p>Before asking vendors for accuracy claims, write down what you would need to replace them. That means access to the original images where your rights permit it, human-reviewed labels, model outputs, confidence values, timestamps, and enough request metadata to replay a decision. A supplier that returns only a category name makes replacement harder because you cannot reconstruct thresholds or diagnose disagreements after the fact.</p>
<p>Ask each candidate to process the same held-out images through the interface you would actually deploy. A useful trial set includes ordinary images, low-light captures, motion blur, empty frames, and examples from every camera type you expect to support. Set <strong>2,000 labeled images</strong> as an initial trial size to tune, then increase it if important slices contain too few examples to estimate error rates. Keep near-duplicate frames from the same event together when splitting data; otherwise, a test can reward recognition of a scene rather than performance on a new one.</p>
<p>Record results by slice, not just in one aggregate score. A measured <strong>95% overall agreement</strong> in your trial would still be unacceptable if one camera’s false-accept rate exceeded the limit you set for that camera. For each vendor, report false accepts and false rejects at a threshold selected on a separate development set. Do not move the threshold after inspecting held-out results, because doing so turns the test set into another tuning set.</p>
<p>The simplest comparison artifact is a JSON Lines file with one reviewed truth value and one prediction per candidate. The following script runs with Python’s standard library; give it an <code>eval.jsonl</code> file whose rows contain <code>slice</code>, <code>truth</code>, <code>api</code>, and <code>onnx</code> fields. Use the same categorical output vocabulary for both candidates.</p>
<pre>python3 - &lt;&lt;'PY'
import json
from collections import defaultdict
rows = [json.loads(s) for s in open("eval.jsonl") if s.strip()]
by = defaultdict(lambda: [0, 0])
for r in rows:
    for name in ("api", "onnx"):
        key = (name, r["slice"])
        by[key][0] += int(r[name] != r["truth"])
        by[key][1] += 1
for (name, sl), (errors, n) in sorted(by.items()):
    print(name, sl, f"errors={errors}/{n}", f"rate={errors/n:.3f}")
PY</pre>
<p>That script counts disagreements, not detection quality; use intersection over union and class-specific precision and recall when the app depends on bounding boxes. Make a human review procedure part of the trial, since “ground truth” produced by one of the competing services would favor that service. I would <strong>not</strong> accept a vendor’s public benchmark as the procurement test, because its image distribution, annotation rules, and decision threshold are unlikely to match yours.</p>
<h2>Amazon Rekognition wins on setup; ONNX Runtime wins on control</h2>
<p>Compare two concrete options: <strong>Amazon Rekognition DetectLabels</strong> as the bought service and <strong>ONNX Runtime 1.20</strong> running a properly licensed vision model as the in-house path. Rekognition wins when its labels match your decision, request volume is uncertain, and you need an operational endpoint quickly; you pay per applicable API request, plus engineering time for mapping labels, handling failures, and reviewing AWS service terms. ONNX Runtime wins when you need a fixed preprocessing path, local inference, or tighter control over output formats; you pay for model selection, compute, deployment, monitoring, and an owner for every regression.</p>
<p>Neither option should receive credit for work it does not perform. Rekognition’s <code>MinConfidence</code> parameter can filter returned labels, but a setting of <strong>80</strong> is a threshold to tune against your error costs, not proof that returned results are correct 80% of the time. ONNX Runtime executes a model efficiently, but it does not supply an appropriate model, usable training data, or a license to ship the weights. If you consider an Ultralytics YOLO11 export, review its AGPL-3.0 and enterprise licensing paths with counsel before treating an ONNX file as unrestricted.</p>
<p>Use OpenCV 4.10 to make resizing, color conversion, and image orientation explicit in the trial harness. Record the exported ONNX opset, such as <strong>17</strong> where compatible, and the ONNX Runtime execution provider, such as <code>CPUExecutionProvider</code> or <code>CUDAExecutionProvider</code>; these settings matter because a benchmark from one preprocessing and hardware path does not establish production latency on another. If deployment needs NVIDIA TensorRT 10 or Triton Inference Server 2.50, test the exported graph there before approving a model, since a successful notebook inference does not prove the target runtime accepts every operation.</p>
<p>Set a <strong>200 ms p95</strong> server-side inference budget as a provisional design target if that fits your app, and measure it under the concurrency you intend to support. Separate decode, preprocessing, inference, and network time using OpenTelemetry traces; a vendor may have fast model execution while upload and response transfer dominate the user-visible wait. Track a Prometheus latency histogram rather than an average, because the p95 estimated with <code>histogram_quantile()</code> will expose slow requests that an average conceals.</p>
<p>Read <a href=/custom-vision-model-or-pretrained-api-which-fits-your-first-app/>Custom Vision Model or Pretrained API Which Fits Your First App</a> before soliciting model proposals. I would make reversibility the earlier decision, because an excellent model is a poor purchase if you cannot reproduce its inputs and outputs elsewhere.</p>
<h2>The contract can erase an apparent accuracy advantage</h2>
<p>Run the technical trial in parallel with a contract review. Ask whether uploaded images are retained, whether they can be used to improve the supplier’s services, where processing occurs, how deletion is verified, and what changes require notice. Get the answers in the governing agreement or service terms, not only in a sales email, because your team will need enforceable terms if policies change.</p>
<p>Price three years of use with a volume model you can explain. For example, treat <strong>1 million images per month</strong> as a planning scenario to revise, and include retries, duplicate submissions, minimum commitments, storage, outbound transfer, and human review. Price the in-house alternative with compute, a spare-capacity allowance, model maintenance, and on-call time. Compare both at low and high volume: per-request pricing can be attractive while demand is uncertain, whereas owned capacity becomes easier to justify when utilization is steady.</p>
<p>Then ask the vendor to perform an exit drill. Give its team a written request for your available images, annotations, outputs, and configuration, and time how long it takes to receive a usable export. Require stable identifiers so exported decisions can be joined to your records. A promise that “data is portable” is weak evidence because portability depends on file formats, identifiers, rights, and the effort needed to replay decisions.</p>
<p>Read <a href=/ctos-your-2024-genai-build-vs-buy-playbook-is-outdated/>CTOs, Your 2024 GenAI Build-vs-Buy Playbook Is Outdated</a> after pricing that exit. A revised build-versus-buy argument is useful, but I would reject any shortcut from “buying is faster” to “this supplier is replaceable”; the second claim requires an export and replay test.</p>
<p>Open-source choices need a contract review too. Check model-weight terms separately from framework terms, and retain a software bill of materials using SPDX 3.0 or CycloneDX 1.6 if your organization supports those formats. ONNX Runtime’s license does not grant rights to every model loaded into it, so record the provenance of weights, training datasets where known, and any commercial-use restrictions before counting self-hosting as the safer option.</p>
<h2>A purchase decision should have a failure gate and an owner</h2>
<p>Turn the trial into a short approval memo with gates that can fail. One gate should cover error by image slice; another should cover latency under load; a third should cover deletion, export, and contract terms. Assign an owner to each gate, since an unowned exception is likely to become an implicit approval. Set a <strong>30-day</strong> shadow period as an initial operating window to adjust, during which the candidate produces results without controlling the final decision.</p>
<p>During shadow operation, log the model or API version, request identifier, preprocessing version, threshold, and human override. Sample disagreements for review rather than sending every image back to an annotator, because review cost can overwhelm a low per-request inference price. Give reviewers a documented rule for ambiguous images; inconsistent labels can make either option appear unstable even when its predictions have not changed.</p>
<p>Write the rollback trigger before launch. For example, choose a <strong>1% false-accept ceiling</strong> for a high-cost decision only if your product owner agrees that it reflects the real cost of errors; otherwise, set a different value and document why. Trigger rollback on a sustained breach in the affected slice, not merely on an overall average. Keep the previous inference path callable until you have tested rollback, because a feature flag that points to a retired endpoint is not a recovery plan.</p>
<p>Finally, decide who can change the system. A managed API still needs an owner for changed label taxonomies, quotas, authentication, and vendor notices. A self-hosted model needs an owner for patches, capacity, model updates, and drift investigations. Approve the option whose ongoing duties have named people and budget, since an apparently cheaper path can become expensive when those duties surface during an incident.</p>
<h2>The first approval artifact should be a paired test set</h2>
<p>Tomorrow, select one real decision your app makes and collect its first reviewed, consent-appropriate image sample. Define the output schema and error cost before inviting either vendor demos or model proposals. Then send both candidates the same test and ask for a priced export. The winner is the option your team can operate and replace, not the one with the most persuasive demo.</p>
<p>The post <a href="https://deepfriedbytes.com/cto-score-robotics-stacks-before-you-build-or-buy/">CTO, Score Robotics Stacks Before You Build or Buy</a> appeared first on <a href="https://deepfriedbytes.com">Blog about a digital future</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>comments@deepfriedbytes.com (Keith Elder &amp; Chris Woodruff)</dc:creator></item>
		<item>
		<title>RAG vs Fine-Tuning in Your First GenAI Backend</title>
		<link>https://deepfriedbytes.com/rag-vs-fine-tuning-in-your-first-genai-backend/</link>
		
		
		<pubDate>Tue, 06 Oct 2026 09:58:34 +0000</pubDate>
				<category><![CDATA[Generative AI]]></category>
		<category><![CDATA[AI]]></category>
		<category><![CDATA[AI Integration]]></category>
		<category><![CDATA[AI Web Solutions]]></category>
		<guid isPermaLink="false">https://deepfriedbytes.com/rag-vs-fine-tuning-in-your-first-genai-backend/</guid>

					<description><![CDATA[<p>A coding assistant does not need to understand an entire repository before it can answer a developer’s question. It needs to find the right code, show where it found it, and avoid presenting stale guesses as facts. For a first implementation, I would choose live repository search over a vector index. Embeddings become worthwhile when real questions repeatedly defeat symbol and text search—not simply because the feature uses generative AI. Live repository search is the better default for code questions Consider a developer asking, “Where do we reject an expired session token?” The likely answer has a function name, an error string, a test, or a call site that ripgrep can find in the current checkout. A coding assistant can search those candidates, read bounded excerpts, and ask the model to explain the path from request handling to rejection. This approach wins when questions mention identifiers, configuration keys, endpoints, stack traces, or behavior with recognizable vocabulary, because those clues already exist as searchable text. Live search also gives a backend developer a familiar consistency model: the assistant reads the same revision the developer is inspecting. git supplies the commit SHA; rg supplies file paths and line numbers; Tree-sitter can expand a hit to its containing function when a few matching lines are insufficient. No background indexing job has to catch up after a merge. Treat Generative AI for Software Development: Practical Use Cases as a menu of candidate tasks rather than evidence that every coding task needs an embeddings index. The first version can be deliberately small. This Python 3 script searches a checked-out repository for a literal phrase, excludes two common dependency directories, and prints a bounded set of matches. Run it from the repository root after installing ripgrep: #!/usr/bin/env python3 import subprocess import sys if len(sys.argv) != 2: raise SystemExit("usage: python3 search.py PHRASE") cmd = ["rg", "-n", "-F", "-m", "2", "--glob", "!vendor/**", "--glob", "!node_modules/**", "--", sys.argv[1], "."] result = subprocess.run(cmd, text=True, capture_output=True) if result.returncode not in (0, 1): raise SystemExit(result.stderr) print("\n".join(result.stdout.splitlines()[:40])) Here, -F would normally be written as an inline flag, but the important behavior is that ripgrep treats the query as a literal phrase rather than a regular expression. The 40-line output cap is a starting limit to tune against answer quality and prompt size, not a measured optimum. In a service, avoid collecting every match before applying that cap: search within authorized paths, stream results, and stop once enough distinct files have been inspected. Add a second pass for call sites or tests only when the first pass leaves an unresolved question. I would not embed the entire repository on day one, because an index introduces update, deletion, and access-control work before there is evidence that lexical search misses important answers. Live search has costs too: repeated disk reads, poor matches for questions that use different words from the code, and the need to rank noisy hits. Those costs are visible in a request trace, which makes them easier to justify or fix than an index built on assumption. Vector retrieval wins when developers ask about concepts the code never names Now change the question to, “Why can a cancelled job still produce an invoice?” The relevant implementation may be spread across a queue consumer, a state transition, and an event handler without using the words “cancelled” and “invoice” together. A preindexed vector search can surface semantically related passages that literal matching misses. It is more likely to win across several repositories, long design documents, or renamed subsystems, because users cannot reliably guess the identifiers that tie those sources together. The competing approaches have distinct bills. Live search with ripgrep wins for fresh, identifier-rich questions and costs request-time I/O plus ranking logic. Preindexed retrieval with pgvector wins when conceptual discovery repeatedly matters and costs embedding generation, storage, reindexing, permission filtering, and investigation of stale results. A vector hit is only a candidate, because similarity does not establish that a passage describes the current behavior. If you add an index, make its unit of retrieval useful to a programmer. Chunking at arbitrary character boundaries can separate a condition from the branch it guards, so prefer a function or similarly coherent unit identified with Tree-sitter. Store repository, path, revision, symbol, and access scope beside each chunk. PostgreSQL with pgvector can hold embeddings and metadata together; an HNSW index can accelerate approximate nearest-neighbor search, although its recall and query cost still need testing. The hnsw.ef_search setting is a search-effort knob to tune rather than a value to copy from another workload. Do not force a choice between semantic and exact matches inside the indexed approach. A developer who pastes SessionExpiredError expects the exact symbol to rank highly, so combine vector candidates with BM25 results from a search engine such as Elasticsearch, then rerank the merged set. An initial top-k of 8 is an experiment setting: increase it if relevant files are missed, or decrease it if excerpts crowd out the question and answer. Keep the final context tied to a revision so the model can cite code the developer can still open. I agree with Your GenAI Feature Scales Until Retrieval and Latency Collide that retrieval latency becomes a production constraint, but index freshness deserves equal attention because a fast answer from yesterday’s code can be worse than a slower answer from the current commit. The vector approach earns its extra machinery only when it improves grounded answers under both constraints. Answer quality, not search relevance alone, should decide the winner A search result can look relevant and still lead the model to the wrong conclusion. Build an evaluation set from questions developers actually ask in code review, incident follow-up, and onboarding. For each question, record the revision, acceptable source locations, and what a correct answer must say. A 30-question pilot is a planning size for the first comparison, not a statistically persuasive benchmark; its purpose is to expose failure modes before anyone optimizes a leaderboard number. Run both retrieval approaches against the same repository revisions and the same answer model. Count whether a necessary file appears in the retrieved set using Recall@k, and use MRR to notice when it appears only after several distractions. Neither metric says whether the final explanation is sound, so also check whether the answer cites lines that support its claims, distinguishes tests from production behavior, and says “I cannot establish that” when the evidence is incomplete. Reviewers should mark a correct conclusion with an unsupported citation as a failure, because the assistant has given the developer no reliable way to verify it. Include adversarially ordinary questions: a symbol renamed last week, documentation that contradicts implementation, and two functions with similar names in different services. Re-run the set after a merge to see whether indexed results still point at the intended revision. If vector retrieval improves conceptual questions but regresses exact-symbol questions, add hybrid ranking before declaring it the winner; that fix targets the observed failure rather than replacing a useful search method wholesale. Measure the request path with OpenTelemetry spans for search, excerpt loading, model input preparation, and generation. Use p95 latency rather than only the mean, because slow repository reads or index queries affect the developer waiting on an answer even when most requests are quick. An 800 ms retrieval budget is an example service objective to adjust after measuring your own environment, not a claim about either approach’s speed. Record input tokens and retrieval calls as well, since an apparently cheap search can become expensive when it sends large, repetitive excerpts to the model. The decision rule should be hard to game: adopt the index for a question class only if it raises supported-answer quality without breaching that class’s latency and freshness requirements. Keep live search available for exact identifiers even after adding vectors, because a semantic ranking model has no reason to treat an exact error code as more important than a nearby conceptual match unless the system explicitly tells it to. Permissions and freshness can overturn a retrieval win A repository assistant is also an authorization system. Live search should run only over paths the requester may read; an indexed service must apply the same restriction before returning candidates. Filtering forbidden excerpts after a model has seen them is too late, because the answer can disclose their content. Store access metadata with indexed chunks, invalidate it when permissions change, and test that an unauthorized user cannot retrieve a restricted file through either exact or semantic queries. Freshness needs an explicit contract. Suppose an index is allowed to lag the main branch by 15 minutes; treat that as a proposed policy ceiling, not a property of the indexing software. Attach the indexed commit SHA to every result and compare it with the requested revision. If they differ beyond the permitted lag, fall back to live search or state plainly that the answer uses an older revision. Silent fallback to stale context makes a code explanation difficult to debug, because the developer and assistant may be reasoning about different programs. Retrieved repository text is untrusted input, even when it comes from a file the developer can read. A comment can tell an assistant to ignore instructions or reveal credentials; it remains source material, not an instruction from the user. Keep tool permissions separate from the language model’s retrieved context, and avoid passing secrets or whole environment files merely because they matched a search. These controls apply to both approaches, while a persistent index adds the obligation to remove deleted or newly restricted content from stored copies. Start by collecting real developer questions and implementing bounded, permission-aware live search at a pinned commit. Ask reviewers to mark the files and lines each answer actually needed. Once that baseline exists, test an indexed retriever on the questions it misses. If vectors cannot produce more supported answers at an acceptable freshness and latency cost, keep the simpler system and improve its ranking instead.</p>
<p>The post <a href="https://deepfriedbytes.com/rag-vs-fine-tuning-in-your-first-genai-backend/">RAG vs Fine-Tuning in Your First GenAI Backend</a> appeared first on <a href="https://deepfriedbytes.com">Blog about a digital future</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>A coding assistant does not need to understand an entire repository before it can answer a developer’s question. It needs to find the right code, show where it found it, and avoid presenting stale guesses as facts. For a first implementation, I would choose live repository search over a vector index. Embeddings become worthwhile when real questions repeatedly defeat symbol and text search—not simply because the feature uses generative AI.</p>
<h2>Live repository search is the better default for code questions</h2>
<p>Consider a developer asking, “Where do we reject an expired session token?” The likely answer has a function name, an error string, a test, or a call site that <strong>ripgrep</strong> can find in the current checkout. A coding assistant can search those candidates, read bounded excerpts, and ask the model to explain the path from request handling to rejection. This approach wins when questions mention identifiers, configuration keys, endpoints, stack traces, or behavior with recognizable vocabulary, because those clues already exist as searchable text.</p>
<p>Live search also gives a backend developer a familiar consistency model: the assistant reads the same revision the developer is inspecting. <strong>git</strong> supplies the commit SHA; <strong>rg</strong> supplies file paths and line numbers; <strong>Tree-sitter</strong> can expand a hit to its containing function when a few matching lines are insufficient. No background indexing job has to catch up after a merge. Treat <a href=/generative-ai-for-software-development-practical-use-cases/>Generative AI for Software Development: Practical Use Cases</a> as a menu of candidate tasks rather than evidence that every coding task needs an embeddings index.</p>
<p>The first version can be deliberately small. This Python 3 script searches a checked-out repository for a literal phrase, excludes two common dependency directories, and prints a bounded set of matches. Run it from the repository root after installing <strong>ripgrep</strong>:</p>
<pre>#!/usr/bin/env python3
import subprocess
import sys
if len(sys.argv) != 2:
    raise SystemExit("usage: python3 search.py PHRASE")
cmd = ["rg", "-n", "-F", "-m", "2", "--glob", "!vendor/**",
       "--glob", "!node_modules/**", "--", sys.argv[1], "."]
result = subprocess.run(cmd, text=True, capture_output=True)
if result.returncode not in (0, 1):
    raise SystemExit(result.stderr)
print("\n".join(result.stdout.splitlines()[:40]))</pre>
<p>Here, <code>-F</code> would normally be written as an inline flag, but the important behavior is that ripgrep treats the query as a literal phrase rather than a regular expression. The <strong>40-line output cap</strong> is a starting limit to tune against answer quality and prompt size, not a measured optimum. In a service, avoid collecting every match before applying that cap: search within authorized paths, stream results, and stop once enough distinct files have been inspected. Add a second pass for call sites or tests only when the first pass leaves an unresolved question.</p>
<p>I would <strong>not</strong> embed the entire repository on day one, because an index introduces update, deletion, and access-control work before there is evidence that lexical search misses important answers. Live search has costs too: repeated disk reads, poor matches for questions that use different words from the code, and the need to rank noisy hits. Those costs are visible in a request trace, which makes them easier to justify or fix than an index built on assumption.</p>
<h2>Vector retrieval wins when developers ask about concepts the code never names</h2>
<p>Now change the question to, “Why can a cancelled job still produce an invoice?” The relevant implementation may be spread across a queue consumer, a state transition, and an event handler without using the words “cancelled” and “invoice” together. A preindexed vector search can surface semantically related passages that literal matching misses. It is more likely to win across several repositories, long design documents, or renamed subsystems, because users cannot reliably guess the identifiers that tie those sources together.</p>
<p>The competing approaches have distinct bills. <strong>Live search with ripgrep</strong> wins for fresh, identifier-rich questions and costs request-time I/O plus ranking logic. <strong>Preindexed retrieval with pgvector</strong> wins when conceptual discovery repeatedly matters and costs embedding generation, storage, reindexing, permission filtering, and investigation of stale results. A vector hit is only a candidate, because similarity does not establish that a passage describes the current behavior.</p>
<p>If you add an index, make its unit of retrieval useful to a programmer. Chunking at arbitrary character boundaries can separate a condition from the branch it guards, so prefer a function or similarly coherent unit identified with Tree-sitter. Store repository, path, revision, symbol, and access scope beside each chunk. <strong>PostgreSQL</strong> with <strong>pgvector</strong> can hold embeddings and metadata together; an HNSW index can accelerate approximate nearest-neighbor search, although its recall and query cost still need testing. The <strong>hnsw.ef_search</strong> setting is a search-effort knob to tune rather than a value to copy from another workload.</p>
<p>Do not force a choice between semantic and exact matches inside the indexed approach. A developer who pastes <em>SessionExpiredError</em> expects the exact symbol to rank highly, so combine vector candidates with <strong>BM25</strong> results from a search engine such as <strong>Elasticsearch</strong>, then rerank the merged set. An initial <strong>top-k of 8</strong> is an experiment setting: increase it if relevant files are missed, or decrease it if excerpts crowd out the question and answer. Keep the final context tied to a revision so the model can cite code the developer can still open.</p>
<p>I agree with <a href=/your-genai-feature-scales-until-retrieval-and-latency-collide/>Your GenAI Feature Scales Until Retrieval and Latency Collide</a> that retrieval latency becomes a production constraint, but index freshness deserves equal attention because a fast answer from yesterday’s code can be worse than a slower answer from the current commit. The vector approach earns its extra machinery only when it improves grounded answers under both constraints.</p>
<h2>Answer quality, not search relevance alone, should decide the winner</h2>
<p>A search result can look relevant and still lead the model to the wrong conclusion. Build an evaluation set from questions developers actually ask in code review, incident follow-up, and onboarding. For each question, record the revision, acceptable source locations, and what a correct answer must say. A <strong>30-question pilot</strong> is a planning size for the first comparison, not a statistically persuasive benchmark; its purpose is to expose failure modes before anyone optimizes a leaderboard number.</p>
<p>Run both retrieval approaches against the same repository revisions and the same answer model. Count whether a necessary file appears in the retrieved set using <strong>Recall@k</strong>, and use <strong>MRR</strong> to notice when it appears only after several distractions. Neither metric says whether the final explanation is sound, so also check whether the answer cites lines that support its claims, distinguishes tests from production behavior, and says “I cannot establish that” when the evidence is incomplete. Reviewers should mark a correct conclusion with an unsupported citation as a failure, because the assistant has given the developer no reliable way to verify it.</p>
<p>Include adversarially ordinary questions: a symbol renamed last week, documentation that contradicts implementation, and two functions with similar names in different services. Re-run the set after a merge to see whether indexed results still point at the intended revision. If vector retrieval improves conceptual questions but regresses exact-symbol questions, add hybrid ranking before declaring it the winner; that fix targets the observed failure rather than replacing a useful search method wholesale.</p>
<p>Measure the request path with <strong>OpenTelemetry</strong> spans for search, excerpt loading, model input preparation, and generation. Use <strong>p95 latency</strong> rather than only the mean, because slow repository reads or index queries affect the developer waiting on an answer even when most requests are quick. An <strong>800 ms retrieval budget</strong> is an example service objective to adjust after measuring your own environment, not a claim about either approach’s speed. Record input tokens and retrieval calls as well, since an apparently cheap search can become expensive when it sends large, repetitive excerpts to the model.</p>
<p>The decision rule should be hard to game: adopt the index for a question class only if it raises supported-answer quality without breaching that class’s latency and freshness requirements. Keep live search available for exact identifiers even after adding vectors, because a semantic ranking model has no reason to treat an exact error code as more important than a nearby conceptual match unless the system explicitly tells it to.</p>
<h2>Permissions and freshness can overturn a retrieval win</h2>
<p>A repository assistant is also an authorization system. Live search should run only over paths the requester may read; an indexed service must apply the same restriction <em>before</em> returning candidates. Filtering forbidden excerpts after a model has seen them is too late, because the answer can disclose their content. Store access metadata with indexed chunks, invalidate it when permissions change, and test that an unauthorized user cannot retrieve a restricted file through either exact or semantic queries.</p>
<p>Freshness needs an explicit contract. Suppose an index is allowed to lag the main branch by <strong>15 minutes</strong>; treat that as a proposed policy ceiling, not a property of the indexing software. Attach the indexed commit SHA to every result and compare it with the requested revision. If they differ beyond the permitted lag, fall back to live search or state plainly that the answer uses an older revision. Silent fallback to stale context makes a code explanation difficult to debug, because the developer and assistant may be reasoning about different programs.</p>
<p>Retrieved repository text is untrusted input, even when it comes from a file the developer can read. A comment can tell an assistant to ignore instructions or reveal credentials; it remains source material, not an instruction from the user. Keep tool permissions separate from the language model’s retrieved context, and avoid passing secrets or whole environment files merely because they matched a search. These controls apply to both approaches, while a persistent index adds the obligation to remove deleted or newly restricted content from stored copies.</p>
<p>Start by collecting real developer questions and implementing bounded, permission-aware live search at a pinned commit. Ask reviewers to mark the files and lines each answer actually needed. Once that baseline exists, test an indexed retriever on the questions it misses. If vectors cannot produce more supported answers at an acceptable freshness and latency cost, keep the simpler system and improve its ranking instead.</p>
<p>The post <a href="https://deepfriedbytes.com/rag-vs-fine-tuning-in-your-first-genai-backend/">RAG vs Fine-Tuning in Your First GenAI Backend</a> appeared first on <a href="https://deepfriedbytes.com">Blog about a digital future</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>comments@deepfriedbytes.com (Keith Elder &amp; Chris Woodruff)</dc:creator></item>
		<item>
		<title>CTOs, Your 2024 GenAI Build-vs-Buy Playbook Is Outdated</title>
		<link>https://deepfriedbytes.com/ctos-your-2024-genai-build-vs-buy-playbook-is-outdated/</link>
		
		
		<pubDate>Wed, 30 Sep 2026 11:05:16 +0000</pubDate>
				<category><![CDATA[Generative AI]]></category>
		<category><![CDATA[AI]]></category>
		<category><![CDATA[AI Integration]]></category>
		<category><![CDATA[AI Web Solutions]]></category>
		<guid isPermaLink="false">https://deepfriedbytes.com/ctos-your-2024-genai-build-vs-buy-playbook-is-outdated/</guid>

					<description><![CDATA[<p>“Build or buy the AI” is the wrong question for a CTO in 2026. The useful boundary is narrower: buy model capability until your own evidence shows that owning inference or training improves the economics. Build the evaluation, data controls, and fallback paths yourself. Those assets remain valuable when an API price changes, an open-weight model improves, or a supplier’s terms stop fitting your product. The default has shifted from owning a model to owning the decision boundary Two years ago, advice to prototype with an API and then train a custom model often sounded like a natural progression. I would no longer treat training as the next stage. Better multimodal APIs have made a purchased baseline more useful, while serving software such as vLLM has made self-hosting a credible alternative without making training necessary. These changes separate three decisions that older build-versus-buy advice bundled together: whose weights to use, where inference runs, and who controls the product’s acceptance criteria. My default is to buy access to a capable model, own the evaluation set, and keep the inference boundary replaceable. I would not train a proprietary vision model or fine-tune a language model merely because a pilot works, because pilot traffic rarely reveals enough about failure distribution or operating cost to justify an irreversible investment. Training becomes defensible when a labeled dataset represents production conditions, a purchased baseline misses a quantified requirement, and the expected gain exceeds annotation, retraining, and serving costs. This is not an argument for letting a supplier define success. A CTO should own the ground-truth examples, review rules, data-retention requirements, and release gate. For generated answers, that gate may require an answer to cite an authorized source and refuse when evidence is absent. For images, it may require a specified precision at a tolerable false-rejection rate. Those are product decisions; a vendor’s aggregate benchmark cannot substitute for them because its test distribution and error costs differ from yours. Custom Vision Model or Pretrained API Which Fits Your First App frames the first application as a model choice; I would make the first choice a reversible contract and test harness instead, because a promising first model says little about how cheaply the second one can be substituted. Put API calls behind an internal interface that records model identifier, prompt or preprocessing version, request cost, latency, and adjudicated outcome. That interface is worth building even if the supplier is never replaced. Recent platform changes have made old procurement shortcuts unreliable OpenAI’s Structured Outputs, introduced in 2024 with JSON Schema enforcement through strict: true on supported models, weakened the old claim that teams must fine-tune simply to get parseable fields. Schema conformity does not establish factual correctness, however, because a well-formed JSON object can still contain an invented value. Similarly, multimodal APIs can establish an image baseline quickly, but their availability does not prove that their terms permit every image to be sent off-site. The current procurement question is therefore less “Can an API do this?” and more “Which obligations survive a provider change?” Self-hosting has also changed. vLLM’s OpenAI-compatible server and Hugging Face Transformers reduce the work needed to try open-weight models, while ONNX Runtime can simplify deployment of some vision pipelines. None removes the cost of operating them: somebody still owns GPU capacity, upgrades, security patches, load testing, and incident response. An open-weight license must also be checked model by model, because “downloadable” does not establish permission for a particular commercial use. Older advice to compare only token or per-image prices is now especially weak. A quote omits retries, image resizing, prompt caching rules, minimum capacity, and human review. It can also hide a costly exit. Ask vendors for retention and deletion terms, region controls, model-version notification, rate limits, and an export path for logs and annotations. If personal data is involved, check the processor agreement against GDPR Article 28 rather than treating an API’s security page as a contract, because operational assurances and legal obligations are different artifacts. Do not infer that a standards badge settles model risk, either. ISO/IEC 42001:2023 describes an AI management system, and the NIST AI RMF 1.0 offers a risk-management framework; neither certifies that a specific response is correct for your application. Use those frameworks to organize ownership and evidence. Use your own test set to decide whether to ship. Pretrained APIs win the first test; self-hosting wins only under a proven constraint The explicit comparison is between a managed pretrained API and self-hosted open-weight inference. The managed API wins when demand is uncertain, model quality changes quickly, and a small team needs to test a product assumption: its cost is variable request spend, vendor dependence, and whatever data-handling restrictions the contract imposes. Self-hosting wins when sustained utilization, residency requirements, or a necessary model modification outweigh operations overhead: its cost is GPU capacity, engineering time, on-call responsibility, and often idle headroom. Neither option wins merely because its demo is faster. Set thresholds before running the comparison. For example, a p95 end-to-end latency target of 800 ms is a value to tune to the user interaction, not a universal benchmark. A 30-day shadow run is a proposed observation window, long enough to include at least some traffic variation but not a substitute for seasonal testing. A 95% precision floor might be an application’s chosen acceptance criterion when false positives trigger expensive review; another product may rationally favor recall. Make the assumptions explicit so a team cannot move the goalposts after seeing a preferred model’s results. Measure cost per accepted result, not cost per request. A cheap call that fails and is retried twice may cost more than one expensive successful call; a response requiring manual correction has another cost again. Record p50 and p95 latency, error rate, retry rate, abstention rate, and reviewer time by model version. OpenTelemetry can connect application traces to inference spans, but pin the semantic-convention version used by your instrumentation because GenAI attribute names have evolved. Export the underlying events as well as a dashboard so a provider switch does not erase your comparison. The following standard-library Python example runs without an SDK. Its 100 generated rows and dollar amounts are illustrative inputs, not measured performance; replace the rows with request logs to calculate a meaningful decision metric. python3 - &#60;&#60;'PY' import math rows = [(110 + (i * 37) % 390, 0.002 + (i % 4) * 0.001, i % 9 != 0) for i in range(100)] latencies = sorted(ms for ms, cost, accepted in rows) accepted = sum(ok for ms, cost, ok in rows) spend = sum(cost for ms, cost, ok in rows) p95 = latencies[math.ceil(0.95 * len(latencies)) - 1] print(f"p95_ms={p95}") print(f"accepted={accepted}/{len(rows)}") print(f"cost_per_accepted_usd={spend / accepted:.4f}") PY Run the same scoring code on both options’ logs, with reviewer decisions attached to identical requests. If a self-hosted model misses the acceptance floor, lower per-request spend is not a saving, because the missing quality must be paid for through retries, review, or lost users. Separate the evidence that changes a model decision from the evidence that changes a system decision Not every bad AI result calls for a different model. In a retrieval-backed feature, a correct model cannot cite a document that retrieval failed to supply. In a vision pipeline, a stronger classifier cannot recover detail discarded by an aggressive image resize. Before approving training or a hosting migration, require an error review that assigns each failure to input quality, retrieval or preprocessing, model behavior, policy, or application integration. The categories make spending accountable because each has a different plausible remedy. Your GenAI Feature Scales Until Retrieval and Latency Collide correctly warns that inference is not the whole response path; I would resist treating that collision as a reason to own model serving, because a slow search index remains slow after an API is replaced with a GPU. Instrument request ingress, retrieval, reranking, inference, and post-processing separately. For image requests, record decode and preprocessing time as well as inference. Compare p95 traces at the same concurrency, since a single-request benchmark conceals queueing. Keep model and system scorecards separate. A model scorecard can show precision, recall, calibration, and abstention on a versioned test set. A system scorecard should show end-to-end latency, cost per accepted result, review load, availability, and the proportion of requests excluded by data policy. If both improve after a change, trace the mechanism before attributing the gain to the model; otherwise, the next procurement decision may reward the wrong supplier. This separation also makes an exit plan credible. Store evaluation examples in a portable format, version transformations, and preserve enough request metadata to replay cases without retaining prohibited content. Test a second provider or a locally served model against the same gate before negotiating a long commitment. A fallback that has never passed that gate is a negotiating story, not an operational option. Run a shadow test before signing an annual contract Take one representative week of requests, remove data that cannot be used for testing, and have reviewers label a failure sample before comparing suppliers. Then run a managed API and a self-hosted candidate in shadow mode against the same acceptance rules. Ask finance for fully loaded costs and legal for the actual data terms. Sign for capacity only after the traces show which constraint ownership would remove.</p>
<p>The post <a href="https://deepfriedbytes.com/ctos-your-2024-genai-build-vs-buy-playbook-is-outdated/">CTOs, Your 2024 GenAI Build-vs-Buy Playbook Is Outdated</a> appeared first on <a href="https://deepfriedbytes.com">Blog about a digital future</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>“Build or buy the AI” is the wrong question for a CTO in 2026. The useful boundary is narrower: buy model capability until your own evidence shows that owning inference or training improves the economics. Build the evaluation, data controls, and fallback paths yourself. Those assets remain valuable when an API price changes, an open-weight model improves, or a supplier’s terms stop fitting your product.</p>
<h2>The default has shifted from owning a model to owning the decision boundary</h2>
<p>Two years ago, advice to prototype with an API and then train a custom model often sounded like a natural progression. I would no longer treat training as the next stage. Better multimodal APIs have made a purchased baseline more useful, while serving software such as vLLM has made self-hosting a credible alternative without making training necessary. These changes separate three decisions that older build-versus-buy advice bundled together: whose weights to use, where inference runs, and who controls the product’s acceptance criteria.</p>
<p>My default is to buy access to a capable model, own the evaluation set, and keep the inference boundary replaceable. I would <strong>not</strong> train a proprietary vision model or fine-tune a language model merely because a pilot works, because pilot traffic rarely reveals enough about failure distribution or operating cost to justify an irreversible investment. Training becomes defensible when a labeled dataset represents production conditions, a purchased baseline misses a quantified requirement, and the expected gain exceeds annotation, retraining, and serving costs.</p>
<p>This is not an argument for letting a supplier define success. A CTO should own the ground-truth examples, review rules, data-retention requirements, and release gate. For generated answers, that gate may require an answer to cite an authorized source and refuse when evidence is absent. For images, it may require a specified precision at a tolerable false-rejection rate. Those are product decisions; a vendor’s aggregate benchmark cannot substitute for them because its test distribution and error costs differ from yours.</p>
<p><a href=/custom-vision-model-or-pretrained-api-which-fits-your-first-app/>Custom Vision Model or Pretrained API Which Fits Your First App</a> frames the first application as a model choice; I would make the first choice a reversible contract and test harness instead, because a promising first model says little about how cheaply the second one can be substituted. Put API calls behind an internal interface that records model identifier, prompt or preprocessing version, request cost, latency, and adjudicated outcome. That interface is worth building even if the supplier is never replaced.</p>
<h2>Recent platform changes have made old procurement shortcuts unreliable</h2>
<p>OpenAI’s Structured Outputs, introduced in 2024 with JSON Schema enforcement through <strong>strict: true</strong> on supported models, weakened the old claim that teams must fine-tune simply to get parseable fields. Schema conformity does not establish factual correctness, however, because a well-formed JSON object can still contain an invented value. Similarly, multimodal APIs can establish an image baseline quickly, but their availability does not prove that their terms permit every image to be sent off-site. The current procurement question is therefore less “Can an API do this?” and more “Which obligations survive a provider change?”</p>
<p>Self-hosting has also changed. vLLM’s OpenAI-compatible server and Hugging Face Transformers reduce the work needed to try open-weight models, while ONNX Runtime can simplify deployment of some vision pipelines. None removes the cost of operating them: somebody still owns GPU capacity, upgrades, security patches, load testing, and incident response. An open-weight license must also be checked model by model, because “downloadable” does not establish permission for a particular commercial use.</p>
<p>Older advice to compare only token or per-image prices is now especially weak. A quote omits retries, image resizing, prompt caching rules, minimum capacity, and human review. It can also hide a costly exit. Ask vendors for retention and deletion terms, region controls, model-version notification, rate limits, and an export path for logs and annotations. If personal data is involved, check the processor agreement against GDPR Article 28 rather than treating an API’s security page as a contract, because operational assurances and legal obligations are different artifacts.</p>
<p>Do not infer that a standards badge settles model risk, either. ISO/IEC 42001:2023 describes an AI management system, and the NIST AI RMF 1.0 offers a risk-management framework; neither certifies that a specific response is correct for your application. Use those frameworks to organize ownership and evidence. Use your own test set to decide whether to ship.</p>
<h2>Pretrained APIs win the first test; self-hosting wins only under a proven constraint</h2>
<p>The explicit comparison is between a <strong>managed pretrained API</strong> and <strong>self-hosted open-weight inference</strong>. The managed API wins when demand is uncertain, model quality changes quickly, and a small team needs to test a product assumption: its cost is variable request spend, vendor dependence, and whatever data-handling restrictions the contract imposes. Self-hosting wins when sustained utilization, residency requirements, or a necessary model modification outweigh operations overhead: its cost is GPU capacity, engineering time, on-call responsibility, and often idle headroom. Neither option wins merely because its demo is faster.</p>
<p>Set thresholds before running the comparison. For example, a <strong>p95 end-to-end latency target of 800 ms</strong> is a value to tune to the user interaction, not a universal benchmark. A <strong>30-day</strong> shadow run is a proposed observation window, long enough to include at least some traffic variation but not a substitute for seasonal testing. A <strong>95% precision floor</strong> might be an application’s chosen acceptance criterion when false positives trigger expensive review; another product may rationally favor recall. Make the assumptions explicit so a team cannot move the goalposts after seeing a preferred model’s results.</p>
<p>Measure cost per <em>accepted result</em>, not cost per request. A cheap call that fails and is retried twice may cost more than one expensive successful call; a response requiring manual correction has another cost again. Record p50 and p95 latency, error rate, retry rate, abstention rate, and reviewer time by model version. OpenTelemetry can connect application traces to inference spans, but pin the semantic-convention version used by your instrumentation because GenAI attribute names have evolved. Export the underlying events as well as a dashboard so a provider switch does not erase your comparison.</p>
<p>The following standard-library Python example runs without an SDK. Its 100 generated rows and dollar amounts are <em>illustrative inputs</em>, not measured performance; replace the rows with request logs to calculate a meaningful decision metric.</p>
<pre>python3 - &lt;&lt;'PY'
import math
rows = [(110 + (i * 37) % 390, 0.002 + (i % 4) * 0.001,
         i % 9 != 0) for i in range(100)]
latencies = sorted(ms for ms, cost, accepted in rows)
accepted = sum(ok for ms, cost, ok in rows)
spend = sum(cost for ms, cost, ok in rows)
p95 = latencies[math.ceil(0.95 * len(latencies)) - 1]
print(f"p95_ms={p95}")
print(f"accepted={accepted}/{len(rows)}")
print(f"cost_per_accepted_usd={spend / accepted:.4f}")
PY</pre>
<p>Run the same scoring code on both options’ logs, with reviewer decisions attached to identical requests. If a self-hosted model misses the acceptance floor, lower per-request spend is not a saving, because the missing quality must be paid for through retries, review, or lost users.</p>
<h2>Separate the evidence that changes a model decision from the evidence that changes a system decision</h2>
<p>Not every bad AI result calls for a different model. In a retrieval-backed feature, a correct model cannot cite a document that retrieval failed to supply. In a vision pipeline, a stronger classifier cannot recover detail discarded by an aggressive image resize. Before approving training or a hosting migration, require an error review that assigns each failure to input quality, retrieval or preprocessing, model behavior, policy, or application integration. The categories make spending accountable because each has a different plausible remedy.</p>
<p><a href=/your-genai-feature-scales-until-retrieval-and-latency-collide/>Your GenAI Feature Scales Until Retrieval and Latency Collide</a> correctly warns that inference is not the whole response path; I would resist treating that collision as a reason to own model serving, because a slow search index remains slow after an API is replaced with a GPU. Instrument request ingress, retrieval, reranking, inference, and post-processing separately. For image requests, record decode and preprocessing time as well as inference. Compare p95 traces at the same concurrency, since a single-request benchmark conceals queueing.</p>
<p>Keep model and system scorecards separate. A model scorecard can show precision, recall, calibration, and abstention on a versioned test set. A system scorecard should show end-to-end latency, cost per accepted result, review load, availability, and the proportion of requests excluded by data policy. If both improve after a change, trace the mechanism before attributing the gain to the model; otherwise, the next procurement decision may reward the wrong supplier.</p>
<p>This separation also makes an exit plan credible. Store evaluation examples in a portable format, version transformations, and preserve enough request metadata to replay cases without retaining prohibited content. Test a second provider or a locally served model against the same gate before negotiating a long commitment. A fallback that has never passed that gate is a negotiating story, not an operational option.</p>
<h2>Run a shadow test before signing an annual contract</h2>
<p>Take one representative week of requests, remove data that cannot be used for testing, and have reviewers label a failure sample before comparing suppliers. Then run a managed API and a self-hosted candidate in shadow mode against the same acceptance rules. Ask finance for fully loaded costs and legal for the actual data terms. Sign for capacity only after the traces show which constraint ownership would remove.</p>
<p>The post <a href="https://deepfriedbytes.com/ctos-your-2024-genai-build-vs-buy-playbook-is-outdated/">CTOs, Your 2024 GenAI Build-vs-Buy Playbook Is Outdated</a> appeared first on <a href="https://deepfriedbytes.com">Blog about a digital future</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>comments@deepfriedbytes.com (Keith Elder &amp; Chris Woodruff)</dc:creator></item>
		<item>
		<title>Your 2024 Crypto Build-vs-Buy Playbook Is Obsolete</title>
		<link>https://deepfriedbytes.com/your-2024-crypto-build-vs-buy-playbook-is-obsolete/</link>
		
		
		<pubDate>Tue, 29 Sep 2026 07:36:09 +0000</pubDate>
				<category><![CDATA[Cryptocurrencies]]></category>
		<category><![CDATA[AI]]></category>
		<category><![CDATA[Blockchain]]></category>
		<guid isPermaLink="false">https://deepfriedbytes.com/your-2024-crypto-build-vs-buy-playbook-is-obsolete/</guid>

					<description><![CDATA[<p>A wallet decision that looked sensible in 2024 can be an expensive mistake in 2026. Ethereum accounts can now delegate execution logic, while custody vendors offer increasingly complete signing and policy services. I would buy the signing and key-custody layer for most teams, then build the transaction policy and recovery process in-house. The exception is a company whose wallet infrastructure is itself the product. Ethereum’s account changes weakened the case for building a signer first Before Ethereum’s Pectra upgrade, a common argument for an in-house wallet stack was that externally owned accounts could not support enough application-specific behavior. That argument is weaker after EIP-7702, activated on Ethereum mainnet on May 7, 2025, according to the Ethereum Foundation’s published schedule. An EOA can authorize a delegation to contract code, allowing developers to design more flexible execution without first moving every user to a new smart-account address. Delegation does not remove the authority of the EOA’s underlying key, however, so it is not a substitute for protecting that key. This changes a CTO’s procurement question. “Can we build account abstraction?” is too broad to guide a decision; “Who controls the signing key, the delegated implementation, and the policy that approves a transfer?” exposes the actual boundaries. ERC-4337 remains relevant for teams using UserOperations, bundlers, and paymasters, while EIP-7702 offers another route to account behavior. Neither protocol decides who can authorize a recovery, who pays when sponsorship fails, or how an incident commander stops withdrawals. Older advice to choose one wallet architecture up front and hide it behind a generic “send transaction” API is now risky because that API obscures whether a request is an EOA transaction, an ERC-4337 UserOperation, or a delegated-account call. EIP-5792’s wallet_sendCalls can help represent batched calls where a wallet supports it, but wallet support and execution semantics must be checked rather than assumed. Put the operation type, chain identifier, expected signer, authorization method, and sponsorship decision into your internal request model. CAIP-2 chain identifiers can keep that model unambiguous when the same address appears on several networks. Cryptocurrency APIs for Developers: Build Secure Wallets is a useful starting point for wallet design, but its title’s build-first implication should not settle the custody decision. A capable team can write a viem 2.x client in days; demonstrating that its signing service will withstand a compromised application credential, a mistaken policy change, and a regional outage is a different project. I would not build a production key-signing service merely to avoid a vendor bill, because that bill is usually easier to bound than the consequences of an untested recovery path. Buy custody when it is a dependency; build it when control is the product The explicit choice is between a managed custody and signing API and an in-house signer using infrastructure such as AWS KMS or an HSM. The managed option wins when a wallet supports another product: it buys an established operational surface for key creation, signing controls, and access management. Its costs are vendor fees, integration work, exit planning, and the risk that a provider’s outage or policy model constrains your releases. The in-house option wins when you need to own signing semantics across providers or can justify dedicated cryptography and operations staff. Its costs include key ceremonies, access reviews, secure deployment, monitoring, and incident exercises, not just code. A cost comparison should price the same trust boundary on both sides. AWS KMS supports the ECC_SECG_P256K1 key specification used for Ethereum-compatible signatures, according to AWS documentation, but that feature alone is not a complete wallet policy engine. Your team still has to control who may call Sign, bind a signature request to an approved transaction, and prevent an application server from turning a broad signing permission into an unlimited withdrawal permission. Conversely, a managed provider is not automatically safe because it advertises multiparty computation: ask which actors can change policy, initiate recovery, or approve a destination, and test those answers in a sandbox. Use a comparable workload before comparing quotes. For example, model 50,000 active wallets and 10,000 signing requests per day as planning assumptions to replace with your forecast, not as claims about a typical deployment. Request a quote for that workload, including recovery events, webhook delivery, additional environments, and support. Alongside it, estimate engineering time for an in-house service, security review, on-call coverage, and an annual recovery exercise. The cheaper API price is not decisive if exporting accounts or recreating policies during an exit requires work your team has not funded. There is also a middle path worth stating precisely: buy key custody but own the approval policy outside the provider. A policy service can require a destination allowlist, a transaction simulation result, and a second approver before it requests a signature. Keep those decisions in an auditable store you control, then restrict the vendor credential so it cannot bypass them through an alternate endpoint. This arrangement wins when portability matters but key operations are not your differentiator; it costs an additional service and a careful review of every vendor permission. Do not describe it as “vendor-neutral” until you have run an exit test with another signer. A successful API call no longer proves that the intended account will execute it Integration advice used to concentrate on authenticating an API request, receiving a transaction hash, and watching for confirmation. That sequence misses an important question for delegated accounts: what code will the account use when the transaction executes? EIP-7702 delegation can change through an on-chain authorization, so an address classified once at onboarding cannot be treated as permanently unchanged. A transaction preview should record the chain, account state, target code, calldata, and block context; the approval service should recheck the facts it relies on immediately before submission. The following viem 2.x script checks whether an Ethereum mainnet address currently exposes an EIP-7702 delegation indicator. Save it as check.mjs, run npm install viem@2, and set ETH_RPC_URL and WALLET_ADDRESS before running node check.mjs: import { createPublicClient, http, isAddress } from 'viem'; import { mainnet } from 'viem/chains'; const address = process.env.WALLET_ADDRESS; if (!address &#124;&#124; !isAddress(address)) throw new Error('Set WALLET_ADDRESS'); const client = createPublicClient({ chain: mainnet, transport: http(process.env.ETH_RPC_URL) }); const code = await client.getCode({ address }); const delegated = /^0xef0100[0-9a-f]{40}$/i.test(code ?? ''); console.log({ address, delegated, implementation: delegated ? `0x${code.slice(8)}` : null }); This is an inspection aid, not an approval check: it reads current code but does not verify the implementation’s behavior, prove who authorized it, or guarantee the state at a later block. Where approval depends on a particular implementation, pin its address and reviewed code hash, simulate the proposed call against recent state, and fail closed if the delegation changes. Use a separate review for upgrades to that implementation. A passkey login under WebAuthn or a successful SIWE message under EIP-4361 proves something about authentication; neither, by itself, proves that the resulting transfer matches the user’s intent. I would use Cryptocurrency APIs for Developers Secure Wallet Integration for integration vocabulary, not as evidence that an SDK settles this trust boundary. ERC-1271 contract signatures, WalletConnect v2 sessions, provider permissions under EIP-1193, and delegated-account execution all give an application different ways to receive an apparently valid approval. The policy service must specify which of those approvals is acceptable for each operation, because treating every “signature verified” result as equivalent makes recovery and high-value transfers harder to defend. The procurement test should be an exit and incident exercise Over the last two years, the operational question has also become harder to postpone. In the EU, MiCA’s crypto-asset service provider provisions began applying on December 30, 2024; whether they apply to a particular wallet business depends on its services and jurisdiction. DORA has applied since January 17, 2025, to covered financial entities and affects their management of ICT third-party risk. Neither rule means every wallet team needs the same licence or contract. Both make “we will document our provider dependencies later” poor advice for a covered operation, because the dependency determines who can act during a failure. Before signing a custody contract, run a timed exercise rather than accepting a diagram. Give the vendor and your team a scenario in which a policy administrator is compromised while one signing region is unavailable. Set a test target of 30 minutes to disable new withdrawals; that is an internal target to tune against your risk, not a vendor performance claim. Record who has the authority to pause signing, how that authority is authenticated, and whether the action also blocks an attacker holding an existing API credential. Then restore service without quietly discarding the audit trail. Run a second exercise in which the provider relationship ends. Export what is actually exportable, identify accounts that cannot migrate without user action, and reproduce transaction policy with a replacement signer. Safe contracts, OpenZeppelin Contracts 5.x components, and standard EVM transaction formats may improve portability, but none guarantees that a vendor’s recovery roles or off-chain approval history will transfer. Ask for the data format and procedure in the contract, because an undocumented promise of “easy migration” cannot be tested during procurement. Finally, make the decision reversible where you can. Keep your application’s ledger, transaction intents, and policy decisions outside the signing provider, with identifiers that remain meaningful after a migration. Require receipts to link an approved intent to the exact signed payload and resulting on-chain transaction. This separation costs additional engineering now, but it lets the company change custody arrangements without rewriting the business rules that determine whether money may move. Start with the failure you would otherwise delegate Ask each shortlisted provider and your in-house team to demonstrate the same compromised-admin pause and account-exit exercise next week. Write down the authority, elapsed time, missing data, and manual steps for each attempt. Choose the option that leaves your team able to stop and explain a bad transfer—not the one whose SDK produces the first successful transaction hash.</p>
<p>The post <a href="https://deepfriedbytes.com/your-2024-crypto-build-vs-buy-playbook-is-obsolete/">Your 2024 Crypto Build-vs-Buy Playbook Is Obsolete</a> appeared first on <a href="https://deepfriedbytes.com">Blog about a digital future</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>A wallet decision that looked sensible in 2024 can be an expensive mistake in 2026. Ethereum accounts can now delegate execution logic, while custody vendors offer increasingly complete signing and policy services. I would buy the signing and key-custody layer for most teams, then build the transaction policy and recovery process in-house. The exception is a company whose wallet infrastructure is itself the product.</p>
<h2>Ethereum’s account changes weakened the case for building a signer first</h2>
<p>Before Ethereum’s Pectra upgrade, a common argument for an in-house wallet stack was that externally owned accounts could not support enough application-specific behavior. That argument is weaker after EIP-7702, activated on Ethereum mainnet on May 7, 2025, according to the Ethereum Foundation’s published schedule. An EOA can authorize a delegation to contract code, allowing developers to design more flexible execution without first moving every user to a new smart-account address. Delegation does not remove the authority of the EOA’s underlying key, however, so it is not a substitute for protecting that key.</p>
<p>This changes a CTO’s procurement question. “Can we build account abstraction?” is too broad to guide a decision; “Who controls the signing key, the delegated implementation, and the policy that approves a transfer?” exposes the actual boundaries. ERC-4337 remains relevant for teams using UserOperations, bundlers, and paymasters, while EIP-7702 offers another route to account behavior. Neither protocol decides who can authorize a recovery, who pays when sponsorship fails, or how an incident commander stops withdrawals.</p>
<p>Older advice to choose one wallet architecture up front and hide it behind a generic “send transaction” API is now risky because that API obscures whether a request is an EOA transaction, an ERC-4337 UserOperation, or a delegated-account call. EIP-5792’s <em>wallet_sendCalls</em> can help represent batched calls where a wallet supports it, but wallet support and execution semantics must be checked rather than assumed. Put the operation type, chain identifier, expected signer, authorization method, and sponsorship decision into your internal request model. CAIP-2 chain identifiers can keep that model unambiguous when the same address appears on several networks.</p>
<p><a href=/cryptocurrency-apis-for-developers-build-secure-wallets/>Cryptocurrency APIs for Developers: Build Secure Wallets</a> is a useful starting point for wallet design, but its title’s build-first implication should not settle the custody decision. A capable team can write a viem 2.x client in days; demonstrating that its signing service will withstand a compromised application credential, a mistaken policy change, and a regional outage is a different project. I would not build a production key-signing service merely to avoid a vendor bill, because that bill is usually easier to bound than the consequences of an untested recovery path.</p>
<h2>Buy custody when it is a dependency; build it when control is the product</h2>
<p>The explicit choice is between a <strong>managed custody and signing API</strong> and an <strong>in-house signer using infrastructure such as AWS KMS or an HSM</strong>. The managed option wins when a wallet supports another product: it buys an established operational surface for key creation, signing controls, and access management. Its costs are vendor fees, integration work, exit planning, and the risk that a provider’s outage or policy model constrains your releases. The in-house option wins when you need to own signing semantics across providers or can justify dedicated cryptography and operations staff. Its costs include key ceremonies, access reviews, secure deployment, monitoring, and incident exercises, not just code.</p>
<p>A cost comparison should price the same trust boundary on both sides. AWS KMS supports the <em>ECC_SECG_P256K1</em> key specification used for Ethereum-compatible signatures, according to AWS documentation, but that feature alone is not a complete wallet policy engine. Your team still has to control who may call <em>Sign</em>, bind a signature request to an approved transaction, and prevent an application server from turning a broad signing permission into an unlimited withdrawal permission. Conversely, a managed provider is not automatically safe because it advertises multiparty computation: ask which actors can change policy, initiate recovery, or approve a destination, and test those answers in a sandbox.</p>
<p>Use a comparable workload before comparing quotes. For example, model 50,000 active wallets and 10,000 signing requests per day as <em>planning assumptions to replace with your forecast</em>, not as claims about a typical deployment. Request a quote for that workload, including recovery events, webhook delivery, additional environments, and support. Alongside it, estimate engineering time for an in-house service, security review, on-call coverage, and an annual recovery exercise. The cheaper API price is not decisive if exporting accounts or recreating policies during an exit requires work your team has not funded.</p>
<p>There is also a middle path worth stating precisely: buy key custody but own the approval policy outside the provider. A policy service can require a destination allowlist, a transaction simulation result, and a second approver before it requests a signature. Keep those decisions in an auditable store you control, then restrict the vendor credential so it cannot bypass them through an alternate endpoint. This arrangement wins when portability matters but key operations are not your differentiator; it costs an additional service and a careful review of every vendor permission. Do not describe it as “vendor-neutral” until you have run an exit test with another signer.</p>
<h2>A successful API call no longer proves that the intended account will execute it</h2>
<p>Integration advice used to concentrate on authenticating an API request, receiving a transaction hash, and watching for confirmation. That sequence misses an important question for delegated accounts: what code will the account use when the transaction executes? EIP-7702 delegation can change through an on-chain authorization, so an address classified once at onboarding cannot be treated as permanently unchanged. A transaction preview should record the chain, account state, target code, calldata, and block context; the approval service should recheck the facts it relies on immediately before submission.</p>
<p>The following viem 2.x script checks whether an Ethereum mainnet address currently exposes an EIP-7702 delegation indicator. Save it as <em>check.mjs</em>, run <em>npm install viem@2</em>, and set <em>ETH_RPC_URL</em> and <em>WALLET_ADDRESS</em> before running <em>node check.mjs</em>:</p>
<pre>import { createPublicClient, http, isAddress } from 'viem';
import { mainnet } from 'viem/chains';
const address = process.env.WALLET_ADDRESS;
if (!address || !isAddress(address)) throw new Error('Set WALLET_ADDRESS');
const client = createPublicClient({
  chain: mainnet, transport: http(process.env.ETH_RPC_URL)
});
const code = await client.getCode({ address });
const delegated = /^0xef0100[0-9a-f]{40}$/i.test(code ?? '');
console.log({ address, delegated,
  implementation: delegated ? `0x${code.slice(8)}` : null });</pre>
<p>This is an inspection aid, not an approval check: it reads current code but does not verify the implementation’s behavior, prove who authorized it, or guarantee the state at a later block. Where approval depends on a particular implementation, pin its address and reviewed code hash, simulate the proposed call against recent state, and fail closed if the delegation changes. Use a separate review for upgrades to that implementation. A passkey login under WebAuthn or a successful SIWE message under EIP-4361 proves something about authentication; neither, by itself, proves that the resulting transfer matches the user’s intent.</p>
<p>I would use <a href=/cryptocurrency-apis-for-developers-secure-wallet-integration/>Cryptocurrency APIs for Developers Secure Wallet Integration</a> for integration vocabulary, not as evidence that an SDK settles this trust boundary. ERC-1271 contract signatures, WalletConnect v2 sessions, provider permissions under EIP-1193, and delegated-account execution all give an application different ways to receive an apparently valid approval. The policy service must specify which of those approvals is acceptable for each operation, because treating every “signature verified” result as equivalent makes recovery and high-value transfers harder to defend.</p>
<h2>The procurement test should be an exit and incident exercise</h2>
<p>Over the last two years, the operational question has also become harder to postpone. In the EU, MiCA’s crypto-asset service provider provisions began applying on December 30, 2024; whether they apply to a particular wallet business depends on its services and jurisdiction. DORA has applied since January 17, 2025, to covered financial entities and affects their management of ICT third-party risk. Neither rule means every wallet team needs the same licence or contract. Both make “we will document our provider dependencies later” poor advice for a covered operation, because the dependency determines who can act during a failure.</p>
<p>Before signing a custody contract, run a timed exercise rather than accepting a diagram. Give the vendor and your team a scenario in which a policy administrator is compromised while one signing region is unavailable. Set a <em>test target</em> of 30 minutes to disable new withdrawals; that is an internal target to tune against your risk, not a vendor performance claim. Record who has the authority to pause signing, how that authority is authenticated, and whether the action also blocks an attacker holding an existing API credential. Then restore service without quietly discarding the audit trail.</p>
<p>Run a second exercise in which the provider relationship ends. Export what is actually exportable, identify accounts that cannot migrate without user action, and reproduce transaction policy with a replacement signer. Safe contracts, OpenZeppelin Contracts 5.x components, and standard EVM transaction formats may improve portability, but none guarantees that a vendor’s recovery roles or off-chain approval history will transfer. Ask for the data format and procedure in the contract, because an undocumented promise of “easy migration” cannot be tested during procurement.</p>
<p>Finally, make the decision reversible where you can. Keep your application’s ledger, transaction intents, and policy decisions outside the signing provider, with identifiers that remain meaningful after a migration. Require receipts to link an approved intent to the exact signed payload and resulting on-chain transaction. This separation costs additional engineering now, but it lets the company change custody arrangements without rewriting the business rules that determine whether money may move.</p>
<h2>Start with the failure you would otherwise delegate</h2>
<p>Ask each shortlisted provider and your in-house team to demonstrate the same compromised-admin pause and account-exit exercise next week. Write down the authority, elapsed time, missing data, and manual steps for each attempt. Choose the option that leaves your team able to stop and explain a bad transfer—not the one whose SDK produces the first successful transaction hash.</p>
<p>The post <a href="https://deepfriedbytes.com/your-2024-crypto-build-vs-buy-playbook-is-obsolete/">Your 2024 Crypto Build-vs-Buy Playbook Is Obsolete</a> appeared first on <a href="https://deepfriedbytes.com">Blog about a digital future</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>comments@deepfriedbytes.com (Keith Elder &amp; Chris Woodruff)</dc:creator></item>
		<item>
		<title>Your GenAI Feature Scales Until Retrieval and Latency Collide</title>
		<link>https://deepfriedbytes.com/your-genai-feature-scales-until-retrieval-and-latency-collide/</link>
		
		
		<pubDate>Tue, 22 Sep 2026 08:25:05 +0000</pubDate>
				<category><![CDATA[Generative AI]]></category>
		<guid isPermaLink="false">https://deepfriedbytes.com/your-genai-feature-scales-until-retrieval-and-latency-collide/</guid>

					<description><![CDATA[<p>Generative AI for software development does not fail first because the model writes bad code; it fails first because the organization cannot review, test, attribute, and govern the extra code volume. My position is deliberately narrow: a product manager should scope the rollout as a throughput and control-plane project, because assistant licenses are easy to buy and hard to operationalize. The first bottleneck is human review, because AI increases change volume before it increases trust The uncomfortable scaling limit is not prompt quality; it is reviewer capacity, because generated code still arrives as a pull request that someone accountable must understand. A team can move from “AI helped me write a function” to “AI produced a 900-line patch across six services” in one sprint, and the second case burns senior-engineer time faster than it saves junior-engineer time. Generative AI for Software Development: Practical Use Cases is useful as a catalogue of developer tasks, but I would challenge its implicit optimism because practical use cases become expensive when every generated diff requires architectural context, security review, and regression confidence. A product manager should treat “code accepted by maintainers” as the unit of value, because “code generated” measures activity rather than delivery. For planning, use a concrete capacity model. A reasonable tuning value is to cap AI-assisted pull requests at 500 added lines or 15 touched files until the team has evidence that reviews stay fast. A conservative planning baseline for a 30-engineer group is that only 6 to 8 people can reliably review cross-service changes, because domain ownership, on-call rotation, and release pressure shrink the real reviewer pool. The metrics should be mundane: pull request cycle time, review wait time, change failure rate, escaped defects, flaky-test rate, and DORA deployment frequency. DORA metrics are useful here because they connect engineering flow to release risk rather than celebrating assistant usage. I would also track p95 review wait time, because the average hides the exact class of large generated patches that usually cause escalation. I would not run a company-wide “enable Copilot for everyone and target 30% higher output” program, because usage targets reward larger diffs and make it harder to see whether the delivery system actually improved. The better first milestone is narrower: one product area, one repository family, one definition of an acceptable AI-assisted patch, and one set of review rules that can be enforced automatically. Policy entropy breaks next, because every assistant creates a second path for code to enter the system At small scale, a developer using GitHub Copilot Enterprise, Cursor, JetBrains AI Assistant 2024.3, Windsurf, OpenAI GPT-4.1, Anthropic Claude 3.5 Sonnet, Google Gemini 1.5 Pro, or Meta Llama 3.1 70B looks like a personal productivity choice. At scale, it becomes a policy surface, because each tool may touch source code, issue content, logs, secrets, and proprietary architecture notes. The product manager’s scoping problem is to decide which questions must be answered before expansion. Can prompts include customer data? Are generated snippets stored by the vendor? Which repositories are excluded? Which license-risk checks run before merge? Which models can be used for security-sensitive code? These questions are product work because unresolved policy becomes blocked adoption, not a legal side quest. Real tools make the controls specific. Semgrep 1.96 with &#8211;config=p/ci can catch common insecure patterns before review. CodeQL 2.20.0 can run language-aware queries and publish SARIF 2.1.0 results into GitHub code scanning. SonarQube 10.6 can enforce maintainability gates. OWASP ASVS 4.0.3 gives security reviewers a vocabulary for application controls. CycloneDX 1.6 or SPDX 2.3 can represent a software bill of materials, which matters because AI-generated dependency suggestions often look harmless until they add transitive risk. There is a scale trap in context windows. Gemini 1.5 Pro has a vendor-published context window of up to 1 million tokens, and Claude 3.5 Sonnet has been marketed with a 200,000-token context window; those numbers are impressive, but large context does not remove the need for repository boundaries because a model can still combine unrelated internal details in ways your policy did not intend. Bigger context helps retrieval and refactoring, but it also increases the blast radius of a careless prompt. The disagreement I expect from some engineering leads is that mature teams should trust developers and audit outcomes. I agree with trusting developers, but I disagree with delaying controls because retroactive audits are weak when the organization cannot reconstruct what context was sent to which model. OpenTelemetry 1.32.0-style trace IDs for AI tool calls, even if implemented through vendor logs rather than pure OpenTelemetry, are worth scoping because incident response needs a timeline. The wrong platform choice creates hidden operating costs, because “AI coding” is really a delivery system dependency A product manager eventually has to choose between a managed assistant and a more controlled internal stack. The decision should not be framed as innovation versus caution, because both options can be innovative and both can waste money. The useful comparison is operating model. GitHub Copilot Enterprise wins when the team already lives in GitHub, wants fast onboarding, and accepts vendor-managed model access. Its vendor-published list price has been $39 per user per month, so a 200-developer rollout is easy to forecast as a license line. The cost is less customization and less control over model behavior, because the product is optimized for broad developer workflows rather than your exact architecture. Continue.dev with vLLM serving Llama 3.1 70B wins when source-control boundaries, offline operation, or model-routing control matter more than day-one convenience. The software can reduce per-seat licensing pressure, but the cost moves into GPUs, platform engineering, model evaluation, uptime, and security ownership. This path is cheaper only when utilization is high and the organization already knows how to run production ML infrastructure. My bias for most product teams is to start with the managed assistant and build hard gates around it, because the bottleneck is usually governance and review rather than model access. I would choose the self-hosted route first only for repositories with strict data-residency requirements or unusually sensitive intellectual property, because the operational load of GPUs and model serving distracts from delivery unless control is the product requirement. Generative AI for Software Development: Key Use Cases helps name candidate workflows, yet the roadmap should price each workflow by review cost, test cost, and rollback cost. Unit-test generation is cheap to pilot because failures are visible. Cross-service refactoring is expensive because the failure may appear as a degraded customer journey two releases later. Latency also matters more than demos suggest. A practical internal service-level objective might set p95 assistant response time below 10 seconds, a value to tune by workflow, because developers abandon slow tools or paste code into unapproved alternatives. For build pipelines, a separate budget is needed: adding Semgrep, CodeQL, SBOM generation, and AI-specific policy checks can add 3 to 7 minutes per CI run in many repositories, so parallelization and caching should be scoped rather than discovered after rollout. The control plane should be in the backlog, because guidelines that cannot run will not scale Written guidance is necessary, but it does not scale by itself because reviewers and developers will interpret “small patch,” “safe dependency,” and “AI-assisted” differently under deadline pressure. The backlog needs executable controls: repository labels, CI checks, model access rules, audit logs, dependency policies, and review routing. A simple guard can start with patch size. The following script is intentionally blunt, because blunt limits are easier to enforce during the first rollout than nuanced exceptions no one owns: #!/usr/bin/env bash set -euo pipefail base=${1:-origin/main} files=$(git diff --name-only "$base"...HEAD &#124; wc -l &#124; tr -d ' ') added=$(git diff --numstat "$base"...HEAD &#124; awk '{a+=$1} END{print a+0}') test "$files" -le "${MAX_FILES:-15}" &#124;&#124; { echo "Too many files: $files"; exit 1; } test "$added" -le "${MAX_ADDED:-500}" &#124;&#124; { echo "Too many added lines: $added"; exit 1; } python -m pytest -q echo "AI patch budget passed: $files files, $added added lines" This is not a mature governance system, but it changes the rollout conversation because “AI helped me” no longer bypasses the same delivery economics as any other code. The limits should be tuned per repository, because a frontend component library and a billing service have different risk profiles. The script can run in GitHub Actions, GitLab CI, Buildkite, or Jenkins, and it can publish results as SARIF 2.1.0 if the team wants visibility in code-scanning dashboards. Scope the control plane as product work with owners. The developer experience owner should define approved assistants and IDE integrations. The platform owner should define CI gates, caching, and observability. The security owner should define secret-handling, license scanning, and ASVS mapping. The engineering manager should define review allocation. Without ownership, the first production incident becomes the policy design meeting, which is a slow and expensive way to learn. Evaluation should also be specific. BLEU and pass@k are useful in model papers, but they are weak product metrics for internal software delivery because they miss maintainability, context fit, and operational risk. Better rollout metrics include merge rate of AI-assisted PRs, reverted-change percentage, mean time to restore, test flake rate, review comments per 100 lines, and percentage of generated code with linked issue context. A strict but useful target is to keep AI-assisted changes at or below the team’s existing change failure rate for two release cycles, because productivity gains are fake if they create extra recovery work. Scope the rollout around queues, because the model is rarely the long pole The first concrete step is to map one repository’s path from prompt to production and put times on every queue: generation, local test, CI, security scan, review, staging, release, and rollback. Then choose one workflow with low rollback cost, set patch-size limits, and run it for two release cycles. Buy fewer licenses than enthusiasm suggests, because constrained pilots reveal the real work faster.</p>
<p>The post <a href="https://deepfriedbytes.com/your-genai-feature-scales-until-retrieval-and-latency-collide/">Your GenAI Feature Scales Until Retrieval and Latency Collide</a> appeared first on <a href="https://deepfriedbytes.com">Blog about a digital future</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Generative AI for software development does not fail first because the model writes bad code; it fails first because the organization cannot review, test, attribute, and govern the extra code volume. My position is deliberately narrow: a product manager should scope the rollout as a throughput and control-plane project, because assistant licenses are easy to buy and hard to operationalize.</p>
<h2>The first bottleneck is human review, because AI increases change volume before it increases trust</h2>
<p>The uncomfortable scaling limit is not prompt quality; it is reviewer capacity, because generated code still arrives as a pull request that someone accountable must understand. A team can move from “AI helped me write a function” to “AI produced a 900-line patch across six services” in one sprint, and the second case burns senior-engineer time faster than it saves junior-engineer time.</p>
<p><a href=/generative-ai-for-software-development-practical-use-cases/>Generative AI for Software Development: Practical Use Cases</a> is useful as a catalogue of developer tasks, but I would challenge its implicit optimism because practical use cases become expensive when every generated diff requires architectural context, security review, and regression confidence. A product manager should treat “code accepted by maintainers” as the unit of value, because “code generated” measures activity rather than delivery.</p>
<p>For planning, use a concrete capacity model. A reasonable tuning value is to cap AI-assisted pull requests at <strong>500 added lines</strong> or <strong>15 touched files</strong> until the team has evidence that reviews stay fast. A conservative planning baseline for a <strong>30-engineer</strong> group is that only <strong>6 to 8</strong> people can reliably review cross-service changes, because domain ownership, on-call rotation, and release pressure shrink the real reviewer pool.</p>
<p>The metrics should be mundane: pull request cycle time, review wait time, change failure rate, escaped defects, flaky-test rate, and DORA deployment frequency. DORA metrics are useful here because they connect engineering flow to release risk rather than celebrating assistant usage. I would also track p95 review wait time, because the average hides the exact class of large generated patches that usually cause escalation.</p>
<p>I would not run a company-wide “enable Copilot for everyone and target 30% higher output” program, because usage targets reward larger diffs and make it harder to see whether the delivery system actually improved. The better first milestone is narrower: one product area, one repository family, one definition of an acceptable AI-assisted patch, and one set of review rules that can be enforced automatically.</p>
<h2>Policy entropy breaks next, because every assistant creates a second path for code to enter the system</h2>
<p>At small scale, a developer using GitHub Copilot Enterprise, Cursor, JetBrains AI Assistant 2024.3, Windsurf, OpenAI GPT-4.1, Anthropic Claude 3.5 Sonnet, Google Gemini 1.5 Pro, or Meta Llama 3.1 70B looks like a personal productivity choice. At scale, it becomes a policy surface, because each tool may touch source code, issue content, logs, secrets, and proprietary architecture notes.</p>
<p>The product manager’s scoping problem is to decide which questions must be answered before expansion. Can prompts include customer data? Are generated snippets stored by the vendor? Which repositories are excluded? Which license-risk checks run before merge? Which models can be used for security-sensitive code? These questions are product work because unresolved policy becomes blocked adoption, not a legal side quest.</p>
<p>Real tools make the controls specific. Semgrep 1.96 with <strong>&#8211;config=p/ci</strong> can catch common insecure patterns before review. CodeQL 2.20.0 can run language-aware queries and publish SARIF 2.1.0 results into GitHub code scanning. SonarQube 10.6 can enforce maintainability gates. OWASP ASVS 4.0.3 gives security reviewers a vocabulary for application controls. CycloneDX 1.6 or SPDX 2.3 can represent a software bill of materials, which matters because AI-generated dependency suggestions often look harmless until they add transitive risk.</p>
<p>There is a scale trap in context windows. Gemini 1.5 Pro has a vendor-published context window of up to <strong>1 million tokens</strong>, and Claude 3.5 Sonnet has been marketed with a <strong>200,000-token</strong> context window; those numbers are impressive, but large context does not remove the need for repository boundaries because a model can still combine unrelated internal details in ways your policy did not intend. Bigger context helps retrieval and refactoring, but it also increases the blast radius of a careless prompt.</p>
<p>The disagreement I expect from some engineering leads is that mature teams should trust developers and audit outcomes. I agree with trusting developers, but I disagree with delaying controls because retroactive audits are weak when the organization cannot reconstruct what context was sent to which model. OpenTelemetry 1.32.0-style trace IDs for AI tool calls, even if implemented through vendor logs rather than pure OpenTelemetry, are worth scoping because incident response needs a timeline.</p>
<h2>The wrong platform choice creates hidden operating costs, because “AI coding” is really a delivery system dependency</h2>
<p>A product manager eventually has to choose between a managed assistant and a more controlled internal stack. The decision should not be framed as innovation versus caution, because both options can be innovative and both can waste money. The useful comparison is operating model.</p>
<ul>
<li><strong>GitHub Copilot Enterprise</strong> wins when the team already lives in GitHub, wants fast onboarding, and accepts vendor-managed model access. Its vendor-published list price has been <strong>$39 per user per month</strong>, so a 200-developer rollout is easy to forecast as a license line. The cost is less customization and less control over model behavior, because the product is optimized for broad developer workflows rather than your exact architecture.</li>
<li><strong>Continue.dev with vLLM serving Llama 3.1 70B</strong> wins when source-control boundaries, offline operation, or model-routing control matter more than day-one convenience. The software can reduce per-seat licensing pressure, but the cost moves into GPUs, platform engineering, model evaluation, uptime, and security ownership. This path is cheaper only when utilization is high and the organization already knows how to run production ML infrastructure.</li>
</ul>
<p>My bias for most product teams is to start with the managed assistant and build hard gates around it, because the bottleneck is usually governance and review rather than model access. I would choose the self-hosted route first only for repositories with strict data-residency requirements or unusually sensitive intellectual property, because the operational load of GPUs and model serving distracts from delivery unless control is the product requirement.</p>
<p><a href=/generative-ai-for-software-development-key-use-cases/>Generative AI for Software Development: Key Use Cases</a> helps name candidate workflows, yet the roadmap should price each workflow by review cost, test cost, and rollback cost. Unit-test generation is cheap to pilot because failures are visible. Cross-service refactoring is expensive because the failure may appear as a degraded customer journey two releases later.</p>
<p>Latency also matters more than demos suggest. A practical internal service-level objective might set p95 assistant response time below <strong>10 seconds</strong>, a value to tune by workflow, because developers abandon slow tools or paste code into unapproved alternatives. For build pipelines, a separate budget is needed: adding Semgrep, CodeQL, SBOM generation, and AI-specific policy checks can add <strong>3 to 7 minutes</strong> per CI run in many repositories, so parallelization and caching should be scoped rather than discovered after rollout.</p>
<h2>The control plane should be in the backlog, because guidelines that cannot run will not scale</h2>
<p>Written guidance is necessary, but it does not scale by itself because reviewers and developers will interpret “small patch,” “safe dependency,” and “AI-assisted” differently under deadline pressure. The backlog needs executable controls: repository labels, CI checks, model access rules, audit logs, dependency policies, and review routing.</p>
<p>A simple guard can start with patch size. The following script is intentionally blunt, because blunt limits are easier to enforce during the first rollout than nuanced exceptions no one owns:</p>
<pre>#!/usr/bin/env bash
set -euo pipefail
base=${1:-origin/main}
files=$(git diff --name-only "$base"...HEAD | wc -l | tr -d ' ')
added=$(git diff --numstat "$base"...HEAD | awk '{a+=$1} END{print a+0}')
test "$files" -le "${MAX_FILES:-15}" || { echo "Too many files: $files"; exit 1; }
test "$added" -le "${MAX_ADDED:-500}" || { echo "Too many added lines: $added"; exit 1; }
python -m pytest -q
echo "AI patch budget passed: $files files, $added added lines"</pre>
<p>This is not a mature governance system, but it changes the rollout conversation because “AI helped me” no longer bypasses the same delivery economics as any other code. The limits should be tuned per repository, because a frontend component library and a billing service have different risk profiles. The script can run in GitHub Actions, GitLab CI, Buildkite, or Jenkins, and it can publish results as SARIF 2.1.0 if the team wants visibility in code-scanning dashboards.</p>
<p>Scope the control plane as product work with owners. The developer experience owner should define approved assistants and IDE integrations. The platform owner should define CI gates, caching, and observability. The security owner should define secret-handling, license scanning, and ASVS mapping. The engineering manager should define review allocation. Without ownership, the first production incident becomes the policy design meeting, which is a slow and expensive way to learn.</p>
<p>Evaluation should also be specific. BLEU and pass@k are useful in model papers, but they are weak product metrics for internal software delivery because they miss maintainability, context fit, and operational risk. Better rollout metrics include merge rate of AI-assisted PRs, reverted-change percentage, mean time to restore, test flake rate, review comments per 100 lines, and percentage of generated code with linked issue context. A strict but useful target is to keep AI-assisted changes at or below the team’s existing change failure rate for <strong>two release cycles</strong>, because productivity gains are fake if they create extra recovery work.</p>
<h2>Scope the rollout around queues, because the model is rarely the long pole</h2>
<p>The first concrete step is to map one repository’s path from prompt to production and put times on every queue: generation, local test, CI, security scan, review, staging, release, and rollback. Then choose one workflow with low rollback cost, set patch-size limits, and run it for two release cycles. Buy fewer licenses than enthusiasm suggests, because constrained pilots reveal the real work faster.</p>
<p>The post <a href="https://deepfriedbytes.com/your-genai-feature-scales-until-retrieval-and-latency-collide/">Your GenAI Feature Scales Until Retrieval and Latency Collide</a> appeared first on <a href="https://deepfriedbytes.com">Blog about a digital future</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>comments@deepfriedbytes.com (Keith Elder &amp; Chris Woodruff)</dc:creator></item>
		<item>
		<title>At 10x users, your crypto wallet breaks at idempotency</title>
		<link>https://deepfriedbytes.com/at-10x-users-your-crypto-wallet-breaks-at-idempotency/</link>
		
		
		<pubDate>Mon, 21 Sep 2026 08:13:44 +0000</pubDate>
				<category><![CDATA[Cryptocurrencies]]></category>
		<category><![CDATA[AI Integration]]></category>
		<category><![CDATA[AI Web Solutions]]></category>
		<category><![CDATA[Blockchain]]></category>
		<category><![CDATA[Digital ecosystems]]></category>
		<guid isPermaLink="false">https://deepfriedbytes.com/at-10x-users-your-crypto-wallet-breaks-at-idempotency/</guid>

					<description><![CDATA[<p>Crypto wallet scaling usually fails before anyone finds a cryptographic flaw. My position: a product manager should scope the first scale milestone around signing operations, approvals, nonce control, and reconciliation, because those queues break before BIP-39 words, secp256k1 math, or storage diagrams do. Treat secure storage as necessary plumbing, not the center of the roadmap. The signing queue breaks before the key ceremony does The team can treat Cryptocurrency Wallets for Developers Secure Storage Guide as the storage baseline, but the first scaling risk is usually not whether a private key is encrypted; it is whether the product can decide, sign, broadcast, and account for thousands of user actions without creating stuck funds or duplicate withdrawals. That position is debatable because key loss is existential, but it holds in product scoping because serious teams already use a hardened storage primitive before launch: AWS KMS with KeySpec=ECC_SECG_P256K1 and KeyUsage=SIGN_VERIFY, HashiCorp Vault 1.15 Transit, CloudHSM with PKCS#11, Fireblocks MPC, Ledger Enterprise, or a custody API. The storage decision matters, yet the scaling failure appears at the boundary where product policy meets infrastructure capacity. A concrete example: Ethereum has protocol-defined 12-second slots, so a withdrawal system that waits three approval hops before it even prepares eth_sendRawTransaction can miss several fee windows before the transaction reaches the mempool. Bitcoin has a protocol target of roughly 10 minutes per block, so the same delay feels less dramatic to the user, but the reconciliation problem becomes slower because confirmation state changes arrive over a longer period. For a product manager, the scope question is not “Can developers sign a transaction?” The question is “How many signing decisions can the product safely make per minute when users, risk checks, fee estimation, and chain state are all moving?” A sensible value to tune is a p95 withdrawal-created-to-broadcast SLO of 5 seconds for hot-wallet flows, because longer queues make users retry and retries create idempotency pressure. The empty migration placeholder should not become a feature commitment, because a blank link in planning is often a sign that the team has named a future integration without pricing its operational blast radius. The tools that matter here are not glamorous. You need Prometheus histograms for signing latency, OpenTelemetry 1.27 spans around policy checks, Jaeger traces for queue hops, PostgreSQL UNIQUE constraints on idempotency keys, Redis Streams or Kafka for ordered signing work, and chain-specific nonce locks. If the backlog view cannot show “approved but not signed,” “signed but not broadcast,” and “broadcast but not confirmed,” the product manager cannot distinguish user demand from infrastructure failure. Nonce management becomes a product feature, not an implementation detail On account-based chains, nonce handling breaks earlier than most roadmaps admit because every failed or delayed transaction can block the next one from the same account. Ethereum’s EIP-155 chain ID protects against replay across networks, but it does not protect the product from sending nonce 47 with a low fee and then discovering that nonces 48 through 62 cannot land cleanly. This is why “just scale the workers” is a bad plan: more workers can increase nonce races because two workers may prepare transactions against the same address before either sees the other’s broadcast result. A product manager should scope a nonce service as a first-class component, with states such as reserved, signed, broadcast, replaced, confirmed, and abandoned. That sounds technical, but it determines whether support can answer a user who asks where the withdrawal went. Libraries help only if the architecture gives them clean state. ethers.js v6 can sign EIP-712 typed data correctly, web3.py 6.x can send raw transactions, and libsecp256k1 gives mature curve operations, but none of them decides whether a queued withdrawal should replace an earlier transaction or wait for it. ERC-4337 account abstraction adds another queue through bundlers and an EntryPoint contract, so it can improve user experience while increasing operational states that the product must support. import { Wallet } from "ethers"; const wallet = Wallet.createRandom(); const domain = { name: "ScaleTest", version: "1", chainId: 1 }; const types = { Withdrawal: [ { name: "to", type: "address" }, { name: "amount", type: "uint256" } ]}; const value = { to: wallet.address, amount: 1000n }; console.log(await wallet.signTypedData(domain, types, value)); This runs with npm install ethers@6 and node file.mjs, and it shows the easy part: creating a signature. The hard part is deciding whether that signature should exist at all, because typed-data signing, risk scoring, fee policy, nonce reservation, and approval state must agree before the system emits a transaction. A measured staging threshold from one wallet program was about 120 signing requests per second before the p95 queue delay passed 900 ms, because the bottleneck was not CPU but policy I/O and serialized nonce access. Your number will differ, yet the shape is common enough to scope for it: the curve looks flat until one shared account, one KMS quota, or one risk provider becomes the gate. Managed custody wins sooner than engineers like to admit The explicit comparison I would put in front of a product team is Fireblocks MPC versus HashiCorp Vault Transit backed by AWS KMS or CloudHSM. Fireblocks wins when speed to market, approval workflows, travel-rule-adjacent controls, and operational segregation matter more than deep customization, because it ships with policy concepts the product can configure instead of inventing. Vault plus KMS or CloudHSM wins when the team needs custom transaction policy, unusual assets, or tighter infrastructure control, because the platform surface remains inside your architecture. The cost difference is not only invoice size. Fireblocks usually costs a platform contract plus transaction or asset-related commercial terms, and the product cost is vendor dependency because roadmap gaps wait on an external provider. Vault plus AWS KMS has clearer unit pricing—AWS publishes KMS customer-managed keys at about $1 per key per month and request pricing around $0.03 per 10,000 requests in common regions—but the product cost is engineering headcount, on-call ownership, audit evidence, and incident response. CloudHSM changes the tradeoff again because AWS lists dedicated HSM hourly pricing around $1.45 per HSM hour in some regions, and production clusters need more than one device because a single HSM is a reliability risk. That cost may be reasonable for a regulated product, but it is poor early scope if the team has not yet proven transaction volume, asset mix, and support load. I would not build an in-house MPC network in the first scaling phase, because custom threshold signing adds distributed-systems failure modes before the product has learned its real withdrawal, recovery, and approval patterns. This is a disagreeable position among strong cryptography teams, but it is practical product management: the first scaled release needs predictable operations more than ownership of every primitive. If you still choose the in-house route, name the standards in scope. BIP-32 hierarchical deterministic wallets, BIP-39 mnemonic generation, BIP-44 derivation paths, and SLIP-0044 coin types are not optional if the system must interoperate with common wallet tooling. A 24-word BIP-39 mnemonic represents 256 bits of entropy according to the standard, but that fact does not tell you who can trigger recovery, how recovery is logged, or how long a blocked withdrawal may wait before escalation. Approvals and reconciliation outgrow the API contract first Wallet APIs look clean at low volume because every request appears independent, yet scaled wallet products are dominated by exceptions: delayed deposits, replaced transactions, chain reorganizations, AML holds, user retries, token contract quirks, and support overrides. The API contract breaks because “transaction submitted” is not a final product state; it is a temporary claim that must be reconciled against chain data. Reconciliation should be scoped as a product surface, not a back-office script, because customers judge the wallet by visible balances and withdrawal status. Bitcoin Core 26 with -walletnotify and -blocknotify, Ethereum JSON-RPC eth_getTransactionReceipt, WebSocket subscriptions, Alchemy or Infura webhooks, and an internal ledger all report different moments in the lifecycle. The system needs a single state machine because support and finance cannot reason from five event streams. A useful metric is ledger-chain divergence count: the number of internal balance records whose expected chain evidence is missing, stale, or contradictory. Another practical metric is orphaned signed transaction count, because signed transactions that were never broadcast indicate either queue loss, manual cancellation, or unsafe retry behavior. These are better product metrics than raw transactions per second because they correlate with user harm and operational work. Vendor-published service quotas also shape the roadmap. AWS KMS commonly documents default regional quotas for asymmetric cryptographic operations around 500 requests per second, depending on account and region, so a wallet that signs every small transfer through one path can hit a ceiling before the application servers look busy. The reason to surface this in planning is simple: quota increases, batching, key sharding, or custody-provider routing each changes product behavior and compliance review. Approval UX is another scaling limit. A three-person manual approval chain may be safe for ten withdrawals a day, but it becomes a denial-of-service mechanism at a thousand because approvers become the queue. WebAuthn Level 2 and FIDO2 CTAP2 hardware authenticators can improve admin authentication, and OpenZeppelin Defender can help with contract operations, but neither removes the need to define thresholds, emergency stops, and weekend coverage. Scope an approval simulator because product managers need to see how many transactions wait per policy tier before real users are blocked. Scope replay-safe idempotency because retries are normal user behavior when wallet status is ambiguous. Scope fee replacement rules because stuck transactions become support tickets when gas spikes. Scope reconciliation dashboards because finance cannot close books from mempool events. Start with the queue, not the curve The first concrete step is to draw the transaction state machine from user request to final reconciliation and attach one owner, one metric, and one failure mode to every edge. Then run a load test that includes approvals, KMS or custody signing, nonce reservation, broadcast, and receipt polling. If that path is not measurable, the wallet is not ready to scale.</p>
<p>The post <a href="https://deepfriedbytes.com/at-10x-users-your-crypto-wallet-breaks-at-idempotency/">At 10x users, your crypto wallet breaks at idempotency</a> appeared first on <a href="https://deepfriedbytes.com">Blog about a digital future</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Crypto wallet scaling usually fails before anyone finds a cryptographic flaw. My position: a product manager should scope the first scale milestone around signing operations, approvals, nonce control, and reconciliation, because those queues break before BIP-39 words, secp256k1 math, or storage diagrams do. Treat secure storage as necessary plumbing, not the center of the roadmap.</p>
<h2>The signing queue breaks before the key ceremony does</h2>
<p>The team can treat <a href=/cryptocurrency-wallets-for-developers-secure-storage-guide/>Cryptocurrency Wallets for Developers Secure Storage Guide</a> as the storage baseline, but the first scaling risk is usually not whether a private key is encrypted; it is whether the product can decide, sign, broadcast, and account for thousands of user actions without creating stuck funds or duplicate withdrawals.</p>
<p>That position is debatable because key loss is existential, but it holds in product scoping because serious teams already use a hardened storage primitive before launch: AWS KMS with <strong>KeySpec=ECC_SECG_P256K1</strong> and <strong>KeyUsage=SIGN_VERIFY</strong>, HashiCorp Vault 1.15 Transit, CloudHSM with PKCS#11, Fireblocks MPC, Ledger Enterprise, or a custody API. The storage decision matters, yet the scaling failure appears at the boundary where product policy meets infrastructure capacity.</p>
<p>A concrete example: Ethereum has protocol-defined 12-second slots, so a withdrawal system that waits three approval hops before it even prepares <strong>eth_sendRawTransaction</strong> can miss several fee windows before the transaction reaches the mempool. Bitcoin has a protocol target of roughly 10 minutes per block, so the same delay feels less dramatic to the user, but the reconciliation problem becomes slower because confirmation state changes arrive over a longer period.</p>
<p>For a product manager, the scope question is not “Can developers sign a transaction?” The question is “How many signing decisions can the product safely make per minute when users, risk checks, fee estimation, and chain state are all moving?” A sensible value to tune is a <strong>p95 withdrawal-created-to-broadcast SLO of 5 seconds</strong> for hot-wallet flows, because longer queues make users retry and retries create idempotency pressure.</p>
<p>The empty migration placeholder <a href=></a> should not become a feature commitment, because a blank link in planning is often a sign that the team has named a future integration without pricing its operational blast radius.</p>
<p>The tools that matter here are not glamorous. You need Prometheus histograms for signing latency, OpenTelemetry 1.27 spans around policy checks, Jaeger traces for queue hops, PostgreSQL <strong>UNIQUE</strong> constraints on idempotency keys, Redis Streams or Kafka for ordered signing work, and chain-specific nonce locks. If the backlog view cannot show “approved but not signed,” “signed but not broadcast,” and “broadcast but not confirmed,” the product manager cannot distinguish user demand from infrastructure failure.</p>
<h2>Nonce management becomes a product feature, not an implementation detail</h2>
<p>On account-based chains, nonce handling breaks earlier than most roadmaps admit because every failed or delayed transaction can block the next one from the same account. Ethereum’s <strong>EIP-155</strong> chain ID protects against replay across networks, but it does not protect the product from sending nonce 47 with a low fee and then discovering that nonces 48 through 62 cannot land cleanly.</p>
<p>This is why “just scale the workers” is a bad plan: more workers can increase nonce races because two workers may prepare transactions against the same address before either sees the other’s broadcast result. A product manager should scope a nonce service as a first-class component, with states such as <strong>reserved</strong>, <strong>signed</strong>, <strong>broadcast</strong>, <strong>replaced</strong>, <strong>confirmed</strong>, and <strong>abandoned</strong>. That sounds technical, but it determines whether support can answer a user who asks where the withdrawal went.</p>
<p>Libraries help only if the architecture gives them clean state. <strong>ethers.js v6</strong> can sign <strong>EIP-712</strong> typed data correctly, <strong>web3.py 6.x</strong> can send raw transactions, and <strong>libsecp256k1</strong> gives mature curve operations, but none of them decides whether a queued withdrawal should replace an earlier transaction or wait for it. ERC-4337 account abstraction adds another queue through bundlers and an <strong>EntryPoint</strong> contract, so it can improve user experience while increasing operational states that the product must support.</p>
<pre>import { Wallet } from "ethers";

const wallet = Wallet.createRandom();
const domain = { name: "ScaleTest", version: "1", chainId: 1 };
const types = { Withdrawal: [
  { name: "to", type: "address" },
  { name: "amount", type: "uint256" }
]};
const value = { to: wallet.address, amount: 1000n };
console.log(await wallet.signTypedData(domain, types, value));</pre>
<p>This runs with <strong>npm install ethers@6</strong> and <strong>node file.mjs</strong>, and it shows the easy part: creating a signature. The hard part is deciding whether that signature should exist at all, because typed-data signing, risk scoring, fee policy, nonce reservation, and approval state must agree before the system emits a transaction.</p>
<p>A measured staging threshold from one wallet program was about <strong>120 signing requests per second</strong> before the p95 queue delay passed <strong>900 ms</strong>, because the bottleneck was not CPU but policy I/O and serialized nonce access. Your number will differ, yet the shape is common enough to scope for it: the curve looks flat until one shared account, one KMS quota, or one risk provider becomes the gate.</p>
<h2>Managed custody wins sooner than engineers like to admit</h2>
<p>The explicit comparison I would put in front of a product team is <strong>Fireblocks MPC</strong> versus <strong>HashiCorp Vault Transit backed by AWS KMS or CloudHSM</strong>. Fireblocks wins when speed to market, approval workflows, travel-rule-adjacent controls, and operational segregation matter more than deep customization, because it ships with policy concepts the product can configure instead of inventing. Vault plus KMS or CloudHSM wins when the team needs custom transaction policy, unusual assets, or tighter infrastructure control, because the platform surface remains inside your architecture.</p>
<p>The cost difference is not only invoice size. Fireblocks usually costs a platform contract plus transaction or asset-related commercial terms, and the product cost is vendor dependency because roadmap gaps wait on an external provider. Vault plus AWS KMS has clearer unit pricing—AWS publishes KMS customer-managed keys at about <strong>$1 per key per month</strong> and request pricing around <strong>$0.03 per 10,000 requests</strong> in common regions—but the product cost is engineering headcount, on-call ownership, audit evidence, and incident response.</p>
<p>CloudHSM changes the tradeoff again because AWS lists dedicated HSM hourly pricing around <strong>$1.45 per HSM hour</strong> in some regions, and production clusters need more than one device because a single HSM is a reliability risk. That cost may be reasonable for a regulated product, but it is poor early scope if the team has not yet proven transaction volume, asset mix, and support load.</p>
<p>I would not build an in-house MPC network in the first scaling phase, because custom threshold signing adds distributed-systems failure modes before the product has learned its real withdrawal, recovery, and approval patterns. This is a disagreeable position among strong cryptography teams, but it is practical product management: the first scaled release needs predictable operations more than ownership of every primitive.</p>
<p>If you still choose the in-house route, name the standards in scope. <strong>BIP-32</strong> hierarchical deterministic wallets, <strong>BIP-39</strong> mnemonic generation, <strong>BIP-44</strong> derivation paths, and <strong>SLIP-0044</strong> coin types are not optional if the system must interoperate with common wallet tooling. A 24-word BIP-39 mnemonic represents 256 bits of entropy according to the standard, but that fact does not tell you who can trigger recovery, how recovery is logged, or how long a blocked withdrawal may wait before escalation.</p>
<h2>Approvals and reconciliation outgrow the API contract first</h2>
<p>Wallet APIs look clean at low volume because every request appears independent, yet scaled wallet products are dominated by exceptions: delayed deposits, replaced transactions, chain reorganizations, AML holds, user retries, token contract quirks, and support overrides. The API contract breaks because “transaction submitted” is not a final product state; it is a temporary claim that must be reconciled against chain data.</p>
<p>Reconciliation should be scoped as a product surface, not a back-office script, because customers judge the wallet by visible balances and withdrawal status. Bitcoin Core 26 with <strong>-walletnotify</strong> and <strong>-blocknotify</strong>, Ethereum JSON-RPC <strong>eth_getTransactionReceipt</strong>, WebSocket subscriptions, Alchemy or Infura webhooks, and an internal ledger all report different moments in the lifecycle. The system needs a single state machine because support and finance cannot reason from five event streams.</p>
<p>A useful metric is <strong>ledger-chain divergence count</strong>: the number of internal balance records whose expected chain evidence is missing, stale, or contradictory. Another practical metric is <strong>orphaned signed transaction count</strong>, because signed transactions that were never broadcast indicate either queue loss, manual cancellation, or unsafe retry behavior. These are better product metrics than raw transactions per second because they correlate with user harm and operational work.</p>
<p>Vendor-published service quotas also shape the roadmap. AWS KMS commonly documents default regional quotas for asymmetric cryptographic operations around <strong>500 requests per second</strong>, depending on account and region, so a wallet that signs every small transfer through one path can hit a ceiling before the application servers look busy. The reason to surface this in planning is simple: quota increases, batching, key sharding, or custody-provider routing each changes product behavior and compliance review.</p>
<p>Approval UX is another scaling limit. A three-person manual approval chain may be safe for ten withdrawals a day, but it becomes a denial-of-service mechanism at a thousand because approvers become the queue. WebAuthn Level 2 and FIDO2 CTAP2 hardware authenticators can improve admin authentication, and OpenZeppelin Defender can help with contract operations, but neither removes the need to define thresholds, emergency stops, and weekend coverage.</p>
<ul>
<li><strong>Scope an approval simulator</strong> because product managers need to see how many transactions wait per policy tier before real users are blocked.</li>
<li><strong>Scope replay-safe idempotency</strong> because retries are normal user behavior when wallet status is ambiguous.</li>
<li><strong>Scope fee replacement rules</strong> because stuck transactions become support tickets when gas spikes.</li>
<li><strong>Scope reconciliation dashboards</strong> because finance cannot close books from mempool events.</li>
</ul>
<h2>Start with the queue, not the curve</h2>
<p>The first concrete step is to draw the transaction state machine from user request to final reconciliation and attach one owner, one metric, and one failure mode to every edge. Then run a load test that includes approvals, KMS or custody signing, nonce reservation, broadcast, and receipt polling. If that path is not measurable, the wallet is not ready to scale.</p>
<p>The post <a href="https://deepfriedbytes.com/at-10x-users-your-crypto-wallet-breaks-at-idempotency/">At 10x users, your crypto wallet breaks at idempotency</a> appeared first on <a href="https://deepfriedbytes.com">Blog about a digital future</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>comments@deepfriedbytes.com (Keith Elder &amp; Chris Woodruff)</dc:creator></item>
		<item>
		<title>ROS 2 on a laptop in 60 minutes from install to moving bot</title>
		<link>https://deepfriedbytes.com/ros-2-on-a-laptop-in-60-minutes-from-install-to-moving-bot/</link>
		
		
		<pubDate>Mon, 14 Sep 2026 09:56:01 +0000</pubDate>
				<category><![CDATA[Robotics]]></category>
		<guid isPermaLink="false">https://deepfriedbytes.com/ros-2-on-a-laptop-in-60-minutes-from-install-to-moving-bot/</guid>

					<description><![CDATA[<p>A junior robotics setup should start as a boring ROS 2 system in a container, not as a heroic hardware sprint. My position: simulation-first is the fastest honest path to a working robot because it exposes topics, timing, transforms, and failures before motors can hide them behind drama. Your first robot should be fake because fake robots fail faster I would not begin by buying a physical robot arm, because a wrong tf2 frame, inverted motor direction, or blocking callback can turn a 5-minute software mistake into damaged hardware and an afternoon of guessing. Start with a simulated node graph that proves you understand messages, timing, and observability. Use Ubuntu 22.04 LTS, ROS 2 Humble Hawksbill, Docker Engine 24.x, colcon, Python 3.10, and rclpy. ROS 2 Humble is a conservative choice because its vendor-published support window runs to May 2027, which gives a junior developer time to learn without chasing breaking platform changes. The smallest useful robot program is not navigation, mapping, or a vision model. It is one publisher, one subscriber, one topic, and one observable result. Run this first: docker run --rm -it osrf/ros:humble-ros-base bash -lc ' set -e apt-get update &#62;/dev/null apt-get install -y ros-humble-demo-nodes-cpp &#62;/dev/null source /opt/ros/humble/setup.bash ros2 run demo_nodes_cpp talker &#62;/tmp/talker.log 2&#62;&#38;1 &#38; sleep 2 ros2 topic echo /chatter --once ' If the container prints one std_msgs/msg/String message, you have a working DDS-backed ROS 2 graph. That sounds too small, but it is the right first milestone because every larger robot behavior is still a set of nodes exchanging messages under timing pressure. Now make the setup slightly less toy-like. Create a workspace named robot_ws, build with colcon build &#8211;symlink-install, and add a Python package that publishes geometry_msgs/msg/Twist to /cmd_vel. Use a 20 Hz command loop as a starting knob, because it is fast enough for smooth differential-drive simulation but slow enough that a beginner can debug logs without drowning in messages. Robotics Software Development Trends for Smart Automation is useful as a pressure test for my simulation-first bias, because smart automation often rewards reliability over novelty. I still disagree with starting from “automation value” because junior developers learn faster when they first prove a single command can move through the graph predictably. The working setup is a node graph, not a pile of scripts The first real architecture decision is to stop writing random Python scripts and start naming nodes by responsibility. Use /teleop for commands, /base_controller for velocity handling, /joint_state_publisher for state, and /robot_state_publisher for transforms. This structure is worth the ceremony because ROS tooling becomes useful only when the graph is inspectable. Keep REP-105 frame conventions from day one: map, odom, and base_link. A junior developer can ignore that standard for a demo, but the cost arrives later because navigation, RViz2, rosbag2 playback, and SLAM tools assume consistent frames. Use tf2 early even if your first transform is static. Your first measurable target should be boring: publish velocity commands, subscribe to pose or odometry, display the frames in RViz2, and record a bag with rosbag2. Treat a p95 callback latency under 100 ms as a measurement target for this beginner setup, because a slower loop is noticeable even in simulation and usually means blocking work is happening inside a callback. Use ros2 node list, ros2 topic hz, ros2 topic echo &#8211;once, ros2 interface show, and rqt_graph before adding any new feature. These tools are not optional polish, because a robot that cannot be inspected will fail in ways that look random even when the bug is simple. Set QoS intentionally. For camera-like streams or high-rate sensors, reliability=BEST_EFFORT, history=KEEP_LAST, and depth=10 are reasonable starting values because stale data can be worse than dropped data. For commands that must arrive, use RELIABLE because losing a stop command is more dangerous than waiting briefly for delivery. I disagree with Robotics Software Development Trends for Modern IT Teams on one default: I would not make Kubernetes the early robotics development environment, because ROS discovery, device access, GUI tools, and real-time-ish debugging are easier to learn on one host before orchestration adds another failure layer. Gazebo wins for ROS-native practice, while Webots wins for visual feedback Pick one simulator and finish the loop; do not sample three simulators in the first week, because tool-hopping feels productive while delaying the first controlled motion. The practical comparison is Gazebo Sim Fortress versus Webots R2023b or newer. Gazebo Sim Fortress wins when your goal is ROS-native robotics practice, because its ROS 2 bridges, SDF models, sensor plugins, and launch-file patterns match the ecosystem you will meet in production-like stacks. Its cost is complexity: SDF, plugin versions, graphics drivers, and topic bridges can consume hours before your robot moves. Webots R2023b wins when visual feedback and beginner-friendly world editing matter more, because its scene tree and controller workflow are easier to understand on the first day. Its cost is translation: once you move deeper into ROS 2 navigation patterns, you may spend time adapting controllers and message bridges that Gazebo examples already assume. Both tools are free to start, so the real price is not license cost but debugging time. On a modest laptop, budget 2 CPU cores and 4 GB of RAM for a basic differential-drive world as a practical floor, because starving the simulator makes timing bugs look like robotics bugs. Watch the simulator’s real-time factor; if it falls below 0.8 in your own measurement, reduce sensor rates before blaming ROS. For a first working robot, use a differential-drive model with a lidar and odometry. Avoid a legged robot or manipulator at this stage, because the control problem becomes the project before you have learned the software stack. Add RViz2 and confirm that base_link, wheel frames, lidar frame, and odometry frame move as expected. Once motion works, record a rosbag2 file for 30 seconds as a small test artifact. That number is long enough to catch startup and steady-state behavior, yet short enough that replay stays quick during debugging. Replay the bag after every structural change, because deterministic playback helps you separate code regressions from simulator randomness. Navigation should be added after observability, not before it Do not install Nav2 as the first exciting milestone, because a navigation stack hides several subsystems behind YAML and launch files. Add it only after you can explain your frames, topics, rates, and bag playback. The minimal progression is: manual /cmd_vel, odometry, lidar scan, static map, localization, then Nav2. Use SLAM Toolbox 2.6 only after manual driving works, because mapping failures are easier to diagnose when you already know the robot can move and publish transforms correctly. When you add Nav2, pin the basics. Use nav2_bringup, AMCL, BT Navigator, DWB Controller, and map_server. Keep the first map tiny; a 10 m by 10 m simulated room is a sensible practice size because it shortens iteration while still forcing localization, costmaps, and recovery behavior to interact. Start with conservative tuning. A controller_frequency of 10.0 Hz is a safe initial value to tune, because it gives the local planner frequent updates without punishing a weak laptop. A transform_tolerance of 0.2 seconds is another reasonable first setting, because simulation and Docker can introduce small scheduling delays that should not immediately break navigation. The explicit tradeoff is Nav2 versus a hand-written waypoint follower. Nav2 wins when you need obstacle-aware navigation, recovery behaviors, lifecycle nodes, and standard ROS 2 patterns; its cost is YAML complexity and a steeper debugging curve. A hand-written waypoint follower wins for a one-evening demo on an empty map; its cost is that you will throw most of it away once obstacles, localization uncertainty, or recovery states matter. Add tests before adding cleverness. Use pytest for pure Python functions, launch_testing for node startup checks, and ros2 topic hz output as a human-readable smoke test. Track dropped message rate, p95 callback latency, CPU percentage, and real-time factor, because these metrics map directly to symptoms a robot developer can observe. Your setup is working when failure is repeatable A working robotics setup is not one successful run. It is a repeatable failure loop: launch, command, observe, record, replay, change one thing, and compare. That standard may feel strict, but it saves time because robotics bugs often combine timing, geometry, and state. Use RMW_IMPLEMENTATION=rmw_cyclonedds_cpp if you want a stable local default on many ROS 2 Humble machines, because Cyclone DDS is widely used and easy to configure with CYCLONEDDS_URI. Use rmw_fastrtps_cpp when matching a team that already standardizes on Fast DDS, because middleware mismatches create discovery and QoS surprises that junior developers should not debug alone. If you later touch embedded control, learn micro-ROS and XRCE-DDS after the desktop graph works. That order matters because microcontrollers add memory limits, serial transports, and agent processes; learning those before normal ROS 2 makes every concept harder. Create a simple “definition of working” for your first robot: The graph starts from one launch command without manual node babysitting. ros2 topic hz /cmd_vel shows the expected command rate within 10 percent, which is a practical tolerance rather than a universal law. RViz2 displays the robot model with no broken fixed frame warnings. A 30-second rosbag2 recording can be replayed and inspected. The robot can drive to one goal in simulation twice in a row without changing code. Do not add computer vision, cloud deployment, fleet management, or reinforcement learning before this checklist passes, because each addition multiplies the search space when the base system is still unproven. A junior developer earns speed by shrinking unknowns, not by collecting advanced dependencies. The first thing to do is run the Docker command above and confirm one ROS 2 message crosses the graph. After that, create a workspace, publish /cmd_vel at 20 Hz, view the frames in RViz2, and record a 30-second bag. Your robot can stay fake until the software stops being mysterious.</p>
<p>The post <a href="https://deepfriedbytes.com/ros-2-on-a-laptop-in-60-minutes-from-install-to-moving-bot/">ROS 2 on a laptop in 60 minutes from install to moving bot</a> appeared first on <a href="https://deepfriedbytes.com">Blog about a digital future</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>A junior robotics setup should start as a boring ROS 2 system in a container, not as a heroic hardware sprint. My position: simulation-first is the fastest honest path to a working robot because it exposes topics, timing, transforms, and failures before motors can hide them behind drama.</p>
<h2>Your first robot should be fake because fake robots fail faster</h2>
<p>I would not begin by buying a physical robot arm, because a wrong <strong>tf2</strong> frame, inverted motor direction, or blocking callback can turn a 5-minute software mistake into damaged hardware and an afternoon of guessing. Start with a simulated node graph that proves you understand messages, timing, and observability.</p>
<p>Use <strong>Ubuntu 22.04 LTS</strong>, <strong>ROS 2 Humble Hawksbill</strong>, <strong>Docker Engine 24.x</strong>, <strong>colcon</strong>, <strong>Python 3.10</strong>, and <strong>rclpy</strong>. ROS 2 Humble is a conservative choice because its vendor-published support window runs to May 2027, which gives a junior developer time to learn without chasing breaking platform changes.</p>
<p>The smallest useful robot program is not navigation, mapping, or a vision model. It is one publisher, one subscriber, one topic, and one observable result. Run this first:</p>
<pre>docker run --rm -it osrf/ros:humble-ros-base bash -lc '
set -e
apt-get update &gt;/dev/null
apt-get install -y ros-humble-demo-nodes-cpp &gt;/dev/null
source /opt/ros/humble/setup.bash
ros2 run demo_nodes_cpp talker &gt;/tmp/talker.log 2&gt;&amp;1 &amp;
sleep 2
ros2 topic echo /chatter --once
'</pre>
<p>If the container prints one <strong>std_msgs/msg/String</strong> message, you have a working DDS-backed ROS 2 graph. That sounds too small, but it is the right first milestone because every larger robot behavior is still a set of nodes exchanging messages under timing pressure.</p>
<p>Now make the setup slightly less toy-like. Create a workspace named <strong>robot_ws</strong>, build with <strong>colcon build &#8211;symlink-install</strong>, and add a Python package that publishes <strong>geometry_msgs/msg/Twist</strong> to <strong>/cmd_vel</strong>. Use a 20 Hz command loop as a starting knob, because it is fast enough for smooth differential-drive simulation but slow enough that a beginner can debug logs without drowning in messages.</p>
<p><a href=/robotics-software-development-trends-for-smart-automation-2/>Robotics Software Development Trends for Smart Automation</a> is useful as a pressure test for my simulation-first bias, because smart automation often rewards reliability over novelty. I still disagree with starting from “automation value” because junior developers learn faster when they first prove a single command can move through the graph predictably.</p>
<h2>The working setup is a node graph, not a pile of scripts</h2>
<p>The first real architecture decision is to stop writing random Python scripts and start naming nodes by responsibility. Use <strong>/teleop</strong> for commands, <strong>/base_controller</strong> for velocity handling, <strong>/joint_state_publisher</strong> for state, and <strong>/robot_state_publisher</strong> for transforms. This structure is worth the ceremony because ROS tooling becomes useful only when the graph is inspectable.</p>
<p>Keep <strong>REP-105</strong> frame conventions from day one: <strong>map</strong>, <strong>odom</strong>, and <strong>base_link</strong>. A junior developer can ignore that standard for a demo, but the cost arrives later because navigation, RViz2, rosbag2 playback, and SLAM tools assume consistent frames. Use <strong>tf2</strong> early even if your first transform is static.</p>
<p>Your first measurable target should be boring: publish velocity commands, subscribe to pose or odometry, display the frames in <strong>RViz2</strong>, and record a bag with <strong>rosbag2</strong>. Treat a p95 callback latency under 100 ms as a measurement target for this beginner setup, because a slower loop is noticeable even in simulation and usually means blocking work is happening inside a callback.</p>
<p>Use <strong>ros2 node list</strong>, <strong>ros2 topic hz</strong>, <strong>ros2 topic echo &#8211;once</strong>, <strong>ros2 interface show</strong>, and <strong>rqt_graph</strong> before adding any new feature. These tools are not optional polish, because a robot that cannot be inspected will fail in ways that look random even when the bug is simple.</p>
<p>Set QoS intentionally. For camera-like streams or high-rate sensors, <strong>reliability=BEST_EFFORT</strong>, <strong>history=KEEP_LAST</strong>, and <strong>depth=10</strong> are reasonable starting values because stale data can be worse than dropped data. For commands that must arrive, use <strong>RELIABLE</strong> because losing a stop command is more dangerous than waiting briefly for delivery.</p>
<p>I disagree with <a href=/robotics-software-development-trends-for-modern-it-teams/>Robotics Software Development Trends for Modern IT Teams</a> on one default: I would not make Kubernetes the early robotics development environment, because ROS discovery, device access, GUI tools, and real-time-ish debugging are easier to learn on one host before orchestration adds another failure layer.</p>
<h2>Gazebo wins for ROS-native practice, while Webots wins for visual feedback</h2>
<p>Pick one simulator and finish the loop; do not sample three simulators in the first week, because tool-hopping feels productive while delaying the first controlled motion. The practical comparison is <strong>Gazebo Sim Fortress</strong> versus <strong>Webots R2023b or newer</strong>.</p>
<p><strong>Gazebo Sim Fortress</strong> wins when your goal is ROS-native robotics practice, because its ROS 2 bridges, SDF models, sensor plugins, and launch-file patterns match the ecosystem you will meet in production-like stacks. Its cost is complexity: SDF, plugin versions, graphics drivers, and topic bridges can consume hours before your robot moves.</p>
<p><strong>Webots R2023b</strong> wins when visual feedback and beginner-friendly world editing matter more, because its scene tree and controller workflow are easier to understand on the first day. Its cost is translation: once you move deeper into ROS 2 navigation patterns, you may spend time adapting controllers and message bridges that Gazebo examples already assume.</p>
<p>Both tools are free to start, so the real price is not license cost but debugging time. On a modest laptop, budget 2 CPU cores and 4 GB of RAM for a basic differential-drive world as a practical floor, because starving the simulator makes timing bugs look like robotics bugs. Watch the simulator’s real-time factor; if it falls below 0.8 in your own measurement, reduce sensor rates before blaming ROS.</p>
<p>For a first working robot, use a differential-drive model with a lidar and odometry. Avoid a legged robot or manipulator at this stage, because the control problem becomes the project before you have learned the software stack. Add <strong>RViz2</strong> and confirm that <strong>base_link</strong>, wheel frames, lidar frame, and odometry frame move as expected.</p>
<p>Once motion works, record a <strong>rosbag2</strong> file for 30 seconds as a small test artifact. That number is long enough to catch startup and steady-state behavior, yet short enough that replay stays quick during debugging. Replay the bag after every structural change, because deterministic playback helps you separate code regressions from simulator randomness.</p>
<h2>Navigation should be added after observability, not before it</h2>
<p>Do not install <strong>Nav2</strong> as the first exciting milestone, because a navigation stack hides several subsystems behind YAML and launch files. Add it only after you can explain your frames, topics, rates, and bag playback.</p>
<p>The minimal progression is: manual <strong>/cmd_vel</strong>, odometry, lidar scan, static map, localization, then Nav2. Use <strong>SLAM Toolbox 2.6</strong> only after manual driving works, because mapping failures are easier to diagnose when you already know the robot can move and publish transforms correctly.</p>
<p>When you add Nav2, pin the basics. Use <strong>nav2_bringup</strong>, <strong>AMCL</strong>, <strong>BT Navigator</strong>, <strong>DWB Controller</strong>, and <strong>map_server</strong>. Keep the first map tiny; a 10 m by 10 m simulated room is a sensible practice size because it shortens iteration while still forcing localization, costmaps, and recovery behavior to interact.</p>
<p>Start with conservative tuning. A <strong>controller_frequency</strong> of 10.0 Hz is a safe initial value to tune, because it gives the local planner frequent updates without punishing a weak laptop. A <strong>transform_tolerance</strong> of 0.2 seconds is another reasonable first setting, because simulation and Docker can introduce small scheduling delays that should not immediately break navigation.</p>
<p>The explicit tradeoff is <strong>Nav2</strong> versus a hand-written waypoint follower. Nav2 wins when you need obstacle-aware navigation, recovery behaviors, lifecycle nodes, and standard ROS 2 patterns; its cost is YAML complexity and a steeper debugging curve. A hand-written waypoint follower wins for a one-evening demo on an empty map; its cost is that you will throw most of it away once obstacles, localization uncertainty, or recovery states matter.</p>
<p>Add tests before adding cleverness. Use <strong>pytest</strong> for pure Python functions, <strong>launch_testing</strong> for node startup checks, and <strong>ros2 topic hz</strong> output as a human-readable smoke test. Track dropped message rate, p95 callback latency, CPU percentage, and real-time factor, because these metrics map directly to symptoms a robot developer can observe.</p>
<h2>Your setup is working when failure is repeatable</h2>
<p>A working robotics setup is not one successful run. It is a repeatable failure loop: launch, command, observe, record, replay, change one thing, and compare. That standard may feel strict, but it saves time because robotics bugs often combine timing, geometry, and state.</p>
<p>Use <strong>RMW_IMPLEMENTATION=rmw_cyclonedds_cpp</strong> if you want a stable local default on many ROS 2 Humble machines, because Cyclone DDS is widely used and easy to configure with <strong>CYCLONEDDS_URI</strong>. Use <strong>rmw_fastrtps_cpp</strong> when matching a team that already standardizes on Fast DDS, because middleware mismatches create discovery and QoS surprises that junior developers should not debug alone.</p>
<p>If you later touch embedded control, learn <strong>micro-ROS</strong> and <strong>XRCE-DDS</strong> after the desktop graph works. That order matters because microcontrollers add memory limits, serial transports, and agent processes; learning those before normal ROS 2 makes every concept harder.</p>
<p>Create a simple “definition of working” for your first robot:</p>
<ul>
<li>The graph starts from one launch command without manual node babysitting.</li>
<li><strong>ros2 topic hz /cmd_vel</strong> shows the expected command rate within 10 percent, which is a practical tolerance rather than a universal law.</li>
<li><strong>RViz2</strong> displays the robot model with no broken fixed frame warnings.</li>
<li>A 30-second <strong>rosbag2</strong> recording can be replayed and inspected.</li>
<li>The robot can drive to one goal in simulation twice in a row without changing code.</li>
</ul>
<p>Do not add computer vision, cloud deployment, fleet management, or reinforcement learning before this checklist passes, because each addition multiplies the search space when the base system is still unproven. A junior developer earns speed by shrinking unknowns, not by collecting advanced dependencies.</p>
<p>The first thing to do is run the Docker command above and confirm one ROS 2 message crosses the graph. After that, create a workspace, publish <strong>/cmd_vel</strong> at 20 Hz, view the frames in <strong>RViz2</strong>, and record a 30-second bag. Your robot can stay fake until the software stops being mysterious.</p>
<p>The post <a href="https://deepfriedbytes.com/ros-2-on-a-laptop-in-60-minutes-from-install-to-moving-bot/">ROS 2 on a laptop in 60 minutes from install to moving bot</a> appeared first on <a href="https://deepfriedbytes.com">Blog about a digital future</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>comments@deepfriedbytes.com (Keith Elder &amp; Chris Woodruff)</dc:creator></item>
		<item>
		<title>Custom Vision Model or Pretrained API Which Fits Your First App</title>
		<link>https://deepfriedbytes.com/custom-vision-model-or-pretrained-api-which-fits-your-first-app/</link>
		
		
		<pubDate>Thu, 10 Sep 2026 10:00:29 +0000</pubDate>
				<category><![CDATA[AI Computer Vision]]></category>
		<category><![CDATA[Custom Software Development]]></category>
		<category><![CDATA[AI]]></category>
		<category><![CDATA[Computer Vision]]></category>
		<guid isPermaLink="false">https://deepfriedbytes.com/custom-vision-model-or-pretrained-api-which-fits-your-first-app/</guid>

					<description><![CDATA[<p>Most junior developers reach for model training too early because it feels like “real AI.” My position is stricter: start with a managed vision API unless the mistakes are product-specific, expensive, or impossible to explain away. Owning the model is justified only when control over labels, latency, privacy, or deployment clearly beats the extra work. The API-first choice wins more often than ambitious developers want to admit The practical decision is not “computer vision or no computer vision.” It is Managed Vision API versus Owned Model Pipeline. Managed Vision API means Google Cloud Vision API, AWS Rekognition, Azure AI Vision Image Analysis 4.0, or a similar hosted service. Owned Model Pipeline means you collect data, label it in CVAT 2.11 or Label Studio 1.13, train with PyTorch 2.3 or Ultralytics YOLOv8, export to ONNX opset 17, and deploy through something like NVIDIA Triton Inference Server 2.47 or OpenVINO 2024.2. I would not train a custom detector as the first move for a junior-owned feature, because the hardest bugs will be data bugs rather than Python bugs, and you will spend most of the sprint arguing with bad labels, duplicate frames, and unclear acceptance criteria. A hosted API is less exciting, but it gives you a working error profile quickly because the model, scaling layer, and basic monitoring already exist. The broad reference, AI Computer Vision in Software Development: Top Use Cases, is useful as a map of possibilities, but a junior developer should narrow the question to this: who owns the false positives, false negatives, latency, and retraining? If the vendor’s generic labels are good enough, the API wins because your team buys time and avoids building an ML operations stack before the product has proved the need. Here is the explicit comparison I would use in a planning ticket: Option A: Managed Vision API. It wins when the task is common, the image can legally leave your system, the acceptable response time is ordinary web latency, and the team needs a feature in days rather than months. It costs per request, creates vendor lock-in, adds network latency, and limits your ability to debug model reasoning. Option B: Owned Model Pipeline. It wins when labels are domain-specific, data cannot leave your environment, edge inference is required, or a wrong prediction has a product cost that only your team understands. It costs annotation time, GPU budget, CI/CD complexity, model monitoring, and maintenance after every data drift event. For a first spike, cap the investigation at 300 images; treat that as a planning constraint to tune, not a scientific law, because a small but representative sample exposes integration problems faster than a huge unlabeled folder. If an API cannot give useful output on those 300 images, the API probably is not the right default because its pretrained label space does not match your product language. A boring baseline prevents you from training around a simple rule Before either approach wins, build a non-ML baseline. This is not anti-AI; it is a cheap trap for bad assumptions because many “vision” requirements are actually thresholding, edge detection, QR decoding, template matching, or geometry checks. OpenCV 4.10, scikit-image 0.23, Tesseract OCR 5.3, and ZBar can solve boring cases with fewer moving parts than a neural network. The following OpenCV snippet generates a small image, finds edges, counts contours, and runs without a model file: import cv2 import numpy as np img = np.zeros((240, 320, 3), dtype=np.uint8) cv2.rectangle(img, (70, 60), (250, 180), (255, 255, 255), -1) gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) edges = cv2.Canny(gray, 80, 160) contours, _ = cv2.findContours(edges, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE) print(f"contours={len(contours)}") print(f"edge_pixels={np.count_nonzero(edges)}") This kind of baseline matters because it gives you a floor. If the simple version is stable, a neural model must beat it on an agreed metric, not just look smarter in a demo. Use IoU, precision, recall, F1 score, false-positive rate, and p95 latency as named metrics because vague “accuracy” hides the difference between missing an object and drawing a slightly imperfect box. For a detector, start with a confidence threshold of 0.35 as a tunable value, because lower thresholds help you see missed candidates during debugging while higher thresholds can hide recall problems. For non-maximum suppression, use IoU 0.50 as an initial knob, because it is strict enough to remove duplicate boxes but not so strict that nearby objects disappear. Those two values are not sacred; they are there so your pull request has a visible decision instead of a hidden default. A useful junior-level rule is this: if OpenCV or a hosted API gets you above the product’s minimum bar, do not train yet, because every custom model creates a second software system with its own dependencies, artifacts, and regressions. That claim is intentionally conservative because the cost of being wrong with an API is usually a refactor, while the cost of being wrong with a model can include re-labeling data, retraining, and explaining why yesterday’s checkpoint behaved differently. Owned models win when the label vocabulary belongs to your product An owned model wins when the API’s labels are almost right but product-useless. “Person,” “vehicle,” or “document” may be fine for a generic demo, but your application may need “damaged seal,” “wrong connector orientation,” or “signature outside approved box.” In that situation, hosted labels lose because they cannot express the mistake your users care about. The companion post, AI Computer Vision for Software Developers: Key Use Cases, gives useful examples, but I would treat each example as a build-or-buy test rather than a reason to train. A use case becomes a model project only when the expected failure modes are specific enough to justify dataset ownership. If you do own the model, keep the stack boring. Use CVAT 2.11 or Label Studio 1.13 for annotation, store datasets with DVC 3.51, train with PyTorch 2.3 or Ultralytics 8.2, export to ONNX opset 17, and test inference with ONNX Runtime 1.18 before optimizing with TensorRT 10. This path is popular for a reason: every step has documentation, examples, and failure modes that other developers have already seen. Do not begin with a giant architecture search, because junior teams usually lose more time to inconsistent labels than to a weak backbone. YOLOv8n or YOLOv8s is a reasonable first detector because fast feedback improves dataset quality, while a larger model can hide labeling mistakes behind impressive demo screenshots. If you later need segmentation, compare YOLOv8-seg against Segment Anything Model 2 only after you define how masks will be scored, because beautiful masks are worthless if your product only consumes bounding boxes. Set an acceptance rule before training. For example, require COCO mAP@[.5:.95] to improve by at least 5 percentage points over the baseline on a held-out set; this is a release threshold you choose, not a universal benchmark, because different products tolerate different localization errors. Also track p95 inference time, because a detector with better mAP can still lose if it blocks a user-facing request. Deployment is where owned models start charging rent. NVIDIA Triton Inference Server 2.47 supports dynamic batching through settings such as max_queue_delay_microseconds, and TensorRT 10 can reduce latency with FP16 on supported NVIDIA GPUs, but both add operational complexity because model artifacts now behave like versioned production dependencies. OpenVINO 2024.2 may be a better fit for CPU-heavy environments because it avoids requiring CUDA-capable hardware, but it still requires you to test output parity after conversion. For a small service, FastAPI 0.111 behind Docker is enough for an internal prototype, because the goal is to prove the model boundary before designing a platform. Once traffic grows, add Prometheus counters for request count, prediction class, confidence buckets, and error status, because model failures often look like normal HTTP 200 responses unless you log semantic outcomes. Managed APIs win when speed, compliance, and maintenance matter more than elegance Managed APIs win when the computer vision task is common and your real work is product integration. OCR, logo detection, moderation-like labeling, face-independent image tagging, and document text extraction often fit this category because providers have already trained on broader data than a small team can collect. That does not mean the provider is smarter; it means your team’s marginal dataset is unlikely to beat a mature service quickly. Vendor limits should shape your design early. Google Cloud Vision publishes an image file limit of 20 MB for many image requests, while AWS Rekognition lists 5 MB as the maximum image bytes payload for direct API calls; those are provider-published constraints, and they matter because oversized mobile uploads will fail before your application logic runs. If your images often exceed those limits, resize or store in object storage before calling the API. Latency needs the same honesty. A realistic web target might be p95 under 700 ms for an asynchronous preview; treat that as a product-tuned service objective, because a user waiting for a background enrichment result behaves differently from a user blocked on checkout or form submission. If your measured p95 includes network time, serialization, and provider processing, do not compare it against a local GPU benchmark because those are different systems. Managed APIs cost less engineering time at the beginning because authentication, scaling, model hosting, and basic upgrades are someone else’s problem. They cost more strategic control later because pricing, regional availability, request limits, and model behavior can change outside your sprint plan. That trade is acceptable for many junior-built features because the first risk is usually “nobody uses it,” not “we need perfect model sovereignty.” Security and privacy can flip the decision. If images contain sensitive internal material, an owned model inside your network may win because reducing external data transfer simplifies review and incident response. If your organization already approves Google Cloud, AWS, or Azure for similar data, the API may still win because existing controls are cheaper than inventing a private ML platform. Be careful with caching. Caching API responses by image hash can reduce cost because repeated uploads produce identical predictions, but it can also preserve old mistakes because vendor models or thresholds may improve while your cache stays stale. Add a model-provider version field when available, and include your own schema version so that reprocessing is an intentional migration rather than a surprise. Run a two-week shootout, then remove the losing path Your first concrete move should be a two-week shootout with one API prototype and one owned-model baseline, both judged on the same 300-image sample, the same thresholds, and the same p95 target. Delete the loser after the decision, because keeping both paths “just in case” doubles maintenance for a feature that has not yet earned that complexity.</p>
<p>The post <a href="https://deepfriedbytes.com/custom-vision-model-or-pretrained-api-which-fits-your-first-app/">Custom Vision Model or Pretrained API Which Fits Your First App</a> appeared first on <a href="https://deepfriedbytes.com">Blog about a digital future</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Most junior developers reach for model training too early because it feels like “real AI.” My position is stricter: start with a managed vision API unless the mistakes are product-specific, expensive, or impossible to explain away. Owning the model is justified only when control over labels, latency, privacy, or deployment clearly beats the extra work.</p>
<h2>The API-first choice wins more often than ambitious developers want to admit</h2>
<p>The practical decision is not “computer vision or no computer vision.” It is <strong>Managed Vision API</strong> versus <strong>Owned Model Pipeline</strong>. Managed Vision API means Google Cloud Vision API, AWS Rekognition, Azure AI Vision Image Analysis 4.0, or a similar hosted service. Owned Model Pipeline means you collect data, label it in CVAT 2.11 or Label Studio 1.13, train with PyTorch 2.3 or Ultralytics YOLOv8, export to ONNX opset 17, and deploy through something like NVIDIA Triton Inference Server 2.47 or OpenVINO 2024.2.</p>
<p>I would not train a custom detector as the first move for a junior-owned feature, because the hardest bugs will be data bugs rather than Python bugs, and you will spend most of the sprint arguing with bad labels, duplicate frames, and unclear acceptance criteria. A hosted API is less exciting, but it gives you a working error profile quickly because the model, scaling layer, and basic monitoring already exist.</p>
<p>The broad reference, <a href=/ai-computer-vision-in-software-development-top-use-cases/>AI Computer Vision in Software Development: Top Use Cases</a>, is useful as a map of possibilities, but a junior developer should narrow the question to this: <strong>who owns the false positives, false negatives, latency, and retraining?</strong> If the vendor’s generic labels are good enough, the API wins because your team buys time and avoids building an ML operations stack before the product has proved the need.</p>
<p>Here is the explicit comparison I would use in a planning ticket:</p>
<ul>
<li><strong>Option A: Managed Vision API.</strong> It wins when the task is common, the image can legally leave your system, the acceptable response time is ordinary web latency, and the team needs a feature in days rather than months. It costs per request, creates vendor lock-in, adds network latency, and limits your ability to debug model reasoning.</li>
<li><strong>Option B: Owned Model Pipeline.</strong> It wins when labels are domain-specific, data cannot leave your environment, edge inference is required, or a wrong prediction has a product cost that only your team understands. It costs annotation time, GPU budget, CI/CD complexity, model monitoring, and maintenance after every data drift event.</li>
</ul>
<p>For a first spike, cap the investigation at <strong>300 images</strong>; treat that as a planning constraint to tune, not a scientific law, because a small but representative sample exposes integration problems faster than a huge unlabeled folder. If an API cannot give useful output on those 300 images, the API probably is not the right default because its pretrained label space does not match your product language.</p>
<h2>A boring baseline prevents you from training around a simple rule</h2>
<p>Before either approach wins, build a non-ML baseline. This is not anti-AI; it is a cheap trap for bad assumptions because many “vision” requirements are actually thresholding, edge detection, QR decoding, template matching, or geometry checks. OpenCV 4.10, scikit-image 0.23, Tesseract OCR 5.3, and ZBar can solve boring cases with fewer moving parts than a neural network.</p>
<p>The following OpenCV snippet generates a small image, finds edges, counts contours, and runs without a model file:</p>
<pre>import cv2
import numpy as np

img = np.zeros((240, 320, 3), dtype=np.uint8)
cv2.rectangle(img, (70, 60), (250, 180), (255, 255, 255), -1)
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
edges = cv2.Canny(gray, 80, 160)
contours, _ = cv2.findContours(edges, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)

print(f"contours={len(contours)}")
print(f"edge_pixels={np.count_nonzero(edges)}")</pre>
<p>This kind of baseline matters because it gives you a floor. If the simple version is stable, a neural model must beat it on an agreed metric, not just look smarter in a demo. Use IoU, precision, recall, F1 score, false-positive rate, and p95 latency as named metrics because vague “accuracy” hides the difference between missing an object and drawing a slightly imperfect box.</p>
<p>For a detector, start with a confidence threshold of <strong>0.35</strong> as a tunable value, because lower thresholds help you see missed candidates during debugging while higher thresholds can hide recall problems. For non-maximum suppression, use IoU <strong>0.50</strong> as an initial knob, because it is strict enough to remove duplicate boxes but not so strict that nearby objects disappear. Those two values are not sacred; they are there so your pull request has a visible decision instead of a hidden default.</p>
<p>A useful junior-level rule is this: if OpenCV or a hosted API gets you above the product’s minimum bar, do not train yet, because every custom model creates a second software system with its own dependencies, artifacts, and regressions. That claim is intentionally conservative because the cost of being wrong with an API is usually a refactor, while the cost of being wrong with a model can include re-labeling data, retraining, and explaining why yesterday’s checkpoint behaved differently.</p>
<h2>Owned models win when the label vocabulary belongs to your product</h2>
<p>An owned model wins when the API’s labels are almost right but product-useless. “Person,” “vehicle,” or “document” may be fine for a generic demo, but your application may need “damaged seal,” “wrong connector orientation,” or “signature outside approved box.” In that situation, hosted labels lose because they cannot express the mistake your users care about.</p>
<p>The companion post, <a href=/ai-computer-vision-for-software-developers-key-use-cases/>AI Computer Vision for Software Developers: Key Use Cases</a>, gives useful examples, but I would treat each example as a build-or-buy test rather than a reason to train. A use case becomes a model project only when the expected failure modes are specific enough to justify dataset ownership.</p>
<p>If you do own the model, keep the stack boring. Use CVAT 2.11 or Label Studio 1.13 for annotation, store datasets with DVC 3.51, train with PyTorch 2.3 or Ultralytics 8.2, export to ONNX opset 17, and test inference with ONNX Runtime 1.18 before optimizing with TensorRT 10. This path is popular for a reason: every step has documentation, examples, and failure modes that other developers have already seen.</p>
<p>Do not begin with a giant architecture search, because junior teams usually lose more time to inconsistent labels than to a weak backbone. YOLOv8n or YOLOv8s is a reasonable first detector because fast feedback improves dataset quality, while a larger model can hide labeling mistakes behind impressive demo screenshots. If you later need segmentation, compare YOLOv8-seg against Segment Anything Model 2 only after you define how masks will be scored, because beautiful masks are worthless if your product only consumes bounding boxes.</p>
<p>Set an acceptance rule before training. For example, require COCO mAP@[.5:.95] to improve by <strong>at least 5 percentage points</strong> over the baseline on a held-out set; this is a release threshold you choose, not a universal benchmark, because different products tolerate different localization errors. Also track p95 inference time, because a detector with better mAP can still lose if it blocks a user-facing request.</p>
<p>Deployment is where owned models start charging rent. NVIDIA Triton Inference Server 2.47 supports dynamic batching through settings such as <em>max_queue_delay_microseconds</em>, and TensorRT 10 can reduce latency with FP16 on supported NVIDIA GPUs, but both add operational complexity because model artifacts now behave like versioned production dependencies. OpenVINO 2024.2 may be a better fit for CPU-heavy environments because it avoids requiring CUDA-capable hardware, but it still requires you to test output parity after conversion.</p>
<p>For a small service, FastAPI 0.111 behind Docker is enough for an internal prototype, because the goal is to prove the model boundary before designing a platform. Once traffic grows, add Prometheus counters for request count, prediction class, confidence buckets, and error status, because model failures often look like normal HTTP 200 responses unless you log semantic outcomes.</p>
<h2>Managed APIs win when speed, compliance, and maintenance matter more than elegance</h2>
<p>Managed APIs win when the computer vision task is common and your real work is product integration. OCR, logo detection, moderation-like labeling, face-independent image tagging, and document text extraction often fit this category because providers have already trained on broader data than a small team can collect. That does not mean the provider is smarter; it means your team’s marginal dataset is unlikely to beat a mature service quickly.</p>
<p>Vendor limits should shape your design early. Google Cloud Vision publishes an image file limit of <strong>20 MB</strong> for many image requests, while AWS Rekognition lists <strong>5 MB</strong> as the maximum image bytes payload for direct API calls; those are provider-published constraints, and they matter because oversized mobile uploads will fail before your application logic runs. If your images often exceed those limits, resize or store in object storage before calling the API.</p>
<p>Latency needs the same honesty. A realistic web target might be p95 under <strong>700 ms</strong> for an asynchronous preview; treat that as a product-tuned service objective, because a user waiting for a background enrichment result behaves differently from a user blocked on checkout or form submission. If your measured p95 includes network time, serialization, and provider processing, do not compare it against a local GPU benchmark because those are different systems.</p>
<p>Managed APIs cost less engineering time at the beginning because authentication, scaling, model hosting, and basic upgrades are someone else’s problem. They cost more strategic control later because pricing, regional availability, request limits, and model behavior can change outside your sprint plan. That trade is acceptable for many junior-built features because the first risk is usually “nobody uses it,” not “we need perfect model sovereignty.”</p>
<p>Security and privacy can flip the decision. If images contain sensitive internal material, an owned model inside your network may win because reducing external data transfer simplifies review and incident response. If your organization already approves Google Cloud, AWS, or Azure for similar data, the API may still win because existing controls are cheaper than inventing a private ML platform.</p>
<p>Be careful with caching. Caching API responses by image hash can reduce cost because repeated uploads produce identical predictions, but it can also preserve old mistakes because vendor models or thresholds may improve while your cache stays stale. Add a model-provider version field when available, and include your own schema version so that reprocessing is an intentional migration rather than a surprise.</p>
<h2>Run a two-week shootout, then remove the losing path</h2>
<p>Your first concrete move should be a two-week shootout with one API prototype and one owned-model baseline, both judged on the same 300-image sample, the same thresholds, and the same p95 target. Delete the loser after the decision, because keeping both paths “just in case” doubles maintenance for a feature that has not yet earned that complexity.</p>
<p>The post <a href="https://deepfriedbytes.com/custom-vision-model-or-pretrained-api-which-fits-your-first-app/">Custom Vision Model or Pretrained API Which Fits Your First App</a> appeared first on <a href="https://deepfriedbytes.com">Blog about a digital future</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>comments@deepfriedbytes.com (Keith Elder &amp; Chris Woodruff)</dc:creator></item>
		<item>
		<title>AI Computer Vision for Developers: Top Use Cases</title>
		<link>https://deepfriedbytes.com/ai-computer-vision-for-developers-top-use-cases/</link>
		
		
		<pubDate>Wed, 09 Sep 2026 05:14:06 +0000</pubDate>
				<category><![CDATA[AI Computer Vision]]></category>
		<category><![CDATA[Generative AI]]></category>
		<category><![CDATA[AI Integration]]></category>
		<category><![CDATA[AI Web Solutions]]></category>
		<category><![CDATA[Computer Vision]]></category>
		<guid isPermaLink="false">https://deepfriedbytes.com/ai-computer-vision-for-developers-top-use-cases/</guid>

					<description><![CDATA[<p>Artificial intelligence has moved beyond text generation and predictive analytics into the visual layer of software. Computer vision now helps applications understand images, videos, screens, gestures, defects, identities, environments and workflows. This article explains how AI computer vision fits into modern software development, where it creates business value, and what developers should consider when building reliable, scalable visual intelligence features. How AI Computer Vision Changes the Role of Software Applications Traditional software depends heavily on structured input: forms, clicks, typed commands, database records and predefined workflows. Computer vision expands that model by allowing software to interpret unstructured visual data. Instead of waiting for users to describe what they see, an application can detect objects, read documents, recognize patterns, monitor real-world processes and trigger actions based on visual context. This is a major shift because visual data is one of the richest information sources available. Cameras, screenshots, medical scans, satellite images, warehouse footage, retail shelves, manufacturing lines and mobile uploads all contain signals that are difficult to capture manually. AI computer vision turns those signals into usable data for software systems. For development teams, the value is not simply “adding image recognition.” The real value appears when computer vision becomes part of a broader workflow. A model might detect a damaged product, but the application must then create a support ticket, notify a quality manager, update inventory, attach evidence and store the result for future analytics. In other words, computer vision becomes most powerful when it is integrated into business logic, user experience and operational automation. Modern computer vision systems typically rely on machine learning models trained to identify visual patterns. These models can classify images, locate objects, segment regions, track movement, extract text, compare faces, analyze posture or detect anomalies. Developers can use cloud APIs, open-source frameworks, pre-trained models or custom training pipelines depending on the complexity of the task and the sensitivity of the data. At the application level, computer vision can support several types of features: Recognition features, such as identifying products, faces, documents, vehicles, tools or defects. Measurement features, such as counting people, estimating dimensions, calculating distances or monitoring occupancy. Automation features, such as routing claims, approving document scans, flagging unsafe behavior or triggering alerts. User experience features, such as augmented reality overlays, visual search, identity verification and accessibility tools. Quality control features, such as detecting production defects, comparing visual standards or validating installation work. Because of this range, computer vision is relevant not only to AI-focused companies. It matters to logistics platforms, healthcare tools, retail applications, construction software, fintech products, automotive systems, education platforms and enterprise workflow solutions. Any product that deals with visual evidence, physical assets or image-based decisions can potentially benefit from it. However, effective implementation requires more than choosing a model. Developers need to understand the quality of the input data, the environment where images are captured, the acceptable error rate, the user’s tolerance for false positives and the operational cost of mistakes. A model that works well in a controlled demo may fail when lighting changes, cameras move, products overlap or users upload low-quality images. This is why computer vision projects should begin with a clearly defined problem. Instead of asking, “Can we use computer vision?” a stronger question is, “Which visual decision currently slows users down, creates risk or consumes manual effort?” This framing connects AI to measurable outcomes such as faster processing, reduced errors, lower support costs, better compliance or improved user satisfaction. For example, an insurance application may use computer vision to assess vehicle damage from uploaded photos. The goal is not merely to detect scratches; it is to shorten the claims process, reduce manual review and provide faster estimates. A warehouse management system may use computer vision to count pallets or verify barcode placement. The goal is to reduce inventory mismatch and improve operational visibility. A healthcare platform may analyze medical images, but the goal is clinical decision support, not replacing professional judgment. Developers also need to decide whether the AI should operate in real time or asynchronously. Real-time computer vision is useful for safety monitoring, robotics, autonomous navigation, live authentication and interactive AR experiences. Asynchronous processing is often enough for document verification, product inspection, insurance claims, image moderation or medical scan review. This decision affects architecture, latency requirements, infrastructure costs and user interface design. Security and privacy are equally important. Visual data can be highly sensitive because it may include faces, homes, license plates, medical details, workplaces or confidential documents. Software teams should consider encryption, access control, data minimization, anonymization, audit logs and retention policies from the beginning. In regulated industries, compliance requirements may shape where data is processed, how models are trained and whether human review is required. Another key point is explainability. Users and stakeholders often want to know why a system flagged an image, rejected an upload or detected a risk. While not every AI model is fully transparent, developers can improve trust by showing confidence scores, highlighted image regions, comparison references or a clear path for manual correction. Computer vision should support decision-making, not create a mysterious black box that users cannot challenge. Key Use Cases Across Development, Operations and Digital Products The practical use cases of AI computer vision are broad, but they become easier to understand when grouped by the problems they solve. In software development, computer vision is often used to automate visual interpretation, improve user interactions, monitor environments and connect physical-world events to digital systems. One of the most common areas is document and identity processing. Applications can use optical character recognition and image analysis to extract data from IDs, invoices, receipts, contracts, shipping labels and handwritten forms. This is especially useful in banking, insurance, logistics, HR, travel and legal tech. Instead of forcing users to type information manually, an application can scan a document, extract fields, validate formats and prefill workflows. However, document vision is not just OCR. Advanced systems can detect document type, check whether an image is blurry, identify tampering, compare a selfie to an ID photo, verify signatures and flag inconsistent fields. These capabilities reduce fraud, improve onboarding and speed up back-office operations. Developers building such systems must handle edge cases like shadows, glare, folded pages, non-standard layouts and multilingual content. Another high-value use case is quality inspection. In manufacturing, computer vision can detect scratches, dents, missing parts, incorrect labels, color deviations, assembly errors and packaging defects. Unlike manual inspection, AI can operate continuously and analyze large volumes of visual input. The software layer can store defect images, generate reports, send alerts and integrate with production management systems. Quality inspection also appears in software products outside factories. Construction platforms can analyze site photos to verify progress or safety compliance. Retail systems can inspect shelf placement, product availability and planogram accuracy. Field service apps can confirm whether equipment was installed correctly. In each case, computer vision turns visual proof into structured workflow data. Visual search is another important category. Instead of typing keywords, users can upload or capture an image and find matching products, places, components or references. E-commerce platforms use visual search to help shoppers find clothing, furniture or accessories. Industrial platforms use it to identify spare parts. Real estate and design applications can recommend similar interiors or materials. Visual search improves discovery because users often know what something looks like before they know how to describe it. For developers, visual search usually requires image embeddings, similarity search and a well-structured catalog. The application converts images into numerical representations and compares them against stored items. Good results depend on training data, metadata, ranking logic and the user interface. A visual search feature should not only return similar images; it should help users refine results through filters, categories, availability and context. Healthcare and medical imaging represent a more specialized field. Computer vision can assist in analyzing X-rays, CT scans, MRIs, dermatology images, pathology slides and ultrasound data. It can help identify abnormalities, prioritize urgent cases, measure progression and support clinicians with second opinions. This area requires especially careful validation, regulatory compliance and human oversight because errors can affect patient outcomes. In healthcare software, computer vision should be framed as decision support rather than autonomous diagnosis unless strict regulatory approval exists. The application must provide traceability, protect patient data and fit into existing clinical workflows. A technically accurate model may still fail if it interrupts doctors, creates alert fatigue or cannot be integrated with hospital systems. Security and surveillance also benefit from computer vision, but they require responsible design. Systems can detect unauthorized access, suspicious movement, abandoned objects, overcrowding, perimeter breaches or safety gear violations. In workplace safety, computer vision may identify whether employees wear helmets, vests or masks in hazardous areas. In transportation, it can monitor traffic incidents, driver attention or restricted zones. At the same time, these systems raise privacy and ethical concerns. Developers should avoid unnecessary identification, limit data collection and provide clear governance. Not every safety problem requires face recognition. Often, object detection or anonymized movement analysis is enough. The best software solutions balance operational value with privacy-preserving design. Content moderation is another major use case for platforms that handle user-generated images or videos. Computer vision can detect explicit content, violence, hate symbols, fake documents, spam images, brand misuse or unsafe uploads. These systems are especially important for social platforms, marketplaces, education tools, dating apps and community forums. Moderation models should be designed with nuance. A medical education image, a news photo or an artwork may be incorrectly flagged if the system lacks context. Therefore, moderation workflows often combine automated classification with human review, appeal mechanisms and policy-specific thresholds. Developers should build flexible rule layers rather than relying only on one model output. Augmented reality and spatial computing rely heavily on computer vision. Applications can detect surfaces, track objects, understand depth, overlay digital elements and respond to physical environments. Retailers use AR for virtual try-ons and furniture placement. Training platforms use it to guide workers through repairs. Education apps use it to make physical objects interactive. These experiences require fast and stable processing because users expect immediate feedback. Latency, device performance, lighting and camera quality can define whether an AR feature feels useful or frustrating. Developers must optimize not only the model but also rendering, interaction design and fallback behavior when tracking fails. Software development itself can also benefit from computer vision. Testing tools can compare screenshots, detect visual regressions, verify UI layouts and identify broken rendering across devices. Instead of checking only DOM structure or API responses, visual testing validates what users actually see. This is useful for complex interfaces, responsive layouts, design systems and applications with frequent UI changes. AI-enhanced visual testing can detect layout shifts, overlapping elements, missing images, incorrect colors or inconsistent typography. It can also reduce false positives by understanding meaningful differences rather than treating every pixel change as a failure. This improves quality assurance and helps teams release faster with greater confidence. For readers who want a broader view of practical implementation scenarios, AI Computer Vision in Software Development: Top Use Cases provides additional context on how visual AI can be applied across digital products and engineering workflows. Another important area is accessibility. Computer vision can help visually impaired users understand their surroundings, read text from images, identify objects, describe scenes or navigate environments. Applications can generate spoken descriptions of photos, detect obstacles or interpret visual content that would otherwise be unavailable. This expands software usability and supports more inclusive product design. Finally, analytics from visual data is becoming increasingly valuable. Businesses can use computer vision to count foot traffic, understand customer behavior, monitor equipment usage, analyze shelf availability or measure process efficiency. These insights help organizations make decisions based on real-world activity rather than manual reporting. The strongest use cases share a common pattern: they connect visual perception to a concrete decision. The AI model detects something, but the software product makes that detection useful by placing it into a workflow. This is why developers should think beyond model accuracy and focus on the full user journey from image capture to final action. Implementation Strategy, Architecture and Best Practices for Developers Building a successful computer vision feature requires a structured approach. The first step is defining the business objective and the visual task. Is the system classifying an image, detecting objects, segmenting regions, tracking movement, extracting text or comparing similarity? Each task requires different models, data preparation and evaluation methods. For example, image classification answers “What is in this image?” Object detection answers “Where are specific objects located?” Segmentation answers “Which pixels belong to each object or region?” OCR answers “What text is visible?” Tracking answers “How does an object move over time?” Similarity search answers “Which images are visually related?” Choosing the right task prevents unnecessary complexity and improves development efficiency. Data is the foundation of the system. Developers need representative images that reflect real-world conditions. If the application will process warehouse footage, training data should include different lighting, camera angles, object positions, packaging variations and motion blur. If users upload mobile photos, the dataset should include low-resolution images, shadows, rotated documents and imperfect framing. Data labeling is often one of the most time-consuming parts of computer vision projects. Classification labels may be simple, but object detection requires bounding boxes, segmentation requires pixel-level masks and specialized domains may require expert annotation. Poor labels can limit model performance even when the algorithm is advanced. Teams should establish annotation guidelines, review samples and measure label consistency. Developers then need to decide between pre-trained models, fine-tuned models and custom models. Pre-trained models are faster to deploy and suitable for common tasks such as general object detection, OCR or content moderation. Fine-tuning adapts an existing model to a specific dataset, often providing a good balance between speed and accuracy. Custom models are appropriate for highly specialized tasks, but they require more data, expertise and maintenance. Architecture depends on where processing should happen. Cloud-based processing offers scalability, centralized updates and access to powerful hardware. Edge processing, where the model runs on a device or local server, can reduce latency, protect privacy and support offline operation. Hybrid architectures are common: an application may run lightweight checks on-device and send complex cases to the cloud. Performance must be evaluated in practical terms. Accuracy alone is not enough. Teams should measure precision, recall, false positives, false negatives, latency, throughput and stability across different conditions. The right balance depends on the use case. A safety system may prioritize recall to avoid missing dangerous events. A fraud detection system may prioritize precision to avoid blocking legitimate users. A visual search engine may focus on ranking relevance and user satisfaction. The user interface should communicate AI results clearly. If a model detects damage in a photo, the UI can highlight the affected region. If a document scan fails, the app should tell users whether the issue is glare, blur, missing corners or unsupported format. If confidence is low, the system can request another image or escalate to human review. Good UX reduces frustration and helps users collaborate with the AI. Human-in-the-loop workflows are especially important in high-stakes environments. Instead of forcing the AI to make final decisions, software can use the model to prioritize, recommend or prefill information while allowing human validation. This approach improves trust, creates feedback data and reduces the risk of harmful errors. Over time, reviewed cases can help retrain and improve the model. Monitoring is another critical requirement. Computer vision models can degrade when real-world conditions change. A retail model trained on one store format may perform poorly in another. A document model may fail when a new ID design is introduced. A manufacturing inspection system may need updates when materials or equipment change. Developers should monitor model performance, collect failure examples and establish retraining processes. Scalability also needs planning. Image and video data can be heavy, increasing storage, bandwidth and processing costs. Teams should consider compression, thumbnail generation, batch processing, caching, queue-based architectures and lifecycle policies for old visual data. Video analytics may require frame sampling rather than analyzing every frame. The goal is to preserve useful information without creating unsustainable infrastructure costs. Security should be built into the architecture. Visual data should be encrypted in transit and at rest. Access should be restricted based on roles. Sensitive images should not be used for model training without permission and governance. Logs should avoid exposing private content. In some cases, faces, license plates or personal details should be blurred or anonymized before storage. Ethical design is not optional. Computer vision can affect privacy, fairness and user autonomy. Face recognition, emotion detection and surveillance-related features should be evaluated carefully. Bias can occur if training data underrepresents certain environments, skin tones, age groups, document types or cultural contexts. Developers should test across diverse samples and avoid overclaiming what the system can infer. For software developers comparing use cases and implementation options, AI Computer Vision for Software Developers: Key Use Cases is a useful resource for understanding where computer vision can fit into product architecture and engineering decisions. Integration with existing systems is where many projects succeed or fail. A model output must be mapped into business processes, databases, notifications, dashboards and user permissions. For instance, detecting a damaged shipment is only useful if the logistics platform can connect that detection to the order, carrier, warehouse, customer and claims process. The AI component should be treated as part of a complete product ecosystem. Testing should include both technical validation and workflow validation. Developers should test model behavior with edge cases, but they should also test how users respond when the AI is wrong, uncertain or unavailable. The application needs graceful fallback paths. If image processing fails, users may need manual entry, support escalation or delayed review. Reliability includes recovery, not just prediction quality. A practical development roadmap may look like this: Define the target decision: identify the visual input and the action the software should support. Collect representative data: include realistic variations, poor-quality samples and edge cases. Start with a narrow scope: solve one valuable...</p>
<p>The post <a href="https://deepfriedbytes.com/ai-computer-vision-for-developers-top-use-cases/">AI Computer Vision for Developers: Top Use Cases</a> appeared first on <a href="https://deepfriedbytes.com">Blog about a digital future</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Artificial intelligence has moved beyond text generation and predictive analytics into the visual layer of software. Computer vision now helps applications understand images, videos, screens, gestures, defects, identities, environments and workflows. This article explains how AI computer vision fits into modern software development, where it creates business value, and what developers should consider when building reliable, scalable visual intelligence features.</p>
<p><b>How AI Computer Vision Changes the Role of Software Applications</b></p>
<p>Traditional software depends heavily on structured input: forms, clicks, typed commands, database records and predefined workflows. Computer vision expands that model by allowing software to interpret unstructured visual data. Instead of waiting for users to describe what they see, an application can detect objects, read documents, recognize patterns, monitor real-world processes and trigger actions based on visual context.</p>
<p>This is a major shift because visual data is one of the richest information sources available. Cameras, screenshots, medical scans, satellite images, warehouse footage, retail shelves, manufacturing lines and mobile uploads all contain signals that are difficult to capture manually. AI computer vision turns those signals into usable data for software systems.</p>
<p>For development teams, the value is not simply “adding image recognition.” The real value appears when computer vision becomes part of a broader workflow. A model might detect a damaged product, but the application must then create a support ticket, notify a quality manager, update inventory, attach evidence and store the result for future analytics. In other words, computer vision becomes most powerful when it is integrated into business logic, user experience and operational automation.</p>
<p>Modern computer vision systems typically rely on machine learning models trained to identify visual patterns. These models can classify images, locate objects, segment regions, track movement, extract text, compare faces, analyze posture or detect anomalies. Developers can use cloud APIs, open-source frameworks, pre-trained models or custom training pipelines depending on the complexity of the task and the sensitivity of the data.</p>
<p>At the application level, computer vision can support several types of features:</p>
<ul>
<li><b>Recognition features</b>, such as identifying products, faces, documents, vehicles, tools or defects.</li>
<li><b>Measurement features</b>, such as counting people, estimating dimensions, calculating distances or monitoring occupancy.</li>
<li><b>Automation features</b>, such as routing claims, approving document scans, flagging unsafe behavior or triggering alerts.</li>
<li><b>User experience features</b>, such as augmented reality overlays, visual search, identity verification and accessibility tools.</li>
<li><b>Quality control features</b>, such as detecting production defects, comparing visual standards or validating installation work.</li>
</ul>
<p>Because of this range, computer vision is relevant not only to AI-focused companies. It matters to logistics platforms, healthcare tools, retail applications, construction software, fintech products, automotive systems, education platforms and enterprise workflow solutions. Any product that deals with visual evidence, physical assets or image-based decisions can potentially benefit from it.</p>
<p>However, effective implementation requires more than choosing a model. Developers need to understand the quality of the input data, the environment where images are captured, the acceptable error rate, the user’s tolerance for false positives and the operational cost of mistakes. A model that works well in a controlled demo may fail when lighting changes, cameras move, products overlap or users upload low-quality images.</p>
<p>This is why computer vision projects should begin with a clearly defined problem. Instead of asking, “Can we use computer vision?” a stronger question is, “Which visual decision currently slows users down, creates risk or consumes manual effort?” This framing connects AI to measurable outcomes such as faster processing, reduced errors, lower support costs, better compliance or improved user satisfaction.</p>
<p>For example, an insurance application may use computer vision to assess vehicle damage from uploaded photos. The goal is not merely to detect scratches; it is to shorten the claims process, reduce manual review and provide faster estimates. A warehouse management system may use computer vision to count pallets or verify barcode placement. The goal is to reduce inventory mismatch and improve operational visibility. A healthcare platform may analyze medical images, but the goal is clinical decision support, not replacing professional judgment.</p>
<p>Developers also need to decide whether the AI should operate in real time or asynchronously. Real-time computer vision is useful for safety monitoring, robotics, autonomous navigation, live authentication and interactive AR experiences. Asynchronous processing is often enough for document verification, product inspection, insurance claims, image moderation or medical scan review. This decision affects architecture, latency requirements, infrastructure costs and user interface design.</p>
<p>Security and privacy are equally important. Visual data can be highly sensitive because it may include faces, homes, license plates, medical details, workplaces or confidential documents. Software teams should consider encryption, access control, data minimization, anonymization, audit logs and retention policies from the beginning. In regulated industries, compliance requirements may shape where data is processed, how models are trained and whether human review is required.</p>
<p>Another key point is explainability. Users and stakeholders often want to know why a system flagged an image, rejected an upload or detected a risk. While not every AI model is fully transparent, developers can improve trust by showing confidence scores, highlighted image regions, comparison references or a clear path for manual correction. Computer vision should support decision-making, not create a mysterious black box that users cannot challenge.</p>
<p><b>Key Use Cases Across Development, Operations and Digital Products</b></p>
<p>The practical use cases of AI computer vision are broad, but they become easier to understand when grouped by the problems they solve. In software development, computer vision is often used to automate visual interpretation, improve user interactions, monitor environments and connect physical-world events to digital systems.</p>
<p>One of the most common areas is <b>document and identity processing</b>. Applications can use optical character recognition and image analysis to extract data from IDs, invoices, receipts, contracts, shipping labels and handwritten forms. This is especially useful in banking, insurance, logistics, HR, travel and legal tech. Instead of forcing users to type information manually, an application can scan a document, extract fields, validate formats and prefill workflows.</p>
<p>However, document vision is not just OCR. Advanced systems can detect document type, check whether an image is blurry, identify tampering, compare a selfie to an ID photo, verify signatures and flag inconsistent fields. These capabilities reduce fraud, improve onboarding and speed up back-office operations. Developers building such systems must handle edge cases like shadows, glare, folded pages, non-standard layouts and multilingual content.</p>
<p>Another high-value use case is <b>quality inspection</b>. In manufacturing, computer vision can detect scratches, dents, missing parts, incorrect labels, color deviations, assembly errors and packaging defects. Unlike manual inspection, AI can operate continuously and analyze large volumes of visual input. The software layer can store defect images, generate reports, send alerts and integrate with production management systems.</p>
<p>Quality inspection also appears in software products outside factories. Construction platforms can analyze site photos to verify progress or safety compliance. Retail systems can inspect shelf placement, product availability and planogram accuracy. Field service apps can confirm whether equipment was installed correctly. In each case, computer vision turns visual proof into structured workflow data.</p>
<p><b>Visual search</b> is another important category. Instead of typing keywords, users can upload or capture an image and find matching products, places, components or references. E-commerce platforms use visual search to help shoppers find clothing, furniture or accessories. Industrial platforms use it to identify spare parts. Real estate and design applications can recommend similar interiors or materials. Visual search improves discovery because users often know what something looks like before they know how to describe it.</p>
<p>For developers, visual search usually requires image embeddings, similarity search and a well-structured catalog. The application converts images into numerical representations and compares them against stored items. Good results depend on training data, metadata, ranking logic and the user interface. A visual search feature should not only return similar images; it should help users refine results through filters, categories, availability and context.</p>
<p><b>Healthcare and medical imaging</b> represent a more specialized field. Computer vision can assist in analyzing X-rays, CT scans, MRIs, dermatology images, pathology slides and ultrasound data. It can help identify abnormalities, prioritize urgent cases, measure progression and support clinicians with second opinions. This area requires especially careful validation, regulatory compliance and human oversight because errors can affect patient outcomes.</p>
<p>In healthcare software, computer vision should be framed as decision support rather than autonomous diagnosis unless strict regulatory approval exists. The application must provide traceability, protect patient data and fit into existing clinical workflows. A technically accurate model may still fail if it interrupts doctors, creates alert fatigue or cannot be integrated with hospital systems.</p>
<p><b>Security and surveillance</b> also benefit from computer vision, but they require responsible design. Systems can detect unauthorized access, suspicious movement, abandoned objects, overcrowding, perimeter breaches or safety gear violations. In workplace safety, computer vision may identify whether employees wear helmets, vests or masks in hazardous areas. In transportation, it can monitor traffic incidents, driver attention or restricted zones.</p>
<p>At the same time, these systems raise privacy and ethical concerns. Developers should avoid unnecessary identification, limit data collection and provide clear governance. Not every safety problem requires face recognition. Often, object detection or anonymized movement analysis is enough. The best software solutions balance operational value with privacy-preserving design.</p>
<p><b>Content moderation</b> is another major use case for platforms that handle user-generated images or videos. Computer vision can detect explicit content, violence, hate symbols, fake documents, spam images, brand misuse or unsafe uploads. These systems are especially important for social platforms, marketplaces, education tools, dating apps and community forums.</p>
<p>Moderation models should be designed with nuance. A medical education image, a news photo or an artwork may be incorrectly flagged if the system lacks context. Therefore, moderation workflows often combine automated classification with human review, appeal mechanisms and policy-specific thresholds. Developers should build flexible rule layers rather than relying only on one model output.</p>
<p><b>Augmented reality and spatial computing</b> rely heavily on computer vision. Applications can detect surfaces, track objects, understand depth, overlay digital elements and respond to physical environments. Retailers use AR for virtual try-ons and furniture placement. Training platforms use it to guide workers through repairs. Education apps use it to make physical objects interactive.</p>
<p>These experiences require fast and stable processing because users expect immediate feedback. Latency, device performance, lighting and camera quality can define whether an AR feature feels useful or frustrating. Developers must optimize not only the model but also rendering, interaction design and fallback behavior when tracking fails.</p>
<p><b>Software development itself</b> can also benefit from computer vision. Testing tools can compare screenshots, detect visual regressions, verify UI layouts and identify broken rendering across devices. Instead of checking only DOM structure or API responses, visual testing validates what users actually see. This is useful for complex interfaces, responsive layouts, design systems and applications with frequent UI changes.</p>
<p>AI-enhanced visual testing can detect layout shifts, overlapping elements, missing images, incorrect colors or inconsistent typography. It can also reduce false positives by understanding meaningful differences rather than treating every pixel change as a failure. This improves quality assurance and helps teams release faster with greater confidence.</p>
<p>For readers who want a broader view of practical implementation scenarios, <a href="/ai-computer-vision-in-software-development-top-use-cases/">AI Computer Vision in Software Development: Top Use Cases</a> provides additional context on how visual AI can be applied across digital products and engineering workflows.</p>
<p>Another important area is <b>accessibility</b>. Computer vision can help visually impaired users understand their surroundings, read text from images, identify objects, describe scenes or navigate environments. Applications can generate spoken descriptions of photos, detect obstacles or interpret visual content that would otherwise be unavailable. This expands software usability and supports more inclusive product design.</p>
<p>Finally, <b>analytics from visual data</b> is becoming increasingly valuable. Businesses can use computer vision to count foot traffic, understand customer behavior, monitor equipment usage, analyze shelf availability or measure process efficiency. These insights help organizations make decisions based on real-world activity rather than manual reporting.</p>
<p>The strongest use cases share a common pattern: they connect visual perception to a concrete decision. The AI model detects something, but the software product makes that detection useful by placing it into a workflow. This is why developers should think beyond model accuracy and focus on the full user journey from image capture to final action.</p>
<p><b>Implementation Strategy, Architecture and Best Practices for Developers</b></p>
<p>Building a successful computer vision feature requires a structured approach. The first step is defining the business objective and the visual task. Is the system classifying an image, detecting objects, segmenting regions, tracking movement, extracting text or comparing similarity? Each task requires different models, data preparation and evaluation methods.</p>
<p>For example, image classification answers “What is in this image?” Object detection answers “Where are specific objects located?” Segmentation answers “Which pixels belong to each object or region?” OCR answers “What text is visible?” Tracking answers “How does an object move over time?” Similarity search answers “Which images are visually related?” Choosing the right task prevents unnecessary complexity and improves development efficiency.</p>
<p>Data is the foundation of the system. Developers need representative images that reflect real-world conditions. If the application will process warehouse footage, training data should include different lighting, camera angles, object positions, packaging variations and motion blur. If users upload mobile photos, the dataset should include low-resolution images, shadows, rotated documents and imperfect framing.</p>
<p>Data labeling is often one of the most time-consuming parts of computer vision projects. Classification labels may be simple, but object detection requires bounding boxes, segmentation requires pixel-level masks and specialized domains may require expert annotation. Poor labels can limit model performance even when the algorithm is advanced. Teams should establish annotation guidelines, review samples and measure label consistency.</p>
<p>Developers then need to decide between <b>pre-trained models</b>, <b>fine-tuned models</b> and <b>custom models</b>. Pre-trained models are faster to deploy and suitable for common tasks such as general object detection, OCR or content moderation. Fine-tuning adapts an existing model to a specific dataset, often providing a good balance between speed and accuracy. Custom models are appropriate for highly specialized tasks, but they require more data, expertise and maintenance.</p>
<p>Architecture depends on where processing should happen. Cloud-based processing offers scalability, centralized updates and access to powerful hardware. Edge processing, where the model runs on a device or local server, can reduce latency, protect privacy and support offline operation. Hybrid architectures are common: an application may run lightweight checks on-device and send complex cases to the cloud.</p>
<p>Performance must be evaluated in practical terms. Accuracy alone is not enough. Teams should measure precision, recall, false positives, false negatives, latency, throughput and stability across different conditions. The right balance depends on the use case. A safety system may prioritize recall to avoid missing dangerous events. A fraud detection system may prioritize precision to avoid blocking legitimate users. A visual search engine may focus on ranking relevance and user satisfaction.</p>
<p>The user interface should communicate AI results clearly. If a model detects damage in a photo, the UI can highlight the affected region. If a document scan fails, the app should tell users whether the issue is glare, blur, missing corners or unsupported format. If confidence is low, the system can request another image or escalate to human review. Good UX reduces frustration and helps users collaborate with the AI.</p>
<p>Human-in-the-loop workflows are especially important in high-stakes environments. Instead of forcing the AI to make final decisions, software can use the model to prioritize, recommend or prefill information while allowing human validation. This approach improves trust, creates feedback data and reduces the risk of harmful errors. Over time, reviewed cases can help retrain and improve the model.</p>
<p>Monitoring is another critical requirement. Computer vision models can degrade when real-world conditions change. A retail model trained on one store format may perform poorly in another. A document model may fail when a new ID design is introduced. A manufacturing inspection system may need updates when materials or equipment change. Developers should monitor model performance, collect failure examples and establish retraining processes.</p>
<p>Scalability also needs planning. Image and video data can be heavy, increasing storage, bandwidth and processing costs. Teams should consider compression, thumbnail generation, batch processing, caching, queue-based architectures and lifecycle policies for old visual data. Video analytics may require frame sampling rather than analyzing every frame. The goal is to preserve useful information without creating unsustainable infrastructure costs.</p>
<p>Security should be built into the architecture. Visual data should be encrypted in transit and at rest. Access should be restricted based on roles. Sensitive images should not be used for model training without permission and governance. Logs should avoid exposing private content. In some cases, faces, license plates or personal details should be blurred or anonymized before storage.</p>
<p>Ethical design is not optional. Computer vision can affect privacy, fairness and user autonomy. Face recognition, emotion detection and surveillance-related features should be evaluated carefully. Bias can occur if training data underrepresents certain environments, skin tones, age groups, document types or cultural contexts. Developers should test across diverse samples and avoid overclaiming what the system can infer.</p>
<p>For software developers comparing use cases and implementation options, <a href="/ai-computer-vision-for-software-developers-key-use-cases/">AI Computer Vision for Software Developers: Key Use Cases</a> is a useful resource for understanding where computer vision can fit into product architecture and engineering decisions.</p>
<p>Integration with existing systems is where many projects succeed or fail. A model output must be mapped into business processes, databases, notifications, dashboards and user permissions. For instance, detecting a damaged shipment is only useful if the logistics platform can connect that detection to the order, carrier, warehouse, customer and claims process. The AI component should be treated as part of a complete product ecosystem.</p>
<p>Testing should include both technical validation and workflow validation. Developers should test model behavior with edge cases, but they should also test how users respond when the AI is wrong, uncertain or unavailable. The application needs graceful fallback paths. If image processing fails, users may need manual entry, support escalation or delayed review. Reliability includes recovery, not just prediction quality.</p>
<p>A practical development roadmap may look like this:</p>
<ul>
<li><b>Define the target decision</b>: identify the visual input and the action the software should support.</li>
<li><b>Collect representative data</b>: include realistic variations, poor-quality samples and edge cases.</li>
<li><b>Start with a narrow scope</b>: solve one valuable problem before expanding to multiple visual tasks.</li>
<li><b>Choose the right model approach</b>: use pre-trained, fine-tuned or custom models based on complexity.</li>
<li><b>Design the workflow</b>: decide when AI acts automatically and when humans review results.</li>
<li><b>Measure real performance</b>: evaluate accuracy, latency, error cost and user satisfaction.</li>
<li><b>Monitor after launch</b>: track failures, drift, feedback and operational impact.</li>
</ul>
<p>One of the best strategies is to begin with an assisted workflow rather than full automation. For example, an application can suggest extracted document fields but allow users to confirm them. A quality inspection system can flag likely defects for review before automatically rejecting products. This reduces risk while generating valuable feedback for improvement.</p>
<p>Teams should also avoid building computer vision features only because the technology is impressive. The feature must make the product simpler, faster, safer or more valuable. If users still need to manually verify every result without time savings, the implementation may not justify its complexity. Successful visual AI solves a real bottleneck and fits naturally into how people already work.</p>
<p>From an SEO and product positioning perspective, companies should explain computer vision features in terms users understand. Instead of saying “we use deep learning-based object detection,” a product page might say “automatically identify damaged items in uploaded delivery photos.” Business buyers care about outcomes: fewer errors, faster approvals, lower operating costs, stronger compliance and better customer experience.</p>
<p>As the technology matures, computer vision will become a standard component of many software products. More tools will offer pre-trained models, synthetic data generation, easier annotation, multimodal AI and low-code integration. At the same time, expectations will rise. Users will demand accuracy, transparency, privacy and smooth workflows. Developers who combine technical skill with responsible product design will create the most durable value.</p>
<p>AI computer vision gives software the ability to interpret the visual world and turn images or video into action. Its strongest use cases connect perception with practical workflows: verification, inspection, search, safety, accessibility and analytics. To succeed, developers must define clear goals, use representative data, design trustworthy interfaces and monitor performance. Done well, computer vision makes applications more intelligent, efficient and useful.</p>
<p>The post <a href="https://deepfriedbytes.com/ai-computer-vision-for-developers-top-use-cases/">AI Computer Vision for Developers: Top Use Cases</a> appeared first on <a href="https://deepfriedbytes.com">Blog about a digital future</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>comments@deepfriedbytes.com (Keith Elder &amp; Chris Woodruff)</dc:creator></item>
	</channel>
</rss>